change import of prop-types

This commit is contained in:
cle1000 2017-04-27 10:54:21 +02:00
parent 2a46f3851a
commit 115a31c9ba
41 changed files with 5563 additions and 4805 deletions

View File

@ -226,14 +226,28 @@ header menu {
} }
.filter-input .popover { .filter-input .popover {
top: 27px; top: 27px;
left: 43px;
display: block; display: block;
max-width: none; max-width: none;
opacity: 0.9; opacity: 0.9;
} }
@media (max-width: 767px) {
.filter-input .popover {
top: 16px;
left: 29px;
right: 2px;
}
}
.filter-input .popover .popover-content { .filter-input .popover .popover-content {
max-height: 500px; max-height: 500px;
overflow-y: auto; overflow-y: auto;
} }
.filter-input .popover .popover-content tr {
cursor: pointer;
}
.filter-input .popover .popover-content tr:hover {
background-color: rgba(193, 215, 235, 0.5) !important;
}
.flow-table { .flow-table {
width: 100%; width: 100%;
overflow-y: scroll; overflow-y: scroll;
@ -358,8 +372,7 @@ header menu {
background-color: #F2F2F2; background-color: #F2F2F2;
} }
.flow-detail section { .flow-detail section {
display: flex; overflow-y: scroll;
flex-direction: column;
} }
.flow-detail section > article { .flow-detail section > article {
overflow: auto; overflow: auto;
@ -790,11 +803,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
cursor: default; cursor: default;
z-index: 4; z-index: 4;
} }
.CodeMirror-gutter-wrapper { .CodeMirror-gutter-wrapper ::selection { background-color: transparent }
-webkit-user-select: none; .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
-moz-user-select: none;
user-select: none;
}
.CodeMirror-lines { .CodeMirror-lines {
cursor: text; cursor: text;
@ -839,6 +849,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-widget {} .CodeMirror-widget {}
.CodeMirror-rtl pre { direction: rtl; }
.CodeMirror-code { .CodeMirror-code {
outline: none; outline: none;
} }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -25,6 +25,7 @@
"classnames": "^2.2.5", "classnames": "^2.2.5",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"react": "^15.4.2", "react": "^15.4.2",
"prop-types": "^15.5.0",
"react-codemirror": "^0.3.0", "react-codemirror": "^0.3.0",
"react-dom": "^15.4.2", "react-dom": "^15.4.2",
"react-redux": "^5.0.2", "react-redux": "^5.0.2",

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import * as ContentViews from './ContentView/ContentViews' import * as ContentViews from './ContentView/ContentViews'
import * as MetaViews from './ContentView/MetaViews' import * as MetaViews from './ContentView/MetaViews'
@ -11,8 +12,8 @@ ContentView.propTypes = {
// It may seem a bit weird at the first glance: // It may seem a bit weird at the first glance:
// Every view takes the flow and the message as props, e.g. // Every view takes the flow and the message as props, e.g.
// <Auto flow={flow} message={flow.request}/> // <Auto flow={flow} message={flow.request}/>
flow: React.PropTypes.object.isRequired, flow: PropTypes.object.isRequired,
message: React.PropTypes.object.isRequired, message: PropTypes.object.isRequired,
} }
ContentView.isContentTooLarge = msg => msg.contentLength > 1024 * 1024 * (ContentViews.ViewImage.matches(msg) ? 10 : 0.2) ContentView.isContentTooLarge = msg => msg.contentLength > 1024 * 1024 * (ContentViews.ViewImage.matches(msg) ? 10 : 0.2)

View File

@ -1,4 +1,5 @@
import React, {PropTypes} from 'react' import React from 'react'
import PropTypes from 'prop-types'
import Codemirror from 'react-codemirror'; import Codemirror from 'react-codemirror';

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { MessageUtils } from '../../flow/utils.js' import { MessageUtils } from '../../flow/utils.js'
export default View => class extends React.Component { export default View => class extends React.Component {

View File

@ -1,12 +1,13 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import ViewSelector from './ViewSelector' import ViewSelector from './ViewSelector'
import UploadContentButton from './UploadContentButton' import UploadContentButton from './UploadContentButton'
import DownloadContentButton from './DownloadContentButton' import DownloadContentButton from './DownloadContentButton'
ContentViewOptions.propTypes = { ContentViewOptions.propTypes = {
flow: React.PropTypes.object.isRequired, flow: PropTypes.object.isRequired,
message: React.PropTypes.object.isRequired, message: PropTypes.object.isRequired,
} }
function ContentViewOptions({ flow, message, uploadContent, readonly, contentViewDescription }) { function ContentViewOptions({ flow, message, uploadContent, readonly, contentViewDescription }) {

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { setContentViewDescription, setContent } from '../../ducks/ui/flow' import { setContentViewDescription, setContent } from '../../ducks/ui/flow'
import ContentLoader from './ContentLoader' import ContentLoader from './ContentLoader'
@ -21,7 +22,7 @@ function ViewImage({ flow, message }) {
} }
Edit.propTypes = { Edit.propTypes = {
content: React.PropTypes.string.isRequired, content: PropTypes.string.isRequired,
} }
function Edit({ content, onChange }) { function Edit({ content, onChange }) {

View File

@ -1,5 +1,5 @@
import { MessageUtils } from "../../flow/utils" import { MessageUtils } from "../../flow/utils"
import { PropTypes } from 'react' import PropTypes from 'prop-types'
DownloadContentButton.propTypes = { DownloadContentButton.propTypes = {
flow: PropTypes.object.isRequired, flow: PropTypes.object.isRequired,

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { render } from 'react-dom'; import { render } from 'react-dom';
import Button from '../common/Button'; import Button from '../common/Button';

View File

@ -1,4 +1,4 @@
import { PropTypes } from 'react' import PropTypes from 'prop-types'
import FileChooser from '../common/FileChooser' import FileChooser from '../common/FileChooser'
UploadContentButton.propTypes = { UploadContentButton.propTypes = {

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { setContentView } from '../../ducks/ui/flow'; import { setContentView } from '../../ducks/ui/flow';
import Dropdown from '../common/Dropdown' import Dropdown from '../common/Dropdown'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { toggleFilter, toggleVisibility } from '../ducks/eventLog' import { toggleFilter, toggleVisibility } from '../ducks/eventLog'
import ToggleButton from './common/ToggleButton' import ToggleButton from './common/ToggleButton'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import shallowEqual from 'shallowequal' import shallowEqual from 'shallowequal'
import AutoScroll from '../helpers/AutoScroll' import AutoScroll from '../helpers/AutoScroll'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import shallowEqual from 'shallowequal' import shallowEqual from 'shallowequal'
import AutoScroll from './helpers/AutoScroll' import AutoScroll from './helpers/AutoScroll'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames' import classnames from 'classnames'
import columns from './FlowColumns' import columns from './FlowColumns'
import { pure } from '../../utils' import { pure } from '../../utils'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import classnames from 'classnames' import classnames from 'classnames'
import columns from './FlowColumns' import columns from './FlowColumns'
@ -7,8 +8,8 @@ import { setSort } from '../../ducks/flows'
FlowTableHead.propTypes = { FlowTableHead.propTypes = {
setSort: PropTypes.func.isRequired, setSort: PropTypes.func.isRequired,
sortDesc: React.PropTypes.bool.isRequired, sortDesc: PropTypes.bool.isRequired,
sortColumn: React.PropTypes.string, sortColumn: PropTypes.string,
} }
function FlowTableHead({ sortColumn, sortDesc, setSort }) { function FlowTableHead({ sortColumn, sortDesc, setSort }) {

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import ValueEditor from '../ValueEditor/ValueEditor' import ValueEditor from '../ValueEditor/ValueEditor'
import { Key } from '../../utils' import { Key } from '../../utils'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import classnames from 'classnames' import classnames from 'classnames'

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { startEdit, stopEdit } from '../../ducks/ui/flow' import { startEdit, stopEdit } from '../../ducks/ui/flow'

View File

@ -1,9 +1,10 @@
import React from 'react' import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { formatSize } from '../utils.js' import { formatSize } from '../utils.js'
Footer.propTypes = { Footer.propTypes = {
settings: React.PropTypes.object.isRequired, settings: PropTypes.object.isRequired,
} }
function Footer({ settings }) { function Footer({ settings }) {

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import classnames from 'classnames' import classnames from 'classnames'
import MainMenu from './Header/MainMenu' import MainMenu from './Header/MainMenu'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import FileChooser from '../common/FileChooser' import FileChooser from '../common/FileChooser'
import Dropdown, {Divider} from '../common/Dropdown' import Dropdown, {Divider} from '../common/Dropdown'

View File

@ -1,4 +1,5 @@
import React, { PropTypes, Component } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import classnames from 'classnames' import classnames from 'classnames'
import { Key } from '../../utils.js' import { Key } from '../../utils.js'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from "react" import React from "react"
import PropTypes from 'prop-types'
import { connect } from "react-redux" import { connect } from "react-redux"
import Button from "../common/Button" import Button from "../common/Button"
import { MessageUtils } from "../../flow/utils.js" import { MessageUtils } from "../../flow/utils.js"

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from "react" import React, { Component } from "react"
import PropTypes from 'prop-types'
import { connect } from "react-redux" import { connect } from "react-redux"
import FilterInput from "./FilterInput" import FilterInput from "./FilterInput"
import { update as updateSettings } from "../../ducks/settings" import { update as updateSettings } from "../../ducks/settings"

View File

@ -1,4 +1,4 @@
import { PropTypes } from "react" import PropTypes from 'prop-types'
import { connect } from "react-redux" import { connect } from "react-redux"
import { update as updateSettings } from "../../ducks/settings" import { update as updateSettings } from "../../ducks/settings"
import { toggleVisibility } from "../../ducks/eventLog" import { toggleVisibility } from "../../ducks/eventLog"

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from "react" import React from "react"
import PropTypes from 'prop-types'
import { connect } from "react-redux" import { connect } from "react-redux"
import { SettingsToggle, EventlogToggle } from "./MenuToggle" import { SettingsToggle, EventlogToggle } from "./MenuToggle"
import DocsLink from "../common/DocsLink" import DocsLink from "../common/DocsLink"

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import Splitter from './common/Splitter' import Splitter from './common/Splitter'
import FlowTable from './FlowTable' import FlowTable from './FlowTable'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
import ReactDOM from 'react-dom' import ReactDOM from 'react-dom'
import _ from 'lodash' import _ from 'lodash'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { onKeyDown } from '../ducks/ui/keyboard' import { onKeyDown } from '../ducks/ui/keyboard'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import ValueEditor from './ValueEditor' import ValueEditor from './ValueEditor'
import classnames from 'classnames' import classnames from 'classnames'

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import _ from "lodash" import _ from "lodash"
import classnames from 'classnames' import classnames from 'classnames'

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from "react" import React from "react"
import PropTypes from 'prop-types'
import classnames from "classnames" import classnames from "classnames"
Button.propTypes = { Button.propTypes = {

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames' import classnames from 'classnames'
export const Divider = () => <hr className="divider"/> export const Divider = () => <hr className="divider"/>

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
FileChooser.propTypes = { FileChooser.propTypes = {
icon: PropTypes.string, icon: PropTypes.string,

View File

@ -1,4 +1,5 @@
import React, { PropTypes } from 'react' import React from 'react'
import PropTypes from 'prop-types'
ToggleButton.propTypes = { ToggleButton.propTypes = {
checked: PropTypes.bool.isRequired, checked: PropTypes.bool.isRequired,

View File

@ -1,4 +1,5 @@
import React, { Component, PropTypes } from 'react' import React, { Component } from 'react'
import PropTypes from 'prop-types'
import classnames from 'classnames' import classnames from 'classnames'
import { Key } from '../../utils' import { Key } from '../../utils'

View File

@ -1953,7 +1953,7 @@ module.exports = (function() {
function domain(regex){ function domain(regex){
regex = new RegExp(regex, "i"); regex = new RegExp(regex, "i");
function domainFilter(flow){ function domainFilter(flow){
return flow.request && regex.test(flow.request.host); return flow.request && (regex.test(flow.request.host) || regex.test(flow.request.pretty_host));
} }
domainFilter.desc = "domain matches " + regex; domainFilter.desc = "domain matches " + regex;
return domainFilter; return domainFilter;