@ng-doc/builder 16.6.0 → 16.6.2
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/helpers/angular/get-input-name.d.ts +7 -0
- package/helpers/angular/get-input-name.js +25 -0
- package/helpers/angular/get-input-name.js.map +1 -0
- package/helpers/angular/index.d.ts +1 -0
- package/helpers/angular/index.js +1 -0
- package/helpers/angular/index.js.map +1 -1
- package/helpers/playground/get-playground-inputs.js +2 -3
- package/helpers/playground/get-playground-inputs.js.map +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getInputName = void 0;
|
|
4
|
+
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
/**
|
|
6
|
+
* Returns the name of the component input.
|
|
7
|
+
*
|
|
8
|
+
* @param property - The property declaration
|
|
9
|
+
*/
|
|
10
|
+
function getInputName(property) {
|
|
11
|
+
var _a;
|
|
12
|
+
const inputArgument = (_a = property.getDecorator('Input')) === null || _a === void 0 ? void 0 : _a.getArguments()[0];
|
|
13
|
+
if (ts_morph_1.Node.isStringLiteral(inputArgument)) {
|
|
14
|
+
return inputArgument.getLiteralText().replace(/^["']|['"]$/g, '');
|
|
15
|
+
}
|
|
16
|
+
if (ts_morph_1.Node.isObjectLiteralExpression(inputArgument)) {
|
|
17
|
+
const inputAliasProperty = inputArgument.getProperty('alias');
|
|
18
|
+
if (ts_morph_1.Node.isPropertyAssignment(inputAliasProperty)) {
|
|
19
|
+
return inputAliasProperty.getInitializerIfKindOrThrow(ts_morph_1.SyntaxKind.StringLiteral).getLiteralText();
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return property.getName();
|
|
23
|
+
}
|
|
24
|
+
exports.getInputName = getInputName;
|
|
25
|
+
//# sourceMappingURL=get-input-name.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-input-name.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/get-input-name.ts"],"names":[],"mappings":";;;AAAA,uCAA+D;AAE/D;;;;GAIG;AACH,SAAgB,YAAY,CAAC,QAA6B;;IACzD,MAAM,aAAa,GAAG,MAAA,QAAQ,CAAC,YAAY,CAAC,OAAO,CAAC,0CAAE,YAAY,GAAG,CAAC,CAAC,CAAC;IAExE,IAAI,eAAI,CAAC,eAAe,CAAC,aAAa,CAAC,EAAE;QACxC,OAAO,aAAa,CAAC,cAAc,EAAE,CAAC,OAAO,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC;KAClE;IAED,IAAI,eAAI,CAAC,yBAAyB,CAAC,aAAa,CAAC,EAAE;QAClD,MAAM,kBAAkB,GAAG,aAAa,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAE9D,IAAI,eAAI,CAAC,oBAAoB,CAAC,kBAAkB,CAAC,EAAE;YAClD,OAAO,kBAAkB,CAAC,2BAA2B,CAAC,qBAAU,CAAC,aAAa,CAAC,CAAC,cAAc,EAAE,CAAC;SACjG;KACD;IAED,OAAO,QAAQ,CAAC,OAAO,EAAE,CAAC;AAC3B,CAAC;AAhBD,oCAgBC"}
|
package/helpers/angular/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("./get-component-decorator"), exports);
|
|
5
5
|
tslib_1.__exportStar(require("./get-directive-decorator"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./get-input-name"), exports);
|
|
6
7
|
tslib_1.__exportStar(require("./get-pipe-decorator"), exports);
|
|
7
8
|
tslib_1.__exportStar(require("./is-standalone"), exports);
|
|
8
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oEAA0C;AAC1C,+DAAqC;AACrC,0DAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,oEAA0C;AAC1C,2DAAiC;AACjC,+DAAqC;AACrC,0DAAgC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getPlaygroundPipeInputs = exports.getPlaygroundComponentInputs = void 0;
|
|
4
4
|
const ts_morph_1 = require("ts-morph");
|
|
5
|
+
const angular_1 = require("../angular");
|
|
5
6
|
const extract_docs_1 = require("../extract-docs");
|
|
6
7
|
const typescript_1 = require("../typescript");
|
|
7
8
|
/**
|
|
@@ -13,9 +14,7 @@ function getPlaygroundComponentInputs(declaration) {
|
|
|
13
14
|
.getProperties()
|
|
14
15
|
.filter((property) => !!property.getDecorator('Input'))
|
|
15
16
|
.reduce((properties, property) => {
|
|
16
|
-
|
|
17
|
-
const inputName = (_c = (_b = (_a = property
|
|
18
|
-
.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
|
+
const inputName = (0, angular_1.getInputName)(property);
|
|
19
18
|
return Object.assign(Object.assign({}, properties), propOrParamToPlaygroundProperty(property, inputName));
|
|
20
19
|
}, {});
|
|
21
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-playground-inputs.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/playground/get-playground-inputs.ts"],"names":[],"mappings":";;;AACA,uCAQkB;AAElB,kDAAkE;AAClE,8CAA0C;AAE1C;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,WAA6B;IACzE,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
|
|
1
|
+
{"version":3,"file":"get-playground-inputs.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/playground/get-playground-inputs.ts"],"names":[],"mappings":";;;AACA,uCAQkB;AAElB,wCAAwC;AACxC,kDAAkE;AAClE,8CAA0C;AAE1C;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,WAA6B;IACzE,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,GAAW,IAAA,sBAAY,EAAC,QAAQ,CAAC,CAAC;QAEjD,uCAAW,UAAU,GAAK,+BAA+B,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE;IACjF,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AATD,oEASC;AAED;;;GAGG;AACH,SAAgB,uBAAuB,CAAC,WAA6B;IACpE,OAAO,WAAW;SAChB,gBAAgB,CAAC,WAAW,CAAC;SAC7B,aAAa,EAAE;SACf,KAAK,CAAC,CAAC,CAAC;SACR,MAAM,CAAC,CAAC,UAAqC,EAAE,SAA+B,EAAE,EAAE;QAClF,uCAAW,UAAU,GAAK,+BAA+B,CAAC,SAAS,CAAC,EAAE;IACvE,CAAC,EAAE,EAAE,CAAC,CAAC;AACT,CAAC;AARD,0DAQC;AAED;;;;GAIG;AACH,SAAS,+BAA+B,CACvC,WAAuD,EACvD,SAAkB;;IAElB,MAAM,IAAI,GAAW,IAAA,wBAAW,EAC/B,WAAW,EACX,0BAAe,CAAC,YAAY,GAAG,0BAAe,CAAC,mCAAmC,CAClF,CAAC;IAEF,OAAO;QACN,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,EAAE;YACxB,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,WAAW,CAAC,OAAO,EAAE;YAC7C,IAAI;YACJ,OAAO,EAAE,MAAA,MAAA,WAAW,CAAC,cAAc,EAAE,0CAAE,OAAO,EAAE,mCAAI,cAAc,CAAC,IAAI,CAAC;YACxE,WAAW,EAAE,eAAI,CAAC,qBAAqB,CAAC,WAAW,CAAC;gBACnD,CAAC,CAAC,IAAA,0BAAW,EAAC,WAAW,CAAC;gBAC1B,CAAC,CAAC,IAAA,mCAAoB,EAAC,WAAW,CAAC,sBAAsB,CAAC,qBAAU,CAAC,iBAAiB,CAAC,EAAE,WAAW,CAAC,OAAO,EAAE,CAAC;YAChH,OAAO,EAAE,WAAW;iBAClB,OAAO,EAAE;iBACT,aAAa,EAAE;iBACf,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CACnB,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,0BAAe,CAAC,YAAY,GAAG,0BAAe,CAAC,mCAAmC,CAAC,CAC3G;SACF;KACD,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,SAAS,cAAc,CAAC,IAAY;IACnC,QAAQ,IAAI,EAAE;QACb,KAAK,SAAS;YACb,OAAO,OAAO,CAAC;QAChB;YACC,OAAO,WAAW,CAAC;KACpB;AACF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-doc/builder",
|
|
3
|
-
"version": "16.6.
|
|
3
|
+
"version": "16.6.2",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"builders": "./builders.json",
|
|
6
6
|
"schematics": "./schematics/collection.json",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@ng-doc/core": "16.6.
|
|
9
|
-
"@ng-doc/utils": "16.6.
|
|
8
|
+
"@ng-doc/core": "16.6.2",
|
|
9
|
+
"@ng-doc/utils": "16.6.2",
|
|
10
10
|
"@angular-devkit/architect": ">=0.1600.0",
|
|
11
11
|
"chokidar": "3.5.3",
|
|
12
12
|
"minimatch": "9.0.1",
|