@storybook/angular 6.5.0-alpha.51 → 6.5.0-alpha.54
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/server/framework-preset-angular-docs.d.ts +1 -1
- package/dist/ts3.4/server/preset.d.ts +1 -1
- package/dist/ts3.9/client/preview/angular-beta/StorybookWrapperComponent.js +3 -14
- package/dist/ts3.9/server/framework-preset-angular-docs.d.ts +1 -1
- package/dist/ts3.9/server/framework-preset-angular-docs.js +2 -2
- package/dist/ts3.9/server/preset.d.ts +1 -1
- package/dist/ts3.9/server/preset.js +2 -2
- package/package.json +14 -13
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StorybookConfig } from '@storybook/core-common';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
|
@@ -68,22 +68,11 @@ exports.createStorybookWrapperComponent = (selector, template, storyComponent, s
|
|
|
68
68
|
// And then forces the `detectChanges`
|
|
69
69
|
this.storyComponentViewContainerRef.injector.get(core_1.ChangeDetectorRef).markForCheck();
|
|
70
70
|
this.changeDetectorRef.detectChanges();
|
|
71
|
-
// Once target component has been initialized, the storyProps$ observable keeps target component
|
|
71
|
+
// Once target component has been initialized, the storyProps$ observable keeps target component properties than are not Input|Output up to date
|
|
72
72
|
this.storyComponentPropsSubscription = this.storyProps$
|
|
73
73
|
.pipe(operators_1.skip(1), operators_1.map((props) => {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
return Object.entries(props).reduce((prev, [key, value]) => (Object.assign(Object.assign({}, prev), (!outputsKeyToRemove.includes(key) && {
|
|
77
|
-
[key]: value,
|
|
78
|
-
}))), {});
|
|
79
|
-
}), operators_1.map((props) => {
|
|
80
|
-
// In case a component uses an input with `bindingPropertyName` (ex: @Input('name'))
|
|
81
|
-
// find the value of the local propName in the component Inputs
|
|
82
|
-
// otherwise use the input key
|
|
83
|
-
return Object.entries(props).reduce((prev, [propKey, value]) => {
|
|
84
|
-
const input = ngComponentInputsOutputs.inputs.find((o) => o.templateName === propKey);
|
|
85
|
-
return Object.assign(Object.assign({}, prev), (input ? { [input.propName]: value } : { [propKey]: value }));
|
|
86
|
-
}, {});
|
|
74
|
+
const propsKeyToKeep = getNonInputsOutputsProps(ngComponentInputsOutputs, props);
|
|
75
|
+
return propsKeyToKeep.reduce((acc, p) => (Object.assign(Object.assign({}, acc), { [p]: props[p] })), {});
|
|
87
76
|
}))
|
|
88
77
|
.subscribe((props) => {
|
|
89
78
|
// Replace inputs with new ones from props
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { StorybookConfig } from '@storybook/core-common';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.previewAnnotations = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
8
|
const docs_tools_1 = require("@storybook/docs-tools");
|
|
9
|
-
exports.
|
|
9
|
+
exports.previewAnnotations = (entry = [], options) => {
|
|
10
10
|
if (!docs_tools_1.hasDocsOrControls(options))
|
|
11
11
|
return entry;
|
|
12
12
|
return [...entry, path_1.default.join(__dirname, '../../../dist/ts3.9/client/docs/config')];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.addons = exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.addons = exports.previewAnnotations = void 0;
|
|
4
|
+
exports.previewAnnotations = (entries = []) => [
|
|
5
5
|
...entries,
|
|
6
6
|
require.resolve('../client/preview/config'),
|
|
7
7
|
];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "6.5.0-alpha.
|
|
3
|
+
"version": "6.5.0-alpha.54",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular Components in isolation with Hot Reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -45,17 +45,17 @@
|
|
|
45
45
|
"prepare": "node ../../scripts/prepare.js"
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@storybook/addons": "6.5.0-alpha.
|
|
49
|
-
"@storybook/api": "6.5.0-alpha.
|
|
50
|
-
"@storybook/client-logger": "6.5.0-alpha.
|
|
51
|
-
"@storybook/core": "6.5.0-alpha.
|
|
52
|
-
"@storybook/core-common": "6.5.0-alpha.
|
|
53
|
-
"@storybook/core-events": "6.5.0-alpha.
|
|
48
|
+
"@storybook/addons": "6.5.0-alpha.54",
|
|
49
|
+
"@storybook/api": "6.5.0-alpha.54",
|
|
50
|
+
"@storybook/client-logger": "6.5.0-alpha.54",
|
|
51
|
+
"@storybook/core": "6.5.0-alpha.54",
|
|
52
|
+
"@storybook/core-common": "6.5.0-alpha.54",
|
|
53
|
+
"@storybook/core-events": "6.5.0-alpha.54",
|
|
54
54
|
"@storybook/csf": "0.0.2--canary.507502b.0",
|
|
55
|
-
"@storybook/docs-tools": "6.5.0-alpha.
|
|
56
|
-
"@storybook/node-logger": "6.5.0-alpha.
|
|
55
|
+
"@storybook/docs-tools": "6.5.0-alpha.54",
|
|
56
|
+
"@storybook/node-logger": "6.5.0-alpha.54",
|
|
57
57
|
"@storybook/semver": "^7.3.2",
|
|
58
|
-
"@storybook/store": "6.5.0-alpha.
|
|
58
|
+
"@storybook/store": "6.5.0-alpha.54",
|
|
59
59
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
60
60
|
"@types/react": "^16.14.23",
|
|
61
61
|
"@types/react-dom": "^16.9.14",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"ts-loader": "^8.0.14",
|
|
81
81
|
"tsconfig-paths-webpack-plugin": "^3.3.0",
|
|
82
82
|
"util-deprecate": "^1.0.2",
|
|
83
|
-
"webpack": "4"
|
|
83
|
+
"webpack": ">=4.0.0 <6.0.0"
|
|
84
84
|
},
|
|
85
85
|
"devDependencies": {
|
|
86
86
|
"@angular-devkit/architect": "~0.1102.0",
|
|
@@ -101,7 +101,8 @@
|
|
|
101
101
|
"jest": "^26.6.3",
|
|
102
102
|
"jest-preset-angular": "^8.3.2",
|
|
103
103
|
"jest-specific-snapshot": "^4.0.0",
|
|
104
|
-
"tmp": "^0.2.1"
|
|
104
|
+
"tmp": "^0.2.1",
|
|
105
|
+
"webpack": "4"
|
|
105
106
|
},
|
|
106
107
|
"peerDependencies": {
|
|
107
108
|
"@angular-devkit/architect": ">=0.8.9",
|
|
@@ -136,5 +137,5 @@
|
|
|
136
137
|
"access": "public"
|
|
137
138
|
},
|
|
138
139
|
"builders": "dist/ts3.9/builders/builders.json",
|
|
139
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "2048f366e90e668c3f462d81f5b372a19902b67f"
|
|
140
141
|
}
|