Authored by 王海元

修改脚本文件

@@ -240,6 +240,12 @@ var ListView = createReactClass({ @@ -240,6 +240,12 @@ var ListView = createReactClass({
240 enableEmptySections: PropTypes.bool, 240 enableEmptySections: PropTypes.bool,
241 }, 241 },
242 242
  243 + yh_updateVisibleSubViews: function() {
  244 + if (this._scrollComponent && this._scrollComponent.yh_updateVisibleSubViews) {
  245 + this._scrollComponent.yh_updateVisibleSubViews();
  246 + }
  247 + },
  248 +
243 /** 249 /**
244 * Exports some data, e.g. for perf investigations or analytics. 250 * Exports some data, e.g. for perf investigations or analytics.
245 */ 251 */
@@ -335,7 +341,7 @@ var ListView = createReactClass({ @@ -335,7 +341,7 @@ var ListView = createReactClass({
335 renderScrollComponent: props => <ScrollView {...props} />, 341 renderScrollComponent: props => <ScrollView {...props} />,
336 scrollRenderAheadDistance: DEFAULT_SCROLL_RENDER_AHEAD, 342 scrollRenderAheadDistance: DEFAULT_SCROLL_RENDER_AHEAD,
337 onEndReachedThreshold: DEFAULT_END_REACHED_THRESHOLD, 343 onEndReachedThreshold: DEFAULT_END_REACHED_THRESHOLD,
338 - stickySectionHeadersEnabled: Platform.OS === 'ios', 344 + stickySectionHeadersEnabled: true,
339 stickyHeaderIndices: [], 345 stickyHeaderIndices: [],
340 }; 346 };
341 }, 347 },
@@ -418,6 +418,19 @@ var ScrollResponderMixin = { @@ -418,6 +418,19 @@ var ScrollResponderMixin = {
418 ); 418 );
419 }, 419 },
420 420
  421 + /****
  422 + *设置刷新事件
  423 + *
  424 + *
  425 + **/
  426 + scrollResponderStartPullToRefresh: function() {
  427 + UIManager.dispatchViewManagerCommand(
  428 + this.scrollResponderGetScrollableNode(),
  429 + UIManager.RCTScrollView.Commands.startPullToRefresh,
  430 + [],
  431 + );
  432 + },
  433 +
421 /** 434 /**
422 * Scrolls to the end of the ScrollView, either immediately or with a smooth 435 * Scrolls to the end of the ScrollView, either immediately or with a smooth
423 * animation. 436 * animation.
@@ -36,7 +36,7 @@ const requireNativeComponent = require('requireNativeComponent'); @@ -36,7 +36,7 @@ const requireNativeComponent = require('requireNativeComponent');
36 const warning = require('fbjs/lib/warning'); 36 const warning = require('fbjs/lib/warning');
37 37
38 import type {NativeMethodsMixinType} from 'ReactNativeTypes'; 38 import type {NativeMethodsMixinType} from 'ReactNativeTypes';
39 - 39 +const RCTScrollViewManager = require('NativeModules').ScrollViewManager;
40 /** 40 /**
41 * Component that wraps platform ScrollView while providing 41 * Component that wraps platform ScrollView while providing
42 * integration with touch locking "responder" system. 42 * integration with touch locking "responder" system.
@@ -423,6 +423,22 @@ const ScrollView = createReactClass({ @@ -423,6 +423,22 @@ const ScrollView = createReactClass({
423 'never', 423 'never',
424 ]), 424 ]),
425 /** 425 /**
  426 +
  427 + pull to refresh
  428 + */
  429 + enablePullToRefresh: PropTypes.bool,
  430 + isOnPullToRefresh: PropTypes.bool,
  431 + onRefreshData: PropTypes.func,
  432 + onFinishRefreshData: PropTypes.func,
  433 +
  434 + /**
  435 +
  436 + 埋点
  437 + */
  438 + yh_exposureData: PropTypes.any,
  439 + yh_viewVisible: PropTypes.bool,
  440 +
  441 + /**
426 * When true, ScrollView will emit updateChildFrames data in scroll events, 442 * When true, ScrollView will emit updateChildFrames data in scroll events,
427 * otherwise will not compute or emit child frame data. This only exists 443 * otherwise will not compute or emit child frame data. This only exists
428 * to support legacy issues, `onLayout` should be used instead to retrieve 444 * to support legacy issues, `onLayout` should be used instead to retrieve
@@ -439,6 +455,25 @@ const ScrollView = createReactClass({ @@ -439,6 +455,25 @@ const ScrollView = createReactClass({
439 _scrollAnimatedValueAttachment: (null: ?{detach: () => void}), 455 _scrollAnimatedValueAttachment: (null: ?{detach: () => void}),
440 _stickyHeaderRefs: (new Map(): Map<number, ScrollViewStickyHeader>), 456 _stickyHeaderRefs: (new Map(): Map<number, ScrollViewStickyHeader>),
441 _headerLayoutYs: (new Map(): Map<string, number>), 457 _headerLayoutYs: (new Map(): Map<string, number>),
  458 +
  459 + yh_updateVisibleSubViews: function() {
  460 + RCTScrollViewManager.yh_updateVisibleSubViews(
  461 + ReactNative.findNodeHandle(this._scrollViewRef)
  462 + );
  463 + },
  464 +
  465 + startPullToRefresh: function() {
  466 + RCTScrollViewManager.startPullToRefresh(
  467 + ReactNative.findNodeHandle(this._scrollViewRef)
  468 + );
  469 + },
  470 +
  471 + stopPullToRefresh: function() {
  472 + RCTScrollViewManager.stopPullToRefresh(
  473 + ReactNative.findNodeHandle(this._scrollViewRef)
  474 + );
  475 + },
  476 +
442 getInitialState: function() { 477 getInitialState: function() {
443 return this.scrollResponderMixinGetInitialState(); 478 return this.scrollResponderMixinGetInitialState();
444 }, 479 },
@@ -192,7 +192,7 @@ type Props<SectionT> = RequiredProps<SectionT> & @@ -192,7 +192,7 @@ type Props<SectionT> = RequiredProps<SectionT> &
192 192
193 const defaultProps = { 193 const defaultProps = {
194 ...VirtualizedSectionList.defaultProps, 194 ...VirtualizedSectionList.defaultProps,
195 - stickySectionHeadersEnabled: Platform.OS === 'ios', 195 + stickySectionHeadersEnabled: true,
196 }; 196 };
197 197
198 type DefaultProps = typeof defaultProps; 198 type DefaultProps = typeof defaultProps;
@@ -279,6 +279,12 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent< @@ -279,6 +279,12 @@ class SectionList<SectionT: SectionBase<any>> extends React.PureComponent<
279 this._wrapperListRef.scrollToLocation(params); 279 this._wrapperListRef.scrollToLocation(params);
280 } 280 }
281 281
  282 + setNativeProps(props: Object) {
  283 + if (this._wrapperListRef) {
  284 + this._wrapperListRef.setNativeProps(props);
  285 + }
  286 + }
  287 +
282 /** 288 /**
283 * Tells the list an interaction has occured, which should trigger viewability calculations, e.g. 289 * Tells the list an interaction has occured, which should trigger viewability calculations, e.g.
284 * if `waitForInteractions` is true and the user has not scrolled. This is typically called by 290 * if `waitForInteractions` is true and the user has not scrolled. This is typically called by
@@ -108,6 +108,8 @@ var TouchableHighlight = createReactClass({ @@ -108,6 +108,8 @@ var TouchableHighlight = createReactClass({
108 * @platform ios 108 * @platform ios
109 */ 109 */
110 tvParallaxProperties: PropTypes.object, 110 tvParallaxProperties: PropTypes.object,
  111 +
  112 + yh_exposureData: PropTypes.object,
111 }, 113 },
112 114
113 mixins: [NativeMethodsMixin, TimerMixin, Touchable.Mixin], 115 mixins: [NativeMethodsMixin, TimerMixin, Touchable.Mixin],
@@ -273,6 +275,7 @@ var TouchableHighlight = createReactClass({ @@ -273,6 +275,7 @@ var TouchableHighlight = createReactClass({
273 render: function() { 275 render: function() {
274 return ( 276 return (
275 <View 277 <View
  278 + yh_exposureData={this.props.yh_exposureData}
276 accessible={this.props.accessible !== false} 279 accessible={this.props.accessible !== false}
277 /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This 280 /* $FlowFixMe(>=0.53.0 site=react_native_fb,react_native_oss) This
278 * comment suppresses an error when upgrading Flow's support for React. 281 * comment suppresses an error when upgrading Flow's support for React.
@@ -67,6 +67,8 @@ var TouchableOpacity = createReactClass({ @@ -67,6 +67,8 @@ var TouchableOpacity = createReactClass({
67 * Apple TV parallax effects 67 * Apple TV parallax effects
68 */ 68 */
69 tvParallaxProperties: PropTypes.object, 69 tvParallaxProperties: PropTypes.object,
  70 +
  71 + yh_exposureData: PropTypes.object,
70 }, 72 },
71 73
72 getDefaultProps: function() { 74 getDefaultProps: function() {
@@ -171,6 +173,7 @@ var TouchableOpacity = createReactClass({ @@ -171,6 +173,7 @@ var TouchableOpacity = createReactClass({
171 render: function() { 173 render: function() {
172 return ( 174 return (
173 <Animated.View 175 <Animated.View
  176 + yh_exposureData={this.props.yh_exposureData}
174 accessible={this.props.accessible !== false} 177 accessible={this.props.accessible !== false}
175 accessibilityLabel={this.props.accessibilityLabel} 178 accessibilityLabel={this.props.accessibilityLabel}
176 accessibilityComponentType={this.props.accessibilityComponentType} 179 accessibilityComponentType={this.props.accessibilityComponentType}
@@ -86,7 +86,13 @@ const View = createReactClass({ @@ -86,7 +86,13 @@ const View = createReactClass({
86 // exists for DEV mode. However it's important for them to be declared. 86 // exists for DEV mode. However it's important for them to be declared.
87 // If the object passed to `createClass` specifies `propTypes`, Flow will 87 // If the object passed to `createClass` specifies `propTypes`, Flow will
88 // create a static type from it. 88 // create a static type from it.
89 - propTypes: ViewPropTypes, 89 + propTypes: {
  90 + yh_exposureData: PropTypes.object,
  91 +
  92 + yh_viewVisible: PropTypes.bool,
  93 +
  94 + ...ViewPropTypes
  95 + },
90 96
91 /** 97 /**
92 * `NativeMethodsMixin` will look for this when invoking `setNativeProps`. We 98 * `NativeMethodsMixin` will look for this when invoking `setNativeProps`. We
@@ -464,4 +464,8 @@ module.exports = { @@ -464,4 +464,8 @@ module.exports = {
464 * @platform android 464 * @platform android
465 */ 465 */
466 needsOffscreenAlphaCompositing: PropTypes.bool, 466 needsOffscreenAlphaCompositing: PropTypes.bool,
  467 +
  468 + yh_exposureData: PropTypes.object,
  469 +
  470 + yh_viewVisible: PropTypes.bool,
467 }; 471 };
@@ -141,6 +141,12 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent< @@ -141,6 +141,12 @@ class VirtualizedSectionList<SectionT: SectionBase> extends React.PureComponent<
141 141
142 state: State; 142 state: State;
143 143
  144 + setNativeProps(props: Object) {
  145 + if (this._listRef) {
  146 + this._listRef.setNativeProps(props);
  147 + }
  148 + }
  149 +
144 static defaultProps: DefaultProps = { 150 static defaultProps: DefaultProps = {
145 ...VirtualizedList.defaultProps, 151 ...VirtualizedList.defaultProps,
146 data: [], 152 data: [],
@@ -33,6 +33,8 @@ var WebViewState = keyMirror({ @@ -33,6 +33,8 @@ var WebViewState = keyMirror({
33 ERROR: null, 33 ERROR: null,
34 }); 34 });
35 35
  36 +type Event = Object;
  37 +
36 var defaultRenderLoading = () => ( 38 var defaultRenderLoading = () => (
37 <View style={styles.loadingView}> 39 <View style={styles.loadingView}>
38 <ActivityIndicator 40 <ActivityIndicator
@@ -60,6 +62,7 @@ class WebView extends React.Component { @@ -60,6 +62,7 @@ class WebView extends React.Component {
60 onContentSizeChange: PropTypes.func, 62 onContentSizeChange: PropTypes.func,
61 startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load 63 startInLoadingState: PropTypes.bool, // force WebView to show loadingView on first load
62 style: ViewPropTypes.style, 64 style: ViewPropTypes.style,
  65 + onShouldStartLoadWithRequest: PropTypes.func,
63 66
64 html: deprecatedPropType( 67 html: deprecatedPropType(
65 PropTypes.string, 68 PropTypes.string,
@@ -260,6 +263,15 @@ class WebView extends React.Component { @@ -260,6 +263,15 @@ class WebView extends React.Component {
260 console.warn('WebView: `source.body` is not supported when using GET.'); 263 console.warn('WebView: `source.body` is not supported when using GET.');
261 } 264 }
262 265
  266 + var onShouldOverrideUrlLoading = this.props.onShouldStartLoadWithRequest
  267 + && ((event: Event) => {
  268 + var shouldOverride = !this.props.onShouldStartLoadWithRequest(event.nativeEvent);
  269 + UIManager.dispatchViewManagerCommandSync(
  270 + this.getWebViewHandle(),
  271 + UIManager.RCTWebView.Commands.shouldOverrideWithResult,
  272 + [shouldOverride]);
  273 + });
  274 +
263 var webView = 275 var webView =
264 <RCTWebView 276 <RCTWebView
265 ref={RCT_WEBVIEW_REF} 277 ref={RCT_WEBVIEW_REF}
@@ -286,6 +298,7 @@ class WebView extends React.Component { @@ -286,6 +298,7 @@ class WebView extends React.Component {
286 mixedContentMode={this.props.mixedContentMode} 298 mixedContentMode={this.props.mixedContentMode}
287 saveFormDataDisabled={this.props.saveFormDataDisabled} 299 saveFormDataDisabled={this.props.saveFormDataDisabled}
288 urlPrefixesForDefaultIntent={this.props.urlPrefixesForDefaultIntent} 300 urlPrefixesForDefaultIntent={this.props.urlPrefixesForDefaultIntent}
  301 + onShouldOverrideUrlLoading={onShouldOverrideUrlLoading}
289 />; 302 />;
290 303
291 return ( 304 return (
  1 +'use strict';
  2 +
  3 +Object.defineProperty(exports, "__esModule", {
  4 + value: true
  5 +});
  6 +
  7 +var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
  8 +
  9 +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  10 +
  11 +var _react = require('react');
  12 +
  13 +var _react2 = _interopRequireDefault(_react);
  14 +
  15 +var _reactNative = require('react-native');
  16 +
  17 +var _propTypes = require('prop-types');
  18 +
  19 +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
  20 +
  21 +function _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }
  22 +
  23 +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  24 +
  25 +function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
  26 +
  27 +function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
  28 +
  29 +function noop() {}
  30 +
  31 +var animationFnPropType = _propTypes.PropTypes.oneOf([_reactNative.Animated.decay, _reactNative.Animated.spring, _reactNative.Animated.timing]);
  32 +
  33 +var Swipeable = function (_PureComponent) {
  34 + _inherits(Swipeable, _PureComponent);
  35 +
  36 + function Swipeable() {
  37 + var _ref;
  38 +
  39 + var _temp, _this, _ret;
  40 +
  41 + _classCallCheck(this, Swipeable);
  42 +
  43 + for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
  44 + args[_key] = arguments[_key];
  45 + }
  46 +
  47 + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Swipeable.__proto__ || Object.getPrototypeOf(Swipeable)).call.apply(_ref, [this].concat(args))), _this), _this.state = {
  48 + pan: new _reactNative.Animated.ValueXY(),
  49 + width: 0,
  50 + lastOffset: { x: 0, y: 0 },
  51 + leftActionActivated: false,
  52 + leftButtonsActivated: false,
  53 + leftButtonsOpen: false,
  54 + rightActionActivated: false,
  55 + rightButtonsActivated: false,
  56 + rightButtonsOpen: false
  57 + }, _this.recenter = function () {
  58 + var animationFn = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _this.props.swipeReleaseAnimationFn;
  59 + var animationConfig = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : _this.props.swipeReleaseAnimationConfig;
  60 + var onDone = arguments[2];
  61 + var pan = _this.state.pan;
  62 +
  63 +
  64 + _this.setState({
  65 + lastOffset: { x: 0, y: 0 },
  66 + leftActionActivated: false,
  67 + leftButtonsActivated: false,
  68 + leftButtonsOpen: false,
  69 + rightActionActivated: false,
  70 + rightButtonsActivated: false,
  71 + rightButtonsOpen: false
  72 + });
  73 +
  74 + pan.flattenOffset();
  75 +
  76 + animationFn(pan, animationConfig).start(onDone);
  77 + }, _this._unmounted = false, _this._handlePan = _reactNative.Animated.event([null, {
  78 + dx: _this.state.pan.x,
  79 + dy: _this.state.pan.y
  80 + }]), _this._handleMoveShouldSetPanResponder = function (event, gestureState) {
  81 + return Math.abs(gestureState.dx) > _this.props.swipeStartMinDistance;
  82 + }, _this._handlePanResponderStart = function (event, gestureState) {
  83 + var _this$state = _this.state,
  84 + lastOffset = _this$state.lastOffset,
  85 + pan = _this$state.pan;
  86 +
  87 +
  88 + pan.setOffset(lastOffset);
  89 + _this.props.onSwipeStart(event, gestureState, _this);
  90 + }, _this._handlePanResponderMove = function (event, gestureState) {
  91 + var _this$props = _this.props,
  92 + leftActionActivationDistance = _this$props.leftActionActivationDistance,
  93 + leftButtonsActivationDistance = _this$props.leftButtonsActivationDistance,
  94 + onLeftActionActivate = _this$props.onLeftActionActivate,
  95 + onLeftActionDeactivate = _this$props.onLeftActionDeactivate,
  96 + onLeftButtonsActivate = _this$props.onLeftButtonsActivate,
  97 + onLeftButtonsDeactivate = _this$props.onLeftButtonsDeactivate,
  98 + rightActionActivationDistance = _this$props.rightActionActivationDistance,
  99 + rightButtonsActivationDistance = _this$props.rightButtonsActivationDistance,
  100 + onRightActionActivate = _this$props.onRightActionActivate,
  101 + onRightActionDeactivate = _this$props.onRightActionDeactivate,
  102 + onRightButtonsActivate = _this$props.onRightButtonsActivate,
  103 + onRightButtonsDeactivate = _this$props.onRightButtonsDeactivate,
  104 + onSwipeMove = _this$props.onSwipeMove;
  105 + var _this$state2 = _this.state,
  106 + lastOffset = _this$state2.lastOffset,
  107 + leftActionActivated = _this$state2.leftActionActivated,
  108 + leftButtonsActivated = _this$state2.leftButtonsActivated,
  109 + rightActionActivated = _this$state2.rightActionActivated,
  110 + rightButtonsActivated = _this$state2.rightButtonsActivated;
  111 + var dx = gestureState.dx,
  112 + vx = gestureState.vx;
  113 +
  114 + var x = dx + lastOffset.x;
  115 + var canSwipeRight = _this._canSwipeRight();
  116 + var canSwipeLeft = _this._canSwipeLeft();
  117 + var hasLeftButtons = _this._hasLeftButtons();
  118 + var hasRightButtons = _this._hasRightButtons();
  119 + var isSwipingLeft = vx < 0;
  120 + var isSwipingRight = vx > 0;
  121 + var nextLeftActionActivated = leftActionActivated;
  122 + var nextLeftButtonsActivated = leftButtonsActivated;
  123 + var nextRightActionActivated = rightActionActivated;
  124 + var nextRightButtonsActivated = rightButtonsActivated;
  125 +
  126 + _this._handlePan(event, gestureState);
  127 + onSwipeMove(event, gestureState, _this);
  128 +
  129 + if (!leftActionActivated && canSwipeRight && x >= leftActionActivationDistance) {
  130 + nextLeftActionActivated = true;
  131 + onLeftActionActivate(event, gestureState, _this);
  132 + }
  133 +
  134 + if (leftActionActivated && canSwipeRight && x < leftActionActivationDistance) {
  135 + nextLeftActionActivated = false;
  136 + onLeftActionDeactivate(event, gestureState, _this);
  137 + }
  138 +
  139 + if (!rightActionActivated && canSwipeLeft && x <= -rightActionActivationDistance) {
  140 + nextRightActionActivated = true;
  141 + onRightActionActivate(event, gestureState, _this);
  142 + }
  143 +
  144 + if (rightActionActivated && canSwipeLeft && x > -rightActionActivationDistance) {
  145 + nextRightActionActivated = false;
  146 + onRightActionDeactivate(event, gestureState, _this);
  147 + }
  148 +
  149 + if (!leftButtonsActivated && hasLeftButtons && !isSwipingLeft && x >= leftButtonsActivationDistance) {
  150 + nextLeftButtonsActivated = true;
  151 + onLeftButtonsActivate(event, gestureState, _this);
  152 + }
  153 +
  154 + if (leftButtonsActivated && hasLeftButtons && isSwipingLeft) {
  155 + nextLeftButtonsActivated = false;
  156 + onLeftButtonsDeactivate(event, gestureState, _this);
  157 + }
  158 +
  159 + if (!rightButtonsActivated && hasRightButtons && !isSwipingRight && x <= -rightButtonsActivationDistance) {
  160 + nextRightButtonsActivated = true;
  161 + onRightButtonsActivate(event, gestureState, _this);
  162 + }
  163 +
  164 + if (rightButtonsActivated && hasRightButtons && isSwipingRight) {
  165 + nextRightButtonsActivated = false;
  166 + onRightButtonsDeactivate(event, gestureState, _this);
  167 + }
  168 +
  169 + var needsUpdate = nextLeftActionActivated !== leftActionActivated || nextLeftButtonsActivated !== leftButtonsActivated || nextRightActionActivated !== rightActionActivated || nextRightButtonsActivated !== rightButtonsActivated;
  170 +
  171 + if (needsUpdate) {
  172 + _this.setState({
  173 + leftActionActivated: nextLeftActionActivated,
  174 + leftButtonsActivated: nextLeftButtonsActivated,
  175 + rightActionActivated: nextRightActionActivated,
  176 + rightButtonsActivated: nextRightButtonsActivated
  177 + });
  178 + }
  179 + }, _this._handlePanResponderEnd = function (event, gestureState) {
  180 + var _this$props2 = _this.props,
  181 + onLeftActionRelease = _this$props2.onLeftActionRelease,
  182 + onLeftActionDeactivate = _this$props2.onLeftActionDeactivate,
  183 + onLeftButtonsOpenRelease = _this$props2.onLeftButtonsOpenRelease,
  184 + onLeftButtonsCloseRelease = _this$props2.onLeftButtonsCloseRelease,
  185 + onRightActionRelease = _this$props2.onRightActionRelease,
  186 + onRightActionDeactivate = _this$props2.onRightActionDeactivate,
  187 + onRightButtonsOpenRelease = _this$props2.onRightButtonsOpenRelease,
  188 + onRightButtonsCloseRelease = _this$props2.onRightButtonsCloseRelease,
  189 + onSwipeRelease = _this$props2.onSwipeRelease;
  190 + var _this$state3 = _this.state,
  191 + leftActionActivated = _this$state3.leftActionActivated,
  192 + leftButtonsOpen = _this$state3.leftButtonsOpen,
  193 + leftButtonsActivated = _this$state3.leftButtonsActivated,
  194 + rightActionActivated = _this$state3.rightActionActivated,
  195 + rightButtonsOpen = _this$state3.rightButtonsOpen,
  196 + rightButtonsActivated = _this$state3.rightButtonsActivated,
  197 + pan = _this$state3.pan;
  198 +
  199 + var animationFn = _this._getReleaseAnimationFn();
  200 + var animationConfig = _this._getReleaseAnimationConfig();
  201 +
  202 + onSwipeRelease(event, gestureState, _this);
  203 +
  204 + if (leftActionActivated) {
  205 + onLeftActionRelease(event, gestureState, _this);
  206 + }
  207 +
  208 + if (rightActionActivated) {
  209 + onRightActionRelease(event, gestureState, _this);
  210 + }
  211 +
  212 + if (leftButtonsActivated && !leftButtonsOpen) {
  213 + onLeftButtonsOpenRelease(event, gestureState, _this);
  214 + }
  215 +
  216 + if (!leftButtonsActivated && leftButtonsOpen) {
  217 + onLeftButtonsCloseRelease(event, gestureState, _this);
  218 + }
  219 +
  220 + if (rightButtonsActivated && !rightButtonsOpen) {
  221 + onRightButtonsOpenRelease(event, gestureState, _this);
  222 + }
  223 +
  224 + if (!rightButtonsActivated && rightButtonsOpen) {
  225 + onRightButtonsCloseRelease(event, gestureState, _this);
  226 + }
  227 +
  228 + _this.setState({
  229 + lastOffset: { x: animationConfig.toValue.x, y: animationConfig.toValue.y },
  230 + leftActionActivated: false,
  231 + rightActionActivated: false,
  232 + leftButtonsOpen: leftButtonsActivated,
  233 + rightButtonsOpen: rightButtonsActivated
  234 + });
  235 +
  236 + pan.flattenOffset();
  237 +
  238 + animationFn(pan, animationConfig).start(function () {
  239 + if (_this._unmounted) {
  240 + return;
  241 + }
  242 +
  243 + var _this$props3 = _this.props,
  244 + onLeftActionComplete = _this$props3.onLeftActionComplete,
  245 + onLeftButtonsOpenComplete = _this$props3.onLeftButtonsOpenComplete,
  246 + onLeftButtonsCloseComplete = _this$props3.onLeftButtonsCloseComplete,
  247 + onRightActionComplete = _this$props3.onRightActionComplete,
  248 + onRightButtonsOpenComplete = _this$props3.onRightButtonsOpenComplete,
  249 + onRightButtonsCloseComplete = _this$props3.onRightButtonsCloseComplete,
  250 + onSwipeComplete = _this$props3.onSwipeComplete;
  251 +
  252 +
  253 + onSwipeComplete(event, gestureState, _this);
  254 +
  255 + if (leftActionActivated) {
  256 + onLeftActionComplete(event, gestureState, _this);
  257 + onLeftActionDeactivate(event, gestureState, _this);
  258 + }
  259 +
  260 + if (rightActionActivated) {
  261 + onRightActionComplete(event, gestureState, _this);
  262 + onRightActionDeactivate(event, gestureState, _this);
  263 + }
  264 +
  265 + if (leftButtonsActivated && !leftButtonsOpen) {
  266 + onLeftButtonsOpenComplete(event, gestureState, _this);
  267 + }
  268 +
  269 + if (!leftButtonsActivated && leftButtonsOpen) {
  270 + onLeftButtonsCloseComplete(event, gestureState, _this);
  271 + }
  272 +
  273 + if (rightButtonsActivated && !rightButtonsOpen) {
  274 + onRightButtonsOpenComplete(event, gestureState, _this);
  275 + }
  276 +
  277 + if (!rightButtonsActivated && rightButtonsOpen) {
  278 + onRightButtonsCloseComplete(event, gestureState, _this);
  279 + }
  280 + });
  281 + }, _this._panResponder = _reactNative.PanResponder.create({
  282 + onMoveShouldSetPanResponder: _this._handleMoveShouldSetPanResponder,
  283 + onMoveShouldSetPanResponderCapture: _this._handleMoveShouldSetPanResponder,
  284 + onPanResponderGrant: _this._handlePanResponderStart,
  285 + onPanResponderMove: _this._handlePanResponderMove,
  286 + onPanResponderRelease: _this._handlePanResponderEnd,
  287 + onPanResponderTerminate: _this._handlePanResponderEnd,
  288 + onPanResponderTerminationRequest: _this._handlePanResponderEnd
  289 + }), _this._handleLayout = function (_ref2) {
  290 + var width = _ref2.nativeEvent.layout.width;
  291 + return _this.setState({ width: width });
  292 + }, _temp), _possibleConstructorReturn(_this, _ret);
  293 + }
  294 +
  295 + _createClass(Swipeable, [{
  296 + key: 'componentWillMount',
  297 + value: function componentWillMount() {
  298 + var _props = this.props,
  299 + onPanAnimatedValueRef = _props.onPanAnimatedValueRef,
  300 + onRef = _props.onRef;
  301 +
  302 +
  303 + onRef(this);
  304 + onPanAnimatedValueRef(this.state.pan);
  305 + }
  306 + }, {
  307 + key: 'componentWillUnmount',
  308 + value: function componentWillUnmount() {
  309 + this._unmounted = true;
  310 + }
  311 + }, {
  312 + key: '_canSwipeRight',
  313 + value: function _canSwipeRight() {
  314 + return this.props.leftContent || this._hasLeftButtons();
  315 + }
  316 + }, {
  317 + key: '_canSwipeLeft',
  318 + value: function _canSwipeLeft() {
  319 + return this.props.rightContent || this._hasRightButtons();
  320 + }
  321 + }, {
  322 + key: '_hasLeftButtons',
  323 + value: function _hasLeftButtons() {
  324 + var _props2 = this.props,
  325 + leftButtons = _props2.leftButtons,
  326 + leftContent = _props2.leftContent;
  327 +
  328 +
  329 + return !leftContent && leftButtons && leftButtons.length;
  330 + }
  331 + }, {
  332 + key: '_hasRightButtons',
  333 + value: function _hasRightButtons() {
  334 + var _props3 = this.props,
  335 + rightButtons = _props3.rightButtons,
  336 + rightContent = _props3.rightContent;
  337 +
  338 +
  339 + return !rightContent && rightButtons && rightButtons.length;
  340 + }
  341 + }, {
  342 + key: '_getReleaseAnimationFn',
  343 + value: function _getReleaseAnimationFn() {
  344 + var _props4 = this.props,
  345 + leftActionReleaseAnimationFn = _props4.leftActionReleaseAnimationFn,
  346 + leftButtonsOpenReleaseAnimationFn = _props4.leftButtonsOpenReleaseAnimationFn,
  347 + leftButtonsCloseReleaseAnimationFn = _props4.leftButtonsCloseReleaseAnimationFn,
  348 + rightActionReleaseAnimationFn = _props4.rightActionReleaseAnimationFn,
  349 + rightButtonsOpenReleaseAnimationFn = _props4.rightButtonsOpenReleaseAnimationFn,
  350 + rightButtonsCloseReleaseAnimationFn = _props4.rightButtonsCloseReleaseAnimationFn,
  351 + swipeReleaseAnimationFn = _props4.swipeReleaseAnimationFn;
  352 + var _state = this.state,
  353 + leftActionActivated = _state.leftActionActivated,
  354 + leftButtonsActivated = _state.leftButtonsActivated,
  355 + leftButtonsOpen = _state.leftButtonsOpen,
  356 + rightActionActivated = _state.rightActionActivated,
  357 + rightButtonsActivated = _state.rightButtonsActivated,
  358 + rightButtonsOpen = _state.rightButtonsOpen;
  359 +
  360 +
  361 + if (leftActionActivated && leftActionReleaseAnimationFn) {
  362 + return leftActionReleaseAnimationFn;
  363 + }
  364 +
  365 + if (rightActionActivated && rightActionReleaseAnimationFn) {
  366 + return rightActionReleaseAnimationFn;
  367 + }
  368 +
  369 + if (leftButtonsActivated && leftButtonsOpenReleaseAnimationFn) {
  370 + return leftButtonsOpenReleaseAnimationFn;
  371 + }
  372 +
  373 + if (!leftButtonsActivated && leftButtonsOpen && leftButtonsCloseReleaseAnimationFn) {
  374 + return leftButtonsCloseReleaseAnimationFn;
  375 + }
  376 +
  377 + if (rightButtonsActivated && rightButtonsOpenReleaseAnimationFn) {
  378 + return rightButtonsOpenReleaseAnimationFn;
  379 + }
  380 +
  381 + if (!rightButtonsActivated && rightButtonsOpen && rightButtonsCloseReleaseAnimationFn) {
  382 + return rightButtonsCloseReleaseAnimationFn;
  383 + }
  384 +
  385 + return swipeReleaseAnimationFn;
  386 + }
  387 + }, {
  388 + key: '_getReleaseAnimationConfig',
  389 + value: function _getReleaseAnimationConfig() {
  390 + var _props5 = this.props,
  391 + leftActionReleaseAnimationConfig = _props5.leftActionReleaseAnimationConfig,
  392 + leftButtons = _props5.leftButtons,
  393 + leftButtonsOpenReleaseAnimationConfig = _props5.leftButtonsOpenReleaseAnimationConfig,
  394 + leftButtonsCloseReleaseAnimationConfig = _props5.leftButtonsCloseReleaseAnimationConfig,
  395 + leftButtonWidth = _props5.leftButtonWidth,
  396 + rightActionReleaseAnimationConfig = _props5.rightActionReleaseAnimationConfig,
  397 + rightButtons = _props5.rightButtons,
  398 + rightButtonsOpenReleaseAnimationConfig = _props5.rightButtonsOpenReleaseAnimationConfig,
  399 + rightButtonsCloseReleaseAnimationConfig = _props5.rightButtonsCloseReleaseAnimationConfig,
  400 + rightButtonWidth = _props5.rightButtonWidth,
  401 + swipeReleaseAnimationConfig = _props5.swipeReleaseAnimationConfig;
  402 + var _state2 = this.state,
  403 + leftActionActivated = _state2.leftActionActivated,
  404 + leftButtonsActivated = _state2.leftButtonsActivated,
  405 + leftButtonsOpen = _state2.leftButtonsOpen,
  406 + rightActionActivated = _state2.rightActionActivated,
  407 + rightButtonsActivated = _state2.rightButtonsActivated,
  408 + rightButtonsOpen = _state2.rightButtonsOpen;
  409 +
  410 +
  411 + if (leftActionActivated && leftActionReleaseAnimationConfig) {
  412 + return leftActionReleaseAnimationConfig;
  413 + }
  414 +
  415 + if (rightActionActivated && rightActionReleaseAnimationConfig) {
  416 + return rightActionReleaseAnimationConfig;
  417 + }
  418 +
  419 + if (leftButtonsActivated) {
  420 + return _extends({}, swipeReleaseAnimationConfig, {
  421 + toValue: {
  422 + x: leftButtons.length * leftButtonWidth,
  423 + y: 0
  424 + }
  425 + }, leftButtonsOpenReleaseAnimationConfig);
  426 + }
  427 +
  428 + if (rightButtonsActivated) {
  429 + return _extends({}, swipeReleaseAnimationConfig, {
  430 + toValue: {
  431 + x: rightButtons.length * rightButtonWidth * -1,
  432 + y: 0
  433 + }
  434 + }, rightButtonsOpenReleaseAnimationConfig);
  435 + }
  436 +
  437 + if (!leftButtonsActivated && leftButtonsOpen && leftButtonsCloseReleaseAnimationConfig) {
  438 + return leftButtonsCloseReleaseAnimationConfig;
  439 + }
  440 +
  441 + if (!rightButtonsActivated && rightButtonsOpen && rightButtonsCloseReleaseAnimationConfig) {
  442 + return rightButtonsCloseReleaseAnimationConfig;
  443 + }
  444 +
  445 + return swipeReleaseAnimationConfig;
  446 + }
  447 + }, {
  448 + key: '_renderButtons',
  449 + value: function _renderButtons(buttons, isLeftButtons) {
  450 + var _props6 = this.props,
  451 + leftButtonContainerStyle = _props6.leftButtonContainerStyle,
  452 + rightButtonContainerStyle = _props6.rightButtonContainerStyle;
  453 + var _state3 = this.state,
  454 + pan = _state3.pan,
  455 + width = _state3.width;
  456 +
  457 + var canSwipeLeft = this._canSwipeLeft();
  458 + var canSwipeRight = this._canSwipeRight();
  459 + var count = buttons.length;
  460 + var leftEnd = canSwipeLeft ? -width : 0;
  461 + var rightEnd = canSwipeRight ? width : 0;
  462 + var inputRange = isLeftButtons ? [0, rightEnd] : [leftEnd, 0];
  463 +
  464 + return buttons.map(function (buttonContent, index) {
  465 + var outputMultiplier = -index / count;
  466 + var outputRange = isLeftButtons ? [0, rightEnd * outputMultiplier] : [leftEnd * outputMultiplier, 0];
  467 + var transform = [{
  468 + translateX: pan.x.interpolate({
  469 + inputRange: inputRange,
  470 + outputRange: outputRange,
  471 + extrapolate: 'clamp'
  472 + })
  473 + }];
  474 + var buttonStyle = [_reactNative.StyleSheet.absoluteFill, { width: width, transform: transform }, isLeftButtons ? leftButtonContainerStyle : rightButtonContainerStyle];
  475 +
  476 + return _react2.default.createElement(
  477 + _reactNative.Animated.View,
  478 + { key: index, style: buttonStyle },
  479 + buttonContent
  480 + );
  481 + });
  482 + }
  483 + }, {
  484 + key: 'render',
  485 + value: function render() {
  486 + var _props7 = this.props,
  487 + children = _props7.children,
  488 + contentContainerStyle = _props7.contentContainerStyle,
  489 + leftButtons = _props7.leftButtons,
  490 + leftContainerStyle = _props7.leftContainerStyle,
  491 + leftContent = _props7.leftContent,
  492 + rightButtons = _props7.rightButtons,
  493 + rightContainerStyle = _props7.rightContainerStyle,
  494 + rightContent = _props7.rightContent,
  495 + style = _props7.style,
  496 + props = _objectWithoutProperties(_props7, ['children', 'contentContainerStyle', 'leftButtons', 'leftContainerStyle', 'leftContent', 'rightButtons', 'rightContainerStyle', 'rightContent', 'style']);
  497 +
  498 + var _state4 = this.state,
  499 + pan = _state4.pan,
  500 + width = _state4.width;
  501 +
  502 + var canSwipeLeft = this._canSwipeLeft();
  503 + var canSwipeRight = this._canSwipeRight();
  504 + var transform = [{
  505 + translateX: pan.x.interpolate({
  506 + inputRange: [canSwipeLeft ? -width : 0, canSwipeRight ? width : 0],
  507 + outputRange: [canSwipeLeft ? -width + _reactNative.StyleSheet.hairlineWidth : 0, canSwipeRight ? width - _reactNative.StyleSheet.hairlineWidth : 0],
  508 + extrapolate: 'clamp'
  509 + })
  510 + }];
  511 +
  512 + return _react2.default.createElement(
  513 + _reactNative.View,
  514 + _extends({ onLayout: this._handleLayout, style: [styles.container, style] }, this._panResponder.panHandlers, props),
  515 + canSwipeRight && _react2.default.createElement(
  516 + _reactNative.Animated.View,
  517 + { style: [{ transform: transform, marginLeft: -width, width: width }, leftContainerStyle] },
  518 + leftContent || this._renderButtons(leftButtons, true)
  519 + ),
  520 + _react2.default.createElement(
  521 + _reactNative.Animated.View,
  522 + { style: [{ transform: transform }, styles.content, contentContainerStyle] },
  523 + children
  524 + ),
  525 + canSwipeLeft && _react2.default.createElement(
  526 + _reactNative.Animated.View,
  527 + { style: [{ transform: transform, marginRight: -width, width: width }, rightContainerStyle] },
  528 + rightContent || this._renderButtons(rightButtons, false)
  529 + )
  530 + );
  531 + }
  532 + }]);
  533 +
  534 + return Swipeable;
  535 +}(_react.PureComponent);
  536 +
  537 +Swipeable.propTypes = {
  538 + // elements
  539 + children: _propTypes.PropTypes.any,
  540 + leftContent: _propTypes.PropTypes.any,
  541 + rightContent: _propTypes.PropTypes.any,
  542 + leftButtons: _propTypes.PropTypes.array,
  543 + rightButtons: _propTypes.PropTypes.array,
  544 +
  545 + // left action lifecycle
  546 + onLeftActionActivate: _propTypes.PropTypes.func,
  547 + onLeftActionDeactivate: _propTypes.PropTypes.func,
  548 + onLeftActionRelease: _propTypes.PropTypes.func,
  549 + onLeftActionComplete: _propTypes.PropTypes.func,
  550 + leftActionActivationDistance: _propTypes.PropTypes.number,
  551 + leftActionReleaseAnimationFn: animationFnPropType,
  552 + leftActionReleaseAnimationConfig: _propTypes.PropTypes.object,
  553 +
  554 + // right action lifecycle
  555 + onRightActionActivate: _propTypes.PropTypes.func,
  556 + onRightActionDeactivate: _propTypes.PropTypes.func,
  557 + onRightActionRelease: _propTypes.PropTypes.func,
  558 + onRightActionComplete: _propTypes.PropTypes.func,
  559 + rightActionActivationDistance: _propTypes.PropTypes.number,
  560 + rightActionReleaseAnimationFn: animationFnPropType,
  561 + rightActionReleaseAnimationConfig: _propTypes.PropTypes.object,
  562 +
  563 + // left buttons lifecycle
  564 + onLeftButtonsActivate: _propTypes.PropTypes.func,
  565 + onLeftButtonsDeactivate: _propTypes.PropTypes.func,
  566 + onLeftButtonsOpenRelease: _propTypes.PropTypes.func,
  567 + onLeftButtonsOpenComplete: _propTypes.PropTypes.func,
  568 + onLeftButtonsCloseRelease: _propTypes.PropTypes.func,
  569 + onLeftButtonsCloseComplete: _propTypes.PropTypes.func,
  570 + leftButtonWidth: _propTypes.PropTypes.number,
  571 + leftButtonsActivationDistance: _propTypes.PropTypes.number,
  572 + leftButtonsOpenReleaseAnimationFn: animationFnPropType,
  573 + leftButtonsOpenReleaseAnimationConfig: _propTypes.PropTypes.object,
  574 + leftButtonsCloseReleaseAnimationFn: animationFnPropType,
  575 + leftButtonsCloseReleaseAnimationConfig: _propTypes.PropTypes.object,
  576 +
  577 + // right buttons lifecycle
  578 + onRightButtonsActivate: _propTypes.PropTypes.func,
  579 + onRightButtonsDeactivate: _propTypes.PropTypes.func,
  580 + onRightButtonsOpenRelease: _propTypes.PropTypes.func,
  581 + onRightButtonsOpenComplete: _propTypes.PropTypes.func,
  582 + onRightButtonsCloseRelease: _propTypes.PropTypes.func,
  583 + onRightButtonsCloseComplete: _propTypes.PropTypes.func,
  584 + rightButtonWidth: _propTypes.PropTypes.number,
  585 + rightButtonsActivationDistance: _propTypes.PropTypes.number,
  586 + rightButtonsOpenReleaseAnimationFn: animationFnPropType,
  587 + rightButtonsOpenReleaseAnimationConfig: _propTypes.PropTypes.object,
  588 + rightButtonsCloseReleaseAnimationFn: animationFnPropType,
  589 + rightButtonsCloseReleaseAnimationConfig: _propTypes.PropTypes.object,
  590 +
  591 + // base swipe lifecycle
  592 + onSwipeStart: _propTypes.PropTypes.func,
  593 + onSwipeMove: _propTypes.PropTypes.func,
  594 + onSwipeRelease: _propTypes.PropTypes.func,
  595 + onSwipeComplete: _propTypes.PropTypes.func,
  596 + swipeReleaseAnimationFn: animationFnPropType,
  597 + swipeReleaseAnimationConfig: _propTypes.PropTypes.object,
  598 +
  599 + // misc
  600 + onRef: _propTypes.PropTypes.func,
  601 + onPanAnimatedValueRef: _propTypes.PropTypes.func,
  602 + swipeStartMinDistance: _propTypes.PropTypes.number,
  603 +
  604 + // styles
  605 + style: _reactNative.View.propTypes.style,
  606 + leftContainerStyle: _reactNative.View.propTypes.style,
  607 + leftButtonContainerStyle: _reactNative.View.propTypes.style,
  608 + rightContainerStyle: _reactNative.View.propTypes.style,
  609 + rightButtonContainerStyle: _reactNative.View.propTypes.style,
  610 + contentContainerStyle: _reactNative.View.propTypes.style
  611 +};
  612 +Swipeable.defaultProps = {
  613 + leftContent: null,
  614 + rightContent: null,
  615 + leftButtons: null,
  616 + rightButtons: null,
  617 +
  618 + // left action lifecycle
  619 + onLeftActionActivate: noop,
  620 + onLeftActionDeactivate: noop,
  621 + onLeftActionRelease: noop,
  622 + onLeftActionComplete: noop,
  623 + leftActionActivationDistance: 125,
  624 + leftActionReleaseAnimationFn: null,
  625 + leftActionReleaseAnimationConfig: null,
  626 +
  627 + // right action lifecycle
  628 + onRightActionActivate: noop,
  629 + onRightActionDeactivate: noop,
  630 + onRightActionRelease: noop,
  631 + onRightActionComplete: noop,
  632 + rightActionActivationDistance: 125,
  633 + rightActionReleaseAnimationFn: null,
  634 + rightActionReleaseAnimationConfig: null,
  635 +
  636 + // left buttons lifecycle
  637 + onLeftButtonsActivate: noop,
  638 + onLeftButtonsDeactivate: noop,
  639 + onLeftButtonsOpenRelease: noop,
  640 + onLeftButtonsOpenComplete: noop,
  641 + onLeftButtonsCloseRelease: noop,
  642 + onLeftButtonsCloseComplete: noop,
  643 + leftButtonWidth: 75,
  644 + leftButtonsActivationDistance: 75,
  645 + leftButtonsOpenReleaseAnimationFn: null,
  646 + leftButtonsOpenReleaseAnimationConfig: null,
  647 + leftButtonsCloseReleaseAnimationFn: null,
  648 + leftButtonsCloseReleaseAnimationConfig: null,
  649 +
  650 + // right buttons lifecycle
  651 + onRightButtonsActivate: noop,
  652 + onRightButtonsDeactivate: noop,
  653 + onRightButtonsOpenRelease: noop,
  654 + onRightButtonsOpenComplete: noop,
  655 + onRightButtonsCloseRelease: noop,
  656 + onRightButtonsCloseComplete: noop,
  657 + rightButtonWidth: 75,
  658 + rightButtonsActivationDistance: 75,
  659 + rightButtonsOpenReleaseAnimationFn: null,
  660 + rightButtonsOpenReleaseAnimationConfig: null,
  661 + rightButtonsCloseReleaseAnimationFn: null,
  662 + rightButtonsCloseReleaseAnimationConfig: null,
  663 +
  664 + // base swipe lifecycle
  665 + onSwipeStart: noop,
  666 + onSwipeMove: noop,
  667 + onSwipeRelease: noop,
  668 + onSwipeComplete: noop,
  669 + swipeReleaseAnimationFn: _reactNative.Animated.timing,
  670 + swipeReleaseAnimationConfig: {
  671 + toValue: { x: 0, y: 0 },
  672 + duration: 250,
  673 + easing: _reactNative.Easing.elastic(0.5)
  674 + },
  675 +
  676 + // misc
  677 + onRef: noop,
  678 + onPanAnimatedValueRef: noop,
  679 + swipeStartMinDistance: 15
  680 +};
  681 +exports.default = Swipeable;
  682 +
  683 +
  684 +var styles = _reactNative.StyleSheet.create({
  685 + container: {
  686 + flexDirection: 'row'
  687 + },
  688 + content: {
  689 + flex: 1
  690 + }
  691 +});
@@ -525,20 +525,20 @@ export default class extends Component { @@ -525,20 +525,20 @@ export default class extends Component {
525 525
526 let dots = [] 526 let dots = []
527 const ActiveDot = this.props.activeDot || <View style={[{ 527 const ActiveDot = this.props.activeDot || <View style={[{
528 - backgroundColor: this.props.activeDotColor || '#007aff',  
529 - width: 8,  
530 - height: 8,  
531 - borderRadius: 4, 528 + backgroundColor: this.props.activeDotColor || 'white',
  529 + width: 6,
  530 + height: 6,
  531 + borderRadius: 3,
532 marginLeft: 3, 532 marginLeft: 3,
533 marginRight: 3, 533 marginRight: 3,
534 marginTop: 3, 534 marginTop: 3,
535 marginBottom: 3 535 marginBottom: 3
536 }, this.props.activeDotStyle]} /> 536 }, this.props.activeDotStyle]} />
537 const Dot = this.props.dot || <View style={[{ 537 const Dot = this.props.dot || <View style={[{
538 - backgroundColor: this.props.dotColor || 'rgba(0,0,0,.2)',  
539 - width: 8,  
540 - height: 8,  
541 - borderRadius: 4, 538 + backgroundColor: this.props.dotColor || 'rgba(237, 237, 237, 0.5)',
  539 + width: 6,
  540 + height: 6,
  541 + borderRadius: 3,
542 marginLeft: 3, 542 marginLeft: 3,
543 marginRight: 3, 543 marginRight: 3,
544 marginTop: 3, 544 marginTop: 3,
1 #!/usr/bin/env bash 1 #!/usr/bin/env bash
2 2
3 echo "Replace custom components!!!" 3 echo "Replace custom components!!!"
4 -echo "Replace View.js..."  
5 -cp -f ./js/common/components/customComponents/View.js.bak ./node_modules/react-native/Libraries/Components/View/View.js  
6 -echo "Replace ScrollView.js..."  
7 -cp -f ./js/common/components/customComponents/android_0.35/ScrollView.js.bak ./node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js 4 +
8 echo "Replace ListView.js..." 5 echo "Replace ListView.js..."
9 -cp -f ./js/common/components/customComponents/ListView.js.bak ./node_modules/react-native/Libraries/CustomComponents/ListView/ListView.js 6 +cp -f ./js/common/components/customComponents/android_0.49.5/ListView.js.bak ./node_modules/react-native/Libraries/Lists/ListView/ListView.js
  7 +echo "Replace SectionList.js..."
  8 +cp -f ./js/common/components/customComponents/android_0.49.5/SectionList.js.bak ./node_modules/react-native/Libraries/Lists/SectionList.js
  9 +echo "Replace VirtualizedSectionList.js..."
  10 +cp -f ./js/common/components/customComponents/android_0.49.5/VirtualizedSectionList.js.bak ./node_modules/react-native/Libraries/Lists/VirtualizedSectionList.js
  11 +
  12 +echo "Replace ScrollView.js..."
  13 +cp -f ./js/common/components/customComponents/android_0.49.5/ScrollView.js.bak ./node_modules/react-native/Libraries/Components/ScrollView/ScrollView.js
  14 +
  15 +echo "Replace ScrollResponder.js..."
  16 +cp -f ./js/common/components/customComponents/android_0.49.5/ScrollResponder.js.bak ./node_modules/react-native/Libraries/Components/ScrollResponder.js
  17 +
10 echo "Replace TouchableOpacity.js..." 18 echo "Replace TouchableOpacity.js..."
11 -cp -f ./js/common/components/customComponents/TouchableOpacity.js.bak ./node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js 19 +cp -f ./js/common/components/customComponents/android_0.49.5/TouchableOpacity.js.bak ./node_modules/react-native/Libraries/Components/Touchable/TouchableOpacity.js
12 echo "Replace TouchableHighlight.js..." 20 echo "Replace TouchableHighlight.js..."
13 -cp -f ./js/common/components/customComponents/TouchableHighlight.js.bak ./node_modules/react-native/Libraries/Components/Touchable/TouchableHighlight.js 21 +cp -f ./js/common/components/customComponents/android_0.49.5/TouchableHighlight.js.bak ./node_modules/react-native/Libraries/Components/Touchable/TouchableHighlight.js
  22 +
  23 +echo "Replace View.js..."
  24 +cp -f ./js/common/components/customComponents/android_0.49.5/View.js.bak ./node_modules/react-native/Libraries/Components/View/View.js
  25 +echo "Replace ViewPropTypes.js..."
  26 +cp -f ./js/common/components/customComponents/android_0.49.5/ViewPropTypes.js.bak ./node_modules/react-native/Libraries/Components/View/ViewPropTypes.js
  27 +
  28 +echo "Replace WebView.android.js..."
  29 +cp -f ./js/common/components/customComponents/android_0.49.5/WebView.android.js.bak ./node_modules/react-native/Libraries/Components/WebView/WebView.android.js
  30 +
  31 +echo "Replace react-native-swipeable.js..."
  32 +cp -f ./js/common/components/customComponents/android_0.49.5/react-native-swipeable.js.bak ./node_modules/react-native-swipeable/lib/index.js
  33 +
14 echo "Replace react-native-swiper.js..." 34 echo "Replace react-native-swiper.js..."
15 -cp -f ./js/common/components/customComponents/android_0.35/react-native-swiper.js.bak ./node_modules/react-native-swiper/src/index.js  
16 -echo "Replace ScrollResponder.js..."  
17 -cp -f ./js/common/components/customComponents/android_0.35/ScrollResponder.js.bak ./node_modules/react-native/Libraries/Components/ScrollResponder.js  
18 -echo "\n"  
  35 +cp -f ./js/common/components/customComponents/android_0.49.5/react-native-swiper.js.bak ./node_modules/react-native-swiper/src/index.js
  36 +echo "\n"