4ac6acb82dcb77f69d4dd4bb38715758.json
6.77 KB
{"ast":null,"code":"var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");var _extends2=_interopRequireDefault(require(\"@babel/runtime/helpers/extends\"));var _defineProperty2=_interopRequireDefault(require(\"@babel/runtime/helpers/defineProperty\"));var _react=_interopRequireDefault(require(\"react\"));var _ScrollView=_interopRequireDefault(require(\"react-native-web/dist/exports/ScrollView\"));var _Platform=_interopRequireDefault(require(\"react-native-web/dist/exports/Platform\"));var _FlatList=_interopRequireDefault(require(\"react-native-web/dist/exports/FlatList\"));var _SectionList=_interopRequireDefault(require(\"react-native-web/dist/exports/SectionList\"));var _RefreshControl=_interopRequireDefault(require(\"react-native-web/dist/exports/RefreshControl\"));var _reactNativeGestureHandler=require(\"react-native-gesture-handler\");var _createNavigationAwareScrollable=_interopRequireDefault(require(\"./createNavigationAwareScrollable\"));var _invariant=_interopRequireDefault(require(\"./utils/invariant\"));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 WrappedScrollView;if(_Platform.default.OS==='android'){WrappedScrollView=(0,_createNavigationAwareScrollable.default)(_ScrollView.default);}else{WrappedScrollView=(0,_createNavigationAwareScrollable.default)(_reactNativeGestureHandler.ScrollView);}function propsMaybeWithRefreshControl(props){var onRefresh=props.onRefresh;if(onRefresh){(0,_invariant.default)(typeof props.refreshing==='boolean','`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `'+JSON.stringify(props.refreshing)+'`');return _objectSpread({},props,{refreshControl:props.refreshControl==null?_react.default.createElement(_RefreshControl.default,{refreshing:props.refreshing,onRefresh:onRefresh,progressViewOffset:props.progressViewOffset}):props.refreshControl});}else{return props;}}var WrappedFlatList=_react.default.forwardRef(function(props,ref){return _react.default.createElement(_FlatList.default,(0,_extends2.default)({ref:ref},props,{renderScrollComponent:function renderScrollComponent(props){return _react.default.createElement(WrappedScrollView,propsMaybeWithRefreshControl(props));}}));});var WrappedSectionList=_react.default.forwardRef(function(props,ref){return _react.default.createElement(_SectionList.default,(0,_extends2.default)({ref:ref},props,{renderScrollComponent:function renderScrollComponent(props){return _react.default.createElement(WrappedScrollView,propsMaybeWithRefreshControl(props));}}));});module.exports={ScrollView:WrappedScrollView,FlatList:WrappedFlatList,SectionList:WrappedSectionList};","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/@react-navigation/native/dist/Scrollables.js"],"names":["WrappedScrollView","Platform","OS","ScrollView","GHScrollView","propsMaybeWithRefreshControl","props","onRefresh","refreshing","JSON","stringify","refreshControl","progressViewOffset","WrappedFlatList","React","forwardRef","ref","WrappedSectionList","module","exports","FlatList","SectionList"],"mappings":"iQAAA,oD,8cAEA,uEACA,0GACA,oE,yxBAEA,GAAIA,CAAAA,iBAAJ,CACA,GAAIC,kBAASC,EAAT,GAAgB,SAApB,CAA+B,CAI7BF,iBAAiB,CAAG,6CAAgCG,mBAAhC,CAApB,CACD,CALD,IAKO,CACLH,iBAAiB,CAAG,6CAAgCI,qCAAhC,CAApB,CACD,CAED,QAASC,CAAAA,4BAAT,CAAsCC,KAAtC,CAA6C,CAC3C,GAAMC,CAAAA,SAAS,CAAGD,KAAK,CAACC,SAAxB,CACA,GAAIA,SAAJ,CAAe,CACb,uBAAU,MAAOD,CAAAA,KAAK,CAACE,UAAb,GAA4B,SAAtC,CAAiD,oFAAsFC,IAAI,CAACC,SAAL,CAAeJ,KAAK,CAACE,UAArB,CAAtF,CAAyH,GAA1K,EACA,wBACKF,KADL,EAEEK,cAAc,CAAEL,KAAK,CAACK,cAAN,EAAwB,IAAxB,CAA+B,6BAAC,uBAAD,EAAgB,UAAU,CAAEL,KAAK,CAACE,UAAlC,CAA8C,SAAS,CAAED,SAAzD,CAAoE,kBAAkB,CAAED,KAAK,CAACM,kBAA9F,EAA/B,CAAsJN,KAAK,CAACK,cAF9K,GAID,CAND,IAMO,CACL,MAAOL,CAAAA,KAAP,CACD,CACF,CAED,GAAMO,CAAAA,eAAe,CAAGC,eAAMC,UAAN,CAAiB,SAACT,KAAD,CAAQU,GAAR,QAAgB,8BAAC,iBAAD,wBAAU,GAAG,CAAEA,GAAf,EAAwBV,KAAxB,EAA+B,qBAAqB,CAAE,+BAAAA,KAAK,QAAI,8BAAC,iBAAD,CAAuBD,4BAA4B,CAACC,KAAD,CAAnD,CAAJ,EAA3D,GAAhB,EAAjB,CAAxB,CAEA,GAAMW,CAAAA,kBAAkB,CAAGH,eAAMC,UAAN,CAAiB,SAACT,KAAD,CAAQU,GAAR,QAAgB,8BAAC,oBAAD,wBAAa,GAAG,CAAEA,GAAlB,EAA2BV,KAA3B,EAAkC,qBAAqB,CAAE,+BAAAA,KAAK,QAAI,8BAAC,iBAAD,CAAuBD,4BAA4B,CAACC,KAAD,CAAnD,CAAJ,EAA9D,GAAhB,EAAjB,CAA3B,CAGAY,MAAM,CAACC,OAAP,CAAiB,CACfhB,UAAU,CAAEH,iBADG,CAEfoB,QAAQ,CAAEP,eAFK,CAGfQ,WAAW,CAAEJ,kBAHE,CAAjB","sourcesContent":["import React from 'react';\nimport { ScrollView, Platform, FlatList, SectionList, RefreshControl } from 'react-native';\nimport { ScrollView as GHScrollView } from 'react-native-gesture-handler';\nimport createNavigationAwareScrollable from './createNavigationAwareScrollable';\nimport invariant from './utils/invariant';\n\nlet WrappedScrollView;\nif (Platform.OS === 'android') {\n // @todo: use GHScrollView again when\n // https://github.com/kmagiera/react-native-gesture-handler/issues/560 has\n // been fixed.\n WrappedScrollView = createNavigationAwareScrollable(ScrollView);\n} else {\n WrappedScrollView = createNavigationAwareScrollable(GHScrollView);\n}\n\nfunction propsMaybeWithRefreshControl(props) {\n const onRefresh = props.onRefresh;\n if (onRefresh) {\n invariant(typeof props.refreshing === 'boolean', '`refreshing` prop must be set as a boolean in order to use `onRefresh`, but got `' + JSON.stringify(props.refreshing) + '`');\n return {\n ...props,\n refreshControl: props.refreshControl == null ? <RefreshControl refreshing={props.refreshing} onRefresh={onRefresh} progressViewOffset={props.progressViewOffset} /> : props.refreshControl\n };\n } else {\n return props;\n }\n}\n\nconst WrappedFlatList = React.forwardRef((props, ref) => <FlatList ref={ref} {...props} renderScrollComponent={props => <WrappedScrollView {...propsMaybeWithRefreshControl(props)} />} />);\n\nconst WrappedSectionList = React.forwardRef((props, ref) => <SectionList ref={ref} {...props} renderScrollComponent={props => <WrappedScrollView {...propsMaybeWithRefreshControl(props)} />} />);\n\n// eslint-disable-next-line import/no-commonjs\nmodule.exports = {\n ScrollView: WrappedScrollView,\n FlatList: WrappedFlatList,\n SectionList: WrappedSectionList\n};"]},"metadata":{},"sourceType":"script"}