@ng-doc/builder 16.8.0 → 16.8.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.
@@ -0,0 +1,8 @@
1
+ import { ClassDeclaration, PropertyDeclaration } from 'ts-morph';
2
+ /**
3
+ * Retrieve all existing `@Input` of an Angular component, up through ascendant classes
4
+ *
5
+ * @param cls - ClassDeclaration
6
+ * @param condition - (cls: ClassDeclaration) => boolean
7
+ */
8
+ export declare function getComponentInputs(cls: ClassDeclaration): PropertyDeclaration[];
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getComponentInputs = void 0;
4
+ const for_all_classes_1 = require("../typescript/class/for-all-classes");
5
+ /**
6
+ * Retrieve all existing `@Input` of an Angular component, up through ascendant classes
7
+ *
8
+ * @param cls - ClassDeclaration
9
+ * @param condition - (cls: ClassDeclaration) => boolean
10
+ */
11
+ function getComponentInputs(cls) {
12
+ const properties = new Map();
13
+ (0, for_all_classes_1.forAllClasses)(cls, (c) => {
14
+ c.getProperties().forEach((p) => {
15
+ if (!properties.has(p.getName()) && p.getDecorator('Input')) {
16
+ properties.set(p.getName(), p);
17
+ }
18
+ });
19
+ });
20
+ return Array.from(properties.values());
21
+ }
22
+ exports.getComponentInputs = getComponentInputs;
23
+ //# sourceMappingURL=get-component-inputs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-component-inputs.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/get-component-inputs.ts"],"names":[],"mappings":";;;AAEA,yEAAkE;AAElE;;;;;GAKG;AACH,SAAgB,kBAAkB,CAAC,GAAqB;IACvD,MAAM,UAAU,GAAqC,IAAI,GAAG,EAAE,CAAC;IAE/D,IAAA,+BAAa,EAAC,GAAG,EAAE,CAAC,CAAmB,EAAE,EAAE;QAC1C,CAAC,CAAC,aAAa,EAAE,CAAC,OAAO,CAAC,CAAC,CAAsB,EAAE,EAAE;YACpD,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE;gBAC5D,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;aAC/B;QACF,CAAC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,OAAO,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC;AACxC,CAAC;AAZD,gDAYC"}
@@ -1,4 +1,5 @@
1
1
  export * from './get-component-decorator';
2
+ export * from './get-component-inputs';
2
3
  export * from './get-directive-decorator';
3
4
  export * from './get-input-name';
4
5
  export * from './get-pipe-decorator';
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  tslib_1.__exportStar(require("./get-component-decorator"), exports);
5
+ tslib_1.__exportStar(require("./get-component-inputs"), exports);
5
6
  tslib_1.__exportStar(require("./get-directive-decorator"), exports);
6
7
  tslib_1.__exportStar(require("./get-input-name"), exports);
7
8
  tslib_1.__exportStar(require("./get-pipe-decorator"), exports);
@@ -1 +1 @@
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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/angular/index.ts"],"names":[],"mappings":";;;AAAA,oEAA0C;AAC1C,iEAAsC;AACtC,oEAA0C;AAC1C,2DAAiC;AACjC,+DAAqC;AACrC,0DAAgC"}
@@ -10,10 +10,7 @@ const typescript_1 = require("../typescript");
10
10
  * @param declaration
11
11
  */
12
12
  function getPlaygroundComponentInputs(declaration) {
13
- return declaration
14
- .getProperties()
15
- .filter((property) => !!property.getDecorator('Input'))
16
- .reduce((properties, property) => {
13
+ return (0, angular_1.getComponentInputs)(declaration).reduce((properties, property) => {
17
14
  const inputName = (0, angular_1.getInputName)(property);
18
15
  return Object.assign(Object.assign({}, properties), propOrParamToPlaygroundProperty(property, inputName));
19
16
  }, {});
@@ -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,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,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"}
1
+ {"version":3,"file":"get-playground-inputs.js","sourceRoot":"","sources":["../../../../../libs/builder/helpers/playground/get-playground-inputs.ts"],"names":[],"mappings":";;;AACA,uCAQkB;AAElB,wCAA4D;AAC5D,kDAAkE;AAClE,8CAA0C;AAE1C;;;GAGG;AACH,SAAgB,4BAA4B,CAAC,WAA6B;IACzE,OAAO,IAAA,4BAAkB,EAAC,WAAW,CAAC,CAAC,MAAM,CAC5C,CAAC,UAAqC,EAAE,QAA6B,EAAE,EAAE;QACxE,MAAM,SAAS,GAAW,IAAA,sBAAY,EAAC,QAAQ,CAAC,CAAC;QACjD,uCAAW,UAAU,GAAK,+BAA+B,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE;IACjF,CAAC,EACD,EAAE,CACF,CAAC;AACH,CAAC;AARD,oEAQC;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,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"}
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@ng-doc/builder",
3
- "version": "16.8.0",
3
+ "version": "16.8.1",
4
4
  "type": "commonjs",
5
5
  "builders": "./builders.json",
6
6
  "schematics": "./schematics/collection.json",
7
7
  "dependencies": {
8
- "@ng-doc/core": "16.8.0",
9
- "@ng-doc/utils": "16.8.0",
8
+ "@ng-doc/core": "16.8.1",
9
+ "@ng-doc/utils": "16.8.1",
10
10
  "@angular-devkit/architect": ">=0.1600.0",
11
11
  "chokidar": "3.5.3",
12
12
  "minimatch": "9.0.1",