Update package.json deps

This commit is contained in:
Victor Baranov 2019-06-18 20:57:36 +03:00
parent d973c28d2d
commit 130c9b38e5
17 changed files with 20270 additions and 16740 deletions

View File

@ -92,7 +92,7 @@ workflows:
jobs:
prep-deps-npm:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -108,7 +108,7 @@ jobs:
prep-build:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -127,7 +127,7 @@ jobs:
prep-docs:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -142,7 +142,7 @@ jobs:
prep-scss:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -161,7 +161,7 @@ jobs:
test-lint:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -172,7 +172,7 @@ jobs:
# test-deps:
# docker:
# - image: circleci/node:8.15.0-browsers
# - image: circleci/node:10.15.3-browsers
# steps:
# - checkout
# - restore_cache:
@ -183,7 +183,7 @@ jobs:
test-e2e-chrome:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -208,7 +208,7 @@ jobs:
test-e2e-firefox:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -229,7 +229,7 @@ jobs:
test-e2e-beta-chrome:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -245,7 +245,7 @@ jobs:
test-e2e-beta-firefox:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -266,7 +266,7 @@ jobs:
job-screens:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -283,7 +283,7 @@ jobs:
job-publish-prerelease:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -310,7 +310,7 @@ jobs:
job-publish-release:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -323,7 +323,7 @@ jobs:
job-publish-postrelease:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -346,7 +346,7 @@ jobs:
test-unit:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -359,7 +359,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -383,7 +383,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -402,7 +402,7 @@ jobs:
environment:
browsers: '["Firefox"]'
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -426,7 +426,7 @@ jobs:
environment:
browsers: '["Chrome"]'
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- checkout
- restore_cache:
@ -443,7 +443,7 @@ jobs:
all-tests-pass:
docker:
- image: circleci/node:8.15.0-browsers
- image: circleci/node:10.15.3-browsers
steps:
- run:
name: All Tests Passed

2
.nvmrc
View File

@ -1 +1 @@
v8.15.0
v10.15.3

View File

@ -1,6 +1,5 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
class ConfirmScreen extends Component {
static propTypes = {
@ -68,11 +67,4 @@ class ConfirmScreen extends Component {
}
}
const mapStateToProps = (state) => {
return {
metamask: state.metamask,
warning: state.appState.warning,
}
}
module.exports = connect(mapStateToProps)(ConfirmScreen)
export default ConfirmScreen

View File

@ -1,136 +1,150 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const findDOMNode = require('react-dom').findDOMNode
const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import h from 'react-hyperscript'
import { findDOMNode } from 'react-dom'
import { CSSTransitionGroup } from 'react-transition-group'
module.exports = MenuDroppoComponent
export default class MenuDroppo extends Component {
inherits(MenuDroppoComponent, Component)
function MenuDroppoComponent () {
Component.call(this)
}
MenuDroppoComponent.prototype.render = function () {
const speed = this.props.speed || '300ms'
const useCssTransition = this.props.useCssTransition
const zIndex = ('zIndex' in this.props) ? this.props.zIndex : 0
this.manageListeners()
const style = this.props.style || {}
if (!('position' in style)) {
style.position = 'fixed'
}
style.zIndex = zIndex
style.overflow = 'hidden'
return (
h('.menu-droppo-container', {
ref: 'menuDroppoContainer',
style,
}, [
useCssTransition
? h(ReactCSSTransitionGroup, {
className: 'css-transition-group',
transitionName: 'menu-droppo',
transitionEnterTimeout: parseInt(speed),
transitionLeaveTimeout: parseInt(speed),
}, this.renderPrimary())
: this.renderPrimary(),
])
)
}
MenuDroppoComponent.prototype.renderPrimary = function () {
const isOpen = this.props.isOpen
if (!isOpen) {
return null
constructor (props) {
super(props)
this.menuDroppoContainer = React.createRef()
}
const innerStyle = this.props.innerStyle || {}
return (
h('.menu-droppo', {
key: 'menu-droppo-drawer',
style: innerStyle,
},
[ this.props.children ])
)
}
MenuDroppoComponent.prototype.manageListeners = function () {
const isOpen = this.props.isOpen
const onClickOutside = this.props.onClickOutside
if (isOpen) {
this.outsideClickHandler = onClickOutside
} else if (isOpen) {
this.outsideClickHandler = null
}
}
MenuDroppoComponent.prototype.componentDidMount = function () {
if (this && document.body) {
this.globalClickHandler = this.globalClickOccurred.bind(this)
document.body.addEventListener('click', this.globalClickHandler)
// eslint-disable-next-line react/no-find-dom-node
var container = findDOMNode(this)
this.container = container
static propTypes = {
speed: PropTypes.string,
useCssTransition: PropTypes.bool,
zIndex: PropTypes.number,
isOpen: PropTypes.bool,
innerStyle: PropTypes.object,
children: PropTypes.array,
onClickOutside: PropTypes.func,
style: PropTypes.object,
constOverflow: PropTypes.bool,
}
this.transitionStarted = this.transitionstartOccured.bind(this)
render () {
const speed = this.props.speed || '300ms'
const useCssTransition = this.props.useCssTransition
const zIndex = ('zIndex' in this.props) ? this.props.zIndex : 0
/*
* transitionstart event is not supported in Chrome yet. But it works for Firefox 53+.
* We need to handle this event only for FF because for Chrome we've hidden scrolls.
*/
this.refs.menuDroppoContainer.addEventListener('transitionstart', this.transitionStarted)
this.manageListeners()
this.transitionEnded = this.transitionendOccured.bind(this)
this.refs.menuDroppoContainer.addEventListener('transitionend', this.transitionEnded)
}
MenuDroppoComponent.prototype.componentWillUnmount = function () {
if (this && document.body) {
document.body.removeEventListener('click', this.globalClickHandler)
document.body.removeEventListener('transitionstart', this.transitionStarted)
document.body.removeEventListener('transitionend', this.transitionEnded)
}
}
MenuDroppoComponent.prototype.globalClickOccurred = function (event) {
const target = event.target
// eslint-disable-next-line react/no-find-dom-node
const container = findDOMNode(this)
if (target !== container &&
!isDescendant(this.container, event.target) &&
this.outsideClickHandler) {
this.outsideClickHandler(event)
}
}
MenuDroppoComponent.prototype.transitionstartOccured = function (event) {
this.refs.menuDroppoContainer.style.overflow = 'hidden'
}
MenuDroppoComponent.prototype.transitionendOccured = function (event) {
if (!this.props.constOverflow) {
this.refs.menuDroppoContainer.style.overflow = 'auto'
}
}
function isDescendant (parent, child) {
var node = child.parentNode
while (node !== null) {
if (node === parent) {
return true
const style = this.props.style || {}
if (!('position' in style)) {
style.position = 'fixed'
}
node = node.parentNode
style.zIndex = zIndex
style.overflow = 'hidden'
return (
h('.menu-droppo-container', {
ref: this.menuDroppoContainer,
style,
}, [
// this.renderPrimary(),
useCssTransition
? h(CSSTransitionGroup, {
className: 'css-transition-group',
transitionName: 'menu-droppo',
transitionEnterTimeout: parseInt(speed),
transitionLeaveTimeout: parseInt(speed),
}, this.renderPrimary())
: this.renderPrimary(),
])
)
}
renderPrimary () {
const isOpen = this.props.isOpen
if (!isOpen) {
return null
}
const innerStyle = this.props.innerStyle || {}
return (
h('.menu-droppo', {
key: 'menu-droppo-drawer',
style: innerStyle,
},
[ this.props.children ])
)
}
manageListeners () {
const isOpen = this.props.isOpen
const onClickOutside = this.props.onClickOutside
if (isOpen) {
this.outsideClickHandler = onClickOutside
} else if (isOpen) {
this.outsideClickHandler = null
}
}
componentDidMount () {
if (this && document.body) {
this.globalClickHandler = this.globalClickOccurred.bind(this)
document.body.addEventListener('click', this.globalClickHandler)
// eslint-disable-next-line react/no-find-dom-node
var container = findDOMNode(this)
this.container = container
}
this.transitionStarted = this.transitionstartOccured.bind(this)
/*
* transitionstart event is not supported in Chrome yet. But it works for Firefox 53+.
* We need to handle this event only for FF because for Chrome we've hidden scrolls.
*/
this.menuDroppoContainer.current.addEventListener('transitionstart', this.transitionStarted)
this.transitionEnded = this.transitionendOccured.bind(this)
this.menuDroppoContainer.current.addEventListener('transitionend', this.transitionEnded)
}
componentWillUnmount () {
if (this && document.body) {
document.body.removeEventListener('click', this.globalClickHandler)
document.body.removeEventListener('transitionstart', this.transitionStarted)
document.body.removeEventListener('transitionend', this.transitionEnded)
}
}
globalClickOccurred (event) {
const target = event.target
// eslint-disable-next-line react/no-find-dom-node
const container = findDOMNode(this)
if (target !== container &&
!this.isDescendant(this.container, event.target) &&
this.outsideClickHandler) {
this.outsideClickHandler(event)
}
}
transitionstartOccured (event) {
this.menuDroppoContainer.current.style.overflow = 'hidden'
}
transitionendOccured (event) {
if (!this.props.constOverflow) {
this.menuDroppoContainer.current.style.overflow = 'auto'
}
}
isDescendant (parent, child) {
var node = child.parentNode
while (node !== null) {
if (node === parent) {
return true
}
node = node.parentNode
}
return false
}
return false
}

View File

@ -1,7 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const ReactTooltip = require('react-tooltip-component')
const ReactTooltip = require('react-tooltip')
module.exports = Tooltip

View File

@ -1,9 +1,8 @@
import ConfirmScreen from './components/confirm'
import React from 'react'
import { connect } from 'react-redux'
import actions from '../../ui/app/actions'
class RemoveTokenScreen extends ConfirmScreen {
export default class RemoveTokenScreen extends ConfirmScreen {
render () {
return (
<ConfirmScreen
@ -21,5 +20,3 @@ class RemoveTokenScreen extends ConfirmScreen {
)
}
}
module.exports = connect()(RemoveTokenScreen)

View File

@ -15,7 +15,7 @@ var cssFiles = {
'index.css': fs.readFileSync(path.join(__dirname, '/app/css/index.css'), 'utf8'),
'transitions.css': fs.readFileSync(path.join(__dirname, '/app/css/transitions.css'), 'utf8'),
'first-time.css': fs.readFileSync(path.join(__dirname, '../mascara/src/app/first-time/index.css'), 'utf8'),
'react-tooltip-component.css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-tooltip-component', 'dist', 'react-tooltip-component.css'), 'utf8'),
// 'react-tooltip.css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-tooltip', 'dist', 'style.css'), 'utf8'),
'react-css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-select', 'dist', 'react-select.css'), 'utf8'),
'dropdowns.css': fs.readFileSync(path.join(__dirname, '/app/css/dropdowns.css'), 'utf8'),
'app-bar.css': fs.readFileSync(path.join(__dirname, '/app/css/app-bar.css'), 'utf8'),

35670
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -81,7 +81,7 @@
]
},
"dependencies": {
"@material-ui/core": "1.0.0",
"@material-ui/core": "^4.1.1",
"@zxing/library": "^0.8.0",
"abi-decoder": "^1.0.9",
"asmcrypto.js": "0.22.0",
@ -92,7 +92,6 @@
"bip39": "^2.2.0",
"bluebird": "^3.5.0",
"bn.js": "^4.11.7",
"boron": "^0.2.3",
"browser-passworder": "^2.0.3",
"browserify-derequire": "^0.9.4",
"browserify-unibabel": "^3.0.0",
@ -121,13 +120,13 @@
"eth-net-props": "^1.0.23",
"eth-phishing-detect": "^1.1.4",
"eth-query": "^2.1.2",
"eth-sig-util": "^2.0.2",
"eth-sig-util": "^2.2.0",
"eth-token-watcher": "^1.1.6",
"eth-trezor-keyring": "github:vbaranov/eth-trezor-keyring#0.3.0--clear-accounts-flag",
"ethereumjs-abi": "^0.6.4",
"ethereumjs-abi": "^0.6.7",
"ethereumjs-tx": "^1.3.0",
"ethereumjs-util": "github:ethereumjs/ethereumjs-util#ac5d0908536b447083ea422b435da27f26615de9",
"ethereumjs-wallet": "^0.6.0",
"ethereumjs-wallet": "^0.6.3",
"ethjs": "^0.4.0",
"ethjs-contract": "^0.2.3",
"ethjs-ens": "^2.0.0",
@ -144,6 +143,7 @@
"gulp-autoprefixer": "^5.0.0",
"gulp-sass": "^4.0.0",
"human-standard-token-abi": "^2.0.0",
"i": "^0.3.6",
"idb-global": "^2.1.0",
"iframe-stream": "^3.0.0",
"inject-css": "^0.1.1",
@ -158,6 +158,7 @@
"metamask-inpage-provider": "^1.2.2",
"mkdirp": "^0.5.1",
"multihashes": "^0.4.12",
"npm": "^6.9.0",
"number-to-bn": "^1.7.0",
"obj-multiplex": "^1.0.0",
"obs-store": "^3.0.2",
@ -169,26 +170,25 @@
"post-message-stream": "^3.0.0",
"promise-filter": "^1.1.0",
"promise-to-callback": "^1.0.0",
"prop-types": "^15.6.1",
"prop-types": "^15.7.2",
"pump": "^3.0.0",
"qrcode-npm": "0.0.3",
"ramda": "^0.24.1",
"raven-js": "^3.24.2",
"react": "^15.6.2",
"react-addons-css-transition-group": "^15.6.0",
"react-dom": "^15.6.2",
"react": "^16.8.6",
"react-transition-group": "^1.2.1",
"react-dom": "^16.8.6",
"react-hyperscript": "^3.0.0",
"react-inspector": "^2.3.0",
"react-markdown": "^3.0.0",
"react-media": "^1.8.0",
"react-redux": "^5.0.5",
"react-redux": "^7.1.0",
"react-router-dom": "^4.2.2",
"react-select": "^1.0.0",
"react-simple-file-input": "^2.0.0",
"react-tippy": "^1.2.2",
"react-toggle-button": "^2.2.0",
"react-tooltip-component": "^0.3.0",
"react-transition-group": "^2.2.1",
"react-tooltip": "^3.10.0",
"react-trigger-change": "^1.0.2",
"reactify": "^1.1.1",
"readable-stream": "^2.3.3",
@ -241,8 +241,8 @@
"deep-freeze-strict": "^1.1.1",
"del": "^3.0.0",
"envify": "^4.0.0",
"enzyme": "^3.4.4",
"enzyme-adapter-react-15": "^1.0.6",
"enzyme": "^3.10.0",
"enzyme-adapter-react-16": "^1.14.0",
"eslint-plugin-chai": "0.0.1",
"eslint-plugin-json": "^1.2.0",
"eslint-plugin-mocha": "^5.0.0",
@ -254,7 +254,7 @@
"fs-extra": "^6.0.1",
"fs-promise": "^2.0.3",
"ganache-cli": "^6.1.0",
"ganache-core": "^2.3.1",
"ganache-core": "^2.5.6",
"geckodriver": "^1.12.2",
"gh-pages": "^1.2.0",
"gifencoder": "^1.1.0",
@ -300,9 +300,8 @@
"qs": "^6.2.0",
"qunitjs": "^2.4.1",
"radgrad-jsdoc-template": "^1.1.3",
"react-addons-test-utils": "^15.5.1",
"react-test-renderer": "^15.6.2",
"react-testutils-additions": "^15.2.0",
"react-test-renderer": "^16.8.6",
"react-testutils-additions": "^16.0.2",
"redux-mock-store": "^1.5.3",
"redux-test-utils": "^0.2.2",
"resolve-url-loader": "^2.3.0",
@ -323,7 +322,7 @@
"watchify": "^3.11.0"
},
"engines": {
"node": "8.15.0",
"node": "10.15.3",
"npm": "^6.9.0"
}
}

View File

@ -1,7 +1,7 @@
const Ganache = require('ganache-core')
const nock = require('nock')
import Enzyme from 'enzyme'
import Adapter from 'enzyme-adapter-react-15'
import Adapter from 'enzyme-adapter-react-16'
nock.disableNetConnect()
nock.enableNetConnect('localhost')
@ -32,7 +32,8 @@ global.fetch = require('isomorphic-fetch')
require('jsdom-global')()
// localStorage
window.localStorage = {}
// window.localStorage = {}
Object.defineProperty(window, 'localStorage', {value: {}})
// crypto.getRandomValues
if (!window.crypto) window.crypto = {}

View File

@ -1,16 +1,15 @@
var assert = require('assert')
import React from 'react'
import assert from 'assert'
const additions = require('react-testutils-additions')
const h = require('react-hyperscript')
const ReactTestUtils = require('react-addons-test-utils')
const ethUtil = require('ethereumjs-util')
const BN = ethUtil.BN
import additions from 'react-testutils-additions'
import ReactTestUtils from 'react-dom/test-utils'
import { BN } from 'ethereumjs-util'
var BnInput = require('../../../old-ui/app/components/bn-as-decimal-input')
import BnInput from '../../../old-ui/app/components/bn-as-decimal-input'
describe('BnInput', function () {
it('can tolerate a gas decimal number at a high precision', function (done) {
const renderer = ReactTestUtils.createRenderer()
// const renderer = ReactTestUtils.createRenderer()
let valueStr = '20'
while (valueStr.length < 20) {
@ -29,19 +28,19 @@ describe('BnInput', function () {
const precision = 18 // ether precision
const scale = 18
const props = {
const onChange = (newBn) => {
assert.equal(newBn.toString(), target.toString(), 'should tolerate increase')
done()
}
const inputComponent = <BnInput {...{
value,
scale,
precision,
onChange: (newBn) => {
assert.equal(newBn.toString(), target.toString(), 'should tolerate increase')
done()
},
}
const inputComponent = h(BnInput, props)
onChange,
}}/>
const component = additions.renderIntoDocument(inputComponent)
renderer.render(inputComponent)
ReactTestUtils.mockComponent(inputComponent)
const input = additions.find(component, 'input.hex-input')[0]
ReactTestUtils.Simulate.change(input, { preventDefault () {}, target: {
value: inputStr,
@ -50,7 +49,7 @@ describe('BnInput', function () {
})
it('can tolerate wei precision', function (done) {
const renderer = ReactTestUtils.createRenderer()
// const renderer = ReactTestUtils.createRenderer()
const valueStr = '1000000000'
@ -71,15 +70,15 @@ describe('BnInput', function () {
precision,
onChange: (newBn) => {
assert.equal(newBn.toString(), target.toString(), 'should tolerate increase')
const reInput = BnInput.prototype.downsize(newBn.toString(), 9, 9)
const reInput = BnInput.downsize(newBn.toString(), 9, 9)
assert.equal(reInput.toString(), inputStr, 'should tolerate increase')
done()
},
}
const inputComponent = h(BnInput, props)
const inputComponent = <BnInput {...{props}}/>
const component = additions.renderIntoDocument(inputComponent)
renderer.render(inputComponent)
ReactTestUtils.mockComponent(inputComponent)
const input = additions.find(component, 'input.hex-input')[0]
ReactTestUtils.Simulate.change(input, { preventDefault () {}, target: {
value: inputStr,

View File

@ -2,7 +2,7 @@ const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const findDOMNode = require('react-dom').findDOMNode
const ReactCSSTransitionGroup = require('react-addons-css-transition-group')
import { CSSTransitionGroup } from 'react-transition-group'
module.exports = MenuDroppoComponent
@ -54,7 +54,7 @@ MenuDroppoComponent.prototype.render = function () {
`),
useCssTransition
? h(ReactCSSTransitionGroup, {
? h(CSSTransitionGroup, {
className: 'css-transition-group',
transitionName: 'menu-droppo',
transitionEnterTimeout: parseInt(speed),

View File

@ -1,483 +1,491 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const connect = require('react-redux').connect
const FadeModal = require('boron').FadeModal
const actions = require('../../actions')
const isMobileView = require('../../../lib/is-mobile-view')
const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
// const Component = require('react').Component
// const h = require('react-hyperscript')
// const inherits = require('util').inherits
// const connect = require('react-redux').connect
// // const FadeModal = require('boron').FadeModal
// const actions = require('../../actions')
// // const isMobileView = require('../../../lib/is-mobile-view')
// const { getEnvironmentType } = require('../../../../app/scripts/lib/util')
// const { ENVIRONMENT_TYPE_POPUP } = require('../../../../app/scripts/lib/enums')
// Modal Components
const BuyOptions = require('./buy-options-modal')
const DepositEtherModal = require('./deposit-ether-modal')
const AccountDetailsModal = require('./account-details-modal')
const EditAccountNameModal = require('./edit-account-name-modal')
const ExportPrivateKeyModal = require('./export-private-key-modal')
const NewAccountModal = require('./new-account-modal')
const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js')
const HideTokenConfirmationModal = require('./hide-token-confirmation-modal')
const CustomizeGasModal = require('../customize-gas-modal')
const NotifcationModal = require('./notification-modal')
const QRScanner = require('./qr-scanner')
// // Modal Components
// const BuyOptions = require('./buy-options-modal')
// const DepositEtherModal = require('./deposit-ether-modal')
// const AccountDetailsModal = require('./account-details-modal')
// const EditAccountNameModal = require('./edit-account-name-modal')
// const ExportPrivateKeyModal = require('./export-private-key-modal')
// const NewAccountModal = require('./new-account-modal')
// const ShapeshiftDepositTxModal = require('./shapeshift-deposit-tx-modal.js')
// const HideTokenConfirmationModal = require('./hide-token-confirmation-modal')
// const CustomizeGasModal = require('../customize-gas-modal')
// const NotifcationModal = require('./notification-modal')
// const QRScanner = require('./qr-scanner')
import ConfirmRemoveAccount from './confirm-remove-account'
import ConfirmResetAccount from './confirm-reset-account'
import TransactionConfirmed from './transaction-confirmed'
import ConfirmCustomizeGasModal from './customize-gas'
import CancelTransaction from './cancel-transaction'
import WelcomeBeta from './welcome-beta'
import TransactionDetails from './transaction-details'
import RejectTransactions from './reject-transactions'
// import ConfirmRemoveAccount from './confirm-remove-account'
// import ConfirmResetAccount from './confirm-reset-account'
// import TransactionConfirmed from './transaction-confirmed'
// import ConfirmCustomizeGasModal from './customize-gas'
// import CancelTransaction from './cancel-transaction'
// import WelcomeBeta from './welcome-beta'
// import TransactionDetails from './transaction-details'
// import RejectTransactions from './reject-transactions'
const modalContainerBaseStyle = {
transform: 'translate3d(-50%, 0, 0px)',
border: '1px solid #CCCFD1',
borderRadius: '8px',
backgroundColor: '#FFFFFF',
boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)',
}
// const modalContainerBaseStyle = {
// transform: 'translate3d(-50%, 0, 0px)',
// border: '1px solid #CCCFD1',
// borderRadius: '8px',
// backgroundColor: '#FFFFFF',
// boxShadow: '0 2px 22px 0 rgba(0,0,0,0.2)',
// }
const modalContainerLaptopStyle = {
...modalContainerBaseStyle,
width: '344px',
top: '15%',
}
// const modalContainerLaptopStyle = {
// ...modalContainerBaseStyle,
// width: '344px',
// top: '15%',
// }
const modalContainerMobileStyle = {
...modalContainerBaseStyle,
width: '309px',
top: '12.5%',
}
// const modalContainerMobileStyle = {
// ...modalContainerBaseStyle,
// width: '309px',
// top: '12.5%',
// }
const accountModalStyle = {
mobileModalStyle: {
width: '95%',
// top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
borderRadius: '4px',
top: '10%',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
laptopModalStyle: {
width: '360px',
// top: 'calc(33% + 45px)',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
borderRadius: '4px',
top: '10%',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
contentStyle: {
borderRadius: '4px',
},
}
// const accountModalStyle = {
// mobileModalStyle: {
// width: '95%',
// // top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
// boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
// borderRadius: '4px',
// top: '10%',
// transform: 'none',
// left: '0',
// right: '0',
// margin: '0 auto',
// },
// laptopModalStyle: {
// width: '360px',
// // top: 'calc(33% + 45px)',
// boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
// borderRadius: '4px',
// top: '10%',
// transform: 'none',
// left: '0',
// right: '0',
// margin: '0 auto',
// },
// contentStyle: {
// borderRadius: '4px',
// },
// }
const MODALS = {
BUY: {
contents: [
h(BuyOptions, {}, []),
],
mobileModalStyle: {
width: '95%',
// top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
top: '10%',
},
laptopModalStyle: {
width: '66%',
maxWidth: '550px',
top: 'calc(10% + 10px)',
left: '0',
right: '0',
margin: '0 auto',
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
transform: 'none',
},
},
// // const MODALS = {
// // BUY: {
// // contents: [
// // h(BuyOptions, {}, []),
// // ],
// // mobileModalStyle: {
// // width: '95%',
// // // top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
// // top: '10%',
// // },
// // laptopModalStyle: {
// // width: '66%',
// // maxWidth: '550px',
// // top: 'calc(10% + 10px)',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
// // transform: 'none',
// // },
// // },
DEPOSIT_ETHER: {
contents: [
h(DepositEtherModal, {}, []),
],
onHide: (props) => props.hideWarning(),
mobileModalStyle: {
width: '100%',
height: '100%',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
top: '0',
display: 'flex',
},
laptopModalStyle: {
width: '850px',
top: 'calc(10% + 10px)',
left: '0',
right: '0',
margin: '0 auto',
boxShadow: '0 0 6px 0 rgba(0,0,0,0.3)',
borderRadius: '7px',
transform: 'none',
height: 'calc(80% - 20px)',
overflowY: 'hidden',
},
contentStyle: {
borderRadius: '7px',
height: '100%',
},
},
// // DEPOSIT_ETHER: {
// // contents: [
// // h(DepositEtherModal, {}, []),
// // ],
// // onHide: (props) => props.hideWarning(),
// // mobileModalStyle: {
// // width: '100%',
// // height: '100%',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // boxShadow: '0 0 7px 0 rgba(0,0,0,0.08)',
// // top: '0',
// // display: 'flex',
// // },
// // laptopModalStyle: {
// // width: '850px',
// // top: 'calc(10% + 10px)',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // boxShadow: '0 0 6px 0 rgba(0,0,0,0.3)',
// // borderRadius: '7px',
// // transform: 'none',
// // height: 'calc(80% - 20px)',
// // overflowY: 'hidden',
// // },
// // contentStyle: {
// // borderRadius: '7px',
// // height: '100%',
// // },
// // },
EDIT_ACCOUNT_NAME: {
contents: [
h(EditAccountNameModal, {}, []),
],
mobileModalStyle: {
width: '95%',
// top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
top: '10%',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
laptopModalStyle: {
width: '375px',
// top: 'calc(30% + 10px)',
top: '10%',
boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
},
// // EDIT_ACCOUNT_NAME: {
// // contents: [
// // h(EditAccountNameModal, {}, []),
// // ],
// // mobileModalStyle: {
// // width: '95%',
// // // top: isPopupOrNotification() === 'popup' ? '48vh' : '36.5vh',
// // top: '10%',
// // boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // laptopModalStyle: {
// // width: '375px',
// // // top: 'calc(30% + 10px)',
// // top: '10%',
// // boxShadow: 'rgba(0, 0, 0, 0.15) 0px 2px 2px 2px',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // },
ACCOUNT_DETAILS: {
contents: [
h(AccountDetailsModal, {}, []),
],
...accountModalStyle,
},
// // ACCOUNT_DETAILS: {
// // contents: [
// // h(AccountDetailsModal, {}, []),
// // ],
// // ...accountModalStyle,
// // },
EXPORT_PRIVATE_KEY: {
contents: [
h(ExportPrivateKeyModal, {}, []),
],
...accountModalStyle,
},
// // EXPORT_PRIVATE_KEY: {
// // contents: [
// // h(ExportPrivateKeyModal, {}, []),
// // ],
// // ...accountModalStyle,
// // },
SHAPESHIFT_DEPOSIT_TX: {
contents: [
h(ShapeshiftDepositTxModal),
],
...accountModalStyle,
},
// // SHAPESHIFT_DEPOSIT_TX: {
// // contents: [
// // h(ShapeshiftDepositTxModal),
// // ],
// // ...accountModalStyle,
// // },
HIDE_TOKEN_CONFIRMATION: {
contents: [
h(HideTokenConfirmationModal, {}, []),
],
mobileModalStyle: {
width: '95%',
top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
},
laptopModalStyle: {
width: '449px',
top: 'calc(33% + 45px)',
},
},
// // HIDE_TOKEN_CONFIRMATION: {
// // contents: [
// // h(HideTokenConfirmationModal, {}, []),
// // ],
// // mobileModalStyle: {
// // width: '95%',
// // top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
// // },
// // laptopModalStyle: {
// // width: '449px',
// // top: 'calc(33% + 45px)',
// // },
// // },
BETA_UI_NOTIFICATION_MODAL: {
contents: h(WelcomeBeta),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // BETA_UI_NOTIFICATION_MODAL: {
// // contents: h(WelcomeBeta),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
OLD_UI_NOTIFICATION_MODAL: {
contents: [
h(NotifcationModal, {
header: 'oldUI',
message: 'oldUIMessage',
}),
],
mobileModalStyle: {
width: '95%',
top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
},
laptopModalStyle: {
width: '449px',
top: 'calc(33% + 45px)',
},
},
// // OLD_UI_NOTIFICATION_MODAL: {
// // contents: [
// // h(NotifcationModal, {
// // header: 'oldUI',
// // message: 'oldUIMessage',
// // }),
// // ],
// // mobileModalStyle: {
// // width: '95%',
// // top: getEnvironmentType(window.location.href) === ENVIRONMENT_TYPE_POPUP ? '52vh' : '36.5vh',
// // },
// // laptopModalStyle: {
// // width: '449px',
// // top: 'calc(33% + 45px)',
// // },
// // },
CONFIRM_RESET_ACCOUNT: {
contents: h(ConfirmResetAccount),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // CONFIRM_RESET_ACCOUNT: {
// // contents: h(ConfirmResetAccount),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
CONFIRM_REMOVE_ACCOUNT: {
contents: h(ConfirmRemoveAccount),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // CONFIRM_REMOVE_ACCOUNT: {
// // contents: h(ConfirmRemoveAccount),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
NEW_ACCOUNT: {
contents: [
h(NewAccountModal, {}, []),
],
mobileModalStyle: {
width: '95%',
// top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
top: '10%',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
laptopModalStyle: {
width: '449px',
// top: 'calc(33% + 45px)',
top: '10%',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
},
// // NEW_ACCOUNT: {
// // contents: [
// // h(NewAccountModal, {}, []),
// // ],
// // mobileModalStyle: {
// // width: '95%',
// // // top: isPopupOrNotification() === 'popup' ? '52vh' : '36.5vh',
// // top: '10%',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // laptopModalStyle: {
// // width: '449px',
// // // top: 'calc(33% + 45px)',
// // top: '10%',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // },
CUSTOMIZE_GAS: {
contents: [
h(CustomizeGasModal),
],
mobileModalStyle: {
width: '100vw',
height: '100vh',
top: '0',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
laptopModalStyle: {
width: '720px',
height: '377px',
top: '80px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
},
// // CUSTOMIZE_GAS: {
// // contents: [
// // h(CustomizeGasModal),
// // ],
// // mobileModalStyle: {
// // width: '100vw',
// // height: '100vh',
// // top: '0',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // laptopModalStyle: {
// // width: '720px',
// // height: '377px',
// // top: '80px',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // },
CONFIRM_CUSTOMIZE_GAS: {
contents: h(ConfirmCustomizeGasModal),
mobileModalStyle: {
width: '100vw',
height: '100vh',
top: '0',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
laptopModalStyle: {
width: '720px',
height: '377px',
top: '80px',
transform: 'none',
left: '0',
right: '0',
margin: '0 auto',
},
},
// // CONFIRM_CUSTOMIZE_GAS: {
// // contents: h(ConfirmCustomizeGasModal),
// // mobileModalStyle: {
// // width: '100vw',
// // height: '100vh',
// // top: '0',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // laptopModalStyle: {
// // width: '720px',
// // height: '377px',
// // top: '80px',
// // transform: 'none',
// // left: '0',
// // right: '0',
// // margin: '0 auto',
// // },
// // },
TRANSACTION_CONFIRMED: {
disableBackdropClick: true,
contents: h(TransactionConfirmed),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // TRANSACTION_CONFIRMED: {
// // disableBackdropClick: true,
// // contents: h(TransactionConfirmed),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
QR_SCANNER: {
contents: h(QRScanner),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // QR_SCANNER: {
// // contents: h(QRScanner),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
CANCEL_TRANSACTION: {
contents: h(CancelTransaction),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // CANCEL_TRANSACTION: {
// // contents: h(CancelTransaction),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
TRANSACTION_DETAILS: {
contents: h(TransactionDetails),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // TRANSACTION_DETAILS: {
// // contents: h(TransactionDetails),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
REJECT_TRANSACTIONS: {
contents: h(RejectTransactions),
mobileModalStyle: {
...modalContainerMobileStyle,
},
laptopModalStyle: {
...modalContainerLaptopStyle,
},
contentStyle: {
borderRadius: '8px',
},
},
// // REJECT_TRANSACTIONS: {
// // contents: h(RejectTransactions),
// // mobileModalStyle: {
// // ...modalContainerMobileStyle,
// // },
// // laptopModalStyle: {
// // ...modalContainerLaptopStyle,
// // },
// // contentStyle: {
// // borderRadius: '8px',
// // },
// // },
DEFAULT: {
contents: [],
mobileModalStyle: {},
laptopModalStyle: {},
},
}
// // DEFAULT: {
// // contents: [],
// // mobileModalStyle: {},
// // laptopModalStyle: {},
// // },
// // }
const BACKDROPSTYLE = {
backgroundColor: 'rgba(0, 0, 0, 0.5)',
}
// // const BACKDROPSTYLE = {
// // backgroundColor: 'rgba(0, 0, 0, 0.5)',
// // }
function mapStateToProps (state) {
return {
active: state.appState.modal.open,
modalState: state.appState.modal.modalState,
// function mapStateToProps (state) {
// return {
// active: state.appState.modal.open,
// modalState: state.appState.modal.modalState,
// }
// }
// function mapDispatchToProps (dispatch) {
// return {
// hideModal: () => {
// dispatch(actions.hideModal())
// },
// hideWarning: () => {
// dispatch(actions.hideWarning())
// },
// }
// }
// // Global Modal Component
// inherits(Modal, Component)
// function Modal () {
// Component.call(this)
// }
// module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal)
// Modal.prototype.render = function () {
// // const modal = MODALS[this.props.modalState.name || 'DEFAULT']
// // const { contents: children, disableBackdropClick = false } = modal
// // const modalStyle = modal[isMobileView() ? 'mobileModalStyle' : 'laptopModalStyle']
// // const contentStyle = modal.contentStyle || {}
// // todo
// return null
// // return h(FadeModal,
// // {
// // className: 'modal',
// // keyboard: false,
// // onHide: () => {
// // if (modal.onHide) {
// // modal.onHide(this.props)
// // }
// // this.onHide()
// // },
// // ref: (ref) => {
// // this.modalRef = ref
// // },
// // modalStyle,
// // contentStyle,
// // backdropStyle: BACKDROPSTYLE,
// // closeOnClick: !disableBackdropClick,
// // },
// // children,
// // )
// }
// Modal.prototype.componentWillReceiveProps = function (nextProps) {
// if (nextProps.active) {
// this.show()
// } else if (this.props.active) {
// this.hide()
// }
// }
// Modal.prototype.onHide = function () {
// if (this.props.onHideCallback) {
// this.props.onHideCallback()
// }
// this.props.hideModal()
// }
// Modal.prototype.hide = function () {
// this.modalRef.hide()
// }
// Modal.prototype.show = function () {
// this.modalRef.show()
// }
export default class Modal {
render () {
return null
}
}
function mapDispatchToProps (dispatch) {
return {
hideModal: () => {
dispatch(actions.hideModal())
},
hideWarning: () => {
dispatch(actions.hideWarning())
},
}
}
// Global Modal Component
inherits(Modal, Component)
function Modal () {
Component.call(this)
}
module.exports = connect(mapStateToProps, mapDispatchToProps)(Modal)
Modal.prototype.render = function () {
const modal = MODALS[this.props.modalState.name || 'DEFAULT']
const { contents: children, disableBackdropClick = false } = modal
const modalStyle = modal[isMobileView() ? 'mobileModalStyle' : 'laptopModalStyle']
const contentStyle = modal.contentStyle || {}
return h(FadeModal,
{
className: 'modal',
keyboard: false,
onHide: () => {
if (modal.onHide) {
modal.onHide(this.props)
}
this.onHide()
},
ref: (ref) => {
this.modalRef = ref
},
modalStyle,
contentStyle,
backdropStyle: BACKDROPSTYLE,
closeOnClick: !disableBackdropClick,
},
children,
)
}
Modal.prototype.componentWillReceiveProps = function (nextProps) {
if (nextProps.active) {
this.show()
} else if (this.props.active) {
this.hide()
}
}
Modal.prototype.onHide = function () {
if (this.props.onHideCallback) {
this.props.onHideCallback()
}
this.props.hideModal()
}
Modal.prototype.hide = function () {
this.modalRef.hide()
}
Modal.prototype.show = function () {
this.modalRef.show()
}

View File

@ -1,6 +1,6 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import { CSSTransitionGroup } from 'react-transition-group'
import WalletView from '../wallet-view'
import { WALLET_VIEW_SIDEBAR } from './sidebar.constants'
@ -34,13 +34,13 @@ export default class Sidebar extends Component {
return (
<div>
<ReactCSSTransitionGroup
<CSSTransitionGroup
transitionName={transitionName}
transitionEnterTimeout={300}
transitionLeaveTimeout={200}
>
{ sidebarOpen ? this.renderSidebarContent() : null }
</ReactCSSTransitionGroup>
</CSSTransitionGroup>
{ sidebarOpen ? this.renderOverlay() : null }
</div>
)

View File

@ -2,7 +2,7 @@ import React from 'react'
import assert from 'assert'
import { shallow } from 'enzyme'
import sinon from 'sinon'
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
import { CSSTransitionGroup } from 'react-transition-group'
import Sidebar from '../sidebar.component.js'
import WalletView from '../../wallet-view'
@ -72,8 +72,8 @@ describe('Sidebar Component', function () {
assert.equal(wrapper.children().length, 1)
})
it('should render the ReactCSSTransitionGroup without any children', () => {
assert(wrapper.children().at(0).is(ReactCSSTransitionGroup))
it('should render the CSSTransitionGroup without any children', () => {
assert(wrapper.children().at(0).is(CSSTransitionGroup))
assert.equal(wrapper.children().at(0).children().length, 0)
})

View File

@ -1,7 +1,7 @@
const Component = require('react').Component
const h = require('react-hyperscript')
const inherits = require('util').inherits
const ReactTooltip = require('react-tooltip-component')
const ReactTooltip = require('react-tooltip')
module.exports = Tooltip

View File

@ -6,7 +6,7 @@ module.exports = bundleCss
var cssFiles = {
'index.css': fs.readFileSync(path.join(__dirname, '/app/css/output/index.css'), 'utf8'),
'first-time.css': fs.readFileSync(path.join(__dirname, '../mascara/src/app/first-time/index.css'), 'utf8'),
'react-tooltip-component.css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-tooltip-component', 'dist', 'react-tooltip-component.css'), 'utf8'),
// 'react-tooltip.css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-tooltip', 'dist', 'style.css'), 'utf8'),
'react-css': fs.readFileSync(path.join(__dirname, '..', 'node_modules', 'react-select', 'dist', 'react-select.css'), 'utf8'),
}