b4ff871b2da4c6555d26f011843028f4.json 28.4 KB
{"ast":null,"code":"var _interopRequireWildcard=require(\"@babel/runtime/helpers/interopRequireWildcard\");var _interopRequireDefault=require(\"@babel/runtime/helpers/interopRequireDefault\");Object.defineProperty(exports,\"__esModule\",{value:true});exports.default=void 0;var _debounce=_interopRequireDefault(require(\"debounce\"));var _StyleSheet=_interopRequireDefault(require(\"../StyleSheet\"));var _View=_interopRequireDefault(require(\"../View\"));var _ViewPropTypes=_interopRequireDefault(require(\"../ViewPropTypes\"));var _react=_interopRequireWildcard(require(\"react\"));var _propTypes=require(\"prop-types\");function _objectSpread(target){for(var i=1;i<arguments.length;i++){var source=arguments[i]!=null?arguments[i]:{};var ownKeys=Object.keys(source);if(typeof Object.getOwnPropertySymbols==='function'){ownKeys=ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym){return Object.getOwnPropertyDescriptor(source,sym).enumerable;}));}ownKeys.forEach(function(key){_defineProperty(target,key,source[key]);});}return target;}function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else{obj[key]=value;}return obj;}function _extends(){_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;};return _extends.apply(this,arguments);}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return{};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i<sourceKeys.length;i++){key=sourceKeys[i];if(excluded.indexOf(key)>=0)continue;target[key]=source[key];}return target;}function _inheritsLoose(subClass,superClass){subClass.prototype=Object.create(superClass.prototype);subClass.prototype.constructor=subClass;subClass.__proto__=superClass;}var normalizeScrollEvent=function normalizeScrollEvent(e){return{nativeEvent:{contentOffset:{get x(){return e.target.scrollLeft;},get y(){return e.target.scrollTop;}},contentSize:{get height(){return e.target.scrollHeight;},get width(){return e.target.scrollWidth;}},layoutMeasurement:{get height(){return e.target.offsetHeight;},get width(){return e.target.offsetWidth;}}},timeStamp:Date.now()};};var ScrollViewBase=function(_Component){_inheritsLoose(ScrollViewBase,_Component);function ScrollViewBase(){var _this;for(var _len=arguments.length,args=new Array(_len),_key=0;_key<_len;_key++){args[_key]=arguments[_key];}_this=_Component.call.apply(_Component,[this].concat(args))||this;_this._debouncedOnScrollEnd=(0,_debounce.default)(_this._handleScrollEnd,100);_this._state={isScrolling:false,scrollLastTick:0};_this._createPreventableScrollHandler=function(handler){return function(e){if(_this.props.scrollEnabled){if(handler){handler(e);}}else{e.preventDefault();}};};_this._handleScroll=function(e){e.persist();e.stopPropagation();var scrollEventThrottle=_this.props.scrollEventThrottle;_this._debouncedOnScrollEnd(e);if(_this._state.isScrolling){if(_this._shouldEmitScrollEvent(_this._state.scrollLastTick,scrollEventThrottle)){_this._handleScrollTick(e);}}else{_this._handleScrollStart(e);}};_this._setViewRef=function(element){_this._viewRef=element;};return _this;}var _proto=ScrollViewBase.prototype;_proto.setNativeProps=function setNativeProps(props){if(this._viewRef){this._viewRef.setNativeProps(props);}};_proto.render=function render(){var _this$props=this.props,scrollEnabled=_this$props.scrollEnabled,style=_this$props.style,alwaysBounceHorizontal=_this$props.alwaysBounceHorizontal,alwaysBounceVertical=_this$props.alwaysBounceVertical,automaticallyAdjustContentInsets=_this$props.automaticallyAdjustContentInsets,bounces=_this$props.bounces,bouncesZoom=_this$props.bouncesZoom,canCancelContentTouches=_this$props.canCancelContentTouches,centerContent=_this$props.centerContent,contentInset=_this$props.contentInset,contentInsetAdjustmentBehavior=_this$props.contentInsetAdjustmentBehavior,contentOffset=_this$props.contentOffset,decelerationRate=_this$props.decelerationRate,directionalLockEnabled=_this$props.directionalLockEnabled,endFillColor=_this$props.endFillColor,indicatorStyle=_this$props.indicatorStyle,keyboardShouldPersistTaps=_this$props.keyboardShouldPersistTaps,maximumZoomScale=_this$props.maximumZoomScale,minimumZoomScale=_this$props.minimumZoomScale,onMomentumScrollBegin=_this$props.onMomentumScrollBegin,onMomentumScrollEnd=_this$props.onMomentumScrollEnd,onScrollBeginDrag=_this$props.onScrollBeginDrag,onScrollEndDrag=_this$props.onScrollEndDrag,overScrollMode=_this$props.overScrollMode,pinchGestureEnabled=_this$props.pinchGestureEnabled,removeClippedSubviews=_this$props.removeClippedSubviews,scrollEventThrottle=_this$props.scrollEventThrottle,scrollIndicatorInsets=_this$props.scrollIndicatorInsets,scrollPerfTag=_this$props.scrollPerfTag,scrollsToTop=_this$props.scrollsToTop,showsHorizontalScrollIndicator=_this$props.showsHorizontalScrollIndicator,showsVerticalScrollIndicator=_this$props.showsVerticalScrollIndicator,snapToInterval=_this$props.snapToInterval,snapToAlignment=_this$props.snapToAlignment,zoomScale=_this$props.zoomScale,other=_objectWithoutPropertiesLoose(_this$props,[\"scrollEnabled\",\"style\",\"alwaysBounceHorizontal\",\"alwaysBounceVertical\",\"automaticallyAdjustContentInsets\",\"bounces\",\"bouncesZoom\",\"canCancelContentTouches\",\"centerContent\",\"contentInset\",\"contentInsetAdjustmentBehavior\",\"contentOffset\",\"decelerationRate\",\"directionalLockEnabled\",\"endFillColor\",\"indicatorStyle\",\"keyboardShouldPersistTaps\",\"maximumZoomScale\",\"minimumZoomScale\",\"onMomentumScrollBegin\",\"onMomentumScrollEnd\",\"onScrollBeginDrag\",\"onScrollEndDrag\",\"overScrollMode\",\"pinchGestureEnabled\",\"removeClippedSubviews\",\"scrollEventThrottle\",\"scrollIndicatorInsets\",\"scrollPerfTag\",\"scrollsToTop\",\"showsHorizontalScrollIndicator\",\"showsVerticalScrollIndicator\",\"snapToInterval\",\"snapToAlignment\",\"zoomScale\"]);var hideScrollbar=showsHorizontalScrollIndicator===false||showsVerticalScrollIndicator===false;return _react.default.createElement(_View.default,_extends({},other,{onScroll:this._handleScroll,onTouchMove:this._createPreventableScrollHandler(this.props.onTouchMove),onWheel:this._createPreventableScrollHandler(this.props.onWheel),ref:this._setViewRef,style:[style,!scrollEnabled&&styles.scrollDisabled,hideScrollbar&&styles.hideScrollbar]}));};_proto._handleScrollStart=function _handleScrollStart(e){this._state.isScrolling=true;this._state.scrollLastTick=Date.now();};_proto._handleScrollTick=function _handleScrollTick(e){var onScroll=this.props.onScroll;this._state.scrollLastTick=Date.now();if(onScroll){onScroll(normalizeScrollEvent(e));}};_proto._handleScrollEnd=function _handleScrollEnd(e){var onScroll=this.props.onScroll;this._state.isScrolling=false;if(onScroll){onScroll(normalizeScrollEvent(e));}};_proto._shouldEmitScrollEvent=function _shouldEmitScrollEvent(lastTick,eventThrottle){var timeSinceLastTick=Date.now()-lastTick;return eventThrottle>0&&timeSinceLastTick>=eventThrottle;};return ScrollViewBase;}(_react.Component);exports.default=ScrollViewBase;ScrollViewBase.defaultProps={scrollEnabled:true,scrollEventThrottle:0};ScrollViewBase.propTypes=process.env.NODE_ENV!==\"production\"?_objectSpread({},_ViewPropTypes.default,{onMomentumScrollBegin:_propTypes.func,onMomentumScrollEnd:_propTypes.func,onScroll:_propTypes.func,onScrollBeginDrag:_propTypes.func,onScrollEndDrag:_propTypes.func,onTouchMove:_propTypes.func,onWheel:_propTypes.func,removeClippedSubviews:_propTypes.bool,scrollEnabled:_propTypes.bool,scrollEventThrottle:_propTypes.number,showsHorizontalScrollIndicator:_propTypes.bool,showsVerticalScrollIndicator:_propTypes.bool}):{};var styles=_StyleSheet.default.create({scrollDisabled:{touchAction:'none'},hideScrollbar:{scrollbarWidth:'none'}});","map":{"version":3,"sources":["C:/Users/bluej/Desktop/2_2/searchGuide/searchGuide/node_modules/react-native-web/dist/exports/ScrollView/ScrollViewBase.js"],"names":["_objectSpread","target","i","arguments","length","source","ownKeys","Object","keys","getOwnPropertySymbols","concat","filter","sym","getOwnPropertyDescriptor","enumerable","forEach","key","_defineProperty","obj","value","defineProperty","configurable","writable","_extends","assign","prototype","hasOwnProperty","call","apply","_objectWithoutPropertiesLoose","excluded","sourceKeys","indexOf","_inheritsLoose","subClass","superClass","create","constructor","__proto__","normalizeScrollEvent","e","nativeEvent","contentOffset","x","scrollLeft","y","scrollTop","contentSize","height","scrollHeight","width","scrollWidth","layoutMeasurement","offsetHeight","offsetWidth","timeStamp","Date","now","ScrollViewBase","_Component","_this","_len","args","Array","_key","_debouncedOnScrollEnd","_handleScrollEnd","_state","isScrolling","scrollLastTick","_createPreventableScrollHandler","handler","props","scrollEnabled","preventDefault","_handleScroll","persist","stopPropagation","scrollEventThrottle","_shouldEmitScrollEvent","_handleScrollTick","_handleScrollStart","_setViewRef","element","_viewRef","_proto","setNativeProps","render","_this$props","style","alwaysBounceHorizontal","alwaysBounceVertical","automaticallyAdjustContentInsets","bounces","bouncesZoom","canCancelContentTouches","centerContent","contentInset","contentInsetAdjustmentBehavior","decelerationRate","directionalLockEnabled","endFillColor","indicatorStyle","keyboardShouldPersistTaps","maximumZoomScale","minimumZoomScale","onMomentumScrollBegin","onMomentumScrollEnd","onScrollBeginDrag","onScrollEndDrag","overScrollMode","pinchGestureEnabled","removeClippedSubviews","scrollIndicatorInsets","scrollPerfTag","scrollsToTop","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","snapToInterval","snapToAlignment","zoomScale","other","hideScrollbar","React","createElement","View","onScroll","onTouchMove","onWheel","ref","styles","scrollDisabled","lastTick","eventThrottle","timeSinceLastTick","Component","defaultProps","propTypes","process","env","NODE_ENV","ViewPropTypes","func","bool","number","StyleSheet","touchAction","scrollbarWidth"],"mappings":"wPAkBA,0DACA,iEACA,qDACA,uEACA,qDACA,qCAvBA,QAASA,CAAAA,aAAT,CAAuBC,MAAvB,CAA+B,CAAE,IAAK,GAAIC,CAAAA,CAAC,CAAG,CAAb,CAAgBA,CAAC,CAAGC,SAAS,CAACC,MAA9B,CAAsCF,CAAC,EAAvC,CAA2C,CAAE,GAAIG,CAAAA,MAAM,CAAGF,SAAS,CAACD,CAAD,CAAT,EAAgB,IAAhB,CAAuBC,SAAS,CAACD,CAAD,CAAhC,CAAsC,EAAnD,CAAuD,GAAII,CAAAA,OAAO,CAAGC,MAAM,CAACC,IAAP,CAAYH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7G,MAAX,CAAkB,CAC7B+F,cAAc,CAAE,CACde,WAAW,CAAE,MADC,CADa,CAI7BxB,aAAa,CAAE,CACbyB,cAAc,CAAE,MADH,CAJc,CAAlB,CAAb","sourcesContent":["function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _extends() { _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; }; return _extends.apply(this, arguments); }\n\nfunction _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }\n\nfunction _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }\n\n/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport debounce from 'debounce';\nimport StyleSheet from '../StyleSheet';\nimport View from '../View';\nimport ViewPropTypes from '../ViewPropTypes';\nimport React, { Component } from 'react';\nimport { bool, func, number } from 'prop-types';\n\nvar normalizeScrollEvent = function normalizeScrollEvent(e) {\n  return {\n    nativeEvent: {\n      contentOffset: {\n        get x() {\n          return e.target.scrollLeft;\n        },\n\n        get y() {\n          return e.target.scrollTop;\n        }\n\n      },\n      contentSize: {\n        get height() {\n          return e.target.scrollHeight;\n        },\n\n        get width() {\n          return e.target.scrollWidth;\n        }\n\n      },\n      layoutMeasurement: {\n        get height() {\n          return e.target.offsetHeight;\n        },\n\n        get width() {\n          return e.target.offsetWidth;\n        }\n\n      }\n    },\n    timeStamp: Date.now()\n  };\n};\n/**\n * Encapsulates the Web-specific scroll throttling and disabling logic\n */\n\n\nvar ScrollViewBase =\n/*#__PURE__*/\nfunction (_Component) {\n  _inheritsLoose(ScrollViewBase, _Component);\n\n  function ScrollViewBase() {\n    var _this;\n\n    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n      args[_key] = arguments[_key];\n    }\n\n    _this = _Component.call.apply(_Component, [this].concat(args)) || this;\n    _this._debouncedOnScrollEnd = debounce(_this._handleScrollEnd, 100);\n    _this._state = {\n      isScrolling: false,\n      scrollLastTick: 0\n    };\n\n    _this._createPreventableScrollHandler = function (handler) {\n      return function (e) {\n        if (_this.props.scrollEnabled) {\n          if (handler) {\n            handler(e);\n          }\n        } else {\n          // To disable scrolling in all browsers except Chrome\n          e.preventDefault();\n        }\n      };\n    };\n\n    _this._handleScroll = function (e) {\n      e.persist();\n      e.stopPropagation();\n      var scrollEventThrottle = _this.props.scrollEventThrottle; // A scroll happened, so the scroll bumps the debounce.\n\n      _this._debouncedOnScrollEnd(e);\n\n      if (_this._state.isScrolling) {\n        // Scroll last tick may have changed, check if we need to notify\n        if (_this._shouldEmitScrollEvent(_this._state.scrollLastTick, scrollEventThrottle)) {\n          _this._handleScrollTick(e);\n        }\n      } else {\n        // Weren't scrolling, so we must have just started\n        _this._handleScrollStart(e);\n      }\n    };\n\n    _this._setViewRef = function (element) {\n      _this._viewRef = element;\n    };\n\n    return _this;\n  }\n\n  var _proto = ScrollViewBase.prototype;\n\n  _proto.setNativeProps = function setNativeProps(props) {\n    if (this._viewRef) {\n      this._viewRef.setNativeProps(props);\n    }\n  };\n\n  _proto.render = function render() {\n    var _this$props = this.props,\n        scrollEnabled = _this$props.scrollEnabled,\n        style = _this$props.style,\n        alwaysBounceHorizontal = _this$props.alwaysBounceHorizontal,\n        alwaysBounceVertical = _this$props.alwaysBounceVertical,\n        automaticallyAdjustContentInsets = _this$props.automaticallyAdjustContentInsets,\n        bounces = _this$props.bounces,\n        bouncesZoom = _this$props.bouncesZoom,\n        canCancelContentTouches = _this$props.canCancelContentTouches,\n        centerContent = _this$props.centerContent,\n        contentInset = _this$props.contentInset,\n        contentInsetAdjustmentBehavior = _this$props.contentInsetAdjustmentBehavior,\n        contentOffset = _this$props.contentOffset,\n        decelerationRate = _this$props.decelerationRate,\n        directionalLockEnabled = _this$props.directionalLockEnabled,\n        endFillColor = _this$props.endFillColor,\n        indicatorStyle = _this$props.indicatorStyle,\n        keyboardShouldPersistTaps = _this$props.keyboardShouldPersistTaps,\n        maximumZoomScale = _this$props.maximumZoomScale,\n        minimumZoomScale = _this$props.minimumZoomScale,\n        onMomentumScrollBegin = _this$props.onMomentumScrollBegin,\n        onMomentumScrollEnd = _this$props.onMomentumScrollEnd,\n        onScrollBeginDrag = _this$props.onScrollBeginDrag,\n        onScrollEndDrag = _this$props.onScrollEndDrag,\n        overScrollMode = _this$props.overScrollMode,\n        pinchGestureEnabled = _this$props.pinchGestureEnabled,\n        removeClippedSubviews = _this$props.removeClippedSubviews,\n        scrollEventThrottle = _this$props.scrollEventThrottle,\n        scrollIndicatorInsets = _this$props.scrollIndicatorInsets,\n        scrollPerfTag = _this$props.scrollPerfTag,\n        scrollsToTop = _this$props.scrollsToTop,\n        showsHorizontalScrollIndicator = _this$props.showsHorizontalScrollIndicator,\n        showsVerticalScrollIndicator = _this$props.showsVerticalScrollIndicator,\n        snapToInterval = _this$props.snapToInterval,\n        snapToAlignment = _this$props.snapToAlignment,\n        zoomScale = _this$props.zoomScale,\n        other = _objectWithoutPropertiesLoose(_this$props, [\"scrollEnabled\", \"style\", \"alwaysBounceHorizontal\", \"alwaysBounceVertical\", \"automaticallyAdjustContentInsets\", \"bounces\", \"bouncesZoom\", \"canCancelContentTouches\", \"centerContent\", \"contentInset\", \"contentInsetAdjustmentBehavior\", \"contentOffset\", \"decelerationRate\", \"directionalLockEnabled\", \"endFillColor\", \"indicatorStyle\", \"keyboardShouldPersistTaps\", \"maximumZoomScale\", \"minimumZoomScale\", \"onMomentumScrollBegin\", \"onMomentumScrollEnd\", \"onScrollBeginDrag\", \"onScrollEndDrag\", \"overScrollMode\", \"pinchGestureEnabled\", \"removeClippedSubviews\", \"scrollEventThrottle\", \"scrollIndicatorInsets\", \"scrollPerfTag\", \"scrollsToTop\", \"showsHorizontalScrollIndicator\", \"showsVerticalScrollIndicator\", \"snapToInterval\", \"snapToAlignment\", \"zoomScale\"]);\n\n    var hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;\n    return React.createElement(View, _extends({}, other, {\n      onScroll: this._handleScroll,\n      onTouchMove: this._createPreventableScrollHandler(this.props.onTouchMove),\n      onWheel: this._createPreventableScrollHandler(this.props.onWheel),\n      ref: this._setViewRef,\n      style: [style, !scrollEnabled && styles.scrollDisabled, hideScrollbar && styles.hideScrollbar]\n    }));\n  };\n\n  _proto._handleScrollStart = function _handleScrollStart(e) {\n    this._state.isScrolling = true;\n    this._state.scrollLastTick = Date.now();\n  };\n\n  _proto._handleScrollTick = function _handleScrollTick(e) {\n    var onScroll = this.props.onScroll;\n    this._state.scrollLastTick = Date.now();\n\n    if (onScroll) {\n      onScroll(normalizeScrollEvent(e));\n    }\n  };\n\n  _proto._handleScrollEnd = function _handleScrollEnd(e) {\n    var onScroll = this.props.onScroll;\n    this._state.isScrolling = false;\n\n    if (onScroll) {\n      onScroll(normalizeScrollEvent(e));\n    }\n  };\n\n  _proto._shouldEmitScrollEvent = function _shouldEmitScrollEvent(lastTick, eventThrottle) {\n    var timeSinceLastTick = Date.now() - lastTick;\n    return eventThrottle > 0 && timeSinceLastTick >= eventThrottle;\n  };\n\n  return ScrollViewBase;\n}(Component); // Chrome doesn't support e.preventDefault in this case; touch-action must be\n// used to disable scrolling.\n// https://developers.google.com/web/updates/2017/01/scrolling-intervention\n\n\nScrollViewBase.defaultProps = {\n  scrollEnabled: true,\n  scrollEventThrottle: 0\n};\nexport { ScrollViewBase as default };\nScrollViewBase.propTypes = process.env.NODE_ENV !== \"production\" ? _objectSpread({}, ViewPropTypes, {\n  onMomentumScrollBegin: func,\n  onMomentumScrollEnd: func,\n  onScroll: func,\n  onScrollBeginDrag: func,\n  onScrollEndDrag: func,\n  onTouchMove: func,\n  onWheel: func,\n  removeClippedSubviews: bool,\n  scrollEnabled: bool,\n  scrollEventThrottle: number,\n  showsHorizontalScrollIndicator: bool,\n  showsVerticalScrollIndicator: bool\n}) : {};\nvar styles = StyleSheet.create({\n  scrollDisabled: {\n    touchAction: 'none'\n  },\n  hideScrollbar: {\n    scrollbarWidth: 'none'\n  }\n});"]},"metadata":{},"sourceType":"script"}