Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
let { getState } = this.props
window.props = this.props
return (
<div>
<h3><a> {this.plusOrMinus(this.state.jsonDumpOpen)} App </a></h3>
</div>
)
}
static defaultProps = {
currentView: 0,
viewsToShow: 'auto',
viewsToMove: 1,
align: 0,
contain: false,
axis: 'x',
autoSize: false,
infinite: false,
instant: false,
swipe: true,
swipeThreshold: 0.5,
flickTimeout: 300,
rightToLeft: false,
lazyLoad: false,
springConfig: presets.noWobble,
onReady: () => null,
onChange: () => null,
beforeAnimation: () => null,
afterAnimation: () => null
}
static childContextTypes = {
viewPager: PropTypes.instanceOf(Pager)
}
constructor(props) {
super(props)
this._viewPager = new Pager(props)
this._currentTween = 0
getDefault() {
return {
blur: { val : 0, config: presets.noWobble},
opacity: { val : 1, config: presets.noWobble },
scale: { val : 1, config: presets.wobbly},
grayscale: { val : 0, config: presets.noWobble}
}
}
function getAnimationStyle(animationStyle = presets.noWobble) {
if (typeof animationStyle === 'string') {
return presets[animationStyle] || presets.noWobble;
}
const {damping, stiffness} = animationStyle;
return {
damping: damping || presets.noWobble.damping,
stiffness: stiffness || presets.noWobble.stiffness,
...animationStyle
};
}
getDefault() {
return {
blur: { val : 0, config: presets.noWobble},
opacity: { val : 1, config: presets.noWobble },
scale: { val : 1, config: presets.wobbly},
grayscale: { val : 0, config: presets.noWobble}
}
}
styles={this.state.messages.map(msg => ({
key: String(msg.key),
style: {
x: spring(0, presets.noWobble),
negativeMargin: spring(0, presets.noWobble)
},
data: _.assign({}, msg)
}))}
accessibility: PropTypes.bool,
springConfig: PropTypes.objectOf(PropTypes.number)
}
class Frame extends Component {
static contextTypes = {
pager: PropTypes.instanceOf(Pager)
}
static propTypes = checkedProps
static defaultProps = {
tag: 'div',
autoSize: false,
accessibility: true,
springConfig: presets.noWobble
}
constructor(props) {
super(props)
this.state = {
width: 0,
height: 0,
instant: true
}
this._hydrate = false
}
componentWillMount() {
const { pager } = this.context
const { autoSize, accessibility } = this.props
class Slideable extends Component {
static propTypes = {
component: PropTypes.string,
defaultHeight: PropTypes.number,
springConfig: PropTypes.array,
toggle: PropTypes.bool,
forceAutoHeight: PropTypes.bool,
measure: PropTypes.bool,
instant: PropTypes.bool,
onSlideEnd: PropTypes.func
}
static defaultProps = {
component: 'div',
defaultHeight: 0,
springConfig: presets.noWobble,
toggle: false,
forceAutoHeight: false,
measure: true,
instant: false,
onSlideEnd: () => null
}
state = {
height: null
}
shouldComponentUpdate(nextProps, nextState) {
return this.props.toggle !== nextProps.toggle ||
this.state.height !== nextState.height
}
size: open ? 5 : 56,
}}
style={{
opacity: spring(
open ? 1 : 0,
open ? presets.gentle : presets.noWobble
),
x: spring(
open ? 30 - (3 - col) * 75 : 0,
open ? presets.gentle : presets.noWobble
),
y: spring(
open ? 30 - (3 - row) * 75 : 0,
open ? presets.gentle : presets.noWobble
),
size: spring(open ? 56 : 5, open ? presets.gentle : presets.noWobble),
}}
>
{({ x, y, size, opacity }) => {
if (!open && size < 5.1) {
this.onRest()
}
return (