ecency-mobile/patches/@esteemapp+react-native-slider+0.12.0.patch

31 lines
29 KiB
Diff
Raw Normal View History

2022-10-24 15:33:04 +03:00
diff --git a/node_modules/@esteemapp/react-native-slider/lib/Slider.js b/node_modules/@esteemapp/react-native-slider/lib/Slider.js
index 8e2eb9e..7a1630c 100644
--- a/node_modules/@esteemapp/react-native-slider/lib/Slider.js
+++ b/node_modules/@esteemapp/react-native-slider/lib/Slider.js
@@ -1 +1 @@
-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 _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));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 _propTypes=_interopRequireDefault(require("prop-types"));var _jsxFileName="/Users/f/pjs/react-native-slider/src/Slider.js";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(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var TRACK_SIZE=4;var THUMB_SIZE=20;function Rect(x,y,width,height){this.x=x;this.y=y;this.width=width;this.height=height;}Rect.prototype.containsPoint=function(x,y){return x>=this.x&&y>=this.y&&x<=this.x+this.width&&y<=this.y+this.height;};var DEFAULT_ANIMATION_CONFIGS={spring:{friction:7,tension:100},timing:{duration:150,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),delay:0}};var Slider=function(_PureComponent){(0,_inherits2.default)(Slider,_PureComponent);function Slider(_props){var _this;(0,_classCallCheck2.default)(this,Slider);_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(Slider).call(this,_props));_this._handleStartShouldSetPanResponder=function(e){return _this._thumbHitTest(e);};_this._handlePanResponderGrant=function(){_this._previousLeft=_this._getThumbLeft(_this._getCurrentValue());_this._fireChangeEvent('onSlidingStart');};_this._handlePanResponderMove=function(e,gestureState){if(_this.props.disabled){return;}_this._setCurrentValue(_this._getValue(gestureState));_this._fireChangeEvent('onValueChange');};_this._handlePanResponderEnd=function(e,gestureState){if(_this.props.disabled){return;}_this._setCurrentValue(_this._getValue(gestureState));_this._fireChangeEvent('onSlidingComplete');};_this._measureContainer=function(x){_this._handleMeasure('containerSize',x);};_this._measureTrack=function(x){_this._handleMeasure('trackSize',x);};_this._measureThumb=function(x){_this._handleMeasure('thumbSize',x);};_this._handleMeasure=function(name,x){var _x$nativeEvent$layout=x.nativeEvent.layout,width=_x$nativeEvent$layout.width,height=_x$nativeEvent$layout.height;var size={width:width,height:height};var storeName="_"+name;var currentSize=_this[storeName];if(currentSize&&width===currentSize.width&&height===currentSize.height){return;}_this[storeName]=size;if(_this._containerSize&&_this._trackSize&&_this._thumbSize){_this.setState({containerSize:_this._containerSize,trackSize:_this._trackSize,thumbSize:_this._thumbSize,allMeasured:true});}};_this._getRatio=function(value){retu
\ No newline at end of file
+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 _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _extends2=_interopRequireDefault(require("@babel/runtime/helpers/extends"));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 _depPropTypes=require("deprecated-react-native-prop-types");var _reactNative=require("react-native");var _propTypes=_interopRequireDefault(require("prop-types"));var _jsxFileName="/Users/f/pjs/react-native-slider/src/Slider.js";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(Object(source),true).forEach(function(key){(0,_defineProperty2.default)(target,key,source[key]);});}else if(Object.getOwnPropertyDescriptors){Object.defineProperties(target,Object.getOwnPropertyDescriptors(source));}else{ownKeys(Object(source)).forEach(function(key){Object.defineProperty(target,key,Object.getOwnPropertyDescriptor(source,key));});}}return target;}var TRACK_SIZE=4;var THUMB_SIZE=20;function Rect(x,y,width,height){this.x=x;this.y=y;this.width=width;this.height=height;}Rect.prototype.containsPoint=function(x,y){return x>=this.x&&y>=this.y&&x<=this.x+this.width&&y<=this.y+this.height;};var DEFAULT_ANIMATION_CONFIGS={spring:{friction:7,tension:100},timing:{duration:150,easing:_reactNative.Easing.inOut(_reactNative.Easing.ease),delay:0}};var Slider=function(_PureComponent){(0,_inherits2.default)(Slider,_PureComponent);function Slider(_props){var _this;(0,_classCallCheck2.default)(this,Slider);_this=(0,_possibleConstructorReturn2.default)(this,(0,_getPrototypeOf2.default)(Slider).call(this,_props));_this._handleStartShouldSetPanResponder=function(e){return _this._thumbHitTest(e);};_this._handlePanResponderGrant=function(){_this._previousLeft=_this._getThumbLeft(_this._getCurrentValue());_this._fireChangeEvent('onSlidingStart');};_this._handlePanResponderMove=function(e,gestureState){if(_this.props.disabled){return;}_this._setCurrentValue(_this._getValue(gestureState));_this._fireChangeEvent('onValueChange');};_this._handlePanResponderEnd=function(e,gestureState){if(_this.props.disabled){return;}_this._setCurrentValue(_this._getValue(gestureState));_this._fireChangeEvent('onSlidingComplete');};_this._measureContainer=function(x){_this._handleMeasure('containerSize',x);};_this._measureTrack=function(x){_this._handleMeasure('trackSize',x);};_this._measureThumb=function(x){_this._handleMeasure('thumbSize',x);};_this._handleMeasure=function(name,x){var _x$nativeEvent$layout=x.nativeEvent.layout,width=_x$nativeEvent$layout.width,height=_x$nativeEvent$layout.height;var size={width:width,height:height};var storeName="_"+name;var currentSize=_this[storeName];if(currentSize&&width===currentSize.width&&height===currentSize.height){return;}_this[storeName]=size;if(_this._containerSize&&_this._trackSize&&_this._thumbSize){_this.setState({containerSize:_this._containerSize,trackSize:_this._trackSize,thumbSize:_this._thum
\ No newline at end of file
2022-10-24 14:49:43 +03:00
diff --git a/node_modules/@esteemapp/react-native-slider/src/Slider.js b/node_modules/@esteemapp/react-native-slider/src/Slider.js
index 62a724f..7733ac9 100644
--- a/node_modules/@esteemapp/react-native-slider/src/Slider.js
+++ b/node_modules/@esteemapp/react-native-slider/src/Slider.js
@@ -12,6 +12,7 @@ import {
} from 'react-native';
import PropTypes from 'prop-types';
+import { ImagePropTypes } from 'deprecated-react-native-prop-types';
const TRACK_SIZE = 4;
const THUMB_SIZE = 20;
@@ -146,7 +147,7 @@ export default class Slider extends PureComponent {
/**
* Sets an image for the thumb.
*/
- thumbImage: Image.propTypes.source,
+ thumbImage: ImagePropTypes.source,
/**
* Set this to true to visually see the thumb touch rect in green.