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

react-toastr

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-toastr - npm Package Compare versions

Comparing version 2.2.0 to 2.2.2

lib/__tests__/index.spec.js

45

CHANGELOG.md

@@ -0,1 +1,46 @@

<a name="2.2.2"></a>
## [2.2.2](https://github.com/tomchentw/react-toastr/compare/v2.2.1...v2.2.2) (2015-11-02)
### Bug Fixes
* **src:** Revert breaking changes commits for v2.2.1. Closes #42 ([988112e](https://github.com/tomchentw/react-toastr/commit/988112e)), closes [#42](https://github.com/tomchentw/react-toastr/issues/42)
<a name="2.2.1"></a>
## _UNPLUBISHED FROM NPM_ [2.2.1](https://github.com/tomchentw/react-toastr/compare/v2.2.0...v2.2.1) (2015-11-02)
This version has been unpublished from npm. The __Bug Fixes__ here still applied but __Features__ are removed. See https://github.com/tomchentw/react-toastr/issues/42.
### Bug Fixes
* **package.json:** added react-dom as dependency ([18c58d0](https://github.com/tomchentw/react-toastr/commit/18c58d0)), closes [#41](https://github.com/tomchentw/react-toastr/issues/41)
* **ToastMessage:** use ReactDOM.findDOMNode instead of this.getDOMNode ([d4f40b3](https://github.com/tomchentw/react-toastr/commit/d4f40b3))
### Features
* **src:** ES2015 ([96aa073](https://github.com/tomchentw/react-toastr/commit/96aa073))
* **ToastContainer:** ES2015 ([dce1279](https://github.com/tomchentw/react-toastr/commit/dce1279))
* **ToastMessage:** ES2015 + props naming convention changed ([69c23db](https://github.com/tomchentw/react-toastr/commit/69c23db))
* **ToastMessage.animation:** ES2015 ([69dbd7e](https://github.com/tomchentw/react-toastr/commit/69dbd7e))
* **ToastMessage.jQuery:** ES2015 + require jQuery as dependency ([e0ff62b](https://github.com/tomchentw/react-toastr/commit/e0ff62b))
* **ToastMessageList:** add pure component to wrap toast list ([db9fee6](https://github.com/tomchentw/react-toastr/commit/db9fee6))
### BREAKING CHANGES
* ToastMessage: Props naming convention changed
Before: type,handleRemove, handleOnClick
After: toastType, onRemove, onClick
* ToastMessage.jQuery: use ES2015 import statement for jquery
Previously, we requires you to inject jQuery as global variable ($, jQuery).
However, as people adoping module bundler such as webpack, it's more common
to declare it as dependency.
<a name="2.2.0"></a>

@@ -2,0 +47,0 @@ # [2.2.0](https://github.com/tomchentw/react-toastr/compare/v2.1.0...v2.2.0) (2015-10-28)

4

lib/ToastMessage/animationMixin.js

@@ -126,3 +126,3 @@ "use strict";

animations.forEach(function (animation) {
CSSCore.removeClass(_this2.getDOMNode(), animation);
CSSCore.removeClass(ReactDOM.findDOMNode(_this2), animation);
});

@@ -141,3 +141,3 @@ },

if (this.isMounted()) {
this.classNameQueue.forEach(CSSCore.addClass.bind(CSSCore, this.getDOMNode()));
this.classNameQueue.forEach(CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this)));
}

@@ -144,0 +144,0 @@ this.classNameQueue.length = 0;

"use strict";
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
var _reactDom = require("react-dom");
var _reactDom2 = _interopRequireDefault(_reactDom);
function call_show_method($node, props) {

@@ -77,3 +84,3 @@ $node[props.showMethod]({

/* eslint-disable no-undef */
return jQuery(this.getDOMNode());
return jQuery(_reactDom2["default"].findDOMNode(this));
/* eslint-enable no-undef */

@@ -80,0 +87,0 @@ },

{
"__template__gist__": "https://gist.github.com/tomchentw/368a93bb748ad9d576f1#file-package-json",
"name": "react-toastr",
"version": "2.2.0",
"version": "2.2.2",
"description": "React.js toastr component",

@@ -14,7 +14,15 @@ "main": "lib/index.js",

"scripts": {
"clean": "rm -rf lib",
"build": "npm run lint && npm run clean && babel --stage=1 src --out-dir lib",
"clean": "rimraf lib",
"prebuild": "npm run lint && npm run clean",
"build": "babel src --out-dir lib",
"lint": "eslint src",
"test": "npm run lint"
"pretest:cov": "npm run lint",
"pretest": "npm run lint",
"test:cov": "babel-node ./node_modules/.bin/isparta cover --report lcov _mocha -- $npm_package_config_mocha",
"test:watch": "npm test -- --watch",
"test": "mocha $npm_package_config_mocha"
},
"config": {
"mocha": "--compilers js:babel/register ./src/**/__tests__/*.spec.js --require ./src/__tests__/setup.js"
},
"repository": {

@@ -49,8 +57,15 @@ "type": "git",

"babel-eslint": "^4.1.3",
"codeclimate-test-reporter": "^0.1.1",
"eslint": "^1.6.0",
"eslint-plugin-react": "^3.5.1",
"expect": "^1.12.2",
"fbjs": "^0.3.1",
"isparta": "^3.1.0",
"istanbul": "^0.4.0",
"jquery": "^2.1.4",
"jsdom": "^7.0.2",
"mocha": "^2.3.3",
"react": "^0.14.0",
"react-dom": "^0.14.0",
"react-addons-test-utils": "^0.14.0",
"rimraf": "^2.4.3",
"tomchentw-npm-dev": "^3.1.0"

@@ -64,4 +79,5 @@ },

"classnames": "^2.1.5",
"react-addons-update": "^0.14.0"
"react-addons-update": "^0.14.0",
"react-dom": "^0.14.0"
}
}

@@ -27,2 +27,12 @@ # react-toastr [![Travis CI][travis-image]][travis-url] [![Quality][codeclimate-image]][codeclimate-url] [![Coverage][codeclimate-coverage-image]][codeclimate-coverage-url] [![Dependencies][gemnasium-image]][gemnasium-url] [![Gitter][gitter-image]][gitter-url]

This module requires to be bundled with [webpack][webpack]/browserify and loads `react/addons` internally.
You'll need to download animate.css from here [Animate @github](https://raw.github.com/daneden/animate.css/master/animate.css)
Link to css/js properly..
```html
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css">
<link rel="stylesheet" href="/static/dist/css/animate.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
```
WIP: release a UMD version via bower/components.

@@ -35,2 +45,4 @@

var {ToastContainer} = ReactToastr; // This is a React Element.
// For Non ES6...
// var ToastContainer = ReactToastr.ToastContainer;
var ToastMessageFactory = React.createFactory(ReactToastr.ToastMessage.animation);

@@ -37,0 +49,0 @@

@@ -123,3 +123,3 @@ "use strict";

animations.forEach((animation) => {
CSSCore.removeClass(this.getDOMNode(), animation);
CSSCore.removeClass(ReactDOM.findDOMNode(this), animation);
});

@@ -139,3 +139,3 @@ },

this.classNameQueue.forEach(
CSSCore.addClass.bind(CSSCore, this.getDOMNode())
CSSCore.addClass.bind(CSSCore, ReactDOM.findDOMNode(this))
);

@@ -142,0 +142,0 @@ }

"use strict";
import {
default as ReactDOM,
} from "react-dom";
function call_show_method ($node, props) {

@@ -79,3 +84,3 @@ $node[props.showMethod]({

/* eslint-disable no-undef */
return jQuery(this.getDOMNode());
return jQuery(ReactDOM.findDOMNode(this));
/* eslint-enable no-undef */

@@ -82,0 +87,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