@ng-doc/builder 15.0.0-beta.27 → 15.0.0-beta.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/engine/.cache/libs/app/components/api-list/api-list.component.js +7 -7
  2. package/engine/.cache/libs/app/components/code/code.component.js +12 -16
  3. package/engine/.cache/libs/app/components/demo/demo.component.js +8 -10
  4. package/engine/.cache/libs/app/components/navbar/navbar.component.js +1 -1
  5. package/engine/.cache/libs/app/components/page/page.module.js +1 -0
  6. package/engine/.cache/libs/app/components/page-map/page-map.component.js +1 -2
  7. package/engine/.cache/libs/app/components/playground/playground.component.js +5 -10
  8. package/engine/.cache/libs/app/components/playground-demo/playground-demo.component.js +8 -9
  9. package/engine/.cache/libs/app/components/playground-properties/playground-properties.component.js +1 -2
  10. package/engine/.cache/libs/app/components/playground-property/playground-property.component.js +9 -10
  11. package/engine/.cache/libs/app/components/root/root.component.js +2 -3
  12. package/engine/.cache/libs/app/components/sidebar/sidebar-category/sidebar-category.component.js +3 -5
  13. package/engine/.cache/libs/app/components/sidebar/sidebar.component.js +1 -2
  14. package/engine/.cache/libs/app/directives/code-highlighter/code-highlighter.directive.js +1 -2
  15. package/engine/.cache/libs/app/helpers/generate-page-map/generate-page-map.js +1 -2
  16. package/engine/.cache/libs/app/modules/root/ng-doc.module.js +3 -3
  17. package/engine/.cache/libs/app/pipes/filter-by-text/filter-by-text.pipe.js +1 -2
  18. package/engine/.cache/libs/app/processors/code-processor/code-processor.directive.js +2 -5
  19. package/engine/.cache/libs/app/processors/html-processor/html-processor.directive.js +1 -2
  20. package/engine/.cache/libs/app/processors/icon-processor/icon-processor.directive.js +2 -3
  21. package/engine/.cache/libs/app/processors/index.js +1 -0
  22. package/engine/.cache/libs/app/processors/playground-processor/playground-processor.directive.js +2 -3
  23. package/engine/.cache/libs/app/processors/tooltip-processor/index.js +6 -0
  24. package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.directive.js +30 -0
  25. package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-processor.module.js +18 -0
  26. package/engine/.cache/libs/app/processors/tooltip-processor/tooltip-wrapper.component.js +30 -0
  27. package/engine/.cache/libs/app/services/theme/theme.service.js +1 -2
  28. package/engine/.cache/libs/builder/engine/actions/demo.action.js +1 -2
  29. package/engine/.cache/libs/builder/engine/actions/playground.action.js +3 -4
  30. package/engine/.cache/libs/builder/engine/actions.js +1 -2
  31. package/engine/.cache/libs/builder/engine/builder.js +2 -2
  32. package/engine/.cache/libs/builder/engine/entities/abstractions/entity.js +2 -3
  33. package/engine/.cache/libs/builder/engine/entities/abstractions/file.entity.js +7 -2
  34. package/engine/.cache/libs/builder/engine/entities/abstractions/module.entity.js +1 -2
  35. package/engine/.cache/libs/builder/engine/entities/abstractions/route.entity.js +1 -2
  36. package/engine/.cache/libs/builder/engine/entities/abstractions/source-file.entity.js +3 -3
  37. package/engine/.cache/libs/builder/engine/entities/api-page.entity.js +4 -4
  38. package/engine/.cache/libs/builder/engine/entities/api-scope.entity.js +1 -2
  39. package/engine/.cache/libs/builder/engine/entities/api.entity.js +9 -16
  40. package/engine/.cache/libs/builder/engine/entities/category.entity.js +6 -12
  41. package/engine/.cache/libs/builder/engine/entities/dependencies.entity.js +20 -9
  42. package/engine/.cache/libs/builder/engine/entities/page.entity.js +13 -20
  43. package/engine/.cache/libs/builder/engine/entities/playground.entity.js +4 -3
  44. package/engine/.cache/libs/builder/engine/entity-store.js +3 -5
  45. package/engine/.cache/libs/builder/engine/functions/build-candidates.js +1 -2
  46. package/engine/.cache/libs/builder/engine/post-processors/html-plugins/keywords-processor.js +19 -16
  47. package/engine/.cache/libs/builder/engine/post-processors/html-post-processor.js +5 -2
  48. package/engine/.cache/libs/builder/engine/renderer.js +10 -7
  49. package/engine/.cache/libs/builder/engine/template-filters.js +16 -1
  50. package/engine/.cache/libs/builder/engine/watcher.js +1 -1
  51. package/engine/.cache/libs/builder/helpers/build-assets.js +2 -0
  52. package/engine/.cache/libs/builder/helpers/build-global-indexes.js +1 -2
  53. package/engine/.cache/libs/builder/helpers/create-builder-context.js +3 -4
  54. package/engine/.cache/libs/builder/helpers/declaration-to-playground.js +6 -4
  55. package/engine/.cache/libs/builder/helpers/extract-path-anchor.js +2 -3
  56. package/engine/.cache/libs/builder/helpers/extract-selectors.js +2 -3
  57. package/engine/.cache/libs/builder/helpers/format-code.js +3 -6
  58. package/engine/.cache/libs/builder/helpers/generate-api-entities.js +1 -2
  59. package/engine/.cache/libs/builder/helpers/index.js +1 -0
  60. package/engine/.cache/libs/builder/helpers/marked.js +1 -1
  61. package/engine/.cache/libs/builder/helpers/no-empty.js +12 -0
  62. package/engine/.cache/libs/builder/helpers/not-empty-assets.js +1 -1
  63. package/engine/.cache/libs/builder/helpers/presentation.js +76 -5
  64. package/engine/.cache/libs/builder/helpers/typescript/class/find-base-class.js +21 -0
  65. package/engine/.cache/libs/builder/helpers/typescript/class/find-class.js +21 -0
  66. package/engine/.cache/libs/builder/helpers/typescript/class/for-all-classes.js +15 -0
  67. package/engine/.cache/libs/builder/helpers/typescript/class/index.js +6 -0
  68. package/engine/.cache/libs/builder/helpers/typescript/create-project.js +17 -2
  69. package/engine/.cache/libs/builder/helpers/typescript/find-declaration.js +3 -4
  70. package/engine/.cache/libs/builder/helpers/typescript/first-node-with-comment.js +13 -0
  71. package/engine/.cache/libs/builder/helpers/typescript/index.js +6 -0
  72. package/engine/.cache/libs/builder/helpers/typescript/interface/find-interface.js +29 -0
  73. package/engine/.cache/libs/builder/helpers/typescript/interface/for-all-interfaces.js +20 -0
  74. package/engine/.cache/libs/builder/helpers/typescript/interface/index.js +5 -0
  75. package/engine/.cache/libs/builder/helpers/typescript/method/get-class-methods.js +22 -0
  76. package/engine/.cache/libs/builder/helpers/typescript/method/get-implemented-method.js +44 -0
  77. package/engine/.cache/libs/builder/helpers/typescript/method/get-interface-methods.js +22 -0
  78. package/engine/.cache/libs/builder/helpers/typescript/method/get-method-chain.js +32 -0
  79. package/engine/.cache/libs/builder/helpers/typescript/method/get-overridden-method.js +26 -0
  80. package/engine/.cache/libs/builder/helpers/typescript/method/index.js +8 -0
  81. package/engine/.cache/libs/builder/helpers/typescript/node/index.js +4 -0
  82. package/engine/.cache/libs/builder/helpers/typescript/node/sort-by-nodes-name.js +11 -0
  83. package/engine/.cache/libs/builder/helpers/typescript/property/get-class-properties.js +22 -0
  84. package/engine/.cache/libs/builder/helpers/typescript/property/get-implemented-property.js +44 -0
  85. package/engine/.cache/libs/builder/helpers/typescript/property/get-interface-properties.js +22 -0
  86. package/engine/.cache/libs/builder/helpers/typescript/property/get-overridden-property.js +26 -0
  87. package/engine/.cache/libs/builder/helpers/typescript/property/get-property-chain.js +33 -0
  88. package/engine/.cache/libs/builder/helpers/typescript/property/index.js +8 -0
  89. package/engine/.cache/libs/builder/resolvers/common/get-property-assignment.js +1 -2
  90. package/engine/.cache/libs/builder/schematics/api/index.js +1 -1
  91. package/engine/.cache/libs/builder/schematics/category/index.js +1 -1
  92. package/engine/.cache/libs/builder/schematics/dependencies/index.js +2 -3
  93. package/engine/.cache/libs/builder/schematics/page/index.js +7 -1
  94. package/engine/.cache/libs/builder/templates-env/code.env.js +2 -0
  95. package/engine/.cache/libs/builder/templates-env/index.js +1 -0
  96. package/engine/.cache/libs/core/helpers/extract-value.js +1 -1
  97. package/engine/.cache/libs/core/helpers/kebab-case.js +4 -3
  98. package/engine/.cache/libs/ui-kit/cdk/combobox-host/combobox-host.component.js +8 -11
  99. package/engine/.cache/libs/ui-kit/components/clear-control/clear-control.component.js +3 -6
  100. package/engine/.cache/libs/ui-kit/components/dropdown/dropdown.component.js +27 -17
  101. package/engine/.cache/libs/ui-kit/components/input-wrapper/input-wrapper.component.js +3 -6
  102. package/engine/.cache/libs/ui-kit/components/list/list.component.js +7 -10
  103. package/engine/.cache/libs/ui-kit/components/option/option.component.js +2 -4
  104. package/engine/.cache/libs/ui-kit/components/overlay-container/overlay-container.component.js +5 -9
  105. package/engine/.cache/libs/ui-kit/components/selection/selection-host.directive.js +1 -2
  106. package/engine/.cache/libs/ui-kit/components/tab-group/tab-group.component.js +1 -2
  107. package/engine/.cache/libs/ui-kit/components/toggle/toggle.component.js +2 -3
  108. package/engine/.cache/libs/ui-kit/directives/media-query/media-query.directive.js +1 -2
  109. package/engine/.cache/libs/ui-kit/directives/tooltip/tooltip.directive.js +14 -7
  110. package/engine/.cache/libs/ui-kit/helpers/merge-overlay-configs.js +5 -3
  111. package/engine/.cache/libs/ui-kit/modules/root/root.module.js +1 -2
  112. package/engine/.cache/libs/ui-kit/services/notify/notify.service.js +2 -2
  113. package/engine/.cache/libs/ui-kit/services/overlay/overlay.service.js +2 -3
  114. package/engine/.cache/libs/ui-kit/services/overlay-strategy/overlay-strategy.js +4 -7
  115. package/engine/.cache/libs/ui-kit/utils/overlay-utils.js +1 -1
  116. package/engine/entities/api-page.entity.d.ts +1 -1
  117. package/engine/entities/dependencies.entity.js +14 -4
  118. package/engine/entities/dependencies.entity.js.map +1 -1
  119. package/engine/post-processors/html-plugins/keywords-processor.js +18 -15
  120. package/engine/post-processors/html-plugins/keywords-processor.js.map +1 -1
  121. package/engine/renderer.d.ts +1 -0
  122. package/engine/renderer.js +4 -1
  123. package/engine/renderer.js.map +1 -1
  124. package/engine/template-filters.d.ts +1 -1
  125. package/engine/template-filters.js +16 -1
  126. package/engine/template-filters.js.map +1 -1
  127. package/helpers/build-assets.js +2 -0
  128. package/helpers/build-assets.js.map +1 -1
  129. package/helpers/format-code.js +3 -6
  130. package/helpers/format-code.js.map +1 -1
  131. package/helpers/index.d.ts +1 -0
  132. package/helpers/index.js +1 -0
  133. package/helpers/index.js.map +1 -1
  134. package/helpers/no-empty.d.ts +5 -0
  135. package/helpers/no-empty.js +13 -0
  136. package/helpers/no-empty.js.map +1 -0
  137. package/helpers/not-empty-assets.js +1 -1
  138. package/helpers/not-empty-assets.js.map +1 -1
  139. package/helpers/presentation.d.ts +11 -1
  140. package/helpers/presentation.js +77 -4
  141. package/helpers/presentation.js.map +1 -1
  142. package/helpers/typescript/class/find-base-class.d.ts +7 -0
  143. package/helpers/typescript/class/find-base-class.js +22 -0
  144. package/helpers/typescript/class/find-base-class.js.map +1 -0
  145. package/helpers/typescript/class/find-class.d.ts +7 -0
  146. package/helpers/typescript/class/find-class.js +22 -0
  147. package/helpers/typescript/class/find-class.js.map +1 -0
  148. package/helpers/typescript/class/for-all-classes.d.ts +7 -0
  149. package/helpers/typescript/class/for-all-classes.js +16 -0
  150. package/helpers/typescript/class/for-all-classes.js.map +1 -0
  151. package/helpers/typescript/class/index.d.ts +3 -0
  152. package/helpers/typescript/class/index.js +7 -0
  153. package/helpers/typescript/class/index.js.map +1 -0
  154. package/helpers/typescript/first-node-with-comment.d.ts +8 -0
  155. package/helpers/typescript/first-node-with-comment.js +15 -0
  156. package/helpers/typescript/first-node-with-comment.js.map +1 -0
  157. package/helpers/typescript/index.d.ts +6 -0
  158. package/helpers/typescript/index.js +6 -0
  159. package/helpers/typescript/index.js.map +1 -1
  160. package/helpers/typescript/interface/find-interface.d.ts +7 -0
  161. package/helpers/typescript/interface/find-interface.js +30 -0
  162. package/helpers/typescript/interface/find-interface.js.map +1 -0
  163. package/helpers/typescript/interface/for-all-interfaces.d.ts +7 -0
  164. package/helpers/typescript/interface/for-all-interfaces.js +21 -0
  165. package/helpers/typescript/interface/for-all-interfaces.js.map +1 -0
  166. package/helpers/typescript/interface/index.d.ts +2 -0
  167. package/helpers/typescript/interface/index.js +6 -0
  168. package/helpers/typescript/interface/index.js.map +1 -0
  169. package/helpers/typescript/method/get-class-methods.d.ts +6 -0
  170. package/helpers/typescript/method/get-class-methods.js +23 -0
  171. package/helpers/typescript/method/get-class-methods.js.map +1 -0
  172. package/helpers/typescript/method/get-implemented-method.d.ts +7 -0
  173. package/helpers/typescript/method/get-implemented-method.js +46 -0
  174. package/helpers/typescript/method/get-implemented-method.js.map +1 -0
  175. package/helpers/typescript/method/get-interface-methods.d.ts +6 -0
  176. package/helpers/typescript/method/get-interface-methods.js +23 -0
  177. package/helpers/typescript/method/get-interface-methods.js.map +1 -0
  178. package/helpers/typescript/method/get-method-chain.d.ts +6 -0
  179. package/helpers/typescript/method/get-method-chain.js +33 -0
  180. package/helpers/typescript/method/get-method-chain.js.map +1 -0
  181. package/helpers/typescript/method/get-overridden-method.d.ts +7 -0
  182. package/helpers/typescript/method/get-overridden-method.js +28 -0
  183. package/helpers/typescript/method/get-overridden-method.js.map +1 -0
  184. package/helpers/typescript/method/index.d.ts +5 -0
  185. package/helpers/typescript/method/index.js +9 -0
  186. package/helpers/typescript/method/index.js.map +1 -0
  187. package/helpers/typescript/node/index.d.ts +1 -0
  188. package/helpers/typescript/node/index.js +5 -0
  189. package/helpers/typescript/node/index.js.map +1 -0
  190. package/helpers/typescript/node/sort-by-nodes-name.d.ts +6 -0
  191. package/helpers/typescript/node/sort-by-nodes-name.js +12 -0
  192. package/helpers/typescript/node/sort-by-nodes-name.js.map +1 -0
  193. package/helpers/typescript/property/get-class-properties.d.ts +6 -0
  194. package/helpers/typescript/property/get-class-properties.js +23 -0
  195. package/helpers/typescript/property/get-class-properties.js.map +1 -0
  196. package/helpers/typescript/property/get-implemented-property.d.ts +7 -0
  197. package/helpers/typescript/property/get-implemented-property.js +46 -0
  198. package/helpers/typescript/property/get-implemented-property.js.map +1 -0
  199. package/helpers/typescript/property/get-interface-properties.d.ts +6 -0
  200. package/helpers/typescript/property/get-interface-properties.js +23 -0
  201. package/helpers/typescript/property/get-interface-properties.js.map +1 -0
  202. package/helpers/typescript/property/get-overridden-property.d.ts +7 -0
  203. package/helpers/typescript/property/get-overridden-property.js +28 -0
  204. package/helpers/typescript/property/get-overridden-property.js.map +1 -0
  205. package/helpers/typescript/property/get-property-chain.d.ts +6 -0
  206. package/helpers/typescript/property/get-property-chain.js +34 -0
  207. package/helpers/typescript/property/get-property-chain.js.map +1 -0
  208. package/helpers/typescript/property/index.d.ts +5 -0
  209. package/helpers/typescript/property/index.js +9 -0
  210. package/helpers/typescript/property/index.js.map +1 -0
  211. package/interfaces/asset.d.ts +1 -0
  212. package/package.json +2 -2
  213. package/templates/api/class.html.nunj +22 -8
  214. package/templates/api/function.html.nunj +1 -1
  215. package/templates/api/interface.html.nunj +4 -4
  216. package/templates/code.html.nunj +3 -0
  217. package/templates/helpers/code.html.nunj +1 -1
  218. package/templates/helpers/constructor.html.nunj +34 -0
  219. package/templates/helpers/declaration-modifiers.html.nunj +5 -8
  220. package/templates/helpers/method.html.nunj +19 -4
  221. package/templates/helpers/methods.html.nunj +2 -2
  222. package/templates/helpers/parameters.html.nunj +2 -1
  223. package/templates/helpers/properties.html.nunj +19 -2
  224. package/templates-env/code.env.d.ts +4 -0
  225. package/templates-env/code.env.js +3 -0
  226. package/templates-env/code.env.js.map +1 -0
  227. package/templates-env/index.d.ts +1 -0
  228. package/templates-env/index.js +1 -0
  229. package/templates-env/index.js.map +1 -1
@@ -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 `function ${method.getName()}(${parameters}): ${(0, typescript_1.displayType)(method.getReturnType())};`;
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 `${(_b = (_a = variable.getVariableStatement()) === null || _a === void 0 ? void 0 : _a.getDeclarationKind()) !== null && _b !== void 0 ? _b : 'const'} ${variable.getName()}: ${(0, typescript_1.displayType)(variable.getType())};`;
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 `${parameter.getName()}${parameter.hasQuestionToken() ? '?' : ''}: ${(0, typescript_1.displayType)(parameter.getType())}${parameter.getInitializer() ? ` = ${parameter.getInitializer()}` : ''}`.trim();
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":";;;AAEA,6CAAyC;AAEzC;;;GAGG;AACH,SAAgB,kBAAkB,CAAC,MAAyB;IAC3D,MAAM,UAAU,GAAW,MAAM,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAExF,OAAO,YAAY,MAAM,CAAC,OAAO,EAAE,IAAI,UAAU,MAAM,IAAA,wBAAW,EAAC,MAAM,CAAC,aAAa,EAAE,CAAC,GAAG,CAAC;AAC/F,CAAC;AAJD,gDAIC;AAED;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,SAA+B;IACpE,OAAO,SAAS,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE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,sBAAsB,CAAC,IAAqB;IACpD,OAAO,IAAI;SACT,aAAa,EAAE;SACf,GAAG,CAAC,CAAC,CAAY,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC;SAC1C,IAAI,CAAC,GAAG,CAAC,CAAC;AACb,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ClassDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param cls
5
+ * @param condition
6
+ */
7
+ export declare function findBaseClass(cls: ClassDeclaration, condition: (cls: ClassDeclaration) => boolean): ClassDeclaration | undefined;
@@ -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,7 @@
1
+ import { ClassDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param cls
5
+ * @param condition
6
+ */
7
+ export declare function findClass(cls: ClassDeclaration, condition: (c: ClassDeclaration) => boolean): ClassDeclaration | undefined;
@@ -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,7 @@
1
+ import { ClassDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param cls
5
+ * @param fn
6
+ */
7
+ export declare function forAllClasses(cls: ClassDeclaration, fn: (c: ClassDeclaration) => boolean | void): void;
@@ -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,3 @@
1
+ export * from './find-base-class';
2
+ export * from './find-class';
3
+ export * from './for-all-classes';
@@ -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,8 @@
1
+ import { JSDocableNode } from 'ts-morph';
2
+ /**
3
+ * Returns first node that has JSDoc comment, will return first node, if there are no comment nodes
4
+ *
5
+ *
6
+ * @param nodes
7
+ */
8
+ export declare function firstNodeWithComment(nodes: JSDocableNode[]): JSDocableNode;
@@ -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,7 @@
1
+ import { InterfaceDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param int
5
+ * @param fn
6
+ */
7
+ export declare function findInterface(int: InterfaceDeclaration, fn: (c: InterfaceDeclaration) => boolean): InterfaceDeclaration | undefined;
@@ -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,7 @@
1
+ import { InterfaceDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param int
5
+ * @param fn
6
+ */
7
+ export declare function forAllInterfaces(int: InterfaceDeclaration, fn: (c: InterfaceDeclaration) => boolean | void): void;
@@ -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,2 @@
1
+ export * from './find-interface';
2
+ export * from './for-all-interfaces';
@@ -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,6 @@
1
+ import { ClassDeclaration, MethodDeclaration } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param cls
5
+ */
6
+ export declare function getClassMethods(cls: ClassDeclaration): MethodDeclaration[];
@@ -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;
@@ -0,0 +1,46 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,6 @@
1
+ import { InterfaceDeclaration, MethodSignature } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param int
5
+ */
6
+ export declare function getInterfaceMethods(int: InterfaceDeclaration): MethodSignature[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getInterfaceMethods = void 0;
4
+ const core_1 = require("@ng-doc/core");
5
+ const interface_1 = require("../interface");
6
+ /**
7
+ *
8
+ * @param int
9
+ */
10
+ function getInterfaceMethods(int) {
11
+ const methods = new Map();
12
+ (0, interface_1.forAllInterfaces)(int, (i) => {
13
+ i.getMethods().forEach((method) => {
14
+ const name = method.getName();
15
+ if (!methods.get(name)) {
16
+ methods.set(name, method);
17
+ }
18
+ });
19
+ });
20
+ return (0, core_1.asArray)(methods.values());
21
+ }
22
+ exports.getInterfaceMethods = getInterfaceMethods;
23
+ //# sourceMappingURL=get-interface-methods.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-interface-methods.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/method/get-interface-methods.ts"],"names":[],"mappings":";;;AAAA,uCAAqC;AAGrC,4CAA8C;AAE9C;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,GAAyB;IAC5D,MAAM,OAAO,GAAiC,IAAI,GAAG,EAA2B,CAAC;IAEjF,IAAA,4BAAgB,EAAC,GAAG,EAAE,CAAC,CAAuB,EAAE,EAAE;QACjD,CAAC,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,CAAC,MAAuB,EAAE,EAAE;YAClD,MAAM,IAAI,GAAW,MAAM,CAAC,OAAO,EAAE,CAAC;YAEtC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACvB,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,kDAcC"}
@@ -0,0 +1,6 @@
1
+ import { MethodDeclaration, MethodSignature } from 'ts-morph';
2
+ /**
3
+ *
4
+ * @param method
5
+ */
6
+ export declare function getMethodChain(method: MethodDeclaration): Array<MethodDeclaration | MethodSignature>;
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getMethodChain = 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
+ /**
8
+ *
9
+ * @param method
10
+ */
11
+ function getMethodChain(method) {
12
+ const parent = method.getParent();
13
+ const methods = [];
14
+ if (ts_morph_1.Node.isClassDeclaration(parent)) {
15
+ (0, class_1.forAllClasses)(parent, (cls) => {
16
+ const mtd = cls.getMethod(method.getName());
17
+ if (mtd) {
18
+ methods.push(mtd);
19
+ }
20
+ });
21
+ }
22
+ if (ts_morph_1.Node.isInterfaceDeclaration(parent)) {
23
+ (0, for_all_interfaces_1.forAllInterfaces)(parent, (int) => {
24
+ const mtd = int.getMethod(method.getName());
25
+ if (mtd) {
26
+ methods.push(mtd);
27
+ }
28
+ });
29
+ }
30
+ return methods;
31
+ }
32
+ exports.getMethodChain = getMethodChain;
33
+ //# sourceMappingURL=get-method-chain.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-method-chain.js","sourceRoot":"","sources":["../../../../../../libs/builder/helpers/typescript/method/get-method-chain.ts"],"names":[],"mappings":";;;AAAA,uCAA0G;AAE1G,oCAAsD;AACtD,wEAAiE;AAEjE;;;GAGG;AACH,SAAgB,cAAc,CAAC,MAAyB;IACvD,MAAM,MAAM,GAAqB,MAAM,CAAC,SAAS,EAAE,CAAC;IACpD,MAAM,OAAO,GAA+C,EAAE,CAAC;IAE/D,IAAI,eAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,EAAE;QACpC,IAAA,qBAAa,EAAC,MAAM,EAAE,CAAC,GAAqB,EAAE,EAAE;YAC/C,MAAM,GAAG,GAAkC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAE3E,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAClB;QACF,CAAC,CAAC,CAAC;KACH;IAED,IAAI,eAAI,CAAC,sBAAsB,CAAC,MAAM,CAAC,EAAE;QACxC,IAAA,qCAAgB,EAAC,MAAM,EAAE,CAAC,GAAyB,EAAE,EAAE;YACtD,MAAM,GAAG,GAAgC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC;YAEzE,IAAI,GAAG,EAAE;gBACR,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;aAClB;QACF,CAAC,CAAC,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AAChB,CAAC;AAzBD,wCAyBC"}
@@ -0,0 +1,7 @@
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;
@@ -0,0 +1,28 @@
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
@@ -0,0 +1 @@
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"}
@@ -0,0 +1,5 @@
1
+ export * from './get-class-methods';
2
+ export * from './get-implemented-method';
3
+ export * from './get-interface-methods';
4
+ export * from './get-method-chain';
5
+ export * from './get-overridden-method';