@storybook/angular 6.4.15 → 6.4.16
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/dist/ts3.4/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +4 -2
- package/dist/ts3.9/builders/utils/run-compodoc.js +27 -1
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.d.ts +4 -2
- package/dist/ts3.9/client/preview/angular-beta/utils/NgComponentAnalyzer.js +6 -33
- package/dist/ts3.9/client/preview/angular-beta/utils/NgModulesAnalyzer.js +2 -6
- package/dist/ts3.9/server/framework-preset-angular-cli.js +3 -1
- package/package.json +9 -19
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, Type } from '@angular/core';
|
|
2
2
|
export declare type ComponentInputsOutputs = {
|
|
3
3
|
inputs: {
|
|
4
4
|
propName: string;
|
|
@@ -19,7 +19,9 @@ export declare const isComponent: (component: any) => component is Type<unknown>
|
|
|
19
19
|
* Returns all component decorator properties
|
|
20
20
|
* is used to get all `@Input` and `@Output` Decorator
|
|
21
21
|
*/
|
|
22
|
-
export declare const getComponentPropsDecoratorMetadata: (component: any) =>
|
|
22
|
+
export declare const getComponentPropsDecoratorMetadata: (component: any) => {
|
|
23
|
+
[key: string]: any[];
|
|
24
|
+
};
|
|
23
25
|
/**
|
|
24
26
|
* Returns component decorator `@Component`
|
|
25
27
|
*/
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
10
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
11
|
+
}) : function(o, v) {
|
|
12
|
+
o["default"] = v;
|
|
13
|
+
});
|
|
14
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
15
|
+
if (mod && mod.__esModule) return mod;
|
|
16
|
+
var result = {};
|
|
17
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
18
|
+
__setModuleDefault(result, mod);
|
|
19
|
+
return result;
|
|
20
|
+
};
|
|
2
21
|
var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
3
22
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
4
23
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
@@ -10,13 +29,20 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
10
29
|
exports.runCompodoc = void 0;
|
|
11
30
|
var child_process_1 = require("child_process");
|
|
12
31
|
var rxjs_1 = require("rxjs");
|
|
32
|
+
var path = __importStar(require("path"));
|
|
13
33
|
var hasTsConfigArg = function (args) { return args.indexOf('-p') !== -1; };
|
|
34
|
+
// path.relative is necessary to workaround a compodoc issue with
|
|
35
|
+
// absolute paths on windows machines
|
|
36
|
+
var toRelativePath = function (pathToTsConfig) {
|
|
37
|
+
return path.isAbsolute(pathToTsConfig) ? path.relative('.', pathToTsConfig) : pathToTsConfig;
|
|
38
|
+
};
|
|
14
39
|
exports.runCompodoc = function (_a, context) {
|
|
15
40
|
var compodocArgs = _a.compodocArgs, tsconfig = _a.tsconfig;
|
|
16
41
|
return new rxjs_1.Observable(function (observer) {
|
|
42
|
+
var tsConfigPath = toRelativePath(tsconfig);
|
|
17
43
|
var finalCompodocArgs = __spreadArrays([
|
|
18
44
|
'compodoc'
|
|
19
|
-
], (hasTsConfigArg(compodocArgs) ? [] : ['-p',
|
|
45
|
+
], (hasTsConfigArg(compodocArgs) ? [] : ['-p', tsConfigPath]), [
|
|
20
46
|
'-d',
|
|
21
47
|
"" + context.workspaceRoot
|
|
22
48
|
], compodocArgs);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component,
|
|
1
|
+
import { Component, Type } from '@angular/core';
|
|
2
2
|
export declare type ComponentInputsOutputs = {
|
|
3
3
|
inputs: {
|
|
4
4
|
propName: string;
|
|
@@ -19,7 +19,9 @@ export declare const isComponent: (component: any) => component is Type<unknown>
|
|
|
19
19
|
* Returns all component decorator properties
|
|
20
20
|
* is used to get all `@Input` and `@Output` Decorator
|
|
21
21
|
*/
|
|
22
|
-
export declare const getComponentPropsDecoratorMetadata: (component: any) =>
|
|
22
|
+
export declare const getComponentPropsDecoratorMetadata: (component: any) => {
|
|
23
|
+
[key: string]: any[];
|
|
24
|
+
};
|
|
23
25
|
/**
|
|
24
26
|
* Returns component decorator `@Component`
|
|
25
27
|
*/
|
|
@@ -20,6 +20,7 @@ var __spreadArrays = (this && this.__spreadArrays) || function () {
|
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.getComponentDecoratorMetadata = exports.getComponentPropsDecoratorMetadata = exports.isComponent = exports.isDeclarable = exports.getComponentInputsOutputs = void 0;
|
|
22
22
|
var core_1 = require("@angular/core");
|
|
23
|
+
var reflectionCapabilities = new core_1.ɵReflectionCapabilities();
|
|
23
24
|
/**
|
|
24
25
|
* Returns component Inputs / Outputs by browsing these properties and decorator
|
|
25
26
|
*/
|
|
@@ -70,20 +71,14 @@ exports.isDeclarable = function (component) {
|
|
|
70
71
|
if (!component) {
|
|
71
72
|
return false;
|
|
72
73
|
}
|
|
73
|
-
var
|
|
74
|
-
var decorators = Reflect.getOwnPropertyDescriptor(component, decoratorKey)
|
|
75
|
-
? Reflect.getOwnPropertyDescriptor(component, decoratorKey).value
|
|
76
|
-
: component[decoratorKey];
|
|
74
|
+
var decorators = reflectionCapabilities.annotations(component);
|
|
77
75
|
return !!(decorators || []).find(function (d) { return d instanceof core_1.Directive || d instanceof core_1.Pipe || d instanceof core_1.Component; });
|
|
78
76
|
};
|
|
79
77
|
exports.isComponent = function (component) {
|
|
80
78
|
if (!component) {
|
|
81
79
|
return false;
|
|
82
80
|
}
|
|
83
|
-
var
|
|
84
|
-
var decorators = Reflect.getOwnPropertyDescriptor(component, decoratorKey)
|
|
85
|
-
? Reflect.getOwnPropertyDescriptor(component, decoratorKey).value
|
|
86
|
-
: component[decoratorKey];
|
|
81
|
+
var decorators = reflectionCapabilities.annotations(component);
|
|
87
82
|
return (decorators || []).some(function (d) { return d instanceof core_1.Component; });
|
|
88
83
|
};
|
|
89
84
|
/**
|
|
@@ -91,34 +86,12 @@ exports.isComponent = function (component) {
|
|
|
91
86
|
* is used to get all `@Input` and `@Output` Decorator
|
|
92
87
|
*/
|
|
93
88
|
exports.getComponentPropsDecoratorMetadata = function (component) {
|
|
94
|
-
|
|
95
|
-
var propsDecorators = Reflect &&
|
|
96
|
-
Reflect.getOwnPropertyDescriptor &&
|
|
97
|
-
Reflect.getOwnPropertyDescriptor(component, decoratorKey)
|
|
98
|
-
? Reflect.getOwnPropertyDescriptor(component, decoratorKey).value
|
|
99
|
-
: component[decoratorKey];
|
|
100
|
-
var parent = Reflect && Reflect.getPrototypeOf && Reflect.getPrototypeOf(component);
|
|
101
|
-
if (parent) {
|
|
102
|
-
var parentPropsDecorators = exports.getComponentPropsDecoratorMetadata(parent);
|
|
103
|
-
propsDecorators = __assign(__assign({}, parentPropsDecorators), propsDecorators);
|
|
104
|
-
}
|
|
105
|
-
return propsDecorators;
|
|
89
|
+
return reflectionCapabilities.propMetadata(component);
|
|
106
90
|
};
|
|
107
91
|
/**
|
|
108
92
|
* Returns component decorator `@Component`
|
|
109
93
|
*/
|
|
110
94
|
exports.getComponentDecoratorMetadata = function (component) {
|
|
111
|
-
var
|
|
112
|
-
|
|
113
|
-
Reflect.getOwnPropertyDescriptor &&
|
|
114
|
-
Reflect.getOwnPropertyDescriptor(component, decoratorKey)
|
|
115
|
-
? Reflect.getOwnPropertyDescriptor(component, decoratorKey).value
|
|
116
|
-
: component[decoratorKey];
|
|
117
|
-
if (!decorators) {
|
|
118
|
-
return (component.decorators &&
|
|
119
|
-
component.decorators[0] &&
|
|
120
|
-
component.decorators[0].args &&
|
|
121
|
-
component.decorators[0].args[0]);
|
|
122
|
-
}
|
|
123
|
-
return decorators.find(function (d) { return d instanceof core_1.Component; });
|
|
95
|
+
var decorators = reflectionCapabilities.annotations(component);
|
|
96
|
+
return decorators.reverse().find(function (d) { return d instanceof core_1.Component; });
|
|
124
97
|
};
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.isComponentAlreadyDeclaredInModules = void 0;
|
|
4
4
|
var core_1 = require("@angular/core");
|
|
5
|
+
var reflectionCapabilities = new core_1.ɵReflectionCapabilities();
|
|
5
6
|
/**
|
|
6
7
|
* Avoid component redeclaration
|
|
7
8
|
*
|
|
@@ -27,12 +28,7 @@ exports.isComponentAlreadyDeclaredInModules = function (componentToFind, moduleD
|
|
|
27
28
|
};
|
|
28
29
|
var extractNgModuleMetadata = function (importItem) {
|
|
29
30
|
var target = importItem && importItem.ngModule ? importItem.ngModule : importItem;
|
|
30
|
-
var
|
|
31
|
-
var decorators = Reflect &&
|
|
32
|
-
Reflect.getOwnPropertyDescriptor &&
|
|
33
|
-
Reflect.getOwnPropertyDescriptor(target, decoratorKey)
|
|
34
|
-
? Reflect.getOwnPropertyDescriptor(target, decoratorKey).value
|
|
35
|
-
: target[decoratorKey];
|
|
31
|
+
var decorators = reflectionCapabilities.annotations(target);
|
|
36
32
|
if (!decorators || decorators.length === 0) {
|
|
37
33
|
return null;
|
|
38
34
|
}
|
|
@@ -96,7 +96,9 @@ function webpackFinal(baseConfig, options) {
|
|
|
96
96
|
node_logger_1.logger.info('=> Using base config because "@angular-devkit/build-angular" is not installed');
|
|
97
97
|
return [2 /*return*/, baseConfig];
|
|
98
98
|
}
|
|
99
|
-
return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require('@angular/
|
|
99
|
+
return [4 /*yield*/, Promise.resolve().then(function () { return __importStar(require('@angular/core')); }).then(function (m) {
|
|
100
|
+
return semver_1.default.coerce(m.VERSION.full);
|
|
101
|
+
})];
|
|
100
102
|
case 1:
|
|
101
103
|
angularCliVersion = _a.sent();
|
|
102
104
|
webpackGetterByVersions = [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "6.4.
|
|
3
|
+
"version": "6.4.16",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "6.4.
|
|
49
|
-
"@storybook/api": "6.4.
|
|
50
|
-
"@storybook/core": "6.4.
|
|
51
|
-
"@storybook/core-common": "6.4.
|
|
52
|
-
"@storybook/core-events": "6.4.
|
|
48
|
+
"@storybook/addons": "6.4.16",
|
|
49
|
+
"@storybook/api": "6.4.16",
|
|
50
|
+
"@storybook/core": "6.4.16",
|
|
51
|
+
"@storybook/core-common": "6.4.16",
|
|
52
|
+
"@storybook/core-events": "6.4.16",
|
|
53
53
|
"@storybook/csf": "0.0.2--canary.87bc651.0",
|
|
54
|
-
"@storybook/node-logger": "6.4.
|
|
54
|
+
"@storybook/node-logger": "6.4.16",
|
|
55
55
|
"@storybook/semver": "^7.3.2",
|
|
56
|
-
"@storybook/store": "6.4.
|
|
56
|
+
"@storybook/store": "6.4.16",
|
|
57
57
|
"@types/webpack-env": "^1.16.0",
|
|
58
58
|
"autoprefixer": "^9.8.6",
|
|
59
59
|
"core-js": "^3.8.2",
|
|
@@ -85,14 +85,12 @@
|
|
|
85
85
|
"@angular/compiler": "^11.2.14",
|
|
86
86
|
"@angular/compiler-cli": "^11.2.14",
|
|
87
87
|
"@angular/core": "^11.2.14",
|
|
88
|
-
"@angular/elements": "^11.2.14",
|
|
89
88
|
"@angular/forms": "^11.2.14",
|
|
90
89
|
"@angular/platform-browser": "^11.2.14",
|
|
91
90
|
"@angular/platform-browser-dynamic": "^11.2.14",
|
|
92
91
|
"@nrwl/workspace": "^11.6.3",
|
|
93
92
|
"@types/autoprefixer": "^9.7.2",
|
|
94
93
|
"@types/jest": "^26.0.16",
|
|
95
|
-
"@webcomponents/custom-elements": "^1.4.3",
|
|
96
94
|
"jest": "^26.6.3",
|
|
97
95
|
"jest-preset-angular": "^8.3.2",
|
|
98
96
|
"ts-jest": "^26.4.4"
|
|
@@ -106,13 +104,11 @@
|
|
|
106
104
|
"@angular/compiler": ">=6.0.0",
|
|
107
105
|
"@angular/compiler-cli": ">=6.0.0",
|
|
108
106
|
"@angular/core": ">=6.0.0",
|
|
109
|
-
"@angular/elements": ">=6.0.0",
|
|
110
107
|
"@angular/forms": ">=6.0.0",
|
|
111
108
|
"@angular/platform-browser": ">=6.0.0",
|
|
112
109
|
"@angular/platform-browser-dynamic": ">=6.0.0",
|
|
113
110
|
"@babel/core": "*",
|
|
114
111
|
"@nrwl/workspace": ">=11.1.0",
|
|
115
|
-
"@webcomponents/custom-elements": ">=1.4.3",
|
|
116
112
|
"rxjs": "^6.0.0 || ^7.4.0",
|
|
117
113
|
"typescript": "^3.4.0 || >=4.0.0",
|
|
118
114
|
"zone.js": "^0.8.29 || ^0.9.0 || ^0.10.0 || ^0.11.0"
|
|
@@ -121,14 +117,8 @@
|
|
|
121
117
|
"@angular/cli": {
|
|
122
118
|
"optional": true
|
|
123
119
|
},
|
|
124
|
-
"@angular/elements": {
|
|
125
|
-
"optional": true
|
|
126
|
-
},
|
|
127
120
|
"@nrwl/workspace": {
|
|
128
121
|
"optional": true
|
|
129
|
-
},
|
|
130
|
-
"@webcomponents/custom-elements": {
|
|
131
|
-
"optional": true
|
|
132
122
|
}
|
|
133
123
|
},
|
|
134
124
|
"engines": {
|
|
@@ -138,5 +128,5 @@
|
|
|
138
128
|
"access": "public"
|
|
139
129
|
},
|
|
140
130
|
"builders": "dist/ts3.9/builders/builders.json",
|
|
141
|
-
"gitHead": "
|
|
131
|
+
"gitHead": "450fb4e44d68bc7b11fe927c390488f336a2431e"
|
|
142
132
|
}
|