Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/* NavigationAction */
const action = PropTypes.shape({
type: PropTypes.string.isRequired,
});
/* NavigationAnimatedValue */
const animatedValue = PropTypes.instanceOf(Animated.Value);
/* NavigationRoute */
const navigationRoute = PropTypes.shape({
key: PropTypes.string.isRequired,
});
/* NavigationState */
const navigationState = PropTypes.shape({
index: PropTypes.number.isRequired,
routes: PropTypes.arrayOf(navigationRoute),
});
/* NavigationLayout */
const layout = PropTypes.shape({
height: animatedValue,
initHeight: PropTypes.number.isRequired,
initWidth: PropTypes.number.isRequired,
isMeasured: PropTypes.bool.isRequired,
width: animatedValue,
});
/* NavigationScene */
const scene = PropTypes.shape({
index: PropTypes.number.isRequired,
isActive: PropTypes.bool.isRequired,
/** @jsx createElement */
'use strict';
import {createElement, Component, PropTypes} from 'rax';
import View from 'rax-view';
import {Event as Emitter} from './Utils';
import Detection from './Detection';
class TabPanelView extends Component {
isPanning = false;
static contextTypes = {
isInATabPanel: PropTypes.bool,
uuid: PropTypes.number
};
render() {
let props = {
...this.props,
preventMoveEvent: true,
onClick: this.onCellClick
};
if (Detection.isEnableSliderAndroid && this.context.isInATabPanel) {
props.onHorizontalPan = this.onHorizontalPan;
}
return (
monthNames: PropTypes.array,
nextButtonText: PropTypes.string,
onDateSelect: PropTypes.func,
onSwipeNext: PropTypes.func,
onSwipePrev: PropTypes.func,
onTouchNext: PropTypes.func,
onTouchPrev: PropTypes.func,
prevButtonText: PropTypes.string,
selectedDate: PropTypes.any,
showControls: PropTypes.bool,
startDate: PropTypes.any,
endDate: PropTypes.any,
titleFormat: PropTypes.string,
dateFormat: PropTypes.string,
today: PropTypes.any,
weekStart: PropTypes.number,
};
static defaultProps = {
customStyle: {},
dayHeadings: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
eventDates: [],
monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
nextButtonText: 'Next',
prevButtonText: 'Prev',
showControls: true,
titleFormat: 'MMMM YYYY',
dateFormat: 'YYYY-MM-DD',
today: moment(),
weekStart: 1,
};
import AreaStack from './AreaStack';
import isArray from '../utils/isArray';
import isFunction from '../utils/isFunction';
let WeexGM = null;
const WEEX_ID = 'taobao-fed-rax-chart-weex-id';
if (isWeex) {
WeexGM = require('./weexGM');
}
class Chart extends Component {
static propTypes = {
height: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,
id: PropTypes.string.isRequired,
backgroundColor: PropTypes.string,
draw: PropTypes.func,
margin: PropTypes.array,
};
static defaultProps = {};
constructor(props) {
super(props);
this.chart = null;
/**
* global defs animate must only one
*/
this.globalChildren = null;
this.defsChildren = null;
import IntervalStack from './IntervalStack';
import AreaStack from './AreaStack';
import isArray from '../utils/isArray';
import isFunction from '../utils/isFunction';
let WeexGM = null;
const WEEX_ID = 'taobao-fed-rax-chart-weex-id';
if (isWeex) {
WeexGM = require('./weexGM');
}
class Chart extends Component {
static propTypes = {
height: PropTypes.number.isRequired,
width: PropTypes.number.isRequired,
id: PropTypes.string.isRequired,
backgroundColor: PropTypes.string,
draw: PropTypes.func,
margin: PropTypes.array,
};
static defaultProps = {};
constructor(props) {
super(props);
this.chart = null;
/**
* global defs animate must only one
*/
this.globalChildren = null;
onTouchEnd={this.webRefresh}
ref={(ref) => {
this.recyclerView = ref;
}}
>
{children}
);
}
}
FloorWrapper.propTypes = {
onEndReached: T.func,
onEndReachedThreshold: T.number,
style: T.object,
children: T.node
};
FloorWrapper.Top = function Top() {
return null;
};
FloorWrapper.Bottom = function Bottom() {
return null;
};
FloorWrapper.Header = function Header() {
return null;
};
* fillOpacity: 1
* },
* hollowArea: {
* fill: '#fff',
* stroke: '#999',
* fillOpacity: 0,
* lineWidth: 1
* },
* line: {
* stroke: '#999',
* lineWidth: 1,
* fill: null
* }
*/
static propTypes = {
lineWidth: PropTypes.number,
fill: PropTypes.string,
radius: PropTypes.number,
stroke: PropTypes.string,
fillOpacity: PropTypes.number,
strokeOpacity: PropTypes.number,
opacity: PropTypes.number,
};
constructor(props) {
super(props);
return this.draw();
}
draw = () => {
let {chart, ...item} = this.props;
nextButtonText: PropTypes.string,
onDateSelect: PropTypes.func,
onSwipeNext: PropTypes.func,
onSwipePrev: PropTypes.func,
onTouchNext: PropTypes.func,
onTouchPrev: PropTypes.func,
prevButtonText: PropTypes.string,
scrollEnabled: PropTypes.bool,
selectedDate: PropTypes.any,
showControls: PropTypes.bool,
startDate: PropTypes.any,
endDate: PropTypes.any,
titleFormat: PropTypes.string,
dateFormat: PropTypes.string,
today: PropTypes.any,
weekStart: PropTypes.number,
};
static defaultProps = {
customStyle: {},
dayHeadings: ['S', 'M', 'T', 'W', 'T', 'F', 'S'],
eventDates: [],
monthNames: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun',
'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
nextButtonText: 'Next',
prevButtonText: 'Prev',
scrollEnabled: false,
showControls: true,
titleFormat: 'MMMM YYYY',
dateFormat: 'YYYY-MM-DD',
today: moment(),
weekStart: 1,
* hollowArea: {
* fill: '#fff',
* stroke: '#999',
* fillOpacity: 0,
* lineWidth: 1
* },
* line: {
* stroke: '#999',
* lineWidth: 1,
* fill: null
* }
*/
static propTypes = {
lineWidth: PropTypes.number,
fill: PropTypes.string,
radius: PropTypes.number,
stroke: PropTypes.string,
fillOpacity: PropTypes.number,
strokeOpacity: PropTypes.number,
opacity: PropTypes.number,
};
constructor(props) {
super(props);
return this.draw();
}
draw = () => {
let {chart, ...item} = this.props;
if (item && isObject(item)) {
chart = chart.style(item);
return (
<span style="{styles.preview}">
{`${object.constructor.name} {`}
{intersperse(propertyNodes, ', ')}
{'}'}
</span>
);
}
};
ObjectPreview.propTypes = {
/**
* max number of properties shown in the property view
*/
maxProperties: PropTypes.number,
};
ObjectPreview.defaultProps = {
maxProperties: 5,
};
export default ObjectPreview;