Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

oo7-react

Package Overview
Dependencies
Maintainers
2
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

oo7-react - npm Package Compare versions

Comparing version 0.4.8 to 0.4.9

73

lib/index.js

@@ -20,2 +20,53 @@ 'use strict';

/**
* React element in which app should be placed if it needs to wait for the parent
* frame to inject the BondCache.
*/
var InjectedCacheWaiter = function (_React$Component) {
_inherits(InjectedCacheWaiter, _React$Component);
function InjectedCacheWaiter() {
_classCallCheck(this, InjectedCacheWaiter);
var _this = _possibleConstructorReturn(this, (InjectedCacheWaiter.__proto__ || Object.getPrototypeOf(InjectedCacheWaiter)).call(this));
_this.state = { haveCache: window ? window.injectedBondCache ? true : null : false };
if (_this.state.haveCache === null) {
_this._timers = [window.setInterval(_this.checkInject.bind(_this), 100), window.setInterval(_this.checksTimeout.bind(_this), 2000)];
}
return _this;
}
_createClass(InjectedCacheWaiter, [{
key: 'checkInject',
value: function checkInject() {
if (window.injectedBondCache) {
Bond.cache = window.injectedBondCache;
this._timers.forEach(window.clearInterval);
this.setState({ haveCache: true });
}
}
}, {
key: 'checksTimeout',
value: function checksTimeout() {
this._timers.forEach(window.clearInterval);
this.setState({ haveCache: false });
}
}, {
key: 'render',
value: function render() {
return this.state.haveCache === null ? React.createElement(
'div',
null,
'Waiting for cache...'
) : this.props.children;
}
}]);
return InjectedCacheWaiter;
}(React.Component);
/**
* @summary A derivable class for creating React components that can transparently

@@ -50,4 +101,4 @@ * accept deal with prop values that are {@link Bond}s.

var ReactiveComponent = function (_React$Component) {
_inherits(ReactiveComponent, _React$Component);
var ReactiveComponent = function (_React$Component2) {
_inherits(ReactiveComponent, _React$Component2);

@@ -75,8 +126,8 @@ /**

var _this = _possibleConstructorReturn(this, (ReactiveComponent.__proto__ || Object.getPrototypeOf(ReactiveComponent)).call(this));
var _this2 = _possibleConstructorReturn(this, (ReactiveComponent.__proto__ || Object.getPrototypeOf(ReactiveComponent)).call(this));
_this.reactiveProps = reactiveProps;
_this.bonds = bonds;
_this.allBondKeys = [].concat(reactiveProps).concat(Object.keys(bonds));
return _this;
_this2.reactiveProps = reactiveProps;
_this2.bonds = bonds;
_this2.allBondKeys = [].concat(reactiveProps).concat(Object.keys(bonds));
return _this2;
}

@@ -186,6 +237,6 @@

value: function ready() {
var _this2 = this;
var _this3 = this;
return this.allBondKeys.every(function (k) {
return _this2.state[k] !== undefined;
return _this3.state[k] !== undefined;
});

@@ -426,2 +477,4 @@ }

module.exports = { ReactiveComponent: ReactiveComponent, Rspan: Rspan, Rdiv: Rdiv, Ra: Ra, Rimg: Rimg, Hash: Hash };
module.exports = {
ReactiveComponent: ReactiveComponent, Rspan: Rspan, Rdiv: Rdiv, Ra: Ra, Rimg: Rimg, Hash: Hash, InjectedCacheWaiter: InjectedCacheWaiter
};

16

package.json
{
"name": "oo7-react",
"version": "0.4.8",
"version": "0.4.9",
"description": "The Reactive Bond API",

@@ -10,11 +10,10 @@ "main": "lib/index.js",

"scripts": {
"lint": "echo todo",
"test": "npm run compile && mocha --compilers js:babel-core/register --reporter spec",
"compile": "babel --presets react -d lib/ src/",
"prepublishOnly": "../oo7/prepublish.sh",
"prepublish": "npm run compile",
"postpublish": "../oo7/postpublish.sh"
"prepare": "npm run compile"
},
"repository": {
"type": "git",
"url": "git+https://github.com/ethcore/oo7-react.git"
"url": "git+https://github.com/paritytech/oo7-react.git"
},

@@ -31,7 +30,7 @@ "keywords": [

"bugs": {
"url": "https://github.com/ethcore/oo7-react/issues"
"url": "https://github.com/paritytech/oo7-react/issues"
},
"homepage": "https://github.com/ethcore/oo7-react#readme",
"homepage": "https://github.com/paritytech/oo7-react#readme",
"dependencies": {
"oo7": "file:../oo7",
"oo7": "^0.5.9",
"react": "^15.4.2"

@@ -41,2 +40,3 @@ },

"babel-cli": "^6.22.2",
"babel-preset-es2015": "^6.24.1",
"babel-preset-react": "^6.22.0",

@@ -43,0 +43,0 @@ "chai": "^3.5.0",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc