@ng-doc/builder 16.9.0 → 16.11.0

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 (263) hide show
  1. package/browser/index.js +2 -1
  2. package/browser/index.js.map +1 -1
  3. package/browser/schema.json +7 -1
  4. package/classes/observable-set.d.ts +1 -0
  5. package/classes/observable-set.js +4 -0
  6. package/classes/observable-set.js.map +1 -1
  7. package/dev-server/index.js +2 -1
  8. package/dev-server/index.js.map +1 -1
  9. package/dev-server/schema.json +7 -1
  10. package/engine/.cache/apps/ng-doc/docs/ng-doc.api.js +3 -8
  11. package/engine/.cache/apps/ng-doc/docs/recipes/ignoring-file-lines/ng-doc.page.js +41 -0
  12. package/engine/.cache/apps/ng-doc/docs/recipes/ng-doc.category.js +30 -0
  13. package/engine/actions/playground.action.js +2 -2
  14. package/engine/actions/playground.action.js.map +1 -1
  15. package/engine/build-ng-doc.js +10 -2
  16. package/engine/build-ng-doc.js.map +1 -1
  17. package/engine/builder-operators/build.d.ts +2 -3
  18. package/engine/builder-operators/build.js +8 -4
  19. package/engine/builder-operators/build.js.map +1 -1
  20. package/engine/builder-operators/compile.d.ts +1 -1
  21. package/engine/builder-operators/compile.js.map +1 -1
  22. package/engine/builder-operators/emit.d.ts +2 -2
  23. package/engine/builder-operators/emit.js.map +1 -1
  24. package/engine/builder-operators/post-build.d.ts +6 -0
  25. package/engine/builder-operators/post-build.js +23 -0
  26. package/engine/builder-operators/post-build.js.map +1 -0
  27. package/engine/builder-operators/post-process.d.ts +2 -2
  28. package/engine/builder-operators/post-process.js +4 -5
  29. package/engine/builder-operators/post-process.js.map +1 -1
  30. package/engine/builder-operators/task.d.ts +1 -1
  31. package/engine/builder-operators/task.js.map +1 -1
  32. package/engine/builder-operators/to-builder-output.d.ts +6 -0
  33. package/engine/builder-operators/to-builder-output.js +13 -0
  34. package/engine/builder-operators/to-builder-output.js.map +1 -0
  35. package/engine/entities/abstractions/entity.d.ts +11 -11
  36. package/engine/entities/abstractions/entity.js +2 -5
  37. package/engine/entities/abstractions/entity.js.map +1 -1
  38. package/engine/entities/abstractions/file.entity.d.ts +2 -2
  39. package/engine/entities/abstractions/file.entity.js.map +1 -1
  40. package/engine/entities/abstractions/module.entity.d.ts +1 -1
  41. package/engine/entities/abstractions/module.entity.js.map +1 -1
  42. package/engine/entities/abstractions/navigation.entity.d.ts +1 -1
  43. package/engine/entities/abstractions/navigation.entity.js.map +1 -1
  44. package/engine/entities/abstractions/route.entity.d.ts +3 -4
  45. package/engine/entities/abstractions/route.entity.js +2 -2
  46. package/engine/entities/abstractions/route.entity.js.map +1 -1
  47. package/engine/entities/api-list.entity.d.ts +20 -0
  48. package/engine/entities/api-list.entity.js +69 -0
  49. package/engine/entities/api-list.entity.js.map +1 -0
  50. package/engine/entities/api-page.entity.d.ts +2 -3
  51. package/engine/entities/api-page.entity.js +26 -28
  52. package/engine/entities/api-page.entity.js.map +1 -1
  53. package/engine/entities/api-scope.entity.d.ts +2 -3
  54. package/engine/entities/api-scope.entity.js +13 -7
  55. package/engine/entities/api-scope.entity.js.map +1 -1
  56. package/engine/entities/api.entity.d.ts +3 -4
  57. package/engine/entities/api.entity.js +26 -29
  58. package/engine/entities/api.entity.js.map +1 -1
  59. package/engine/entities/category.entity.d.ts +2 -3
  60. package/engine/entities/category.entity.js +11 -13
  61. package/engine/entities/category.entity.js.map +1 -1
  62. package/engine/entities/context.entity.d.ts +11 -0
  63. package/engine/entities/context.entity.js +34 -0
  64. package/engine/entities/context.entity.js.map +1 -0
  65. package/engine/entities/generated-module.entity.d.ts +12 -0
  66. package/engine/entities/generated-module.entity.js +52 -0
  67. package/engine/entities/generated-module.entity.js.map +1 -0
  68. package/engine/entities/index-file.entity.d.ts +12 -0
  69. package/engine/entities/index-file.entity.js +52 -0
  70. package/engine/entities/index-file.entity.js.map +1 -0
  71. package/engine/entities/index.d.ts +8 -1
  72. package/engine/entities/index.js +8 -1
  73. package/engine/entities/index.js.map +1 -1
  74. package/engine/entities/indexes.entity.d.ts +3 -4
  75. package/engine/entities/indexes.entity.js +12 -14
  76. package/engine/entities/indexes.entity.js.map +1 -1
  77. package/engine/entities/keywords.entity.d.ts +12 -0
  78. package/engine/entities/keywords.entity.js +32 -0
  79. package/engine/entities/keywords.entity.js.map +1 -0
  80. package/engine/entities/page-demo.entity.d.ts +20 -0
  81. package/engine/entities/page-demo.entity.js +87 -0
  82. package/engine/entities/page-demo.entity.js.map +1 -0
  83. package/engine/entities/page-playground.entity.d.ts +21 -0
  84. package/engine/entities/page-playground.entity.js +80 -0
  85. package/engine/entities/page-playground.entity.js.map +1 -0
  86. package/engine/entities/page.entity.d.ts +6 -18
  87. package/engine/entities/page.entity.js +39 -107
  88. package/engine/entities/page.entity.js.map +1 -1
  89. package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.d.ts +5 -0
  90. package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js +20 -0
  91. package/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.js.map +1 -0
  92. package/engine/entities/plugins/entity-plugins/apply.plugin.d.ts +26 -0
  93. package/engine/entities/plugins/entity-plugins/apply.plugin.js +65 -0
  94. package/engine/entities/plugins/entity-plugins/apply.plugin.js.map +1 -0
  95. package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.d.ts +6 -0
  96. package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js +23 -0
  97. package/engine/entities/plugins/entity-plugins/extract-snippets.plugin.js.map +1 -0
  98. package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.d.ts +6 -0
  99. package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js +27 -0
  100. package/engine/entities/plugins/entity-plugins/fill-indexes.plugin.js.map +1 -0
  101. package/engine/entities/plugins/entity-plugins/index.d.ts +9 -0
  102. package/engine/entities/plugins/entity-plugins/index.js +13 -0
  103. package/engine/entities/plugins/entity-plugins/index.js.map +1 -0
  104. package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.d.ts +5 -0
  105. package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js +21 -0
  106. package/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.js.map +1 -0
  107. package/engine/entities/plugins/entity-plugins/post-process-html.plugin.d.ts +5 -0
  108. package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js +18 -0
  109. package/engine/entities/plugins/entity-plugins/post-process-html.plugin.js.map +1 -0
  110. package/engine/entities/plugins/entity-plugins/process-html.plugin.d.ts +5 -0
  111. package/engine/entities/plugins/entity-plugins/process-html.plugin.js +18 -0
  112. package/engine/entities/plugins/entity-plugins/process-html.plugin.js.map +1 -0
  113. package/engine/entities/plugins/entity-plugins/remove-lines.plugin.d.ts +6 -0
  114. package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js +23 -0
  115. package/engine/entities/plugins/entity-plugins/remove-lines.plugin.js.map +1 -0
  116. package/engine/entities/plugins/entity-plugins/wrap-code.plugin.d.ts +6 -0
  117. package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js +21 -0
  118. package/engine/entities/plugins/entity-plugins/wrap-code.plugin.js.map +1 -0
  119. package/engine/entities/plugins/helpers/execute-plugins.d.ts +10 -0
  120. package/engine/entities/plugins/helpers/execute-plugins.js +18 -0
  121. package/engine/entities/plugins/helpers/execute-plugins.js.map +1 -0
  122. package/engine/entities/plugins/helpers/index.d.ts +1 -0
  123. package/engine/entities/plugins/helpers/index.js +5 -0
  124. package/engine/entities/plugins/helpers/index.js.map +1 -0
  125. package/engine/entities/plugins/index.d.ts +3 -0
  126. package/engine/entities/plugins/index.js +7 -0
  127. package/engine/entities/plugins/index.js.map +1 -0
  128. package/engine/entities/plugins/types/entity-plugin.d.ts +5 -0
  129. package/engine/entities/plugins/types/entity-plugin.js +3 -0
  130. package/engine/entities/plugins/types/entity-plugin.js.map +1 -0
  131. package/engine/entities/plugins/types/index.d.ts +1 -0
  132. package/engine/entities/plugins/types/index.js +5 -0
  133. package/engine/entities/plugins/types/index.js.map +1 -0
  134. package/engine/entities/routes.entity.d.ts +11 -0
  135. package/engine/entities/routes.entity.js +34 -0
  136. package/engine/entities/routes.entity.js.map +1 -0
  137. package/engine/entity-store.d.ts +1 -0
  138. package/engine/entity-store.js +3 -0
  139. package/engine/entity-store.js.map +1 -1
  140. package/engine/nunjucks/filters.d.ts +2 -2
  141. package/engine/nunjucks/filters.js +3 -2
  142. package/engine/nunjucks/filters.js.map +1 -1
  143. package/engine/variables.d.ts +1 -0
  144. package/engine/variables.js +1 -0
  145. package/engine/variables.js.map +1 -1
  146. package/helpers/angular/get-component-assets.d.ts +8 -0
  147. package/helpers/angular/get-component-assets.js +15 -0
  148. package/helpers/angular/get-component-assets.js.map +1 -0
  149. package/helpers/angular/get-component-source-files.d.ts +7 -0
  150. package/helpers/angular/get-component-source-files.js +23 -0
  151. package/helpers/angular/get-component-source-files.js.map +1 -0
  152. package/helpers/angular/index.d.ts +2 -0
  153. package/helpers/angular/index.js +2 -0
  154. package/helpers/angular/index.js.map +1 -1
  155. package/helpers/build-file-assets.d.ts +7 -0
  156. package/helpers/build-file-assets.js +25 -0
  157. package/helpers/build-file-assets.js.map +1 -0
  158. package/helpers/build-file-entity.js +14 -1
  159. package/helpers/build-file-entity.js.map +1 -1
  160. package/helpers/create-builder-context.d.ts +5 -5
  161. package/helpers/create-builder-context.js +6 -6
  162. package/helpers/create-builder-context.js.map +1 -1
  163. package/helpers/demo/assets-from-component-asset.d.ts +6 -0
  164. package/helpers/demo/assets-from-component-asset.js +14 -0
  165. package/helpers/demo/assets-from-component-asset.js.map +1 -0
  166. package/helpers/demo/index.d.ts +1 -0
  167. package/helpers/demo/index.js +5 -0
  168. package/helpers/demo/index.js.map +1 -0
  169. package/helpers/emit-built-output.d.ts +2 -2
  170. package/helpers/emit-built-output.js.map +1 -1
  171. package/helpers/entity-type.d.ts +1 -1
  172. package/helpers/extract-docs.js +4 -4
  173. package/helpers/extract-docs.js.map +1 -1
  174. package/helpers/format-code.d.ts +1 -1
  175. package/helpers/format-code.js +14 -3
  176. package/helpers/format-code.js.map +1 -1
  177. package/helpers/get-code-type-from-lang.d.ts +6 -0
  178. package/helpers/get-code-type-from-lang.js +31 -0
  179. package/helpers/get-code-type-from-lang.js.map +1 -0
  180. package/helpers/get-demo-class-declarations.d.ts +1 -1
  181. package/helpers/get-demo-class-declarations.js +18 -7
  182. package/helpers/get-demo-class-declarations.js.map +1 -1
  183. package/helpers/index.d.ts +7 -3
  184. package/helpers/index.js +7 -3
  185. package/helpers/index.js.map +1 -1
  186. package/helpers/load-config.d.ts +3 -2
  187. package/helpers/load-config.js +4 -3
  188. package/helpers/load-config.js.map +1 -1
  189. package/helpers/markdown-to-html.d.ts +10 -0
  190. package/helpers/{marked.js → markdown-to-html.js} +11 -8
  191. package/helpers/markdown-to-html.js.map +1 -0
  192. package/helpers/process-html.d.ts +3 -3
  193. package/helpers/process-html.js +14 -11
  194. package/helpers/process-html.js.map +1 -1
  195. package/helpers/process-legacy-snippets.d.ts +9 -0
  196. package/helpers/process-legacy-snippets.js +70 -0
  197. package/helpers/process-legacy-snippets.js.map +1 -0
  198. package/helpers/process-snippets.d.ts +5 -5
  199. package/helpers/process-snippets.js +63 -50
  200. package/helpers/process-snippets.js.map +1 -1
  201. package/helpers/remove-lines-from-code.d.ts +6 -0
  202. package/helpers/remove-lines-from-code.js +30 -0
  203. package/helpers/remove-lines-from-code.js.map +1 -0
  204. package/helpers/snippets-from-asset.d.ts +9 -0
  205. package/helpers/snippets-from-asset.js +26 -0
  206. package/helpers/snippets-from-asset.js.map +1 -0
  207. package/interfaces/asset.d.ts +5 -7
  208. package/interfaces/build-result.d.ts +10 -0
  209. package/{types/snippet-type.js → interfaces/build-result.js} +1 -1
  210. package/interfaces/build-result.js.map +1 -0
  211. package/interfaces/index.d.ts +3 -0
  212. package/interfaces/index.js +3 -0
  213. package/interfaces/index.js.map +1 -1
  214. package/interfaces/output.d.ts +1 -3
  215. package/interfaces/schema.d.ts +3 -0
  216. package/interfaces/snippet-config.d.ts +8 -0
  217. package/interfaces/snippet-config.js +3 -0
  218. package/interfaces/snippet-config.js.map +1 -0
  219. package/interfaces/snippet.d.ts +5 -4
  220. package/operators/error-handler.d.ts +1 -1
  221. package/package.json +6 -5
  222. package/parsers/helpers/index.d.ts +3 -0
  223. package/parsers/helpers/index.js +7 -0
  224. package/parsers/helpers/index.js.map +1 -0
  225. package/parsers/helpers/number.d.ts +2 -0
  226. package/parsers/helpers/number.js +7 -0
  227. package/parsers/helpers/number.js.map +1 -0
  228. package/parsers/helpers/param-value.d.ts +2 -0
  229. package/parsers/helpers/param-value.js +8 -0
  230. package/parsers/helpers/param-value.js.map +1 -0
  231. package/parsers/helpers/param.d.ts +7 -0
  232. package/parsers/helpers/param.js +19 -0
  233. package/parsers/helpers/param.js.map +1 -0
  234. package/parsers/parse-code-block-params.js +8 -13
  235. package/parsers/parse-code-block-params.js.map +1 -1
  236. package/parsers/parse-snippet.d.ts +6 -0
  237. package/parsers/parse-snippet.js +27 -0
  238. package/parsers/parse-snippet.js.map +1 -0
  239. package/schematics/category/files/ng-doc.category.ts.template +1 -1
  240. package/schematics/category/index.js +2 -1
  241. package/schematics/category/index.js.map +1 -1
  242. package/schematics/page/index.js +2 -1
  243. package/schematics/page/index.js.map +1 -1
  244. package/templates/demo-assets.ts.nunj +13 -4
  245. package/templates/page.module.ts.nunj +3 -2
  246. package/templates/parts/usage-notes.html.nunj +1 -1
  247. package/templates/playgrounds.ts.nunj +19 -9
  248. package/types/index.d.ts +0 -1
  249. package/types/index.js +0 -1
  250. package/types/index.js.map +1 -1
  251. package/engine/entities/skeleton.entity.d.ts +0 -16
  252. package/engine/entities/skeleton.entity.js +0 -44
  253. package/engine/entities/skeleton.entity.js.map +0 -1
  254. package/helpers/build-assets.d.ts +0 -10
  255. package/helpers/build-assets.js +0 -55
  256. package/helpers/build-assets.js.map +0 -1
  257. package/helpers/get-component-asset.d.ts +0 -10
  258. package/helpers/get-component-asset.js +0 -50
  259. package/helpers/get-component-asset.js.map +0 -1
  260. package/helpers/marked.d.ts +0 -9
  261. package/helpers/marked.js.map +0 -1
  262. package/types/snippet-type.d.ts +0 -1
  263. package/types/snippet-type.js.map +0 -1
@@ -8,12 +8,13 @@ const path = tslib_1.__importStar(require("path"));
8
8
  const rxjs_1 = require("rxjs");
9
9
  const operators_1 = require("rxjs/operators");
10
10
  const helpers_1 = require("../../helpers");
11
- const build_indexes_1 = require("../../helpers/build-indexes");
12
- const operators_2 = require("../../operators");
13
11
  const actions_1 = require("../actions");
14
12
  const nunjucks_1 = require("../nunjucks");
15
13
  const navigation_entity_1 = require("./abstractions/navigation.entity");
16
14
  const decorators_1 = require("./cache/decorators");
15
+ const page_demo_entity_1 = require("./page-demo.entity");
16
+ const page_playground_entity_1 = require("./page-playground.entity");
17
+ const plugins_1 = require("./plugins");
17
18
  exports.NgDocPageEntity = (() => {
18
19
  let _classDecorators = [(0, decorators_1.CachedEntity)()];
19
20
  let _classDescriptor;
@@ -21,20 +22,15 @@ exports.NgDocPageEntity = (() => {
21
22
  let _classThis;
22
23
  let _instanceExtraInitializers = [];
23
24
  let _get_mdPath_decorators;
24
- let _get_demoAssetsPath_decorators;
25
- let _get_playgroundsPath_decorators;
26
25
  var NgDocPageEntity = _classThis = class extends navigation_entity_1.NgDocNavigationEntity {
27
26
  constructor() {
28
27
  super(...arguments);
29
- this.playgroundsExpression = (tslib_1.__runInitializers(this, _instanceExtraInitializers), void 0);
30
- this.demoClassDeclarations = [];
31
- this.playgroundMetadata = {};
32
- this.componentAssets = {};
28
+ this.parent = (tslib_1.__runInitializers(this, _instanceExtraInitializers), void 0);
33
29
  }
34
30
  get route() {
35
- var _a, _b;
31
+ var _a, _b, _c, _d;
36
32
  const folderName = path.basename(path.dirname(this.sourceFile.getFilePath()));
37
- return (_b = (_a = this.target) === null || _a === void 0 ? void 0 : _a.route) !== null && _b !== void 0 ? _b : folderName;
33
+ return (_d = ((0, core_1.isRoute)((_a = this.target) === null || _a === void 0 ? void 0 : _a.route) ? (_b = this.target) === null || _b === void 0 ? void 0 : _b.route.path : (_c = this.target) === null || _c === void 0 ? void 0 : _c.route)) !== null && _d !== void 0 ? _d : folderName;
38
34
  }
39
35
  get isRoot() {
40
36
  var _a;
@@ -93,29 +89,6 @@ exports.NgDocPageEntity = (() => {
93
89
  get mdFolder() {
94
90
  return path.dirname(this.mdPath);
95
91
  }
96
- get assets() {
97
- return Object.keys(this.componentAssets)
98
- .map((key) => this.componentAssets[key])
99
- .flat();
100
- }
101
- get assetsFolder() {
102
- return path.relative(this.context.context.workspaceRoot, path.join(this.folderPath, 'assets'));
103
- }
104
- get demoAssetsPath() {
105
- return path.join(this.folderPath, 'component-assets.ts');
106
- }
107
- get demoAssetsImport() {
108
- return (0, helpers_1.slash)(path.relative(this.context.context.workspaceRoot, path.join(this.folderPath, 'component-assets')));
109
- }
110
- get demoAssets() {
111
- return this.assets.length ? this.demoAssetsImport : undefined;
112
- }
113
- get playgroundsPath() {
114
- return path.join(this.folderPath, 'playgrounds.ts');
115
- }
116
- get playgroundIds() {
117
- return this.playgroundsExpression ? (0, helpers_1.getPlaygroundsIds)(this.playgroundsExpression) : [];
118
- }
119
92
  get hasImports() {
120
93
  var _a;
121
94
  return !!((_a = this.objectExpression) === null || _a === void 0 ? void 0 : _a.getProperty('imports'));
@@ -126,9 +99,15 @@ exports.NgDocPageEntity = (() => {
126
99
  }
127
100
  dependenciesChanged() {
128
101
  super.dependenciesChanged();
129
- // Refresh source file from file system to make sure that it is up-to-date
130
- Object.keys(this.playgroundMetadata).forEach((id) => this.playgroundMetadata[id].class.getSourceFile().refreshFromFileSystemSync());
131
- this.updatePlaygroundMetadata();
102
+ }
103
+ childrenGenerator() {
104
+ return (0, rxjs_1.of)([
105
+ new page_demo_entity_1.NgDocPageDemoEntity(this.store, this.cache, this.context, this),
106
+ new page_playground_entity_1.NgDocPagePlaygroundEntity(this.store, this.cache, this.context, this),
107
+ ]);
108
+ }
109
+ get playgroundEntity() {
110
+ return this.children.find((child) => child instanceof page_playground_entity_1.NgDocPagePlaygroundEntity);
132
111
  }
133
112
  loadImpl() {
134
113
  return super.loadImpl().pipe((0, operators_1.map)(() => {
@@ -139,36 +118,12 @@ exports.NgDocPageEntity = (() => {
139
118
  if (!this.title) {
140
119
  throw new Error(`Failed to load page. Make sure that you have a "title" property.`);
141
120
  }
142
- if (this.objectExpression) {
143
- this.playgroundsExpression = (0, helpers_1.getPlaygroundsExpression)(this.objectExpression);
144
- this.demoClassDeclarations = (0, helpers_1.getDemoClassDeclarations)(this.objectExpression);
145
- this.updatePlaygroundMetadata();
146
- }
147
121
  }), (0, operators_1.tap)({
148
122
  error: (e) => this.errors.push(e),
149
123
  }));
150
124
  }
151
- buildImpl() {
152
- return this.isReadyForBuild
153
- ? (0, rxjs_1.forkJoin)([this.buildModule(), this.buildPlaygrounds(), this.buildDemoAssets()])
154
- : (0, rxjs_1.of)([]);
155
- }
156
- updatePlaygroundMetadata() {
157
- this.playgroundMetadata = this.playgroundIds.reduce((metadata, id) => {
158
- if (this.playgroundsExpression) {
159
- const playground = (0, helpers_1.getPlaygroundById)(this.playgroundsExpression, id);
160
- if (playground) {
161
- metadata[id] = (0, helpers_1.buildPlaygroundMetadata)(id, playground);
162
- }
163
- }
164
- return metadata;
165
- }, {});
166
- }
167
- buildModule() {
168
- if (!this.target) {
169
- throw new Error(`Failed to build page. Make sure that you define page configuration property correctly.`);
170
- }
171
- const template = (0, nunjucks_1.renderTemplate)(this.target.mdFile, {
125
+ build() {
126
+ const result = (0, nunjucks_1.renderTemplate)(this.target.mdFile, {
172
127
  scope: this.sourceFileFolder,
173
128
  context: {
174
129
  NgDocPage: this.target,
@@ -177,58 +132,35 @@ exports.NgDocPageEntity = (() => {
177
132
  dependenciesStore: this.dependencies,
178
133
  filters: false,
179
134
  });
180
- return (0, rxjs_1.of)(template).pipe((0, operators_1.map)((output) => (0, helpers_1.marked)(output, this)), (0, operators_1.switchMap)((html) => (0, helpers_1.processHtml)(this, html)), (0, operators_1.map)((content) => ({
181
- content,
182
- filePath: this.modulePath,
183
- postProcessFn: (content) => (0, rxjs_1.from)((0, helpers_1.postProcessHtml)(this, content)).pipe((0, operators_1.switchMap)((content) => (0, rxjs_1.from)((0, build_indexes_1.buildIndexes)({
184
- title: this.title,
185
- content,
186
- pageType: (0, helpers_1.getPageType)(this),
187
- breadcrumbs: this.breadcrumbs,
188
- route: this.fullRoute,
189
- })).pipe((0, operators_1.tap)((indexes) => this.indexes.push(...indexes)), (0, operators_1.map)(() => (0, nunjucks_1.renderTemplate)('./page.module.ts.nunj', {
190
- context: {
191
- page: this,
192
- pageContent: content,
193
- },
194
- }))))),
195
- })));
196
- }
197
- buildPlaygrounds() {
198
- const content = (0, nunjucks_1.renderTemplate)('./playgrounds.ts.nunj', {
199
- context: {
200
- page: this,
201
- },
135
+ return (0, rxjs_1.of)({
136
+ result,
137
+ entity: this,
138
+ toBuilderOutput: (content) => tslib_1.__awaiter(this, void 0, void 0, function* () {
139
+ return ({
140
+ content: (0, nunjucks_1.renderTemplate)('./page.module.ts.nunj', {
141
+ context: {
142
+ page: this,
143
+ pageContent: content,
144
+ },
145
+ }),
146
+ filePath: this.modulePath,
147
+ });
148
+ }),
149
+ postBuildPlugins: [(0, plugins_1.markdownToHtmlPlugin)(), (0, plugins_1.processHtmlPlugin)()],
150
+ postProcessPlugins: [(0, plugins_1.postProcessHtmlPlugin)(), (0, plugins_1.fillIndexesPlugin)()],
151
+ });
152
+ }
153
+ refreshDependencies() {
154
+ var _a;
155
+ (_a = this.objectExpression) === null || _a === void 0 ? void 0 : _a.getSourceFile().getReferencedSourceFiles().forEach((sourceFile) => {
156
+ sourceFile.refreshFromFileSystemSync();
202
157
  });
203
- return (0, rxjs_1.of)({ content: (0, helpers_1.formatCode)(content, 'TypeScript'), filePath: this.playgroundsPath });
204
- }
205
- buildDemoAssets() {
206
- if (this.objectExpression) {
207
- this.componentAssets = this.demoClassDeclarations
208
- .map((classDeclarations) => (0, helpers_1.getComponentAsset)(classDeclarations, this.context.inlineStyleLanguage, this.assetsFolder))
209
- .reduce((acc, curr) => (Object.assign(Object.assign({}, acc), curr)), {});
210
- this.dependencies.add(...this.assets.map((asset) => asset.originalPath));
211
- return (0, operators_2.forkJoinOrEmpty)(Object.keys(this.componentAssets).map((key) => (0, operators_2.forkJoinOrEmpty)(this.componentAssets[key].map((asset) => (0, rxjs_1.from)((0, helpers_1.processHtml)(this, asset.output)).pipe((0, operators_1.tap)((output) => (asset.output = output))))))).pipe((0, operators_1.map)(() => ({
212
- content: '',
213
- filePath: this.demoAssetsPath,
214
- postProcessFn: (content) => (0, rxjs_1.of)(content).pipe((0, operators_1.switchMap)(() => (0, operators_2.forkJoinOrEmpty)(Object.keys(this.componentAssets).map((key) => (0, operators_2.forkJoinOrEmpty)(this.componentAssets[key].map((asset) => (0, rxjs_1.from)((0, helpers_1.postProcessHtml)(this, asset.output)).pipe((0, operators_1.tap)((output) => (asset.output = output)))))))), (0, operators_1.map)(() => (0, nunjucks_1.renderTemplate)('./demo-assets.ts.nunj', {
215
- context: {
216
- demoAssets: this.componentAssets,
217
- },
218
- }))),
219
- })));
220
- }
221
- return (0, rxjs_1.of)({ content: '', filePath: this.demoAssetsPath });
222
158
  }
223
159
  };
224
160
  tslib_1.__setFunctionName(_classThis, "NgDocPageEntity");
225
161
  (() => {
226
162
  _get_mdPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
227
- _get_demoAssetsPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
228
- _get_playgroundsPath_decorators = [(0, decorators_1.CachedFilesGetter)()];
229
163
  tslib_1.__esDecorate(_classThis, null, _get_mdPath_decorators, { kind: "getter", name: "mdPath", static: false, private: false, access: { has: obj => "mdPath" in obj, get: obj => obj.mdPath } }, null, _instanceExtraInitializers);
230
- tslib_1.__esDecorate(_classThis, null, _get_demoAssetsPath_decorators, { kind: "getter", name: "demoAssetsPath", static: false, private: false, access: { has: obj => "demoAssetsPath" in obj, get: obj => obj.demoAssetsPath } }, null, _instanceExtraInitializers);
231
- tslib_1.__esDecorate(_classThis, null, _get_playgroundsPath_decorators, { kind: "getter", name: "playgroundsPath", static: false, private: false, access: { has: obj => "playgroundsPath" in obj, get: obj => obj.playgroundsPath } }, null, _instanceExtraInitializers);
232
164
  tslib_1.__esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name }, null, _classExtraInitializers);
233
165
  NgDocPageEntity = _classThis = _classDescriptor.value;
234
166
  tslib_1.__runInitializers(_classThis, _classExtraInitializers);
@@ -1 +1 @@
1
- {"version":3,"file":"page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAA8F;AAC9F,+CAAyB;AACzB,mDAA6B;AAC7B,+BAAoD;AACpD,8CAAmD;AAGnD,2CAeuB;AACvB,+DAAyD;AAEzD,+CAAgD;AAEhD,wCAAwC;AACxC,0CAA2C;AAE3C,wEAAuE;AACvE,mDAAmE;AAItD,QAAA,eAAe;4BAD3B,IAAA,yBAAY,GAAE;;;;;;;;QACF,eAAe,qBAAC,SAAQ,yCAAgC;;;YACpE,0BAAqB,yEAAsC;YAC3D,0BAAqB,GAAuB,EAAE,CAAC;YAC/C,uBAAkB,GAA4C,EAAE,CAAC;YAGzD,oBAAe,GAAwB,EAAE,CAAC;QA8RnD,CAAC;QA5RA,IAAa,KAAK;;YACjB,MAAM,UAAU,GAAW,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAEtF,OAAO,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,KAAK,mCAAI,UAAU,CAAC;QACzC,CAAC;QAED,IAAa,MAAM;;YAClB,OAAO,CAAC,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,CAAA,CAAC;QAC/B,CAAC;QAED,IAAa,KAAK;;YACjB,OAAO,MAAA,MAAA,IAAI,CAAC,MAA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EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAChD,CACD,CACD,CACD,CACD,CACD,EACD,IAAA,eAAG,EAAC,GAAG,EAAE,CACR,IAAA,yBAAc,EAAC,uBAAuB,EAAE;wBACvC,OAAO,EAAE;4BACR,UAAU,EAAE,IAAI,CAAC,eAAe;yBAChC;qBACD,CAAC,CACF,CACD;iBACF,CAAC,CAAC,CACH,CAAC;aACF;YAED,OAAO,IAAA,SAAE,EAAC,EAAC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAC,CAAC,CAAC;QACzD,CAAC;;;;kCA3NA,IAAA,8BAAiB,GAAE;0CAmBnB,IAAA,8BAAiB,GAAE;2CAanB,IAAA,8BAAiB,GAAE;QA/BpB,uLAAI,MAAM,wCAET;QAiBD,+MAAI,cAAc,wCAEjB;QAWD,kNAAI,eAAe,wCAElB;QA3GF,gKAoSC;QApSY,eAAe;QAAf,+DAAe;;WAAf,eAAe"}
1
+ {"version":3,"file":"page.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/page.entity.ts"],"names":[],"mappings":";;;;AAAA,uCAAuF;AACvF,+CAAyB;AACzB,mDAA6B;AAC7B,+BAAoC;AACpC,8CAAwC;AAExC,2CAAoE;AAEpE,wCAAwC;AACxC,0CAA2C;AAE3C,wEAAuE;AACvE,mDAAmE;AAEnE,yDAAuD;AACvD,qEAAmE;AACnE,uCAA4G;AAG/F,QAAA,eAAe;4BAD3B,IAAA,yBAAY,GAAE;;;;;;QACF,eAAe,qBAAC,SAAQ,yCAAgC;;;YAC3D,WAAM,yEAAuB;QA6JvC,CAAC;QA3JA,IAAa,KAAK;;YACjB,MAAM,UAAU,GAAW,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;YAEtF,OAAO,MAAA,CAAC,IAAA,cAAO,EA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MAAO,CAAC,MAAM,EAAE;gBAC1D,KAAK,EAAE,IAAI,CAAC,gBAAgB;gBAC5B,OAAO,EAAE;oBACR,SAAS,EAAE,IAAI,CAAC,MAAM;oBACtB,YAAY,EAAE,IAAI,sBAAY,CAAC,IAAI,CAAC;iBACpC;gBACD,iBAAiB,EAAE,IAAI,CAAC,YAAY;gBACpC,OAAO,EAAE,KAAK;aACd,CAAC,CAAC;YAEH,OAAO,IAAA,SAAE,EAAC;gBACT,MAAM;gBACN,MAAM,EAAE,IAAI;gBACZ,eAAe,EAAE,CAAO,OAAe,EAAE,EAAE;oBAAC,OAAA,CAAC;wBAC5C,OAAO,EAAE,IAAA,yBAAc,EAAC,uBAAuB,EAAE;4BAChD,OAAO,EAAE;gCACR,IAAI,EAAE,IAAI;gCACV,WAAW,EAAE,OAAO;6BACpB;yBACD,CAAC;wBACF,QAAQ,EAAE,IAAI,CAAC,UAAU;qBACzB,CAAC,CAAA;kBAAA;gBACF,gBAAgB,EAAE,CAAC,IAAA,8BAAoB,GAAE,EAAE,IAAA,2BAAiB,GAAE,CAAC;gBAC/D,kBAAkB,EAAE,CAAC,IAAA,+BAAqB,GAAE,EAAE,IAAA,2BAAiB,GAAE,CAAC;aAClE,CAAC,CAAC;QACJ,CAAC;QAED,mBAAmB;;YAClB,MAAA,IAAI,CAAC,gBAAgB,0CAClB,aAAa,GACd,wBAAwB,GACxB,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE;gBACvB,UAAU,CAAC,yBAAyB,EAAE,CAAC;YACxC,CAAC,CAAC,CAAC;QACL,CAAC;;;;kCA1FA,IAAA,8BAAiB,GAAE;QACpB,uLAAI,MAAM,wCAET;QAtEF,gKA8JC;QA9JY,eAAe;QAAf,+DAAe;;WAAf,eAAe"}
@@ -0,0 +1,5 @@
1
+ import { NgDocEntityPlugin } from '../types';
2
+ /**
3
+ * Adds the given string to the dependencies of the entity.
4
+ */
5
+ export declare function addToDependenciesPlugin(): NgDocEntityPlugin<string>;
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addToDependenciesPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ /**
6
+ * Adds the given string to the dependencies of the entity.
7
+ */
8
+ function addToDependenciesPlugin() {
9
+ return {
10
+ id: 'addToDependenciesPlugin',
11
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
12
+ entity.dependencies.add(data);
13
+ return data;
14
+ }),
15
+ };
16
+ }
17
+ exports.addToDependenciesPlugin = addToDependenciesPlugin;
18
+ // snippet:ts
19
+ // snippet:ts
20
+ //# sourceMappingURL=add-to-dependencies.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-to-dependencies.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/add-to-dependencies.plugin.ts"],"names":[],"mappings":";;;;AAEA;;GAEG;AACH,SAAgB,uBAAuB;IACtC,OAAO;QACN,EAAE,EAAE,yBAAyB;QAC7B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;YAE9B,OAAO,IAAI,CAAC;QACb,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AATD,0DASC;AAED,aAAa;AAEb,aAAa"}
@@ -0,0 +1,26 @@
1
+ import { NgDocEntity } from '../../abstractions/entity';
2
+ import { NgDocEntityPlugin } from '../types';
3
+ type ApplyFn<T, TEntity extends NgDocEntity> = (data: T, entity: TEntity) => Promise<T>;
4
+ type TransformFn<T, R, TEntity extends NgDocEntity> = (data: T, apply: ApplyFn<R, TEntity>, entity: TEntity) => Promise<T>;
5
+ /**
6
+ *
7
+ * @param fn
8
+ * @param get
9
+ * @param transform
10
+ * @param plugins
11
+ */
12
+ export declare function applyPlugin<T, R, TEntity extends NgDocEntity = NgDocEntity>(transform: TransformFn<T, R, TEntity>, plugins: (data: R) => Array<NgDocEntityPlugin<R, TEntity>>): NgDocEntityPlugin<T, TEntity>;
13
+ /**
14
+ *
15
+ */
16
+ export declare function forArrayItems<T, TEntity extends NgDocEntity>(): TransformFn<T[], T, TEntity>;
17
+ /**
18
+ *
19
+ */
20
+ export declare function forObjectValues<T, K extends keyof T, TEntity extends NgDocEntity>(): TransformFn<T, T[K], TEntity>;
21
+ /**
22
+ *
23
+ * @param key
24
+ */
25
+ export declare function forObjectValue<T extends object, K extends keyof T, TEntity extends NgDocEntity>(key: K): TransformFn<T, T[K], TEntity>;
26
+ export {};
@@ -0,0 +1,65 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.forObjectValue = exports.forObjectValues = exports.forArrayItems = exports.applyPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const core_1 = require("@ng-doc/core");
6
+ /**
7
+ *
8
+ * @param fn
9
+ * @param get
10
+ * @param transform
11
+ * @param plugins
12
+ */
13
+ function applyPlugin(transform, plugins) {
14
+ return {
15
+ id: 'apply-plugins',
16
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
17
+ const apply = (data) => tslib_1.__awaiter(this, void 0, void 0, function* () {
18
+ for (const plugin of plugins(data)) {
19
+ // eslint-disable-next-line no-await-in-loop
20
+ data = yield plugin.execute(data, entity);
21
+ }
22
+ return data;
23
+ });
24
+ return transform(data, apply, entity);
25
+ }),
26
+ };
27
+ }
28
+ exports.applyPlugin = applyPlugin;
29
+ /**
30
+ *
31
+ */
32
+ function forArrayItems() {
33
+ return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
34
+ for (let i = 0; i < data.length; i++) {
35
+ data[i] = yield apply(data[i], entity);
36
+ }
37
+ return data;
38
+ });
39
+ }
40
+ exports.forArrayItems = forArrayItems;
41
+ /**
42
+ *
43
+ */
44
+ function forObjectValues() {
45
+ return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
46
+ const keys = (0, core_1.objectKeys)(data);
47
+ for (const k of keys) {
48
+ data[k] = yield apply(data[k], entity);
49
+ }
50
+ return data;
51
+ });
52
+ }
53
+ exports.forObjectValues = forObjectValues;
54
+ /**
55
+ *
56
+ * @param key
57
+ */
58
+ function forObjectValue(key) {
59
+ return (data, apply, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
60
+ data[key] = yield apply(data[key], entity);
61
+ return data;
62
+ });
63
+ }
64
+ exports.forObjectValue = forObjectValue;
65
+ //# sourceMappingURL=apply.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apply.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/apply.plugin.ts"],"names":[],"mappings":";;;;AAAA,uCAAwC;AAWxC;;;;;;GAMG;AACH,SAAgB,WAAW,CAC1B,SAAqC,EACrC,OAA0D;IAE1D,OAAO;QACN,EAAE,EAAE,eAAe;QACnB,OAAO,EAAE,CAAO,IAAO,EAAE,MAAe,EAAc,EAAE;YACvD,MAAM,KAAK,GAAG,CAAO,IAAO,EAAE,EAAE;gBAC/B,KAAK,MAAM,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,EAAE;oBACnC,4CAA4C;oBAC5C,IAAI,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;iBAC1C;gBAED,OAAO,IAAI,CAAC;YACb,CAAC,CAAA,CAAC;YAEF,OAAO,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QACvC,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAnBD,kCAmBC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC5B,OAAO,CAAO,IAAS,EAAE,KAA0B,EAAE,MAAe,EAAgB,EAAE;QACrF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;SACvC;QAED,OAAO,IAAI,CAAC;IACb,CAAC,CAAA,CAAC;AACH,CAAC;AARD,sCAQC;AAED;;GAEG;AACH,SAAgB,eAAe;IAC9B,OAAO,CAAO,IAAO,EAAE,KAA6B,EAAE,MAAe,EAAc,EAAE;QACpF,MAAM,IAAI,GAAQ,IAAA,iBAAU,EAAC,IAAc,CAAQ,CAAC;QAEpD,KAAK,MAAM,CAAC,IAAI,IAAI,EAAE;YACrB,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC;SACvC;QAED,OAAO,IAAI,CAAC;IACb,CAAC,CAAA,CAAC;AACH,CAAC;AAVD,0CAUC;AAED;;;GAGG;AACH,SAAgB,cAAc,CAC7B,GAAM;IAEN,OAAO,CAAO,IAAO,EAAE,KAA6B,EAAE,MAAe,EAAc,EAAE;QACpF,IAAI,CAAC,GAAG,CAAC,GAAG,MAAM,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;QAE3C,OAAO,IAAI,CAAC;IACb,CAAC,CAAA,CAAC;AACH,CAAC;AARD,wCAQC"}
@@ -0,0 +1,6 @@
1
+ import { NgDocAsset } from '../../../../interfaces';
2
+ import { NgDocEntityPlugin } from '../types';
3
+ /**
4
+ *
5
+ */
6
+ export declare function extractSnippetsPlugin(): NgDocEntityPlugin<NgDocAsset[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.extractSnippetsPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ /**
7
+ *
8
+ */
9
+ function extractSnippetsPlugin() {
10
+ return {
11
+ id: 'extractSnippetsPlugin',
12
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ return data
14
+ .map((asset) => {
15
+ const snippets = (0, helpers_1.snippetsFromAsset)(asset, entity.context.inlineStyleLanguage);
16
+ return snippets.length ? snippets : [asset];
17
+ })
18
+ .flat();
19
+ }),
20
+ };
21
+ }
22
+ exports.extractSnippetsPlugin = extractSnippetsPlugin;
23
+ //# sourceMappingURL=extract-snippets.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"extract-snippets.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/extract-snippets.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAsD;AAItD;;GAEG;AACH,SAAgB,qBAAqB;IACpC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAI;iBACT,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,QAAQ,GAAG,IAAA,2BAAiB,EAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBAE9E,OAAO,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;YAC7C,CAAC,CAAC;iBACD,IAAI,EAAE,CAAC;QACV,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAbD,sDAaC"}
@@ -0,0 +1,6 @@
1
+ import { NgDocRouteEntity } from '../../abstractions/route.entity';
2
+ import { NgDocEntityPlugin } from '../types';
3
+ /**
4
+ *
5
+ */
6
+ export declare function fillIndexesPlugin(): NgDocEntityPlugin<string, NgDocRouteEntity>;
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.fillIndexesPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ const build_indexes_1 = require("../../../../helpers/build-indexes");
7
+ /**
8
+ *
9
+ */
10
+ function fillIndexesPlugin() {
11
+ return {
12
+ id: 'fillIndexesPlugin',
13
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
14
+ const indexes = yield (0, build_indexes_1.buildIndexes)({
15
+ title: entity.title,
16
+ content: data,
17
+ pageType: (0, helpers_1.getPageType)(entity),
18
+ breadcrumbs: entity.breadcrumbs,
19
+ route: entity.fullRoute,
20
+ });
21
+ entity.indexes.push(...indexes);
22
+ return data;
23
+ }),
24
+ };
25
+ }
26
+ exports.fillIndexesPlugin = fillIndexesPlugin;
27
+ //# sourceMappingURL=fill-indexes.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fill-indexes.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/fill-indexes.plugin.ts"],"names":[],"mappings":";;;;AAEA,iDAAgD;AAChD,qEAA+D;AAI/D;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,mBAAmB;QACvB,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,MAAM,OAAO,GAAqB,MAAM,IAAA,4BAAY,EAAC;gBACpD,KAAK,EAAE,MAAM,CAAC,KAAK;gBACnB,OAAO,EAAE,IAAI;gBACb,QAAQ,EAAE,IAAA,qBAAW,EAAC,MAAM,CAAC;gBAC7B,WAAW,EAAE,MAAM,CAAC,WAAW;gBAC/B,KAAK,EAAE,MAAM,CAAC,SAAS;aACvB,CAAC,CAAC;YAEH,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;YAEhC,OAAO,IAAI,CAAC;QACb,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAjBD,8CAiBC"}
@@ -0,0 +1,9 @@
1
+ export * from './add-to-dependencies.plugin';
2
+ export * from "./apply.plugin";
3
+ export * from './extract-snippets.plugin';
4
+ export * from "./fill-indexes.plugin";
5
+ export * from "./markdown-to-html.plugin";
6
+ export * from "./post-process-html.plugin";
7
+ export * from "./process-html.plugin";
8
+ export * from './remove-lines.plugin';
9
+ export * from "./wrap-code.plugin";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./add-to-dependencies.plugin"), exports);
5
+ tslib_1.__exportStar(require("./apply.plugin"), exports);
6
+ tslib_1.__exportStar(require("./extract-snippets.plugin"), exports);
7
+ tslib_1.__exportStar(require("./fill-indexes.plugin"), exports);
8
+ tslib_1.__exportStar(require("./markdown-to-html.plugin"), exports);
9
+ tslib_1.__exportStar(require("./post-process-html.plugin"), exports);
10
+ tslib_1.__exportStar(require("./process-html.plugin"), exports);
11
+ tslib_1.__exportStar(require("./remove-lines.plugin"), exports);
12
+ tslib_1.__exportStar(require("./wrap-code.plugin"), exports);
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/index.ts"],"names":[],"mappings":";;;AAAA,uEAA6C;AAC7C,yDAA+B;AAC/B,oEAA0C;AAC1C,gEAAsC;AACtC,oEAA0C;AAC1C,qEAA2C;AAC3C,gEAAsC;AACtC,gEAAsC;AACtC,6DAAmC"}
@@ -0,0 +1,5 @@
1
+ import { NgDocEntityPlugin } from '../types';
2
+ /**
3
+ *
4
+ */
5
+ export declare function markdownToHtmlPlugin(): NgDocEntityPlugin<string>;
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.markdownToHtmlPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ /**
7
+ *
8
+ */
9
+ function markdownToHtmlPlugin() {
10
+ return {
11
+ id: 'markdownToHtmlPlugin',
12
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ if ((0, helpers_1.isPageEntity)(entity)) {
14
+ return (0, helpers_1.markdownToHtml)(data, entity.mdFolder, entity.dependencies.add.bind(entity.dependencies));
15
+ }
16
+ return (0, helpers_1.markdownToHtml)(data);
17
+ }),
18
+ };
19
+ }
20
+ exports.markdownToHtmlPlugin = markdownToHtmlPlugin;
21
+ //# sourceMappingURL=markdown-to-html.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown-to-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/markdown-to-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAiE;AAGjE;;GAEG;AACH,SAAgB,oBAAoB;IACnC,OAAO;QACN,EAAE,EAAE,sBAAsB;QAC1B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,IAAI,IAAA,sBAAY,EAAC,MAAM,CAAC,EAAE;gBACzB,OAAO,IAAA,wBAAc,EAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;aAChG;YAED,OAAO,IAAA,wBAAc,EAAC,IAAI,CAAC,CAAC;QAC7B,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAXD,oDAWC"}
@@ -0,0 +1,5 @@
1
+ import { NgDocEntityPlugin } from '../types';
2
+ /**
3
+ *
4
+ */
5
+ export declare function postProcessHtmlPlugin(): NgDocEntityPlugin<string>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.postProcessHtmlPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ /**
7
+ *
8
+ */
9
+ function postProcessHtmlPlugin() {
10
+ return {
11
+ id: 'postProcessHtmlPlugin',
12
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ return (0, helpers_1.postProcessHtml)(data, entity);
14
+ }),
15
+ };
16
+ }
17
+ exports.postProcessHtmlPlugin = postProcessHtmlPlugin;
18
+ //# sourceMappingURL=post-process-html.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"post-process-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/post-process-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAoD;AAGpD;;GAEG;AACH,SAAgB,qBAAqB;IACpC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAA,yBAAe,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QACtC,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAPD,sDAOC"}
@@ -0,0 +1,5 @@
1
+ import { NgDocEntityPlugin } from '../types';
2
+ /**
3
+ *
4
+ */
5
+ export declare function processHtmlPlugin(): NgDocEntityPlugin<string>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.processHtmlPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ /**
7
+ *
8
+ */
9
+ function processHtmlPlugin() {
10
+ return {
11
+ id: 'processHtmlPlugin',
12
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ return (0, helpers_1.processHtml)(data, entity);
14
+ }),
15
+ };
16
+ }
17
+ exports.processHtmlPlugin = processHtmlPlugin;
18
+ //# sourceMappingURL=process-html.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"process-html.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/process-html.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAAgD;AAGhD;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,mBAAmB;QACvB,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAA,qBAAW,EAAC,IAAI,EAAE,MAAM,CAAC,CAAC;QAClC,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAPD,8CAOC"}
@@ -0,0 +1,6 @@
1
+ import { NgDocAsset } from '../../../../interfaces';
2
+ import { NgDocEntityPlugin } from '../types';
3
+ /**
4
+ *
5
+ */
6
+ export declare function removeLinesPlugin(): NgDocEntityPlugin<NgDocAsset[]>;
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.removeLinesPlugin = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const helpers_1 = require("../../../../helpers");
6
+ /**
7
+ *
8
+ */
9
+ function removeLinesPlugin() {
10
+ return {
11
+ id: 'extractSnippetsPlugin',
12
+ execute: (data, entity) => tslib_1.__awaiter(this, void 0, void 0, function* () {
13
+ return data
14
+ .map((asset) => {
15
+ const snippets = (0, helpers_1.snippetsFromAsset)(asset, entity.context.inlineStyleLanguage);
16
+ return (snippets.length ? snippets : [asset]).map((asset) => (Object.assign(Object.assign({}, asset), { code: (0, helpers_1.removeLinesFromCode)(asset.code) })));
17
+ })
18
+ .flat();
19
+ }),
20
+ };
21
+ }
22
+ exports.removeLinesPlugin = removeLinesPlugin;
23
+ //# sourceMappingURL=remove-lines.plugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remove-lines.plugin.js","sourceRoot":"","sources":["../../../../../../../libs/builder/engine/entities/plugins/entity-plugins/remove-lines.plugin.ts"],"names":[],"mappings":";;;;AAAA,iDAA2E;AAI3E;;GAEG;AACH,SAAgB,iBAAiB;IAChC,OAAO;QACN,EAAE,EAAE,uBAAuB;QAC3B,OAAO,EAAE,CAAO,IAAI,EAAE,MAAM,EAAE,EAAE;YAC/B,OAAO,IAAI;iBACT,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;gBACd,MAAM,QAAQ,GAAG,IAAA,2BAAiB,EAAC,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAC;gBAE9E,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,iCACzD,KAAK,KACR,IAAI,EAAE,IAAA,6BAAmB,EAAC,KAAK,CAAC,IAAI,CAAC,IACpC,CAAC,CAAC;YACL,CAAC,CAAC;iBACD,IAAI,EAAE,CAAC;QACV,CAAC,CAAA;KACD,CAAC;AACH,CAAC;AAhBD,8CAgBC"}
@@ -0,0 +1,6 @@
1
+ import { NgDocEntityPlugin } from '../types';
2
+ /**
3
+ *
4
+ * @param lang
5
+ */
6
+ export declare function wrapCodePlugin(lang: string): NgDocEntityPlugin<string>;