@storybook/addons
Advanced tools
Comparing version 3.0.0 to 3.1.0
@@ -26,7 +26,7 @@ "use strict"; | ||
this._loaders = {}; | ||
this._panels = {}; | ||
this._channel = null; | ||
this._preview = null; | ||
this._database = null; | ||
this.loaders = {}; | ||
this.panels = {}; | ||
this.channel = null; | ||
this.preview = null; | ||
this.database = null; | ||
} | ||
@@ -37,3 +37,3 @@ | ||
value: function getChannel() { | ||
return this._channel; | ||
return this.channel; | ||
} | ||
@@ -43,3 +43,3 @@ }, { | ||
value: function setChannel(channel) { | ||
this._channel = channel; | ||
this.channel = channel; | ||
} | ||
@@ -49,3 +49,3 @@ }, { | ||
value: function getPreview() { | ||
return this._preview; | ||
return this.preview; | ||
} | ||
@@ -55,3 +55,3 @@ }, { | ||
value: function setPreview(preview) { | ||
this._preview = preview; | ||
this.preview = preview; | ||
} | ||
@@ -61,3 +61,3 @@ }, { | ||
value: function getDatabase() { | ||
return this._database; | ||
return this.database; | ||
} | ||
@@ -67,3 +67,3 @@ }, { | ||
value: function setDatabase(database) { | ||
this._database = database; | ||
this.database = database; | ||
} | ||
@@ -73,3 +73,3 @@ }, { | ||
value: function getPanels() { | ||
return this._panels; | ||
return this.panels; | ||
} | ||
@@ -79,3 +79,3 @@ }, { | ||
value: function addPanel(name, panel) { | ||
this._panels[name] = panel; | ||
this.panels[name] = panel; | ||
} | ||
@@ -85,3 +85,3 @@ }, { | ||
value: function register(name, loader) { | ||
this._loaders[name] = loader; | ||
this.loaders[name] = loader; | ||
} | ||
@@ -93,4 +93,4 @@ }, { | ||
(0, _keys2.default)(this._loaders).map(function (name) { | ||
return _this._loaders[name]; | ||
(0, _keys2.default)(this.loaders).map(function (name) { | ||
return _this.loaders[name]; | ||
}).forEach(function (loader) { | ||
@@ -97,0 +97,0 @@ return loader(api); |
{ | ||
"name": "@storybook/addons", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "Storybook addons store", | ||
"main": "dist/index.js", | ||
"scripts": { | ||
"prepublish": "node ../../scripts/prepublish.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/storybooks/storybook.git" | ||
}, | ||
"keywords": [ | ||
"storybook" | ||
], | ||
"license": "MIT", | ||
"homepage": "https://github.com/storybooks/storybook/tree/master/packages/addons", | ||
"bugs": { | ||
"url": "https://github.com/storybooks/storybook/issues" | ||
}, | ||
"homepage": "https://github.com/storybooks/storybook/tree/master/packages/addons", | ||
"license": "MIT", | ||
"main": "dist/index.js", | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/storybooks/storybook.git" | ||
}, | ||
"scripts": { | ||
"prepublish": "node ../../scripts/prepublish.js" | ||
}, | ||
"devDependencies": { | ||
@@ -22,0 +22,0 @@ "shelljs": "^0.7.7" |
export class AddonStore { | ||
constructor() { | ||
this._loaders = {}; | ||
this._panels = {}; | ||
this._channel = null; | ||
this._preview = null; | ||
this._database = null; | ||
this.loaders = {}; | ||
this.panels = {}; | ||
this.channel = null; | ||
this.preview = null; | ||
this.database = null; | ||
} | ||
getChannel() { | ||
return this._channel; | ||
return this.channel; | ||
} | ||
setChannel(channel) { | ||
this._channel = channel; | ||
this.channel = channel; | ||
} | ||
getPreview() { | ||
return this._preview; | ||
return this.preview; | ||
} | ||
setPreview(preview) { | ||
this._preview = preview; | ||
this.preview = preview; | ||
} | ||
getDatabase() { | ||
return this._database; | ||
return this.database; | ||
} | ||
setDatabase(database) { | ||
this._database = database; | ||
this.database = database; | ||
} | ||
getPanels() { | ||
return this._panels; | ||
return this.panels; | ||
} | ||
addPanel(name, panel) { | ||
this._panels[name] = panel; | ||
this.panels[name] = panel; | ||
} | ||
register(name, loader) { | ||
this._loaders[name] = loader; | ||
this.loaders[name] = loader; | ||
} | ||
loadAddons(api) { | ||
Object.keys(this._loaders).map(name => this._loaders[name]).forEach(loader => loader(api)); | ||
Object.keys(this.loaders).map(name => this.loaders[name]).forEach(loader => loader(api)); | ||
} | ||
@@ -49,0 +49,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
6901