react-scroll-up
Advanced tools
Comparing version 1.3.5 to 1.3.6
@@ -28,4 +28,2 @@ /** | ||
var _detectPassiveEvents2 = _interopRequireDefault(_detectPassiveEvents); | ||
var _objectAssign = require('object-assign'); | ||
@@ -82,4 +80,4 @@ | ||
window.addEventListener('scroll', this.handleScroll); | ||
window.addEventListener("wheel", this.stopScrolling, _detectPassiveEvents2.default.hasSupport ? { passive: true } : false); | ||
window.addEventListener("touchstart", this.stopScrolling, _detectPassiveEvents2.default.hasSupport ? { passive: true } : false); | ||
window.addEventListener("wheel", this.stopScrolling, _detectPassiveEvents.supportsPassiveEvents ? { passive: true } : false); | ||
window.addEventListener("touchstart", this.stopScrolling, _detectPassiveEvents.supportsPassiveEvents ? { passive: true } : false); | ||
} | ||
@@ -86,0 +84,0 @@ }, { |
{ | ||
"name": "react-scroll-up", | ||
"version": "1.3.5", | ||
"version": "1.3.6", | ||
"description": "React component to render element for scroll to top of page", | ||
"author": "Milos Janda <milos.janda@gmail.com>", | ||
"scripts": { | ||
"test": "mocha --compilers js:babel-core/register test/test.jsx", | ||
"test": "mocha --require babel-core/register test/test.jsx", | ||
"build": "babel scrollUp.jsx --out-file index.js", | ||
@@ -35,3 +35,3 @@ "prepublish": "npm run test && npm run build" | ||
"dependencies": { | ||
"detect-passive-events": "^1.0.0", | ||
"detect-passive-events": "^2.0.2", | ||
"object-assign": "^4.0.1", | ||
@@ -42,19 +42,20 @@ "prop-types": "^15.5.8", | ||
"peerDependencies": { | ||
"react": "0.13 - 16" | ||
"react": "0.13 - 17" | ||
}, | ||
"devDependencies": { | ||
"babel-cli": "6.24.1", | ||
"babel-core": "6.25.0", | ||
"babel-cli": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"babel-preset-es2015": "6.24.1", | ||
"babel-preset-react": "6.24.1", | ||
"chai": "4.0.2", | ||
"chai-enzyme": "^0.7.1", | ||
"enzyme": "^2.9.1", | ||
"jsdom": "11.0.0", | ||
"mocha": "3.4.2", | ||
"raf": "3.3.2", | ||
"react": "15.6.1", | ||
"react-dom": "^15.6.1", | ||
"react-test-renderer": "^15.6.1", | ||
"sinon": "2.3.5" | ||
"chai": "^4.2.0", | ||
"chai-enzyme": "^1.0.0-beta.1", | ||
"enzyme": "^3.11.0", | ||
"enzyme-adapter-react-16": "^1.15.5", | ||
"jsdom": "^16.4.0", | ||
"mocha": "^8.2.1", | ||
"raf": "^3.4.1", | ||
"react": "^17.0.1", | ||
"react-dom": "^17.0.1", | ||
"react-test-renderer": "^17.0.1", | ||
"sinon": "^9.2.1" | ||
}, | ||
@@ -61,0 +62,0 @@ "readmeFilename": "README.md", |
// JSDom is used to allow the tests to run right from the command line (no browsers needed) | ||
const jsdom = require("jsdom"); | ||
const { JSDOM } = jsdom; | ||
const dom = new JSDOM(`<!DOCTYPE html><html><body></body></html>`); | ||
const dom = new JSDOM(`<!DOCTYPE html><html lang="en"><body><p>Test</p></body></html>`); | ||
// noinspection JSConstantReassignment | ||
global.window = dom.window; | ||
// noinspection JSConstantReassignment | ||
global.document = dom.window.document; | ||
@@ -12,3 +14,2 @@ | ||
import React from 'react'; | ||
@@ -22,2 +23,4 @@ import { after, before, beforeEach, describe, it } from "mocha"; | ||
import chaiEnzyme from 'chai-enzyme'; | ||
import Enzyme from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
@@ -29,4 +32,4 @@ chai.use(chaiEnzyme()); // Note the invocation at the end | ||
Enzyme.configure({ adapter: new Adapter() }); | ||
// describe makes a test group | ||
@@ -193,3 +196,3 @@ describe('<ScrollUp/> states', function () { | ||
it('check rendered styles - default values - visibile', () => { | ||
it('check rendered styles - default values - visible', () => { | ||
const wrapper = shallow( | ||
@@ -196,0 +199,0 @@ <ScrollUp showUnder={100}> |
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
27513
460
15
+ Addeddetect-it@4.0.1(transitive)
+ Addeddetect-passive-events@2.0.3(transitive)
+ Addedreact@17.0.2(transitive)
- Removeddetect-passive-events@1.0.5(transitive)
- Removedreact@16.14.0(transitive)
Updateddetect-passive-events@^2.0.2