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 {
top: 27px;
left: 43px;
display: block;
max-width: none;
opacity: 0.9;
}
@media (max-width: 767px) {
.filter-input .popover {
top: 16px;
left: 29px;
right: 2px;
}
}
.filter-input .popover .popover-content {
max-height: 500px;
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 {
width: 100%;
overflow-y: scroll;
@ -358,8 +372,7 @@ header menu {
background-color: #F2F2F2;
}
.flow-detail section {
display: flex;
flex-direction: column;
overflow-y: scroll;
}
.flow-detail section > article {
overflow: auto;
@ -790,11 +803,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
cursor: default;
z-index: 4;
}
.CodeMirror-gutter-wrapper {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
}
.CodeMirror-gutter-wrapper ::selection { background-color: transparent }
.CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent }
.CodeMirror-lines {
cursor: text;
@ -839,6 +849,8 @@ div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #f22;}
.CodeMirror-widget {}
.CodeMirror-rtl pre { direction: rtl; }
.CodeMirror-code {
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",
"lodash": "^4.17.4",
"react": "^15.4.2",
"prop-types": "^15.5.0",
"react-codemirror": "^0.3.0",
"react-dom": "^15.4.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 * as ContentViews from './ContentView/ContentViews'
import * as MetaViews from './ContentView/MetaViews'
@ -11,8 +12,8 @@ ContentView.propTypes = {
// It may seem a bit weird at the first glance:
// Every view takes the flow and the message as props, e.g.
// <Auto flow={flow} message={flow.request}/>
flow: React.PropTypes.object.isRequired,
message: React.PropTypes.object.isRequired,
flow: PropTypes.object.isRequired,
message: PropTypes.object.isRequired,
}
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';

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'
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 ViewSelector from './ViewSelector'
import UploadContentButton from './UploadContentButton'
import DownloadContentButton from './DownloadContentButton'
ContentViewOptions.propTypes = {
flow: React.PropTypes.object.isRequired,
message: React.PropTypes.object.isRequired,
flow: PropTypes.object.isRequired,
message: PropTypes.object.isRequired,
}
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 { setContentViewDescription, setContent } from '../../ducks/ui/flow'
import ContentLoader from './ContentLoader'
@ -21,7 +22,7 @@ function ViewImage({ flow, message }) {
}
Edit.propTypes = {
content: React.PropTypes.string.isRequired,
content: PropTypes.string.isRequired,
}
function Edit({ content, onChange }) {

View File

@ -1,5 +1,5 @@
import { MessageUtils } from "../../flow/utils"
import { PropTypes } from 'react'
import PropTypes from 'prop-types'
DownloadContentButton.propTypes = {
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 { render } from 'react-dom';
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'
UploadContentButton.propTypes = {
@ -6,7 +6,7 @@ UploadContentButton.propTypes = {
}
export default function UploadContentButton({ uploadContent }) {
return (
<FileChooser
icon="fa-upload"

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 { setContentView } from '../../ducks/ui/flow';
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 { toggleFilter, toggleVisibility } from '../ducks/eventLog'
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 shallowEqual from 'shallowequal'
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 shallowEqual from 'shallowequal'
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 columns from './FlowColumns'
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 classnames from 'classnames'
import columns from './FlowColumns'
@ -7,8 +8,8 @@ import { setSort } from '../../ducks/flows'
FlowTableHead.propTypes = {
setSort: PropTypes.func.isRequired,
sortDesc: React.PropTypes.bool.isRequired,
sortColumn: React.PropTypes.string,
sortDesc: PropTypes.bool.isRequired,
sortColumn: PropTypes.string,
}
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 ValueEditor from '../ValueEditor/ValueEditor'
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'

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 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 { startEdit, stopEdit } from '../../ducks/ui/flow'

View File

@ -1,9 +1,10 @@
import React from 'react'
import PropTypes from 'prop-types'
import { connect } from 'react-redux'
import { formatSize } from '../utils.js'
Footer.propTypes = {
settings: React.PropTypes.object.isRequired,
settings: PropTypes.object.isRequired,
}
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 classnames from 'classnames'
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 FileChooser from '../common/FileChooser'
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 classnames from 'classnames'
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 Button from "../common/Button"
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 FilterInput from "./FilterInput"
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 { update as updateSettings } from "../../ducks/settings"
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 { SettingsToggle, EventlogToggle } from "./MenuToggle"
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 Splitter from './common/Splitter'
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 _ 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 { 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 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 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"
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'
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 = {
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 = {
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 { Key } from '../../utils'

View File

@ -1953,7 +1953,7 @@ module.exports = (function() {
function domain(regex){
regex = new RegExp(regex, "i");
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;
return domainFilter;