@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
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
{% import "helpers/code.html.nunj" as codeMacro %}
|
|
2
|
+
{% import "helpers/type.html.nunj" as typeMacro %}
|
|
3
|
+
{% import "helpers/declaration-modifiers.html.nunj" as tagsMacro %}
|
|
4
|
+
{% import "helpers/parameters.html.nunj" as parametersMacro %}
|
|
5
|
+
{% import "helpers/decorators.html.nunj" as decoratorsMacro %}
|
|
6
|
+
{% import "helpers/no-content.html.nunj" as noContentMacro %}
|
|
7
|
+
{% import "helpers/modifier.html.nunj" as modifierMacro %}
|
|
8
|
+
|
|
9
|
+
{% macro render(accessor, origin) %}
|
|
10
|
+
{% macro renderAccessor(accessor, type, origin) %}
|
|
11
|
+
{% set parameters = accessor.getParameters() %}
|
|
12
|
+
{% set accessorChain = accessor | getAccessorChain %}
|
|
13
|
+
{% set inheritedFrom = accessor | getInheritedParent(origin) %}
|
|
14
|
+
{% set overriddenMember = accessor | getOverriddenMember %}
|
|
15
|
+
{% set implementedMember = accessor | getImplementedMember %}
|
|
16
|
+
{% set docNode = accessorChain | firstNodeWithComment %}
|
|
17
|
+
|
|
18
|
+
<div class="ng-doc-table-wrapper">
|
|
19
|
+
<table class="ng-doc-accessor-table">
|
|
20
|
+
<thead>
|
|
21
|
+
<tr>
|
|
22
|
+
<th>
|
|
23
|
+
{{ decoratorsMacro.render(accessor.getDecorators()) if accessor.getDecorators }}
|
|
24
|
+
{{ tagsMacro.render(accessor, 'modifier') }}
|
|
25
|
+
<h3>{{ modifierMacro.render(type) }} {{ accessor.getName() }}</h3>
|
|
26
|
+
<div class="ng-doc-node-details">
|
|
27
|
+
{%- if inheritedFrom %}
|
|
28
|
+
inherited from <code>{{ inheritedFrom.getName() }}</code>
|
|
29
|
+
{%- elseif overriddenMember %}
|
|
30
|
+
overrides <code>{{ overriddenMember.getParent().getName() }}</code>
|
|
31
|
+
{%- elseif implementedMember %}
|
|
32
|
+
implements <code>{{ implementedMember.getParent().getName() }}</code>
|
|
33
|
+
{%- endif %}
|
|
34
|
+
</div>
|
|
35
|
+
</th>
|
|
36
|
+
</tr>
|
|
37
|
+
</thead>
|
|
38
|
+
<tbody>
|
|
39
|
+
<tr>
|
|
40
|
+
<td>
|
|
41
|
+
{% set description = docNode | extractDocs %}
|
|
42
|
+
|
|
43
|
+
{{ description if description else noContentMacro.render('No documentation has been provided.') }}
|
|
44
|
+
</td>
|
|
45
|
+
</tr>
|
|
46
|
+
<tr>
|
|
47
|
+
<td>
|
|
48
|
+
<h5 class="no-anchor">Presentation</h5>
|
|
49
|
+
{{ codeMacro.render(accessor | accessorPresentation, "typescript", false) }}
|
|
50
|
+
</td>
|
|
51
|
+
</tr>
|
|
52
|
+
<tr>
|
|
53
|
+
<td>
|
|
54
|
+
<h5 class="no-anchor">Type</h5>
|
|
55
|
+
<p>
|
|
56
|
+
{{ typeMacro.render(accessor.getType()) }}
|
|
57
|
+
</p>
|
|
58
|
+
</td>
|
|
59
|
+
</tr>
|
|
60
|
+
</tbody>
|
|
61
|
+
</table>
|
|
62
|
+
</div>
|
|
63
|
+
{% endmacro %}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
{{ renderAccessor(accessor.get, "get", origin) if accessor.get }}
|
|
67
|
+
{{ renderAccessor(accessor.set, "set", origin) if accessor.set }}
|
|
68
|
+
{% endmacro %}
|
|
@@ -12,20 +12,20 @@
|
|
|
12
12
|
{%- if type == 'badge' %}
|
|
13
13
|
{%- if isAbstract or isStatic or isAsync or isReadonly %}
|
|
14
14
|
<span class="ng-doc-badge-wrapper" ngDocTooltip="{{ tooltip }}">
|
|
15
|
-
{{ badgeMacro.render("
|
|
16
|
-
{{ badgeMacro.render("
|
|
17
|
-
{{ badgeMacro.render("
|
|
18
|
-
{{ badgeMacro.render("
|
|
15
|
+
{{ badgeMacro.render("abstract") if isAbstract }}
|
|
16
|
+
{{ badgeMacro.render("static") if isStatic }}
|
|
17
|
+
{{ badgeMacro.render("async") if isAsync }}
|
|
18
|
+
{{ badgeMacro.render("readonly") if isReadonly }}
|
|
19
19
|
</span>
|
|
20
20
|
{%- endif %}
|
|
21
21
|
|
|
22
22
|
{%- elseif type == 'modifier' %}
|
|
23
23
|
{%- if isAbstract or isStatic or isAsync or isReadonly %}
|
|
24
24
|
<div class="ng-doc-modifiers-wrapper">
|
|
25
|
-
{{ modifierMacro.render("
|
|
26
|
-
{{ modifierMacro.render("
|
|
27
|
-
{{ modifierMacro.render("
|
|
28
|
-
{{ modifierMacro.render("
|
|
25
|
+
{{ modifierMacro.render("abstract") if isAbstract }}
|
|
26
|
+
{{ modifierMacro.render("static") if isStatic }}
|
|
27
|
+
{{ modifierMacro.render("async") if isAsync }}
|
|
28
|
+
{{ modifierMacro.render("readonly") if isReadonly }}
|
|
29
29
|
</div>
|
|
30
30
|
{%- endif %}
|
|
31
31
|
{%- else %}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
{% import "helpers/decorators.html.nunj" as decoratorsMacro %}
|
|
6
6
|
{% import "helpers/no-content.html.nunj" as noContentMacro %}
|
|
7
7
|
|
|
8
|
-
{% macro render(method,
|
|
8
|
+
{% macro render(method, origin) %}
|
|
9
9
|
{% set parameters = method.getParameters() %}
|
|
10
10
|
{% set methodChain = method | getMethodChain %}
|
|
11
|
-
{% set inheritedFrom = method
|
|
12
|
-
{% set
|
|
13
|
-
{% set
|
|
11
|
+
{% set inheritedFrom = method | getInheritedParent(origin) %}
|
|
12
|
+
{% set overriddenMember = method | getOverriddenMember %}
|
|
13
|
+
{% set implementedMember = method | getImplementedMember %}
|
|
14
14
|
{% set docNode = methodChain | firstNodeWithComment %}
|
|
15
15
|
|
|
16
16
|
<div class="ng-doc-table-wrapper">
|
|
@@ -20,14 +20,14 @@
|
|
|
20
20
|
<th>
|
|
21
21
|
{{ decoratorsMacro.render(method.getDecorators()) if method.getDecorators }}
|
|
22
22
|
{{ tagsMacro.render(method, 'modifier') }}
|
|
23
|
-
<h3>{{ method.getName() }}</h3>
|
|
23
|
+
<h3>{{ method.getName() }}()</h3>
|
|
24
24
|
<div class="ng-doc-node-details">
|
|
25
25
|
{%- if inheritedFrom %}
|
|
26
26
|
inherited from <code>{{ inheritedFrom.getName() }}</code>
|
|
27
|
-
{%- elseif
|
|
28
|
-
overrides <code>{{
|
|
29
|
-
{%- elseif
|
|
30
|
-
implements <code>{{
|
|
27
|
+
{%- elseif overriddenMember %}
|
|
28
|
+
overrides <code>{{ (overriddenMember | getMemberParent).getName() }}</code>
|
|
29
|
+
{%- elseif implementedMember %}
|
|
30
|
+
implements <code>{{ (implementedMember | getMemberParent).getName() }}</code>
|
|
31
31
|
{%- endif %}
|
|
32
32
|
</div>
|
|
33
33
|
</th>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
{% import "helpers/type.html.nunj" as typeMacro %}
|
|
2
2
|
{% import "helpers/declaration-modifiers.html.nunj" as tagsMacro %}
|
|
3
|
+
{% import "helpers/decorators.html.nunj" as decoratorsMacro %}
|
|
3
4
|
|
|
4
5
|
{% macro render(parameters, origin) %}
|
|
5
6
|
<div class="ng-doc-table-wrapper">
|
|
@@ -13,8 +14,26 @@
|
|
|
13
14
|
</thead>
|
|
14
15
|
<tbody>
|
|
15
16
|
{%- for param in parameters %}
|
|
17
|
+
{% set paramChain = param | getPropertyChain %}
|
|
18
|
+
{% set inheritedFrom = param | getInheritedParent(origin) %}
|
|
19
|
+
{% set overriddenMember = param | getOverriddenMember %}
|
|
20
|
+
{% set implementedMember = param | getImplementedMember %}
|
|
21
|
+
{% set docNode = paramChain | firstNodeWithComment %}
|
|
22
|
+
|
|
16
23
|
<tr>
|
|
17
|
-
<td>
|
|
24
|
+
<td>
|
|
25
|
+
{{ decoratorsMacro.render(param.getDecorators(), true) if param.getDecorators }}
|
|
26
|
+
{{ tagsMacro.render(param, "badge") }}{{ param.getName() }}
|
|
27
|
+
<div class="ng-doc-node-details">
|
|
28
|
+
{%- if inheritedFrom %}
|
|
29
|
+
inherited from <code>{{ inheritedFrom.getName() }}</code>
|
|
30
|
+
{%- elseif overriddenMember %}
|
|
31
|
+
overrides <code>{{ (overriddenMember | getMemberParent).getName() }}</code>
|
|
32
|
+
{%- elseif implementedMember %}
|
|
33
|
+
implements <code>{{ (implementedMember | getMemberParent).getName() }}</code>
|
|
34
|
+
{%- endif %}
|
|
35
|
+
</div>
|
|
36
|
+
</td>
|
|
18
37
|
<td>{{ typeMacro.render(param.getType()) }}</td>
|
|
19
38
|
<td>{{ origin | extractParameterDocs(param.getName()) }}</td>
|
|
20
39
|
</tr>
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
{% import "helpers/declaration-modifiers.html.nunj" as tagsMacro %}
|
|
3
3
|
{% import "helpers/decorators.html.nunj" as decoratorsMacro %}
|
|
4
4
|
|
|
5
|
-
{% macro render(properties,
|
|
5
|
+
{% macro render(properties, origin) %}
|
|
6
6
|
<div class="ng-doc-table-wrapper">
|
|
7
7
|
<table class="ng-doc-properties-table">
|
|
8
8
|
<thead>
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
<tbody>
|
|
16
16
|
{%- for property in properties %}
|
|
17
17
|
{% set propertyChain = property | getPropertyChain %}
|
|
18
|
-
{% set inheritedFrom = property
|
|
19
|
-
{% set
|
|
20
|
-
{% set
|
|
18
|
+
{% set inheritedFrom = property | getInheritedParent(origin) %}
|
|
19
|
+
{% set overriddenMember = property | getOverriddenMember %}
|
|
20
|
+
{% set implementedMember = property | getImplementedMember %}
|
|
21
21
|
{% set docNode = propertyChain | firstNodeWithComment %}
|
|
22
22
|
|
|
23
23
|
<tr>
|
|
@@ -27,12 +27,10 @@
|
|
|
27
27
|
<div class="ng-doc-node-details">
|
|
28
28
|
{%- if inheritedFrom %}
|
|
29
29
|
inherited from <code>{{ inheritedFrom.getName() }}</code>
|
|
30
|
-
{%- elseif
|
|
31
|
-
overrides
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
implements
|
|
35
|
-
<code>{{ implementedProperty.getParent().getName() }}</code>
|
|
30
|
+
{%- elseif overriddenMember %}
|
|
31
|
+
overrides <code>{{ (overriddenMember | getMemberParent).getName() }}</code>
|
|
32
|
+
{%- elseif implementedMember %}
|
|
33
|
+
implements <code>{{ (implementedMember | getMemberParent).getName() }}</code>
|
|
36
34
|
{%- endif %}
|
|
37
35
|
</div>
|
|
38
36
|
</td>
|
|
@@ -3,11 +3,12 @@
|
|
|
3
3
|
|
|
4
4
|
<div class="ng-doc-page-tags">
|
|
5
5
|
{% set selectors = declaration | extractSelectors %}
|
|
6
|
+
{% set declarationType = declaration | getDeclarationType %}
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
{{ tagMacro.render(scope.name, "ng-doc-scope") }}
|
|
9
10
|
<span class="ng-doc-inline-delimiter">/</span>
|
|
10
|
-
{{ tagMacro.render(
|
|
11
|
+
{{ tagMacro.render(declarationType) if declarationType }}
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
{%- if declaration.getDecorators and declaration.getDecorators().length %}
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -4,6 +4,7 @@ const tslib_1 = require("tslib");
|
|
|
4
4
|
tslib_1.__exportStar(require("./action"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./artifact-processor"), exports);
|
|
6
6
|
tslib_1.__exportStar(require("./constructable"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./keyword-type"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./snippet-type"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./supported-declarations"), exports);
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,0DAAgC;AAChC,yDAA+B;AAC/B,mEAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,0DAAgC;AAChC,yDAA+B;AAC/B,yDAA+B;AAC/B,mEAAyC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keyword-type.js","sourceRoot":"","sources":["../../../../libs/builder/types/keyword-type.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
|
-
tslib_1.__exportStar(require("./page-map.component"), exports);
|
|
5
|
-
tslib_1.__exportStar(require("./page-map.module"), exports);
|
|
6
|
-
tslib_1.__exportStar(require("./page-map-element/page-map-element.component"), exports);
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getImplementedMethod = void 0;
|
|
4
|
-
const core_1 = require("@ng-doc/core");
|
|
5
|
-
const ts_morph_1 = require("ts-morph");
|
|
6
|
-
const class_1 = require("../class");
|
|
7
|
-
const find_interface_1 = require("../interface/find-interface");
|
|
8
|
-
/**
|
|
9
|
-
* Returns method that was implemented by the provided one
|
|
10
|
-
*
|
|
11
|
-
* @param method - Target method
|
|
12
|
-
*/
|
|
13
|
-
function getImplementedMethod(method) {
|
|
14
|
-
const parent = method.getParent();
|
|
15
|
-
const name = method.getName();
|
|
16
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
-
const mtd = (0, class_1.findBaseClass)(parent, (cls) => !!cls.getMethod(name))?.getMethod(name);
|
|
18
|
-
if (mtd?.isAbstract) {
|
|
19
|
-
return mtd;
|
|
20
|
-
}
|
|
21
|
-
const nodes = parent
|
|
22
|
-
.getImplements()
|
|
23
|
-
.map((expr) => expr.getType().getSymbol()?.getDeclarations()[0])
|
|
24
|
-
.filter(core_1.isPresent)
|
|
25
|
-
// Reverse implements because the latest one overrides previous one
|
|
26
|
-
.reverse();
|
|
27
|
-
for (const node of nodes) {
|
|
28
|
-
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
29
|
-
const mtd = (0, class_1.findClass)(node, (cls) => !!cls.getMethod(name))?.getMethod(name);
|
|
30
|
-
if (mtd?.isAbstract) {
|
|
31
|
-
return mtd;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
|
|
35
|
-
const mtd = (0, find_interface_1.findInterface)(node, (int) => !!int.getMethod(name))?.getMethod(name);
|
|
36
|
-
if (mtd) {
|
|
37
|
-
return mtd;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
exports.getImplementedMethod = getImplementedMethod;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOverriddenMethod = void 0;
|
|
4
|
-
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
const class_1 = require("../class");
|
|
6
|
-
const interface_1 = require("../interface");
|
|
7
|
-
/**
|
|
8
|
-
* Returns method that was overridden by the provided one
|
|
9
|
-
*
|
|
10
|
-
* @param method - Target method
|
|
11
|
-
*/
|
|
12
|
-
function getOverriddenMethod(method) {
|
|
13
|
-
const parent = method.getParent();
|
|
14
|
-
const name = method.getName();
|
|
15
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
16
|
-
return (0, class_1.findBaseClass)(parent, (cls) => {
|
|
17
|
-
const mtd = cls.getMethod(name);
|
|
18
|
-
return !!mtd && !mtd.isAbstract();
|
|
19
|
-
})?.getMethod(name);
|
|
20
|
-
}
|
|
21
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
22
|
-
return (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getMethod(name))?.getMethod(name);
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
exports.getOverriddenMethod = getOverriddenMethod;
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getImplementedProperty = void 0;
|
|
4
|
-
const core_1 = require("@ng-doc/core");
|
|
5
|
-
const ts_morph_1 = require("ts-morph");
|
|
6
|
-
const class_1 = require("../class");
|
|
7
|
-
const find_interface_1 = require("../interface/find-interface");
|
|
8
|
-
/**
|
|
9
|
-
* Returns property that was implemented by the provided one
|
|
10
|
-
*
|
|
11
|
-
* @param property - Target property
|
|
12
|
-
*/
|
|
13
|
-
function getImplementedProperty(property) {
|
|
14
|
-
const parent = property.getParent();
|
|
15
|
-
const name = property.getName();
|
|
16
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
-
const prop = (0, class_1.findBaseClass)(parent, (cls) => !!cls.getProperty(name))?.getProperty(name);
|
|
18
|
-
if (prop?.isAbstract) {
|
|
19
|
-
return prop;
|
|
20
|
-
}
|
|
21
|
-
const nodes = parent
|
|
22
|
-
.getImplements()
|
|
23
|
-
.map((expr) => expr.getType().getSymbol()?.getDeclarations()[0])
|
|
24
|
-
.filter(core_1.isPresent)
|
|
25
|
-
// Reverse implements because the latest one overrides previous one
|
|
26
|
-
.reverse();
|
|
27
|
-
for (const node of nodes) {
|
|
28
|
-
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
29
|
-
const prop = (0, class_1.findClass)(node, (cls) => !!cls.getProperty(name))?.getProperty(name);
|
|
30
|
-
if (prop?.isAbstract) {
|
|
31
|
-
return prop;
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
|
|
35
|
-
const prop = (0, find_interface_1.findInterface)(node, (int) => !!int.getProperty(name))?.getProperty(name);
|
|
36
|
-
if (prop) {
|
|
37
|
-
return prop;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
return undefined;
|
|
43
|
-
}
|
|
44
|
-
exports.getImplementedProperty = getImplementedProperty;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOverriddenProperty = void 0;
|
|
4
|
-
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
const class_1 = require("../class");
|
|
6
|
-
const interface_1 = require("../interface");
|
|
7
|
-
/**
|
|
8
|
-
* Returns property that was overridden by the provided one
|
|
9
|
-
*
|
|
10
|
-
* @param property - Target method
|
|
11
|
-
*/
|
|
12
|
-
function getOverriddenProperty(property) {
|
|
13
|
-
const parent = property.getParent();
|
|
14
|
-
const name = property.getName();
|
|
15
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
16
|
-
return (0, class_1.findBaseClass)(parent, (cls) => {
|
|
17
|
-
const prop = cls.getProperty(name);
|
|
18
|
-
return !!prop && !prop.isAbstract();
|
|
19
|
-
})?.getProperty(name);
|
|
20
|
-
}
|
|
21
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
22
|
-
return (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getProperty(name))?.getProperty(name);
|
|
23
|
-
}
|
|
24
|
-
return undefined;
|
|
25
|
-
}
|
|
26
|
-
exports.getOverriddenProperty = getOverriddenProperty;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.humanizeDeclarationName = void 0;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param declarationName
|
|
7
|
-
*/
|
|
8
|
-
function humanizeDeclarationName(declarationName) {
|
|
9
|
-
return declarationName
|
|
10
|
-
.replace('Declaration', '')
|
|
11
|
-
.replace(/([a-z])([A-Z])/g, '$1 $2');
|
|
12
|
-
}
|
|
13
|
-
exports.humanizeDeclarationName = humanizeDeclarationName;
|
|
@@ -1,7 +0,0 @@
|
|
|
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;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getImplementedMethod = void 0;
|
|
4
|
-
const core_1 = require("@ng-doc/core");
|
|
5
|
-
const ts_morph_1 = require("ts-morph");
|
|
6
|
-
const class_1 = require("../class");
|
|
7
|
-
const find_interface_1 = require("../interface/find-interface");
|
|
8
|
-
/**
|
|
9
|
-
* Returns method that was implemented by the provided one
|
|
10
|
-
*
|
|
11
|
-
* @param method - Target method
|
|
12
|
-
*/
|
|
13
|
-
function getImplementedMethod(method) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
const parent = method.getParent();
|
|
16
|
-
const name = method.getName();
|
|
17
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
18
|
-
const mtd = (_a = (0, class_1.findBaseClass)(parent, (cls) => !!cls.getMethod(name))) === null || _a === void 0 ? void 0 : _a.getMethod(name);
|
|
19
|
-
if (mtd === null || mtd === void 0 ? void 0 : mtd.isAbstract) {
|
|
20
|
-
return mtd;
|
|
21
|
-
}
|
|
22
|
-
const nodes = parent
|
|
23
|
-
.getImplements()
|
|
24
|
-
.map((expr) => { var _a; return (_a = expr.getType().getSymbol()) === null || _a === void 0 ? void 0 : _a.getDeclarations()[0]; })
|
|
25
|
-
.filter(core_1.isPresent)
|
|
26
|
-
// Reverse implements because the latest one overrides previous one
|
|
27
|
-
.reverse();
|
|
28
|
-
for (const node of nodes) {
|
|
29
|
-
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
30
|
-
const mtd = (_b = (0, class_1.findClass)(node, (cls) => !!cls.getMethod(name))) === null || _b === void 0 ? void 0 : _b.getMethod(name);
|
|
31
|
-
if (mtd === null || mtd === void 0 ? void 0 : mtd.isAbstract) {
|
|
32
|
-
return mtd;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
|
|
36
|
-
const mtd = (_c = (0, find_interface_1.findInterface)(node, (int) => !!int.getMethod(name))) === null || _c === void 0 ? void 0 : _c.getMethod(name);
|
|
37
|
-
if (mtd) {
|
|
38
|
-
return mtd;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
exports.getImplementedMethod = getImplementedMethod;
|
|
46
|
-
//# sourceMappingURL=get-implemented-method.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-implemented-method.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/method/get-implemented-method.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAOkB;AAElB,oCAAkD;AAClD,gEAA0D;AAE1D;;;;GAIG;AACH,SAAgB,oBAAoB,CACnC,MAA2C;;IAE3C,MAAM,MAAM,GAAqB,MAAM,CAAC,SAAS,EAAE,CAAC;IACpD,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;IAEtC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,MAAM,GAAG,GAAkC,MAAA,IAAA,qBAAa,EACvD,MAAM,EACN,CAAC,GAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAChD,0CAAE,SAAS,CAAC,IAAI,CAAC,CAAC;QAEnB,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;YACpB,OAAO,GAAG,CAAC;SACX;QAED,MAAM,KAAK,GAAW,MAAM;aAC1B,aAAa,EAAE;aACf,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,MAAM,CAAC,gBAAS,CAAC;YAClB,mEAAmE;aAClE,OAAO,EAAE,CAAC;QAEZ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACzB,IAAI,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;gBAClC,MAAM,GAAG,GAAkC,MAAA,IAAA,iBAAS,EACnD,IAAI,EACJ,CAAC,GAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAChD,0CAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBAEnB,IAAI,GAAG,aAAH,GAAG,uBAAH,GAAG,CAAE,UAAU,EAAE;oBACpB,OAAO,GAAG,CAAC;iBACX;aACD;YAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBACtC,MAAM,GAAG,GAAgC,MAAA,IAAA,8BAAa,EACrD,IAAI,EACJ,CAAC,GAAyB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CACpD,0CAAE,SAAS,CAAC,IAAI,CAAC,CAAC;gBAEnB,IAAI,GAAG,EAAE;oBACR,OAAO,GAAG,CAAC;iBACX;aACD;SACD;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAjDD,oDAiDC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { MethodDeclaration, MethodSignature } from 'ts-morph';
|
|
2
|
-
/**
|
|
3
|
-
* Returns method that was overridden by the provided one
|
|
4
|
-
*
|
|
5
|
-
* @param method - Target method
|
|
6
|
-
*/
|
|
7
|
-
export declare function getOverriddenMethod(method: MethodDeclaration | MethodSignature): MethodDeclaration | MethodSignature | undefined;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOverriddenMethod = void 0;
|
|
4
|
-
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
const class_1 = require("../class");
|
|
6
|
-
const interface_1 = require("../interface");
|
|
7
|
-
/**
|
|
8
|
-
* Returns method that was overridden by the provided one
|
|
9
|
-
*
|
|
10
|
-
* @param method - Target method
|
|
11
|
-
*/
|
|
12
|
-
function getOverriddenMethod(method) {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const parent = method.getParent();
|
|
15
|
-
const name = method.getName();
|
|
16
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
-
return (_a = (0, class_1.findBaseClass)(parent, (cls) => {
|
|
18
|
-
const mtd = cls.getMethod(name);
|
|
19
|
-
return !!mtd && !mtd.isAbstract();
|
|
20
|
-
})) === null || _a === void 0 ? void 0 : _a.getMethod(name);
|
|
21
|
-
}
|
|
22
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
23
|
-
return (_b = (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getMethod(name))) === null || _b === void 0 ? void 0 : _b.getMethod(name);
|
|
24
|
-
}
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
exports.getOverriddenMethod = getOverriddenMethod;
|
|
28
|
-
//# sourceMappingURL=get-overridden-method.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-overridden-method.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/method/get-overridden-method.ts"],"names":[],"mappings":";;;AAAA,uCAA0G;AAE1G,oCAAuC;AACvC,4CAA2C;AAE3C;;;;GAIG;AACH,SAAgB,mBAAmB,CAClC,MAA2C;;IAE3C,MAAM,MAAM,GAAqB,MAAM,CAAC,SAAS,EAAE,CAAC;IACpD,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;IAEtC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,OAAO,MAAA,IAAA,qBAAa,EAAC,MAAM,EAAE,CAAC,GAAqB,EAAE,EAAE;YACtD,MAAM,GAAG,GAAkC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAE/D,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,EAAE,CAAC;QACnC,CAAC,CAAC,0CAAE,SAAS,CAAC,IAAI,CAAC,CAAC;KACpB;IAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE;QACxC,OAAO,MAAA,IAAA,yBAAa,EAAC,MAAM,EAAE,CAAC,GAAyB,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,0CAAE,SAAS,CAC9G,IAAI,CACJ,CAAC;KACF;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AArBD,kDAqBC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PropertyDeclaration, PropertySignature } from 'ts-morph';
|
|
2
|
-
/**
|
|
3
|
-
* Returns property that was implemented by the provided one
|
|
4
|
-
*
|
|
5
|
-
* @param property - Target property
|
|
6
|
-
*/
|
|
7
|
-
export declare function getImplementedProperty(property: PropertyDeclaration | PropertySignature): PropertyDeclaration | PropertySignature | undefined;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getImplementedProperty = void 0;
|
|
4
|
-
const core_1 = require("@ng-doc/core");
|
|
5
|
-
const ts_morph_1 = require("ts-morph");
|
|
6
|
-
const class_1 = require("../class");
|
|
7
|
-
const find_interface_1 = require("../interface/find-interface");
|
|
8
|
-
/**
|
|
9
|
-
* Returns property that was implemented by the provided one
|
|
10
|
-
*
|
|
11
|
-
* @param property - Target property
|
|
12
|
-
*/
|
|
13
|
-
function getImplementedProperty(property) {
|
|
14
|
-
var _a, _b, _c;
|
|
15
|
-
const parent = property.getParent();
|
|
16
|
-
const name = property.getName();
|
|
17
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
18
|
-
const prop = (_a = (0, class_1.findBaseClass)(parent, (cls) => !!cls.getProperty(name))) === null || _a === void 0 ? void 0 : _a.getProperty(name);
|
|
19
|
-
if (prop === null || prop === void 0 ? void 0 : prop.isAbstract) {
|
|
20
|
-
return prop;
|
|
21
|
-
}
|
|
22
|
-
const nodes = parent
|
|
23
|
-
.getImplements()
|
|
24
|
-
.map((expr) => { var _a; return (_a = expr.getType().getSymbol()) === null || _a === void 0 ? void 0 : _a.getDeclarations()[0]; })
|
|
25
|
-
.filter(core_1.isPresent)
|
|
26
|
-
// Reverse implements because the latest one overrides previous one
|
|
27
|
-
.reverse();
|
|
28
|
-
for (const node of nodes) {
|
|
29
|
-
if (ts_morph_1.Node.isClassDeclaration(node)) {
|
|
30
|
-
const prop = (_b = (0, class_1.findClass)(node, (cls) => !!cls.getProperty(name))) === null || _b === void 0 ? void 0 : _b.getProperty(name);
|
|
31
|
-
if (prop === null || prop === void 0 ? void 0 : prop.isAbstract) {
|
|
32
|
-
return prop;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(node)) {
|
|
36
|
-
const prop = (_c = (0, find_interface_1.findInterface)(node, (int) => !!int.getProperty(name))) === null || _c === void 0 ? void 0 : _c.getProperty(name);
|
|
37
|
-
if (prop) {
|
|
38
|
-
return prop;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
exports.getImplementedProperty = getImplementedProperty;
|
|
46
|
-
//# sourceMappingURL=get-implemented-property.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-implemented-property.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/property/get-implemented-property.ts"],"names":[],"mappings":";;;AAAA,uCAAuC;AACvC,uCAOkB;AAElB,oCAAkD;AAClD,gEAA0D;AAE1D;;;;GAIG;AACH,SAAgB,sBAAsB,CACrC,QAAiD;;IAEjD,MAAM,MAAM,GAAqB,QAAQ,CAAC,SAAS,EAAE,CAAC;IACtD,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;IAExC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,MAAM,IAAI,GAAoC,MAAA,IAAA,qBAAa,EAC1D,MAAM,EACN,CAAC,GAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAClD,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;QAErB,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE;YACrB,OAAO,IAAI,CAAC;SACZ;QAED,MAAM,KAAK,GAAW,MAAM;aAC1B,aAAa,EAAE;aACf,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,MAAM,CAAC,gBAAS,CAAC;YAClB,mEAAmE;aAClE,OAAO,EAAE,CAAC;QAEZ,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE;YACzB,IAAI,eAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE;gBAClC,MAAM,IAAI,GAAoC,MAAA,IAAA,iBAAS,EACtD,IAAI,EACJ,CAAC,GAAqB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAClD,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBAErB,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,UAAU,EAAE;oBACrB,OAAO,IAAI,CAAC;iBACZ;aACD;YAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,IAAI,CAAC,EAAE;gBACtC,MAAM,IAAI,GAAkC,MAAA,IAAA,8BAAa,EACxD,IAAI,EACJ,CAAC,GAAyB,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CACtD,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;gBAErB,IAAI,IAAI,EAAE;oBACT,OAAO,IAAI,CAAC;iBACZ;aACD;SACD;KACD;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAjDD,wDAiDC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { PropertyDeclaration, PropertySignature } from 'ts-morph';
|
|
2
|
-
/**
|
|
3
|
-
* Returns property that was overridden by the provided one
|
|
4
|
-
*
|
|
5
|
-
* @param property - Target method
|
|
6
|
-
*/
|
|
7
|
-
export declare function getOverriddenProperty(property: PropertyDeclaration | PropertySignature): PropertyDeclaration | PropertySignature | undefined;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getOverriddenProperty = void 0;
|
|
4
|
-
const ts_morph_1 = require("ts-morph");
|
|
5
|
-
const class_1 = require("../class");
|
|
6
|
-
const interface_1 = require("../interface");
|
|
7
|
-
/**
|
|
8
|
-
* Returns property that was overridden by the provided one
|
|
9
|
-
*
|
|
10
|
-
* @param property - Target method
|
|
11
|
-
*/
|
|
12
|
-
function getOverriddenProperty(property) {
|
|
13
|
-
var _a, _b;
|
|
14
|
-
const parent = property.getParent();
|
|
15
|
-
const name = property.getName();
|
|
16
|
-
if (ts_morph_1.Node.isClassDeclaration(parent)) {
|
|
17
|
-
return (_a = (0, class_1.findBaseClass)(parent, (cls) => {
|
|
18
|
-
const prop = cls.getProperty(name);
|
|
19
|
-
return !!prop && !prop.isAbstract();
|
|
20
|
-
})) === null || _a === void 0 ? void 0 : _a.getProperty(name);
|
|
21
|
-
}
|
|
22
|
-
if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
|
|
23
|
-
return (_b = (0, interface_1.findInterface)(parent, (int) => int !== parent && !!int.getProperty(name))) === null || _b === void 0 ? void 0 : _b.getProperty(name);
|
|
24
|
-
}
|
|
25
|
-
return undefined;
|
|
26
|
-
}
|
|
27
|
-
exports.getOverriddenProperty = getOverriddenProperty;
|
|
28
|
-
//# sourceMappingURL=get-overridden-property.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-overridden-property.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/property/get-overridden-property.ts"],"names":[],"mappings":";;;AAAA,uCAOkB;AAElB,oCAAuC;AACvC,4CAA2C;AAE3C;;;;GAIG;AACH,SAAgB,qBAAqB,CACpC,QAAiD;;IAEjD,MAAM,MAAM,GAAqB,QAAQ,CAAC,SAAS,EAAE,CAAC;IACtD,MAAM,IAAI,GAAW,QAAQ,CAAC,OAAO,EAAE,CAAC;IAExC,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,OAAO,MAAA,IAAA,qBAAa,EAAC,MAAM,EAAE,CAAC,GAAqB,EAAE,EAAE;YACtD,MAAM,IAAI,GAAoC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;YAEpE,OAAO,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;QACrC,CAAC,CAAC,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KACtB;IAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE;QACxC,OAAO,MAAA,IAAA,yBAAa,EACnB,MAAM,EACN,CAAC,GAAyB,EAAE,EAAE,CAAC,GAAG,KAAK,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,CACxE,0CAAE,WAAW,CAAC,IAAI,CAAC,CAAC;KACrB;IAED,OAAO,SAAS,CAAC;AAClB,CAAC;AAtBD,sDAsBC"}
|