@ng-doc/builder 15.1.1 → 15.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/engine/.cache/apps/ng-doc/src/app/docs/content/api-templating/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/demo/ng-doc.page.js +51 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/ng-doc.category.js +41 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/playground/ng-doc.page.js +50 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guides/templating/ng-doc.page.js +51 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/content/keywords/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/content/ng-doc.category.js +28 -5
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/layout/ng-doc.page.js +42 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/ng-doc.category.js +28 -5
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/themes/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/customization/type-controls/ng-doc.page.js +43 -0
- package/engine/.cache/apps/ng-doc/src/app/docs/develop/ng-doc.page.js +39 -10
- package/engine/.cache/apps/ng-doc/src/app/docs/entities/api/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/entities/category/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/entities/dependencies/ng-doc.page.js +40 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/entities/ng-doc.category.js +28 -5
- package/engine/.cache/apps/ng-doc/src/app/docs/entities/page/ng-doc.page.js +43 -11
- package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/configuration/ng-doc.page.js +39 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/installation/ng-doc.page.js +39 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/ng-doc.category.js +29 -6
- package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/roadmap/ng-doc.page.js +39 -8
- package/engine/.cache/apps/ng-doc/src/app/docs/getting-started/what-is-ng-doc/ng-doc.page.js +38 -7
- package/engine/.cache/apps/ng-doc/src/app/docs/ng-doc.api.js +50 -27
- package/engine/actions/playground.action.d.ts +2 -2
- package/engine/actions/playground.action.js +12 -11
- package/engine/actions/playground.action.js.map +1 -1
- package/engine/builder.d.ts +2 -2
- package/engine/builder.js +20 -8
- package/engine/builder.js.map +1 -1
- package/engine/entities/abstractions/file.entity.js.map +1 -1
- package/engine/entities/abstractions/import.cjs +9 -0
- package/engine/entities/abstractions/source-file.entity.d.ts +4 -0
- package/engine/entities/abstractions/source-file.entity.js +4 -0
- package/engine/entities/abstractions/source-file.entity.js.map +1 -1
- package/engine/entities/api.entity.d.ts +1 -0
- package/engine/entities/api.entity.js +2 -1
- package/engine/entities/api.entity.js.map +1 -1
- package/engine/entities/category.entity.d.ts +1 -0
- package/engine/entities/category.entity.js +4 -0
- package/engine/entities/category.entity.js.map +1 -1
- package/engine/entities/dependencies.entity.d.ts +13 -3
- package/engine/entities/dependencies.entity.js +61 -63
- package/engine/entities/dependencies.entity.js.map +1 -1
- package/engine/entities/index.d.ts +0 -1
- package/engine/entities/index.js +0 -1
- package/engine/entities/index.js.map +1 -1
- package/engine/entities/page.entity.d.ts +1 -4
- package/engine/entities/page.entity.js +7 -15
- package/engine/entities/page.entity.js.map +1 -1
- package/engine/template-filters.d.ts +2 -1
- package/engine/template-filters.js +8 -1
- package/engine/template-filters.js.map +1 -1
- package/engine/variables.d.ts +0 -2
- package/engine/variables.js +1 -3
- package/engine/variables.js.map +1 -1
- package/helpers/build-assets.js +2 -0
- package/helpers/build-assets.js.map +1 -1
- package/helpers/entity-type.d.ts +5 -4
- package/helpers/entity-type.js +10 -9
- package/helpers/entity-type.js.map +1 -1
- package/helpers/get-component-asset.d.ts +10 -0
- package/helpers/get-component-asset.js +60 -0
- package/helpers/get-component-asset.js.map +1 -0
- package/helpers/get-demo-class-declarations.d.ts +6 -0
- package/helpers/get-demo-class-declarations.js +26 -0
- package/helpers/get-demo-class-declarations.js.map +1 -0
- package/helpers/get-entity-constructor.js +0 -3
- package/helpers/get-entity-constructor.js.map +1 -1
- package/helpers/get-playground-by-id.d.ts +7 -0
- package/helpers/get-playground-by-id.js +21 -0
- package/helpers/get-playground-by-id.js.map +1 -0
- package/helpers/get-playground-properties.d.ts +25 -0
- package/helpers/get-playground-properties.js +114 -0
- package/helpers/get-playground-properties.js.map +1 -0
- package/helpers/index.d.ts +4 -1
- package/helpers/index.js +4 -1
- package/helpers/index.js.map +1 -1
- package/package.json +3 -2
- package/templates/page.module.ts.nunj +9 -3
- package/templates/playgrounds.ts.nunj +70 -0
- package/types/component-asset.d.ts +2 -0
- package/types/component-asset.js +3 -0
- package/types/component-asset.js.map +1 -0
- package/types/index.d.ts +1 -0
- package/types/index.js +1 -0
- package/types/index.js.map +1 -1
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-demo/button-demo.component.js +0 -28
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/demos/button-inline-demo/button-inline-demo.component.js +0 -30
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.dependencies.js +0 -12
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.module.js +0 -27
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.page.js +0 -11
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/ng-doc.category.js +0 -9
- package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/templating/ng-doc.page.js +0 -11
- package/engine/.cache/apps/ng-doc/src/app/docs/develop/custom-data.js +0 -6
- package/engine/.cache/ng-doc.buildinfo.json +0 -1
- package/engine/entities/playground.entity.d.ts +0 -16
- package/engine/entities/playground.entity.js +0 -65
- package/engine/entities/playground.entity.js.map +0 -1
- package/helpers/declaration-to-playground.d.ts +0 -7
- package/helpers/declaration-to-playground.js +0 -33
- package/helpers/declaration-to-playground.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-asset.js","sourceRoot":"","sources":["../../../../libs/builder/types/component-asset.ts"],"names":[],"mappings":""}
|
package/types/index.d.ts
CHANGED
package/types/index.js
CHANGED
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
tslib_1.__exportStar(require("./action"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./artifact-processor"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./component-asset"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./constructable"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./keyword-type"), exports);
|
|
8
9
|
tslib_1.__exportStar(require("./snippet-type"), exports);
|
package/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,0DAAgC;AAChC,yDAA+B;AAC/B,yDAA+B;AAC/B,mEAAyC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../libs/builder/types/index.ts"],"names":[],"mappings":";;;AAAA,mDAAyB;AACzB,+DAAqC;AACrC,4DAAkC;AAClC,0DAAgC;AAChC,yDAA+B;AAC/B,yDAA+B;AAC/B,mEAAyC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
exports.__esModule = true;
|
|
9
|
-
exports.ButtonDemoComponent = void 0;
|
|
10
|
-
var core_1 = require("@angular/core");
|
|
11
|
-
var ButtonDemoComponent = /** @class */ (function () {
|
|
12
|
-
function ButtonDemoComponent(notifyService) {
|
|
13
|
-
this.notifyService = notifyService;
|
|
14
|
-
}
|
|
15
|
-
ButtonDemoComponent.prototype.clickEvent = function () {
|
|
16
|
-
this.notifyService.notify('Button was clicked!');
|
|
17
|
-
};
|
|
18
|
-
ButtonDemoComponent = __decorate([
|
|
19
|
-
(0, core_1.Component)({
|
|
20
|
-
selector: 'ng-doc-button-demo',
|
|
21
|
-
templateUrl: './button-demo.component.html',
|
|
22
|
-
styleUrls: ['./button-demo.component.scss'],
|
|
23
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush,
|
|
24
|
-
})
|
|
25
|
-
], ButtonDemoComponent);
|
|
26
|
-
return ButtonDemoComponent;
|
|
27
|
-
}());
|
|
28
|
-
exports.ButtonDemoComponent = ButtonDemoComponent;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
exports.__esModule = true;
|
|
9
|
-
exports.ButtonInlineDemoComponent = void 0;
|
|
10
|
-
var core_1 = require("@angular/core");
|
|
11
|
-
var ButtonInlineDemoComponent = /** @class */ (function () {
|
|
12
|
-
/* NgDocCodeSnippetStart(Constructor) */
|
|
13
|
-
function ButtonInlineDemoComponent(notifyService) {
|
|
14
|
-
this.notifyService = notifyService;
|
|
15
|
-
}
|
|
16
|
-
/* NgDocCodeSnippetEnd(Constructor) */
|
|
17
|
-
/* NgDocCodeSnippetStart(ClickEvent) */
|
|
18
|
-
ButtonInlineDemoComponent.prototype.clickEvent = function () {
|
|
19
|
-
this.notifyService.notify('Button was clicked!');
|
|
20
|
-
};
|
|
21
|
-
ButtonInlineDemoComponent = __decorate([
|
|
22
|
-
(0, core_1.Component)({
|
|
23
|
-
selector: 'ng-doc-button-inline-demo',
|
|
24
|
-
template: "\n\t\t<!-- NgDocHTMLSnippetStart(Button Template) -->\n\t\t<button ng-doc-button (click)=\"clickEvent()\">Just a button</button>\n\t\t<!-- NgDocHTMLSnippetEnd(Button Template) -->\n\t",
|
|
25
|
-
changeDetection: core_1.ChangeDetectionStrategy.OnPush
|
|
26
|
-
})
|
|
27
|
-
], ButtonInlineDemoComponent);
|
|
28
|
-
return ButtonInlineDemoComponent;
|
|
29
|
-
}());
|
|
30
|
-
exports.ButtonInlineDemoComponent = ButtonInlineDemoComponent;
|
package/engine/.cache/apps/ng-doc/src/app/docs/content/guidelines/demo/ng-doc.dependencies.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var button_demo_component_1 = require("./demos/button-demo/button-demo.component");
|
|
4
|
-
var button_inline_demo_component_1 = require("./demos/button-inline-demo/button-inline-demo.component");
|
|
5
|
-
var ng_doc_module_1 = require("./ng-doc.module");
|
|
6
|
-
var DemoPageDependencies = {
|
|
7
|
-
// Add your module here
|
|
8
|
-
module: ng_doc_module_1.DemoPageModule,
|
|
9
|
-
// And all demos that you'd like to use
|
|
10
|
-
demo: { ButtonDemoComponent: button_demo_component_1.ButtonDemoComponent, ButtonInlineDemoComponent: button_inline_demo_component_1.ButtonInlineDemoComponent }
|
|
11
|
-
};
|
|
12
|
-
exports["default"] = DemoPageDependencies;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
exports.__esModule = true;
|
|
9
|
-
exports.DemoPageModule = void 0;
|
|
10
|
-
var core_1 = require("@angular/core");
|
|
11
|
-
var button_1 = require("@ng-doc/ui-kit/components/button");
|
|
12
|
-
var button_demo_component_1 = require("./demos/button-demo/button-demo.component");
|
|
13
|
-
var button_inline_demo_component_1 = require("./demos/button-inline-demo/button-inline-demo.component");
|
|
14
|
-
var DemoPageModule = /** @class */ (function () {
|
|
15
|
-
function DemoPageModule() {
|
|
16
|
-
}
|
|
17
|
-
DemoPageModule = __decorate([
|
|
18
|
-
(0, core_1.NgModule)({
|
|
19
|
-
// Import dependencies
|
|
20
|
-
imports: [button_1.NgDocButtonModule],
|
|
21
|
-
// Declarations for your demos
|
|
22
|
-
declarations: [button_demo_component_1.ButtonDemoComponent, button_inline_demo_component_1.ButtonInlineDemoComponent],
|
|
23
|
-
})
|
|
24
|
-
], DemoPageModule);
|
|
25
|
-
return DemoPageModule;
|
|
26
|
-
}());
|
|
27
|
-
exports.DemoPageModule = DemoPageModule;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var ng_doc_category_1 = require("../ng-doc.category");
|
|
4
|
-
var DemoPage = {
|
|
5
|
-
title: 'Demo',
|
|
6
|
-
mdFile: './index.md',
|
|
7
|
-
category: ng_doc_category_1["default"],
|
|
8
|
-
order: 2,
|
|
9
|
-
keyword: 'ContentGuidelinesDemo',
|
|
10
|
-
};
|
|
11
|
-
exports["default"] = DemoPage;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var ng_doc_category_1 = require("../ng-doc.category");
|
|
4
|
-
var TemplatingPage = {
|
|
5
|
-
title: 'Templating',
|
|
6
|
-
mdFile: './index.md',
|
|
7
|
-
category: ng_doc_category_1["default"],
|
|
8
|
-
keyword: 'ContentGuidelinesTemplating',
|
|
9
|
-
order: 1,
|
|
10
|
-
};
|
|
11
|
-
exports["default"] = TemplatingPage;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":"4.7.3"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { NgDocPlayground } from '@ng-doc/core';
|
|
2
|
-
import { Observable } from 'rxjs';
|
|
3
|
-
import { ClassDeclaration } from 'ts-morph';
|
|
4
|
-
import { NgDocBuiltOutput } from '../../interfaces';
|
|
5
|
-
import { NgDocEntity } from './abstractions/entity';
|
|
6
|
-
import { NgDocFileEntity } from './abstractions/file.entity';
|
|
7
|
-
import { NgDocPageEntity } from './page.entity';
|
|
8
|
-
export declare class NgDocPlaygroundEntity extends NgDocFileEntity<NgDocPlayground> {
|
|
9
|
-
readonly isRoot: boolean;
|
|
10
|
-
readonly buildCandidates: NgDocEntity[];
|
|
11
|
-
get parent(): NgDocPageEntity | undefined;
|
|
12
|
-
protected build(): Observable<NgDocBuiltOutput[]>;
|
|
13
|
-
emit(): Observable<void>;
|
|
14
|
-
update(): Observable<void>;
|
|
15
|
-
getTargetForPlayground(playgroundId: string): ClassDeclaration | undefined;
|
|
16
|
-
}
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NgDocPlaygroundEntity = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const path = tslib_1.__importStar(require("path"));
|
|
6
|
-
const rxjs_1 = require("rxjs");
|
|
7
|
-
const operators_1 = require("rxjs/operators");
|
|
8
|
-
const ts_morph_1 = require("ts-morph");
|
|
9
|
-
const helpers_1 = require("../../helpers");
|
|
10
|
-
const variables_1 = require("../variables");
|
|
11
|
-
const file_entity_1 = require("./abstractions/file.entity");
|
|
12
|
-
class NgDocPlaygroundEntity extends file_entity_1.NgDocFileEntity {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.isRoot = false;
|
|
16
|
-
this.buildCandidates = [];
|
|
17
|
-
}
|
|
18
|
-
get parent() {
|
|
19
|
-
const expectedPath = path.join(this.sourceFileFolder, variables_1.PAGE_NAME);
|
|
20
|
-
const buildable = this.builder.get(expectedPath);
|
|
21
|
-
return (0, helpers_1.isPageEntity)(buildable) ? buildable : undefined;
|
|
22
|
-
}
|
|
23
|
-
build() {
|
|
24
|
-
return (0, rxjs_1.of)([]);
|
|
25
|
-
}
|
|
26
|
-
emit() {
|
|
27
|
-
/*
|
|
28
|
-
We don't want to emit current source file, because it may be depended on project's files,
|
|
29
|
-
so it may take too much time, the fastest way is to parse source file.
|
|
30
|
-
*/
|
|
31
|
-
return (0, rxjs_1.from)(this.sourceFile.refreshFromFileSystem()).pipe((0, operators_1.mapTo)(void 0));
|
|
32
|
-
}
|
|
33
|
-
update() {
|
|
34
|
-
return (0, rxjs_1.of)(null).pipe((0, operators_1.tap)(() => {
|
|
35
|
-
this.readyToBuild = true;
|
|
36
|
-
}), (0, operators_1.mapTo)(void 0));
|
|
37
|
-
}
|
|
38
|
-
getTargetForPlayground(playgroundId) {
|
|
39
|
-
var _a, _b;
|
|
40
|
-
const expression = this.getObjectExpressionFromDefault();
|
|
41
|
-
if (!expression) {
|
|
42
|
-
throw new Error(`Failed to load ${this.sourceFile.getFilePath()}. Make sure that you have exported it as default.`);
|
|
43
|
-
}
|
|
44
|
-
const playgroundExpression = expression.getProperty(playgroundId);
|
|
45
|
-
if (ts_morph_1.Node.isPropertyAssignment(playgroundExpression)) {
|
|
46
|
-
const playgroundInitializer = playgroundExpression.getInitializer();
|
|
47
|
-
if (ts_morph_1.Node.isObjectLiteralExpression(playgroundInitializer)) {
|
|
48
|
-
const target = playgroundInitializer.getProperty('target');
|
|
49
|
-
if (ts_morph_1.Node.isPropertyAssignment(target)) {
|
|
50
|
-
const targetInitializer = target.getInitializer();
|
|
51
|
-
if (ts_morph_1.Node.isIdentifier(targetInitializer)) {
|
|
52
|
-
const declaration = (_b = (_a = targetInitializer
|
|
53
|
-
.getType()) === null || _a === void 0 ? void 0 : _a.getSymbol()) === null || _b === void 0 ? void 0 : _b.getDeclarations()[0];
|
|
54
|
-
if (ts_morph_1.Node.isClassDeclaration(declaration)) {
|
|
55
|
-
return declaration;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
exports.NgDocPlaygroundEntity = NgDocPlaygroundEntity;
|
|
65
|
-
//# sourceMappingURL=playground.entity.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"playground.entity.js","sourceRoot":"","sources":["../../../../../libs/builder/engine/entities/playground.entity.ts"],"names":[],"mappings":";;;;AACA,mDAA6B;AAC7B,+BAA0C;AAC1C,8CAA0C;AAC1C,uCAA+G;AAE/G,2CAA2C;AAE3C,4CAAuC;AAEvC,4DAA2D;AAG3D,MAAa,qBAAsB,SAAQ,6BAAgC;IAA3E;;QACU,WAAM,GAAY,KAAK,CAAC;QACf,oBAAe,GAAkB,EAAE,CAAC;IAkEvD,CAAC;IAhEA,IAAa,MAAM;QAClB,MAAM,YAAY,GAAW,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,gBAAgB,EAAE,qBAAS,CAAC,CAAC;QACzE,MAAM,SAAS,GAA4B,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QAE1E,OAAO,IAAA,sBAAY,EAAC,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC;IACxD,CAAC;IAEkB,KAAK;QACvB,OAAO,IAAA,SAAE,EAAC,EAAE,CAAC,CAAC;IACf,CAAC;IAEQ,IAAI;QACZ;;;WAGG;QACH,OAAO,IAAA,WAAI,EAAC,IAAI,CAAC,UAAU,CAAC,qBAAqB,EAAE,CAAC,CAAC,IAAI,CAAC,IAAA,iBAAK,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC1E,CAAC;IAEQ,MAAM;QACd,OAAO,IAAA,SAAE,EAAC,IAAI,CAAC,CAAC,IAAI,CACnB,IAAA,eAAG,EAAC,GAAG,EAAE;YACR,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC;QAC1B,CAAC,CAAC,EACF,IAAA,iBAAK,EAAC,KAAK,CAAC,CAAC,CACb,CAAC;IACH,CAAC;IAED,sBAAsB,CAAC,YAAoB;;QAC1C,MAAM,UAAU,GAAwC,IAAI,CAAC,8BAA8B,EAAE,CAAC;QAE9F,IAAI,CAAC,UAAU,EAAE;YAChB,MAAM,IAAI,KAAK,CACd,kBAAkB,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,mDAAmD,CAClG,CAAC;SACF;QAED,MAAM,oBAAoB,GAAyC,UAAU,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAExG,IAAI,eAAI,CAAC,oBAAoB,CAAC,oBAAoB,CAAC,EAAE;YACpD,MAAM,qBAAqB,GAA2B,oBAAoB,CAAC,cAAc,EAAE,CAAC;YAE5F,IAAI,eAAI,CAAC,yBAAyB,CAAC,qBAAqB,CAAC,EAAE;gBAC1D,MAAM,MAAM,GAAyC,qBAAqB,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;gBAEjG,IAAI,eAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,EAAE;oBACtC,MAAM,iBAAiB,GAA2B,MAAM,CAAC,cAAc,EAAE,CAAC;oBAE1E,IAAI,eAAI,CAAC,YAAY,CAAC,iBAAiB,CAAC,EAAE;wBACzC,MAAM,WAAW,GAAqB,MAAA,MAAA,iBAAiB;6BACrD,OAAO,EAAE,0CACR,SAAS,EAAE,0CACX,eAAe,GAAG,CAAC,CAAC,CAAC;wBAExB,IAAI,eAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE;4BACzC,OAAO,WAAW,CAAC;yBACnB;qBACD;iBACD;aACD;SACD;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;CACD;AApED,sDAoEC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.declarationToPlayground = void 0;
|
|
4
|
-
const typescript_1 = require("./typescript");
|
|
5
|
-
/**
|
|
6
|
-
*
|
|
7
|
-
* @param declaration
|
|
8
|
-
*/
|
|
9
|
-
function declarationToPlayground(declaration) {
|
|
10
|
-
return declaration
|
|
11
|
-
.getProperties()
|
|
12
|
-
.filter((property) => !!property.getDecorator('Input'))
|
|
13
|
-
.reduce((properties, property) => {
|
|
14
|
-
var _a, _b, _c, _d;
|
|
15
|
-
const inputName = (_c = (_b = (_a = property
|
|
16
|
-
.getDecorator('Input')) === null || _a === void 0 ? void 0 : _a.getArguments()[0]) === null || _b === void 0 ? void 0 : _b.getText().replace(/^["']|['"]$/g, '')) !== null && _c !== void 0 ? _c : property.getName();
|
|
17
|
-
properties[inputName] = {
|
|
18
|
-
name: property.getName(),
|
|
19
|
-
type: (0, typescript_1.displayType)(property.getType()),
|
|
20
|
-
default: (_d = property.getInitializer()) === null || _d === void 0 ? void 0 : _d.getText(),
|
|
21
|
-
description: property
|
|
22
|
-
.getJsDocs()
|
|
23
|
-
.reduce((comment, doc) => `${comment}\n${doc.getCommentText()}`.trim(), ''),
|
|
24
|
-
options: property
|
|
25
|
-
.getType()
|
|
26
|
-
.getUnionTypes()
|
|
27
|
-
.map((type) => type.getText()),
|
|
28
|
-
};
|
|
29
|
-
return properties;
|
|
30
|
-
}, {});
|
|
31
|
-
}
|
|
32
|
-
exports.declarationToPlayground = declarationToPlayground;
|
|
33
|
-
//# sourceMappingURL=declaration-to-playground.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"declaration-to-playground.js","sourceRoot":"","sources":["../../../../libs/builder/helpers/declaration-to-playground.ts"],"names":[],"mappings":";;;AAGA,6CAAyC;AAEzC;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,WAA6B;IACpE,OAAO,WAAW;SAChB,aAAa,EAAE;SACf,MAAM,CAAC,CAAC,QAA6B,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;SAC3E,MAAM,CAAC,CAAC,UAAqC,EAAE,QAA6B,EAAE,EAAE;;QAChF,MAAM,SAAS,GACd,MAAA,MAAA,MAAA,QAAQ;aACN,YAAY,CAAC,OAAO,CAAC,0CACpB,YAAY,GAAG,CAAC,CAAC,0CACjB,OAAO,GACR,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,mCAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;QAErD,UAAU,CAAC,SAAS,CAAC,GAAG;YACvB,IAAI,EAAE,QAAQ,CAAC,OAAO,EAAE;YACxB,IAAI,EAAE,IAAA,wBAAW,EAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;YACrC,OAAO,EAAE,MAAA,QAAQ,CAAC,cAAc,EAAE,0CAAE,OAAO,EAAE;YAC7C,WAAW,EAAE,QAAQ;iBACnB,SAAS,EAAE;iBACX,MAAM,CAAC,CAAC,OAAe,EAAE,GAAU,EAAE,EAAE,CAAC,GAAG,OAAO,KAAK,GAAG,CAAC,cAAc,EAAE,EAAE,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC;YAC3F,OAAO,EAAE,QAAQ;iBACf,OAAO,EAAE;iBACT,aAAa,EAAE;iBACf,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;SACrC,CAAC;QAEF,OAAO,UAAU,CAAC;IACnB,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AA3BD,0DA2BC"}
|