Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@expo/react-native-action-sheet

Package Overview
Dependencies
Maintainers
19
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@expo/react-native-action-sheet - npm Package Compare versions

Comparing version 3.3.1 to 3.3.2

4

CHANGELOG.md

@@ -1,2 +0,2 @@

## [3.3.1](https://github.com/expo/react-native-action-sheet/compare/v3.3.0...v3.3.1) (2019-10-30)
## [3.3.2](https://github.com/expo/react-native-action-sheet/compare/v3.3.1...v3.3.2) (2019-11-05)

@@ -6,4 +6,4 @@

* update eslint-utils to resolve security issue ([#137](https://github.com/expo/react-native-action-sheet/issues/137)) ([3fc5e9f](https://github.com/expo/react-native-action-sheet/commit/3fc5e9f4780d0a4b749abd53776fc425e679023c))
* android calling nested action sheets ([b4f1ae3](https://github.com/expo/react-native-action-sheet/commit/b4f1ae39f936207fed182ae4c6cc0c6d8792d8f2))
# Changelog

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _TouchableNativeFeedbackSafe=_interopRequireDefault(require("./TouchableNativeFeedbackSafe"));var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var ActionGroup=function(_React$Component){(0,_inherits2.default)(ActionGroup,_React$Component);function ActionGroup(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(ActionGroup)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._renderRowSeparator=function(key){return React.createElement(_reactNative.View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:37}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:49}},React.createElement(_reactNative.View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:50}},!!title&&React.createElement(_reactNative.Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:51}},title),!!message&&React.createElement(_reactNative.Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:52}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(_reactNative.Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:67}});}else{return React.createElement(_reactNative.View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:69}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=_TouchableNativeFeedbackSafe.default.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var color=_i===destructiveButtonIndex?DESTRUCTIVE_COLOR:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(_TouchableNativeFeedbackSafe.default,{key:_i,pressInDelay:0,background:nativeFeedbackBackground,onPress:function onPress(){return onSelect(_i);},style:styles.button,__source:{fileName:_jsxFileName,lineNumber:99}},_this._renderIconElement(iconSource,color),React.createElement(_reactNative.Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:106}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}(0,_createClass2.default)(ActionGroup,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:styles.groupContainer,__source:{fileName:_jsxFileName,lineNumber:28}},this._renderTitleContent(),React.createElement(_reactNative.ScrollView,{__source:{fileName:_jsxFileName,lineNumber:30}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);exports.default=ActionGroup;ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};var styles=_reactNative.StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _TouchableNativeFeedbackSafe=_interopRequireDefault(require("./TouchableNativeFeedbackSafe"));var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var ActionGroup=function(_React$Component){(0,_inherits2.default)(ActionGroup,_React$Component);function ActionGroup(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(ActionGroup)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._renderRowSeparator=function(key){return React.createElement(_reactNative.View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:37}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(_reactNative.View,{__source:{fileName:_jsxFileName,lineNumber:49}},React.createElement(_reactNative.View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:50}},!!title&&React.createElement(_reactNative.Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:51}},title),!!message&&React.createElement(_reactNative.Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:52}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(_reactNative.Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:67}});}else{return React.createElement(_reactNative.View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:69}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=_TouchableNativeFeedbackSafe.default.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var color=_i===destructiveButtonIndex?DESTRUCTIVE_COLOR:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(_TouchableNativeFeedbackSafe.default,{key:_i,pressInDelay:0,background:nativeFeedbackBackground,onPress:function onPress(){return onSelect(_i);},style:styles.button,__source:{fileName:_jsxFileName,lineNumber:99}},_this._renderIconElement(iconSource,color),React.createElement(_reactNative.Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:106}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}(0,_createClass2.default)(ActionGroup,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:styles.groupContainer,__source:{fileName:_jsxFileName,lineNumber:28}},this._renderTitleContent(),React.createElement(_reactNative.ScrollView,{__source:{fileName:_jsxFileName,lineNumber:30}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);exports.default=ActionGroup;ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};var styles=_reactNative.StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
//# sourceMappingURL=ActionGroup.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);function ActionSheet(){(0,_classCallCheck2.default)(this,ActionSheet);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ActionSheet).apply(this,arguments));}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:13}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(options,onSelect){var iosOptions=_objectSpread({},options,{title:options.title||undefined,message:options.message||undefined});_reactNative.ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _defineProperty2=_interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){keys.push.apply(keys,Object.getOwnPropertySymbols(object));}if(enumerableOnly)keys=keys.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);function ActionSheet(){(0,_classCallCheck2.default)(this,ActionSheet);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ActionSheet).apply(this,arguments));}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){return React.createElement(_reactNative.View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:13}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(options,onSelect){var iosOptions=_objectSpread({},options,{title:options.title||undefined,message:options.message||undefined});_reactNative.ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;
//# sourceMappingURL=index.ios.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _ActionGroup=_interopRequireDefault(require("./ActionGroup"));var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.tsx";var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=_reactNative.Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=_reactNative.Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);function ActionSheet(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(ActionSheet)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new _reactNative.Animated.Value(0),sheetOpacity:new _reactNative.Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,isAnimating=_this$state.isAnimating,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible&&isAnimating){_this._deferNextShow=_this.showActionSheetWithOptions.bind((0,_assertThisInitialized2.default)(_this),options,onSelect);return;}if(isVisible){return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});_reactNative.BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}_reactNative.BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity;var overlay=isVisible?React.createElement(_reactNative.Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:56}}):null;return React.createElement(_reactNative.View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:66}},React.Children.only(this.props.children),overlay,isVisible?this._renderSheet():null);}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,showSeparators=options.showSeparators,separatorStyle=options.separatorStyle;return React.createElement(_reactNative.TouchableWithoutFeedback,{onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:99}},React.createElement(_reactNative.Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(_reactNative.View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:116}},React.createElement(_ActionGroup.default,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,showSeparators:showSeparators,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:117}}))));}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;ActionSheet.defaultProps={useNativeDriver:true};var styles=_reactNative.StyleSheet.create({overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf3=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _assertThisInitialized2=_interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _ActionGroup=_interopRequireDefault(require("./ActionGroup"));var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/index.tsx";var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=_reactNative.Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=_reactNative.Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){(0,_inherits2.default)(ActionSheet,_React$Component);function ActionSheet(){var _getPrototypeOf2;var _this;(0,_classCallCheck2.default)(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=(0,_possibleConstructorReturn2.default)(this,(_getPrototypeOf2=(0,_getPrototypeOf3.default)(ActionSheet)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new _reactNative.Animated.Value(0),sheetOpacity:new _reactNative.Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,isAnimating=_this$state.isAnimating,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferNextShow=_this.showActionSheetWithOptions.bind((0,_assertThisInitialized2.default)(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});_reactNative.BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}_reactNative.BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});_reactNative.Animated.parallel([_reactNative.Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),_reactNative.Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}(0,_createClass2.default)(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity;var overlay=isVisible?React.createElement(_reactNative.Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:56}}):null;return React.createElement(_reactNative.View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:66}},React.Children.only(this.props.children),overlay,isVisible?this._renderSheet():null);}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,showSeparators=options.showSeparators,separatorStyle=options.separatorStyle;return React.createElement(_reactNative.TouchableWithoutFeedback,{onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:99}},React.createElement(_reactNative.Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(_reactNative.View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:116}},React.createElement(_ActionGroup.default,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,showSeparators:showSeparators,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:117}}))));}}]);return ActionSheet;}(React.Component);exports.default=ActionSheet;ActionSheet.defaultProps={useNativeDriver:true};var styles=_reactNative.StyleSheet.create({overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";var CustomTouchableOpacity=function(_TouchableOpacity){(0,_inherits2.default)(CustomTouchableOpacity,_TouchableOpacity);function CustomTouchableOpacity(){(0,_classCallCheck2.default)(this,CustomTouchableOpacity);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(CustomTouchableOpacity).apply(this,arguments));}return CustomTouchableOpacity;}(_reactNative.TouchableOpacity);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=_reactNative.Platform.select({web:CustomTouchableOpacity,default:_reactNative.Platform.Version<=20?CustomTouchableOpacity:_reactNative.TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component){(0,_inherits2.default)(TouchableNativeFeedbackSafe,_React$Component);function TouchableNativeFeedbackSafe(){(0,_classCallCheck2.default)(this,TouchableNativeFeedbackSafe);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(TouchableNativeFeedbackSafe).apply(this,arguments));}(0,_createClass2.default)(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===_reactNative.TouchableNativeFeedback){return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:35}}),React.createElement(_reactNative.View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:36}},this.props.children));}return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:42}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);exports.default=TouchableNativeFeedbackSafe;TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";var CustomTouchableOpacity=function(_TouchableOpacity){(0,_inherits2.default)(CustomTouchableOpacity,_TouchableOpacity);function CustomTouchableOpacity(){(0,_classCallCheck2.default)(this,CustomTouchableOpacity);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(CustomTouchableOpacity).apply(this,arguments));}return CustomTouchableOpacity;}(_reactNative.TouchableOpacity);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=_reactNative.Platform.select({web:CustomTouchableOpacity,default:_reactNative.Platform.Version<=20?CustomTouchableOpacity:_reactNative.TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component){(0,_inherits2.default)(TouchableNativeFeedbackSafe,_React$Component);function TouchableNativeFeedbackSafe(){(0,_classCallCheck2.default)(this,TouchableNativeFeedbackSafe);return(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(TouchableNativeFeedbackSafe).apply(this,arguments));}(0,_createClass2.default)(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===_reactNative.TouchableNativeFeedback){return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:35}}),React.createElement(_reactNative.View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:36}},this.props.children));}return React.createElement(TouchableComponent,(0,_extends2.default)({},this.props,{__source:{fileName:_jsxFileName,lineNumber:42}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);exports.default=TouchableNativeFeedbackSafe;TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;
//# sourceMappingURL=TouchableNativeFeedbackSafe.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _context=require("./context");var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";var ActionSheetProvider=function(_React$Component){(0,_inherits2.default)(ActionSheetProvider,_React$Component);function ActionSheetProvider(props){var _this;(0,_classCallCheck2.default)(this,ActionSheetProvider);_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ActionSheetProvider).call(this,props));_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}(0,_createClass2.default)(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(_context.Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:29}},React.createElement(_ActionSheet.default,{ref:this._actionSheetRef,__source:{fileName:_jsxFileName,lineNumber:30}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);exports.default=ActionSheetProvider;
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var React=_interopRequireWildcard(require("react"));var _ActionSheet=_interopRequireDefault(require("./ActionSheet"));var _context=require("./context");var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheetProvider.tsx";var ActionSheetProvider=function(_React$Component){(0,_inherits2.default)(ActionSheetProvider,_React$Component);function ActionSheetProvider(props){var _this;(0,_classCallCheck2.default)(this,ActionSheetProvider);_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(ActionSheetProvider).call(this,props));_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}(0,_createClass2.default)(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(_context.Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:29}},React.createElement(_ActionSheet.default,{ref:this._actionSheetRef,__source:{fileName:_jsxFileName,lineNumber:30}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);exports.default=ActionSheetProvider;
//# sourceMappingURL=ActionSheetProvider.js.map

@@ -1,2 +0,2 @@

var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=connectActionSheet;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var React=_interopRequireWildcard(require("react"));var _context=require("./context");var _hoistNonReactStatics=_interopRequireDefault(require("hoist-non-react-statics"));var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/connectActionSheet.tsx";function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(_context.Consumer,{__source:{fileName:_jsxFileName,lineNumber:11}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,(0,_extends2.default)({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:14}}));});};return(0,_hoistNonReactStatics.default)(ConnectedActionSheet,WrappedComponent);}
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");var _interopRequireWildcard=require("@babel/runtime/helpers/interopRequireWildcard");Object.defineProperty(exports,"__esModule",{value:true});exports.default=connectActionSheet;var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));var React=_interopRequireWildcard(require("react"));var _context=require("./context");var _hoistNonReactStatics=_interopRequireDefault(require("hoist-non-react-statics"));var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/connectActionSheet.tsx";function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(_context.Consumer,{__source:{fileName:_jsxFileName,lineNumber:11}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,(0,_extends2.default)({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:14}}));});};return(0,_hoistNonReactStatics.default)(ConnectedActionSheet,WrappedComponent);}
//# sourceMappingURL=connectActionSheet.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";import*as React from'react';import{StyleSheet,Text,Image,View,ScrollView}from'react-native';import TouchableNativeFeedbackSafe from'./TouchableNativeFeedbackSafe';var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var ActionGroup=function(_React$Component){_inherits(ActionGroup,_React$Component);function ActionGroup(){var _getPrototypeOf2;var _this;_classCallCheck(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(ActionGroup)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._renderRowSeparator=function(key){return React.createElement(View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:37}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(View,{__source:{fileName:_jsxFileName,lineNumber:49}},React.createElement(View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:50}},!!title&&React.createElement(Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:51}},title),!!message&&React.createElement(Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:52}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:67}});}else{return React.createElement(View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:69}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=TouchableNativeFeedbackSafe.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var color=_i===destructiveButtonIndex?DESTRUCTIVE_COLOR:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(TouchableNativeFeedbackSafe,{key:_i,pressInDelay:0,background:nativeFeedbackBackground,onPress:function onPress(){return onSelect(_i);},style:styles.button,__source:{fileName:_jsxFileName,lineNumber:99}},_this._renderIconElement(iconSource,color),React.createElement(Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:106}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}_createClass(ActionGroup,[{key:"render",value:function render(){return React.createElement(View,{style:styles.groupContainer,__source:{fileName:_jsxFileName,lineNumber:28}},this._renderTitleContent(),React.createElement(ScrollView,{__source:{fileName:_jsxFileName,lineNumber:30}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};export{ActionGroup as default};var styles=StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/ActionGroup.tsx";import*as React from'react';import{StyleSheet,Text,Image,View,ScrollView}from'react-native';import TouchableNativeFeedbackSafe from'./TouchableNativeFeedbackSafe';var BLACK_54PC_TRANSPARENT='#0000008a';var BLACK_87PC_TRANSPARENT='#000000de';var DESTRUCTIVE_COLOR='#d32f2f';var ActionGroup=function(_React$Component){_inherits(ActionGroup,_React$Component);function ActionGroup(){var _getPrototypeOf2;var _this;_classCallCheck(this,ActionGroup);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(ActionGroup)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._renderRowSeparator=function(key){return React.createElement(View,{key:"separator-"+key,style:[styles.rowSeparator,_this.props.separatorStyle],__source:{fileName:_jsxFileName,lineNumber:37}});};_this._renderTitleContent=function(){var _this$props=_this.props,title=_this$props.title,titleTextStyle=_this$props.titleTextStyle,message=_this$props.message,messageTextStyle=_this$props.messageTextStyle,showSeparators=_this$props.showSeparators;if(!title&&!message){return null;}return React.createElement(View,{__source:{fileName:_jsxFileName,lineNumber:49}},React.createElement(View,{style:[styles.titleContainer,{paddingBottom:showSeparators?24:16}],__source:{fileName:_jsxFileName,lineNumber:50}},!!title&&React.createElement(Text,{style:[styles.title,titleTextStyle],__source:{fileName:_jsxFileName,lineNumber:51}},title),!!message&&React.createElement(Text,{style:[styles.message,messageTextStyle],__source:{fileName:_jsxFileName,lineNumber:52}},message)),!!showSeparators&&_this._renderRowSeparator('title'));};_this._renderIconElement=function(iconSource,color){var tintIcons=_this.props.tintIcons;if(!iconSource){return null;}if(typeof iconSource==='number'){var iconStyle=[styles.icon,{tintColor:tintIcons?color:undefined}];return React.createElement(Image,{fadeDuration:0,source:iconSource,resizeMode:"contain",style:iconStyle,__source:{fileName:_jsxFileName,lineNumber:67}});}else{return React.createElement(View,{style:styles.icon,__source:{fileName:_jsxFileName,lineNumber:69}},iconSource);}};_this._renderOptionViews=function(){var _this$props2=_this.props,options=_this$props2.options,icons=_this$props2.icons,destructiveButtonIndex=_this$props2.destructiveButtonIndex,onSelect=_this$props2.onSelect,startIndex=_this$props2.startIndex,length=_this$props2.length,textStyle=_this$props2.textStyle,tintColor=_this$props2.tintColor,showSeparators=_this$props2.showSeparators;var optionViews=[];var nativeFeedbackBackground=TouchableNativeFeedbackSafe.Ripple('rgba(180, 180, 180, 1)',false);var _loop=function _loop(_i){var defaultColor=tintColor?tintColor:(textStyle||{}).color||BLACK_87PC_TRANSPARENT;var color=_i===destructiveButtonIndex?DESTRUCTIVE_COLOR:defaultColor;var iconSource=icons!=null?icons[_i]:null;optionViews.push(React.createElement(TouchableNativeFeedbackSafe,{key:_i,pressInDelay:0,background:nativeFeedbackBackground,onPress:function onPress(){return onSelect(_i);},style:styles.button,__source:{fileName:_jsxFileName,lineNumber:99}},_this._renderIconElement(iconSource,color),React.createElement(Text,{style:[styles.text,textStyle,{color:color}],__source:{fileName:_jsxFileName,lineNumber:106}},options[_i])));if(showSeparators&&_i<startIndex+length-1){optionViews.push(_this._renderRowSeparator(_i));}};for(var _i=startIndex;_i<startIndex+length;_i++){_loop(_i);}return optionViews;};return _this;}_createClass(ActionGroup,[{key:"render",value:function render(){return React.createElement(View,{style:styles.groupContainer,__source:{fileName:_jsxFileName,lineNumber:28}},this._renderTitleContent(),React.createElement(ScrollView,{__source:{fileName:_jsxFileName,lineNumber:30}},this._renderOptionViews()));}}]);return ActionGroup;}(React.Component);ActionGroup.defaultProps={title:null,message:null,showSeparators:false,tintIcons:true,textStyle:{}};export{ActionGroup as default};var styles=StyleSheet.create({button:{justifyContent:'flex-start',alignItems:'center',flexDirection:'row',height:56,paddingHorizontal:16},groupContainer:{backgroundColor:'#ffffff',overflow:'hidden'},icon:{width:24,height:24,marginRight:32},message:{marginTop:12,fontSize:14,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},rowSeparator:{backgroundColor:'#dddddd',height:1,width:'100%'},text:{fontSize:16,color:BLACK_87PC_TRANSPARENT,textAlignVertical:'center'},title:{fontSize:16,color:BLACK_54PC_TRANSPARENT,textAlignVertical:'center'},titleContainer:{alignItems:'flex-start',padding:16,paddingTop:24}});
//# sourceMappingURL=ActionGroup.js.map

@@ -1,2 +0,2 @@

import _defineProperty from"@babel/runtime/helpers/defineProperty";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){var symbols=Object.getOwnPropertySymbols(object);if(enumerableOnly)symbols=symbols.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});keys.push.apply(keys,symbols);}return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import*as React from'react';import{ActionSheetIOS,View}from'react-native';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);function ActionSheet(){_classCallCheck(this,ActionSheet);return _possibleConstructorReturn(this,_getPrototypeOf(ActionSheet).apply(this,arguments));}_createClass(ActionSheet,[{key:"render",value:function render(){return React.createElement(View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:13}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(options,onSelect){var iosOptions=_objectSpread({},options,{title:options.title||undefined,message:options.message||undefined});ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);export{ActionSheet as default};
import _defineProperty from"@babel/runtime/helpers/defineProperty";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/index.ios.tsx";function ownKeys(object,enumerableOnly){var keys=Object.keys(object);if(Object.getOwnPropertySymbols){keys.push.apply(keys,Object.getOwnPropertySymbols(object));}if(enumerableOnly)keys=keys.filter(function(sym){return Object.getOwnPropertyDescriptor(object,sym).enumerable;});return keys;}function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};if(i%2){ownKeys(source,true).forEach(function(key){_defineProperty(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(source).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}import*as React from'react';import{ActionSheetIOS,View}from'react-native';var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);function ActionSheet(){_classCallCheck(this,ActionSheet);return _possibleConstructorReturn(this,_getPrototypeOf(ActionSheet).apply(this,arguments));}_createClass(ActionSheet,[{key:"render",value:function render(){return React.createElement(View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:13}},React.Children.only(this.props.children));}},{key:"showActionSheetWithOptions",value:function showActionSheetWithOptions(options,onSelect){var iosOptions=_objectSpread({},options,{title:options.title||undefined,message:options.message||undefined});ActionSheetIOS.showActionSheetWithOptions(iosOptions,onSelect);}}]);return ActionSheet;}(React.Component);export{ActionSheet as default};
//# sourceMappingURL=index.ios.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/index.tsx";import*as React from'react';import{Animated,BackHandler,Easing,StyleSheet,TouchableWithoutFeedback,View}from'react-native';import ActionGroup from'./ActionGroup';var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);function ActionSheet(){var _getPrototypeOf2;var _this;_classCallCheck(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(ActionSheet)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new Animated.Value(0),sheetOpacity:new Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,isAnimating=_this$state.isAnimating,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible&&isAnimating){_this._deferNextShow=_this.showActionSheetWithOptions.bind(_assertThisInitialized(_this),options,onSelect);return;}if(isVisible){return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);Animated.parallel([Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});Animated.parallel([Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}_createClass(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity;var overlay=isVisible?React.createElement(Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:56}}):null;return React.createElement(View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:66}},React.Children.only(this.props.children),overlay,isVisible?this._renderSheet():null);}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,showSeparators=options.showSeparators,separatorStyle=options.separatorStyle;return React.createElement(TouchableWithoutFeedback,{onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:99}},React.createElement(Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:116}},React.createElement(ActionGroup,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,showSeparators:showSeparators,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:117}}))));}}]);return ActionSheet;}(React.Component);ActionSheet.defaultProps={useNativeDriver:true};export{ActionSheet as default};var styles=StyleSheet.create({overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _assertThisInitialized from"@babel/runtime/helpers/assertThisInitialized";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/index.tsx";import*as React from'react';import{Animated,BackHandler,Easing,StyleSheet,TouchableWithoutFeedback,View}from'react-native';import ActionGroup from'./ActionGroup';var OPACITY_ANIMATION_IN_TIME=225;var OPACITY_ANIMATION_OUT_TIME=195;var EASING_OUT=Easing.bezier(0.25,0.46,0.45,0.94);var EASING_IN=Easing.out(EASING_OUT);var ActionSheet=function(_React$Component){_inherits(ActionSheet,_React$Component);function ActionSheet(){var _getPrototypeOf2;var _this;_classCallCheck(this,ActionSheet);for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_possibleConstructorReturn(this,(_getPrototypeOf2=_getPrototypeOf(ActionSheet)).call.apply(_getPrototypeOf2,[this].concat(args)));_this._actionSheetHeight=360;_this.state={isVisible:false,isAnimating:false,options:null,onSelect:null,overlayOpacity:new Animated.Value(0),sheetOpacity:new Animated.Value(0)};_this._deferNextShow=undefined;_this._setActionSheetHeight=function(_ref){var nativeEvent=_ref.nativeEvent;return _this._actionSheetHeight=nativeEvent.layout.height;};_this.showActionSheetWithOptions=function(options,onSelect){var _this$state=_this.state,isVisible=_this$state.isVisible,isAnimating=_this$state.isAnimating,overlayOpacity=_this$state.overlayOpacity,sheetOpacity=_this$state.sheetOpacity;if(isVisible){_this._deferNextShow=_this.showActionSheetWithOptions.bind(_assertThisInitialized(_this),options,onSelect);return;}_this.setState({options:options,onSelect:onSelect,isVisible:true,isAnimating:true});overlayOpacity.setValue(0);sheetOpacity.setValue(0);Animated.parallel([Animated.timing(overlayOpacity,{toValue:0.32,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:1,easing:EASING_OUT,duration:OPACITY_ANIMATION_IN_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isAnimating:false});_this._deferNextShow=undefined;}});BackHandler.addEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);};_this._selectCancelButton=function(){var options=_this.state.options;if(!options){return false;}if(typeof options.cancelButtonIndex==='undefined'){return;}else if(typeof options.cancelButtonIndex==='number'){return _this._onSelect(options.cancelButtonIndex);}else{return _this._animateOut();}};_this._onSelect=function(index){var _this$state2=_this.state,isAnimating=_this$state2.isAnimating,onSelect=_this$state2.onSelect;if(isAnimating){return false;}onSelect&&onSelect(index);return _this._animateOut();};_this._animateOut=function(){var _this$state3=_this.state,isAnimating=_this$state3.isAnimating,overlayOpacity=_this$state3.overlayOpacity,sheetOpacity=_this$state3.sheetOpacity;if(isAnimating){return false;}BackHandler.removeEventListener('actionSheetHardwareBackPress',_this._selectCancelButton);_this.setState({isAnimating:true});Animated.parallel([Animated.timing(overlayOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver}),Animated.timing(sheetOpacity,{toValue:0,easing:EASING_IN,duration:OPACITY_ANIMATION_OUT_TIME,useNativeDriver:_this.props.useNativeDriver})]).start(function(result){if(result.finished){_this.setState({isVisible:false,isAnimating:false});if(_this._deferNextShow){_this._deferNextShow();}}});return true;};return _this;}_createClass(ActionSheet,[{key:"render",value:function render(){var _this$state4=this.state,isVisible=_this$state4.isVisible,overlayOpacity=_this$state4.overlayOpacity;var overlay=isVisible?React.createElement(Animated.View,{style:[styles.overlay,{opacity:overlayOpacity}],__source:{fileName:_jsxFileName,lineNumber:56}}):null;return React.createElement(View,{style:{flex:1},__source:{fileName:_jsxFileName,lineNumber:66}},React.Children.only(this.props.children),overlay,isVisible?this._renderSheet():null);}},{key:"_renderSheet",value:function _renderSheet(){var _this$state5=this.state,options=_this$state5.options,isAnimating=_this$state5.isAnimating,sheetOpacity=_this$state5.sheetOpacity;if(!options){return null;}var optionsArray=options.options,icons=options.icons,tintIcons=options.tintIcons,destructiveButtonIndex=options.destructiveButtonIndex,textStyle=options.textStyle,tintColor=options.tintColor,title=options.title,titleTextStyle=options.titleTextStyle,message=options.message,messageTextStyle=options.messageTextStyle,showSeparators=options.showSeparators,separatorStyle=options.separatorStyle;return React.createElement(TouchableWithoutFeedback,{onPress:this._selectCancelButton,__source:{fileName:_jsxFileName,lineNumber:99}},React.createElement(Animated.View,{needsOffscreenAlphaCompositing:isAnimating,style:[styles.sheetContainer,{opacity:sheetOpacity,transform:[{translateY:sheetOpacity.interpolate({inputRange:[0,1],outputRange:[this._actionSheetHeight,0]})}]}],__source:{fileName:_jsxFileName,lineNumber:100}},React.createElement(View,{style:styles.sheet,onLayout:this._setActionSheetHeight,__source:{fileName:_jsxFileName,lineNumber:116}},React.createElement(ActionGroup,{options:optionsArray,icons:icons,tintIcons:tintIcons===undefined?true:tintIcons,destructiveButtonIndex:destructiveButtonIndex,onSelect:this._onSelect,startIndex:0,length:optionsArray.length,textStyle:textStyle||{},tintColor:tintColor,title:title||undefined,titleTextStyle:titleTextStyle,message:message||undefined,messageTextStyle:messageTextStyle,showSeparators:showSeparators,separatorStyle:separatorStyle,__source:{fileName:_jsxFileName,lineNumber:117}}))));}}]);return ActionSheet;}(React.Component);ActionSheet.defaultProps={useNativeDriver:true};export{ActionSheet as default};var styles=StyleSheet.create({overlay:{position:'absolute',top:0,right:0,bottom:0,left:0,backgroundColor:'black'},sheetContainer:{position:'absolute',left:0,right:0,bottom:0,top:0,backgroundColor:'transparent',alignItems:'flex-end',justifyContent:'center',flexDirection:'row'},sheet:{flex:1,backgroundColor:'transparent'}});
//# sourceMappingURL=index.js.map

@@ -1,2 +0,2 @@

import _extends from"@babel/runtime/helpers/extends";import _createClass from"@babel/runtime/helpers/createClass";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";import*as React from'react';import{Platform,TouchableNativeFeedback,TouchableOpacity,View}from'react-native';var CustomTouchableOpacity=function(_TouchableOpacity){_inherits(CustomTouchableOpacity,_TouchableOpacity);function CustomTouchableOpacity(){_classCallCheck(this,CustomTouchableOpacity);return _possibleConstructorReturn(this,_getPrototypeOf(CustomTouchableOpacity).apply(this,arguments));}return CustomTouchableOpacity;}(TouchableOpacity);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=Platform.select({web:CustomTouchableOpacity,default:Platform.Version<=20?CustomTouchableOpacity:TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component){_inherits(TouchableNativeFeedbackSafe,_React$Component);function TouchableNativeFeedbackSafe(){_classCallCheck(this,TouchableNativeFeedbackSafe);return _possibleConstructorReturn(this,_getPrototypeOf(TouchableNativeFeedbackSafe).apply(this,arguments));}_createClass(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===TouchableNativeFeedback){return React.createElement(TouchableComponent,_extends({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:35}}),React.createElement(View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:36}},this.props.children));}return React.createElement(TouchableComponent,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:42}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;export{TouchableNativeFeedbackSafe as default};
import _extends from"@babel/runtime/helpers/extends";import _createClass from"@babel/runtime/helpers/createClass";import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheet/TouchableNativeFeedbackSafe.tsx";import*as React from'react';import{Platform,TouchableNativeFeedback,TouchableOpacity,View}from'react-native';var CustomTouchableOpacity=function(_TouchableOpacity){_inherits(CustomTouchableOpacity,_TouchableOpacity);function CustomTouchableOpacity(){_classCallCheck(this,CustomTouchableOpacity);return _possibleConstructorReturn(this,_getPrototypeOf(CustomTouchableOpacity).apply(this,arguments));}return CustomTouchableOpacity;}(TouchableOpacity);CustomTouchableOpacity.SelectableBackground=function(){return{};};CustomTouchableOpacity.SelectableBackgroundBorderless=function(){return{};};CustomTouchableOpacity.Ripple=function(color,borderless){return{};};var TouchableComponent=Platform.select({web:CustomTouchableOpacity,default:Platform.Version<=20?CustomTouchableOpacity:TouchableNativeFeedback});var TouchableNativeFeedbackSafe=function(_React$Component){_inherits(TouchableNativeFeedbackSafe,_React$Component);function TouchableNativeFeedbackSafe(){_classCallCheck(this,TouchableNativeFeedbackSafe);return _possibleConstructorReturn(this,_getPrototypeOf(TouchableNativeFeedbackSafe).apply(this,arguments));}_createClass(TouchableNativeFeedbackSafe,[{key:"render",value:function render(){if(TouchableComponent===TouchableNativeFeedback){return React.createElement(TouchableComponent,_extends({},this.props,{style:{},__source:{fileName:_jsxFileName,lineNumber:35}}),React.createElement(View,{style:this.props.style,__source:{fileName:_jsxFileName,lineNumber:36}},this.props.children));}return React.createElement(TouchableComponent,_extends({},this.props,{__source:{fileName:_jsxFileName,lineNumber:42}}),this.props.children);}}]);return TouchableNativeFeedbackSafe;}(React.Component);TouchableNativeFeedbackSafe.SelectableBackground=TouchableComponent.SelectableBackground;TouchableNativeFeedbackSafe.SelectableBackgroundBorderless=TouchableComponent.SelectableBackgroundBorderless;TouchableNativeFeedbackSafe.Ripple=TouchableComponent.Ripple;export{TouchableNativeFeedbackSafe as default};
//# sourceMappingURL=TouchableNativeFeedbackSafe.js.map

@@ -1,2 +0,2 @@

import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/ActionSheetProvider.tsx";import*as React from'react';import ActionSheet from'./ActionSheet';import{Provider}from'./context';var ActionSheetProvider=function(_React$Component){_inherits(ActionSheetProvider,_React$Component);function ActionSheetProvider(props){var _this;_classCallCheck(this,ActionSheetProvider);_this=_possibleConstructorReturn(this,_getPrototypeOf(ActionSheetProvider).call(this,props));_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}_createClass(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:29}},React.createElement(ActionSheet,{ref:this._actionSheetRef,__source:{fileName:_jsxFileName,lineNumber:30}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);export{ActionSheetProvider as default};
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";import _inherits from"@babel/runtime/helpers/inherits";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/ActionSheetProvider.tsx";import*as React from'react';import ActionSheet from'./ActionSheet';import{Provider}from'./context';var ActionSheetProvider=function(_React$Component){_inherits(ActionSheetProvider,_React$Component);function ActionSheetProvider(props){var _this;_classCallCheck(this,ActionSheetProvider);_this=_possibleConstructorReturn(this,_getPrototypeOf(ActionSheetProvider).call(this,props));_this.getContext=function(){return{showActionSheetWithOptions:function showActionSheetWithOptions(options,callback){_this._actionSheetRef.current!==null&&_this._actionSheetRef.current.showActionSheetWithOptions(options,callback);}};};_this._actionSheetRef=React.createRef();return _this;}_createClass(ActionSheetProvider,[{key:"render",value:function render(){return React.createElement(Provider,{value:this.getContext(),__source:{fileName:_jsxFileName,lineNumber:29}},React.createElement(ActionSheet,{ref:this._actionSheetRef,__source:{fileName:_jsxFileName,lineNumber:30}},React.Children.only(this.props.children)));}}]);return ActionSheetProvider;}(React.Component);export{ActionSheetProvider as default};
//# sourceMappingURL=ActionSheetProvider.js.map

@@ -1,2 +0,2 @@

import _extends from"@babel/runtime/helpers/extends";var _jsxFileName="/home/runner/work/react-native-action-sheet/react-native-action-sheet/src/connectActionSheet.tsx";import*as React from'react';import{Consumer}from'./context';import hoistNonReactStatic from'hoist-non-react-statics';export default function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(Consumer,{__source:{fileName:_jsxFileName,lineNumber:11}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,_extends({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:14}}));});};return hoistNonReactStatic(ConnectedActionSheet,WrappedComponent);}
import _extends from"@babel/runtime/helpers/extends";var _jsxFileName="/Users/brad/Code/Expo/react-native-action-sheet/src/connectActionSheet.tsx";import*as React from'react';import{Consumer}from'./context';import hoistNonReactStatic from'hoist-non-react-statics';export default function connectActionSheet(WrappedComponent){var ConnectedActionSheet=function ConnectedActionSheet(props){return React.createElement(Consumer,{__source:{fileName:_jsxFileName,lineNumber:11}},function(_ref){var showActionSheetWithOptions=_ref.showActionSheetWithOptions;return React.createElement(WrappedComponent,_extends({},props,{showActionSheetWithOptions:showActionSheetWithOptions,__source:{fileName:_jsxFileName,lineNumber:14}}));});};return hoistNonReactStatic(ConnectedActionSheet,WrappedComponent);}
//# sourceMappingURL=connectActionSheet.js.map
{
"name": "@expo/react-native-action-sheet",
"version": "3.3.1",
"version": "3.3.2",
"description": "A cross-platform ActionSheet for React Native",

@@ -5,0 +5,0 @@ "react-native": "lib/module/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc