@storybook/angular 6.5.0-alpha.51 → 6.5.0-alpha.52

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.
@@ -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 inputs up to date
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
- // removes component output in props
75
- const outputsKeyToRemove = ngComponentInputsOutputs.outputs.map((o) => o.templateName);
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "6.5.0-alpha.51",
3
+ "version": "6.5.0-alpha.52",
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.51",
49
- "@storybook/api": "6.5.0-alpha.51",
50
- "@storybook/client-logger": "6.5.0-alpha.51",
51
- "@storybook/core": "6.5.0-alpha.51",
52
- "@storybook/core-common": "6.5.0-alpha.51",
53
- "@storybook/core-events": "6.5.0-alpha.51",
48
+ "@storybook/addons": "6.5.0-alpha.52",
49
+ "@storybook/api": "6.5.0-alpha.52",
50
+ "@storybook/client-logger": "6.5.0-alpha.52",
51
+ "@storybook/core": "6.5.0-alpha.52",
52
+ "@storybook/core-common": "6.5.0-alpha.52",
53
+ "@storybook/core-events": "6.5.0-alpha.52",
54
54
  "@storybook/csf": "0.0.2--canary.507502b.0",
55
- "@storybook/docs-tools": "6.5.0-alpha.51",
56
- "@storybook/node-logger": "6.5.0-alpha.51",
55
+ "@storybook/docs-tools": "6.5.0-alpha.52",
56
+ "@storybook/node-logger": "6.5.0-alpha.52",
57
57
  "@storybook/semver": "^7.3.2",
58
- "@storybook/store": "6.5.0-alpha.51",
58
+ "@storybook/store": "6.5.0-alpha.52",
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",
@@ -136,5 +136,5 @@
136
136
  "access": "public"
137
137
  },
138
138
  "builders": "dist/ts3.9/builders/builders.json",
139
- "gitHead": "cfcdc7fb74d3cf60eae8dd0b5a626d67ed180d42"
139
+ "gitHead": "863b3811b24a4703645a09286059bc6d95bd2e65"
140
140
  }