@react-native-ohos/slider 5.1.2-rc.1 → 5.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/README.md +2 -2
- package/dist/RNCSliderNativeComponent.js +1 -1
- package/dist/Slider.js +1 -1
- package/dist/components/StepNumber.js +1 -1
- package/dist/components/StepsIndicator.js +1 -1
- package/dist/components/TrackMark.js +1 -1
- package/dist/utils/styles.js +1 -1
- package/harmony/slider/oh-package.json5 +1 -1
- package/harmony/slider.har +0 -0
- package/package.json +1 -1
- package/src/utils/styles.ts +1 -1
- package/.github/Examples/Slider-Android-Example.gif +0 -0
- package/.github/Examples/Slider-Web-Example.gif +0 -0
- package/.github/Examples/Slider-Windows-Example.gif +0 -0
- package/.github/Examples/Slider-iOS-Example.gif +0 -0
- package/.github/ISSUE_TEMPLATE/BUG_REPORT.md +0 -38
- package/.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md +0 -14
- package/.github/ISSUE_TEMPLATE/QUESTION.md +0 -9
- package/.github/PULL_REQUEST_TEMPLATE.md +0 -11
- package/.github/workflows/ReactNativeSlider-CI.yml +0 -231
- package/harmony/slider/README.OpenSource +0 -11
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
|
@@ -4,9 +4,9 @@ This project is based on [react-native-slider@v5.0.0](https://github.com/callsta
|
|
|
4
4
|
|
|
5
5
|
## Documentation
|
|
6
6
|
|
|
7
|
-
[中文](https://
|
|
7
|
+
[中文](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/zh-cn/react-native-community-slider.md)
|
|
8
8
|
|
|
9
|
-
[English](https://
|
|
9
|
+
[English](https://gitcode.com/OpenHarmony-RN/usage-docs/blob/master/en/react-native-community-slider.md)
|
|
10
10
|
|
|
11
11
|
## License
|
|
12
12
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _reactNative=require("react-native");var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var _require=require('react-native/Libraries/NativeComponent/ViewConfigIgnore'),ConditionallyIgnoredEventHandlers=_require.ConditionallyIgnoredEventHandlers;var nativeComponentName='RNCSlider';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _reactNative=require("react-native");var NativeComponentRegistry=require('react-native/Libraries/NativeComponent/NativeComponentRegistry');var _require=require('react-native/Libraries/NativeComponent/ViewConfigIgnore'),ConditionallyIgnoredEventHandlers=_require.ConditionallyIgnoredEventHandlers;var nativeComponentName='RNCSlider';var __INTERNAL_VIEW_CONFIG=exports.__INTERNAL_VIEW_CONFIG={uiViewClassName:'RNCSlider',bubblingEventTypes:{topChange:{phasedRegistrationNames:{captured:'onChangeCapture',bubbled:'onChange'}},topRNCSliderValueChange:{phasedRegistrationNames:{captured:'onRNCSliderValueChangeCapture',bubbled:'onRNCSliderValueChange'}}},directEventTypes:{topRNCSliderSlidingStart:{registrationName:'onRNCSliderSlidingStart'},topRNCSliderSlidingComplete:{registrationName:'onRNCSliderSlidingComplete'}},validAttributes:Object.assign({accessibilityUnits:true,accessibilityIncrements:true,disabled:true,inverted:true,vertical:true,tapToSeek:true,maximumTrackImage:{process:require('react-native/Libraries/Image/resolveAssetSource')},maximumTrackTintColor:{process:require('react-native/Libraries/StyleSheet/processColor').default},maximumValue:true,minimumTrackImage:{process:require('react-native/Libraries/Image/resolveAssetSource')},minimumTrackTintColor:{process:require('react-native/Libraries/StyleSheet/processColor').default},minimumValue:true,step:true,testID:true,thumbImage:{process:require('react-native/Libraries/Image/resolveAssetSource')},thumbTintColor:{process:require('react-native/Libraries/StyleSheet/processColor').default},trackImage:{process:require('react-native/Libraries/Image/resolveAssetSource')},value:true,lowerLimit:true,upperLimit:true},ConditionallyIgnoredEventHandlers({onChange:true,onRNCSliderSlidingStart:true,onRNCSliderSlidingComplete:true,onRNCSliderValueChange:true}))};var _default=exports.default=NativeComponentRegistry.get(nativeComponentName,function(){return __INTERNAL_VIEW_CONFIG;});
|
package/dist/Slider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _index=_interopRequireDefault(require("./index"));var _StepsIndicator=require("./components/StepsIndicator");var _styles=require("./utils/styles");var _constants=require("./utils/constants");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onValueChange","onSlidingStart","onSlidingComplete","onAccessibilityAction","value","minimumValue","maximumValue","step","inverted","tapToSeek","lowerLimit","upperLimit"];var _this=this,_jsxFileName="E:\\
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));var _objectWithoutProperties2=_interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _index=_interopRequireDefault(require("./index"));var _StepsIndicator=require("./components/StepsIndicator");var _styles=require("./utils/styles");var _constants=require("./utils/constants");var _jsxRuntime=require("react/jsx-runtime");var _excluded=["onValueChange","onSlidingStart","onSlidingComplete","onAccessibilityAction","value","minimumValue","maximumValue","step","inverted","tapToSeek","lowerLimit","upperLimit"];var _this=this,_jsxFileName="E:\\gitcode\\rntpc_react-native-slider\\src\\Slider.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var SliderComponent=function SliderComponent(_ref,forwardedRef){var _ref2,_props$accessibilityS;var onValueChange=_ref.onValueChange,onSlidingStart=_ref.onSlidingStart,onSlidingComplete=_ref.onSlidingComplete,onAccessibilityAction=_ref.onAccessibilityAction,_ref$value=_ref.value,value=_ref$value===void 0?_constants.constants.SLIDER_DEFAULT_INITIAL_VALUE:_ref$value,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?1:_ref$maximumValue,_ref$step=_ref.step,step=_ref$step===void 0?0:_ref$step,_ref$inverted=_ref.inverted,inverted=_ref$inverted===void 0?false:_ref$inverted,_ref$tapToSeek=_ref.tapToSeek,tapToSeek=_ref$tapToSeek===void 0?false:_ref$tapToSeek,_ref$lowerLimit=_ref.lowerLimit,lowerLimit=_ref$lowerLimit===void 0?_reactNative.Platform.select({web:minimumValue,default:_constants.constants.LIMIT_MIN_VALUE}):_ref$lowerLimit,_ref$upperLimit=_ref.upperLimit,upperLimit=_ref$upperLimit===void 0?_reactNative.Platform.select({web:maximumValue,default:_constants.constants.LIMIT_MAX_VALUE}):_ref$upperLimit,props=(0,_objectWithoutProperties2.default)(_ref,_excluded);var _useState=(0,_react.useState)((_ref2=value!=null?value:minimumValue)!=null?_ref2:_constants.constants.SLIDER_DEFAULT_INITIAL_VALUE),_useState2=(0,_slicedToArray2.default)(_useState,2),currentValue=_useState2[0],setCurrentValue=_useState2[1];var _useState3=(0,_react.useState)(0),_useState4=(0,_slicedToArray2.default)(_useState3,2),width=_useState4[0],setWidth=_useState4[1];var stepResolution=step?step:_constants.constants.DEFAULT_STEP_RESOLUTION;var defaultStep=(maximumValue-minimumValue)/stepResolution;var stepLength=step||defaultStep;var options=Array.from({length:(step?defaultStep:stepResolution)+1},function(_,index){return minimumValue+index*stepLength;});var defaultStyle=_reactNative.Platform.OS==='ios'||_reactNative.Platform.OS==='harmony'?_styles.styles.defaultSlideriOS:_styles.styles.defaultSlider;var sliderStyle={zIndex:1,width:width};var style=[defaultStyle,props.style];var onValueChangeEvent=function onValueChangeEvent(event){onValueChange&&onValueChange(event.nativeEvent.value);setCurrentValue(event.nativeEvent.value);};var _disabled=typeof props.disabled==='boolean'?props.disabled:((_props$accessibilityS=props.accessibilityState)==null?void 0:_props$accessibilityS.disabled)===true;var _accessibilityState=typeof props.disabled==='boolean'?Object.assign({},props.accessibilityState,{disabled:props.disabled}):props.accessibilityState;var onSlidingStartEvent=onSlidingStart?function(event){onSlidingStart(event.nativeEvent.value);}:null;var onSlidingCompleteEvent=onSlidingComplete?function(event){onSlidingComplete(event.nativeEvent.value);}:null;var onAccessibilityActionEvent=onAccessibilityAction?function(event){onAccessibilityAction(event);}:null;var passedValue=Number.isNaN(value)||!value?undefined:value;(0,_react.useEffect)(function(){if(lowerLimit>=upperLimit){console.warn('Invalid configuration: lower limit is supposed to be smaller than upper limit');}},[lowerLimit,upperLimit]);return(0,_jsxRuntime.jsxs)(_reactNative.View,{onLayout:function onLayout(event){setWidth(event.nativeEvent.layout.width);},style:[style,{justifyContent:'center'}],children:[props.StepMarker||!!props.renderStepNumber?(0,_jsxRuntime.jsx)(_StepsIndicator.StepsIndicator,{options:options,sliderWidth:width,currentValue:currentValue,renderStepNumber:props.renderStepNumber,thumbImage:props.thumbImage,StepMarker:props.StepMarker,isLTR:inverted}):null,(0,_jsxRuntime.jsx)(_index.default,Object.assign({},props,{minimumValue:minimumValue,maximumValue:maximumValue,step:step,inverted:inverted,tapToSeek:tapToSeek,value:passedValue,lowerLimit:lowerLimit,upperLimit:upperLimit,accessibilityState:_accessibilityState,thumbImage:_reactNative.Platform.OS==='web'?props.thumbImage:props.StepMarker||!props.thumbImage?undefined:_reactNative.Image.resolveAssetSource(props.thumbImage),ref:forwardedRef,style:[sliderStyle,defaultStyle,{alignContent:'center',alignItems:'center'}],onChange:onValueChangeEvent,onRNCSliderSlidingStart:onSlidingStartEvent,onRNCSliderSlidingComplete:onSlidingCompleteEvent,onRNCSliderValueChange:onValueChangeEvent,disabled:_disabled,onStartShouldSetResponder:function onStartShouldSetResponder(){return true;},onResponderTerminationRequest:function onResponderTerminationRequest(){return false;},onRNCSliderAccessibilityAction:onAccessibilityActionEvent,thumbTintColor:props.thumbImage&&!!props.StepMarker?'transparent':props.thumbTintColor}))]});};var SliderWithRef=_react.default.forwardRef(SliderComponent);var _default=exports.default=SliderWithRef;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StepNumber=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _styles=require("../utils/styles");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.StepNumber=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _styles=require("../utils/styles");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\gitcode\\rntpc_react-native-slider\\src\\components\\StepNumber.tsx";var StepNumber=exports.StepNumber=function StepNumber(_ref){var i=_ref.i,style=_ref.style;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:_styles.styles.stepNumber,children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:style,children:i})});};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.StepsIndicator=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _StepNumber=require("./StepNumber");var _TrackMark=require("./TrackMark");var _styles=require("../utils/styles");var _constants=require("../utils/constants");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.StepsIndicator=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _StepNumber=require("./StepNumber");var _TrackMark=require("./TrackMark");var _styles=require("../utils/styles");var _constants=require("../utils/constants");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\gitcode\\rntpc_react-native-slider\\src\\components\\StepsIndicator.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}var StepsIndicator=exports.StepsIndicator=function StepsIndicator(_ref){var options=_ref.options,sliderWidth=_ref.sliderWidth,currentValue=_ref.currentValue,StepMarker=_ref.StepMarker,renderStepNumber=_ref.renderStepNumber,thumbImage=_ref.thumbImage,isLTR=_ref.isLTR;var stepNumberFontStyle=(0,_react.useMemo)(function(){return{fontSize:options.length>9?_constants.constants.STEP_NUMBER_TEXT_FONT_SMALL:_constants.constants.STEP_NUMBER_TEXT_FONT_BIG};},[options.length]);var values=isLTR?options.reverse():options;var renderStepIndicator=(0,_react.useCallback)(function(i,index){return(0,_jsxRuntime.jsx)(_react.Fragment,{children:(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_styles.styles.stepIndicatorElement,children:[(0,_jsxRuntime.jsx)(_TrackMark.SliderTrackMark,{isTrue:currentValue===i,index:i,thumbImage:thumbImage,StepMarker:StepMarker,currentValue:currentValue,min:options[0],max:options[options.length-1]},`${index}-SliderTrackMark`),renderStepNumber?(0,_jsxRuntime.jsx)(_StepNumber.StepNumber,{i:i,style:stepNumberFontStyle},`${index}th-step`):null]},`${index}-View`)},index);},[currentValue,StepMarker,options,thumbImage,renderStepNumber,stepNumberFontStyle]);return(0,_jsxRuntime.jsx)(_reactNative.View,{pointerEvents:"none",style:[_styles.styles.stepsIndicator,{marginHorizontal:sliderWidth*_constants.constants.MARGIN_HORIZONTAL_PADDING}],children:values.map(function(i,index){return renderStepIndicator(i,index);})});};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.SliderTrackMark=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _styles=require("../utils/styles");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.SliderTrackMark=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _styles=require("../utils/styles");var _jsxRuntime=require("react/jsx-runtime");var _this=this,_jsxFileName="E:\\gitcode\\rntpc_react-native-slider\\src\\components\\TrackMark.tsx";var SliderTrackMark=exports.SliderTrackMark=function SliderTrackMark(_ref){var isTrue=_ref.isTrue,index=_ref.index,thumbImage=_ref.thumbImage,StepMarker=_ref.StepMarker,currentValue=_ref.currentValue,min=_ref.min,max=_ref.max;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:_styles.styles.trackMarkContainer,children:[StepMarker?(0,_jsxRuntime.jsx)(StepMarker,{stepMarked:isTrue,index:index,currentValue:currentValue,min:min,max:max}):null,thumbImage&&isTrue?(0,_jsxRuntime.jsx)(_reactNative.View,{style:_styles.styles.thumbImageContainer,children:(0,_jsxRuntime.jsx)(_reactNative.Image,{source:thumbImage,style:_styles.styles.thumbImage})}):null]});};
|
package/dist/utils/styles.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:true});exports.styles=void 0;var _reactNative=require("react-native");var styles=exports.styles=_reactNative.StyleSheet.create({stepNumber:{marginTop:20,alignItems:'center',position:'absolute'},sliderMainContainer:{zIndex:1,width:'100%'},defaultSlideriOS:{height:40},defaultSlider:{},stepsIndicator:{flex:1,flexDirection:'row',justifyContent:'space-between',top:_reactNative.Platform.OS==='ios'?10:0,zIndex:2},trackMarkContainer:{alignItems:'center',alignContent:'center',alignSelf:'center',justifyContent:'center',position:'absolute',zIndex:3},thumbImageContainer:{position:'absolute',zIndex:3,justifyContent:'center',alignItems:'center',alignContent:'center'},thumbImage:{alignContent:'center',alignItems:'center',position:'absolute'},stepIndicatorElement:{alignItems:'center',alignContent:'center'},defaultIndicatorMarked:{height:20,width:5,backgroundColor:'#CCCCCC'},defaultIndicatorIdle:{height:10,width:2,backgroundColor:'#C0C0C0'}});
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:true});exports.styles=void 0;var _reactNative=require("react-native");var styles=exports.styles=_reactNative.StyleSheet.create({stepNumber:{marginTop:20,alignItems:'center',position:'absolute'},sliderMainContainer:{zIndex:1,width:'100%'},defaultSlideriOS:{height:40},defaultSlider:{},stepsIndicator:{flex:1,flexDirection:'row',justifyContent:'space-between',top:_reactNative.Platform.OS==='ios'||_reactNative.Platform.OS==='harmony'?10:0,zIndex:2},trackMarkContainer:{alignItems:'center',alignContent:'center',alignSelf:'center',justifyContent:'center',position:'absolute',zIndex:3},thumbImageContainer:{position:'absolute',zIndex:3,justifyContent:'center',alignItems:'center',alignContent:'center'},thumbImage:{alignContent:'center',alignItems:'center',position:'absolute'},stepIndicatorElement:{alignItems:'center',alignContent:'center'},defaultIndicatorMarked:{height:20,width:5,backgroundColor:'#CCCCCC'},defaultIndicatorIdle:{height:10,width:2,backgroundColor:'#C0C0C0'}});
|
package/harmony/slider.har
CHANGED
|
Binary file
|
package/package.json
CHANGED
package/src/utils/styles.ts
CHANGED
|
@@ -21,7 +21,7 @@ export const styles = StyleSheet.create({
|
|
|
21
21
|
flex: 1,
|
|
22
22
|
flexDirection: 'row',
|
|
23
23
|
justifyContent: 'space-between',
|
|
24
|
-
top: Platform.OS === 'ios' ? 10 : 0,
|
|
24
|
+
top: Platform.OS === 'ios' || Platform.OS === 'harmony' ? 10 : 0,
|
|
25
25
|
zIndex: 2,
|
|
26
26
|
},
|
|
27
27
|
trackMarkContainer: {
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 🐛 Report a bug
|
|
3
|
-
about: Report a bug or regression in React Native Slider.
|
|
4
|
-
labels: 'bug report'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Environment
|
|
8
|
-
|
|
9
|
-
<!--
|
|
10
|
-
IMPORTANT
|
|
11
|
-
Provide us with all the below information. We need it to make sure we understand the issue you experience and to set up the environment to actually work on the fix.
|
|
12
|
-
|
|
13
|
-
MAKE SURE TO USE THE LATEST VERSION OF SLIDER
|
|
14
|
-
-->
|
|
15
|
-
|
|
16
|
-
* react-native info output:
|
|
17
|
-
```
|
|
18
|
-
// react-native info
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
* are you using the new architecture?
|
|
22
|
-
|
|
23
|
-
* which version of react & react-native are you using?
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
## Description
|
|
27
|
-
|
|
28
|
-
<!--
|
|
29
|
-
Describe your issue in detail. Include screenshots or recordings.
|
|
30
|
-
-->
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
## Reproducible Demo
|
|
34
|
-
|
|
35
|
-
<!--
|
|
36
|
-
Let us know how to reproduce the issue. Include a code sample and share a project that reproduces the issue.
|
|
37
|
-
PLEASE follow the guidelines for providing a minimal example: https://stackoverflow.com/help/mcve.
|
|
38
|
-
-->
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: 🗣 Feature request
|
|
3
|
-
about: Request a React Native Slider feature.
|
|
4
|
-
labels: 'feature request'
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## Describe the Feature
|
|
8
|
-
<!-- Describe the requested feature -->
|
|
9
|
-
|
|
10
|
-
## Possible Implementations
|
|
11
|
-
<!-- Describe how to implement the feature -->
|
|
12
|
-
|
|
13
|
-
## Related Issues
|
|
14
|
-
<!-- Link related issues here -->
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Summary:
|
|
2
|
-
---------
|
|
3
|
-
|
|
4
|
-
<!-- Thank you for sending the PR! We appreciate you spending the time to work on these changes.
|
|
5
|
-
Help us understand your motivation by explaining why you decided to make this change: -->
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Test Plan:
|
|
9
|
-
----------
|
|
10
|
-
|
|
11
|
-
<!-- Write your test plan here (**REQUIRED**). If you changed any code, please provide us with clear instructions on how you verified your changes work. Bonus points for screenshots and videos! Increase test coverage whenever possible. -->
|
|
@@ -1,231 +0,0 @@
|
|
|
1
|
-
name: ReactNativeSlider-CI
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches:
|
|
6
|
-
- 'main'
|
|
7
|
-
- 'release/**'
|
|
8
|
-
pull_request:
|
|
9
|
-
types: [opened, reopened, synchronize]
|
|
10
|
-
|
|
11
|
-
jobs:
|
|
12
|
-
install:
|
|
13
|
-
name: Install dependencies
|
|
14
|
-
runs-on: ubuntu-latest
|
|
15
|
-
|
|
16
|
-
steps:
|
|
17
|
-
- name: Checkout repository
|
|
18
|
-
uses: actions/checkout@v3
|
|
19
|
-
|
|
20
|
-
- name: Cache node modules
|
|
21
|
-
id: cache-package-npm
|
|
22
|
-
uses: actions/cache@v3.0.7
|
|
23
|
-
env:
|
|
24
|
-
cache-name: cached-ci-npm-deps
|
|
25
|
-
with:
|
|
26
|
-
path: ./package/node_modules
|
|
27
|
-
key: ${{ hashFiles('./package/package.json') }}
|
|
28
|
-
|
|
29
|
-
- name: Install required dependencies on cache miss (npm)
|
|
30
|
-
if: steps.cache-package-npm.outputs.cache-hit != 'true'
|
|
31
|
-
run: |
|
|
32
|
-
npm install
|
|
33
|
-
|
|
34
|
-
verify-package-sources:
|
|
35
|
-
name: Lint the sources
|
|
36
|
-
runs-on: ubuntu-latest
|
|
37
|
-
needs: install
|
|
38
|
-
|
|
39
|
-
steps:
|
|
40
|
-
- name: Checkout repository
|
|
41
|
-
uses: actions/checkout@v3
|
|
42
|
-
|
|
43
|
-
- name: Pull npm dependencies
|
|
44
|
-
uses: actions/cache@v3.0.7
|
|
45
|
-
with:
|
|
46
|
-
path: ./package/node_modules
|
|
47
|
-
key: ${{ hashFiles('./package/package.json') }}
|
|
48
|
-
|
|
49
|
-
- name: Run ESLint on the sources
|
|
50
|
-
run: cd package && npx eslint src
|
|
51
|
-
|
|
52
|
-
- name: Run TypeScript on the sources
|
|
53
|
-
run: cd package && npx tsc --noEmit
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
test:
|
|
57
|
-
name: Run the unit tests
|
|
58
|
-
runs-on: ubuntu-latest
|
|
59
|
-
needs: install
|
|
60
|
-
|
|
61
|
-
steps:
|
|
62
|
-
- name: Checkout repository
|
|
63
|
-
uses: actions/checkout@v3
|
|
64
|
-
|
|
65
|
-
- name: Pull npm dependencies
|
|
66
|
-
uses: actions/cache@v3.0.7
|
|
67
|
-
with:
|
|
68
|
-
path: ./package/node_modules
|
|
69
|
-
key: ${{ hashFiles('./package/package.json') }}
|
|
70
|
-
|
|
71
|
-
- name: Run unit tests
|
|
72
|
-
run: cd package && npx jest src
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
verify-example-sources:
|
|
76
|
-
name: Verify example app sources
|
|
77
|
-
runs-on: ubuntu-latest
|
|
78
|
-
|
|
79
|
-
steps:
|
|
80
|
-
- name: Checkout repository
|
|
81
|
-
uses: actions/checkout@v3
|
|
82
|
-
|
|
83
|
-
- name: Install dependencies
|
|
84
|
-
run: npm install
|
|
85
|
-
|
|
86
|
-
- name: Run ESLint on the sources
|
|
87
|
-
run: cd example && npx eslint .
|
|
88
|
-
|
|
89
|
-
- name: Run TypeScript on the sources
|
|
90
|
-
run: cd example && npx tsc --noEmit
|
|
91
|
-
|
|
92
|
-
build-android-app:
|
|
93
|
-
name: Build example app Android
|
|
94
|
-
runs-on: ubuntu-latest
|
|
95
|
-
needs: [verify-example-sources]
|
|
96
|
-
|
|
97
|
-
steps:
|
|
98
|
-
- uses: actions/checkout@v3
|
|
99
|
-
|
|
100
|
-
- name: Pull the npm dependencies
|
|
101
|
-
run: npm install
|
|
102
|
-
|
|
103
|
-
- uses: actions/setup-java@v3
|
|
104
|
-
with:
|
|
105
|
-
distribution: 'zulu'
|
|
106
|
-
java-version: '11'
|
|
107
|
-
|
|
108
|
-
- name: Build the Android OS app
|
|
109
|
-
run: cd example/android && ./gradlew assembleDebug
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
build-iOS-app:
|
|
113
|
-
name: Build example app iOS
|
|
114
|
-
runs-on: macos-latest
|
|
115
|
-
needs: [verify-example-sources]
|
|
116
|
-
steps:
|
|
117
|
-
- uses: actions/checkout@v3
|
|
118
|
-
|
|
119
|
-
- name: Cache node modules
|
|
120
|
-
id: cache-npm
|
|
121
|
-
uses: actions/cache@v3
|
|
122
|
-
env:
|
|
123
|
-
cache-name: cached-ios-npm-deps
|
|
124
|
-
with:
|
|
125
|
-
path: example/node_modules
|
|
126
|
-
key: ${{ hashFiles('./example/package-lock.json') }}-${{ hashFiles('./package/package-lock.json') }}
|
|
127
|
-
|
|
128
|
-
- name: Install required dependencies on cache miss (npm)
|
|
129
|
-
if: steps.cache-npm.outputs.cache-hit != 'true'
|
|
130
|
-
run: |
|
|
131
|
-
npm install
|
|
132
|
-
|
|
133
|
-
- name: Cache Pods
|
|
134
|
-
id: cache-pods
|
|
135
|
-
uses: actions/cache@v3
|
|
136
|
-
env:
|
|
137
|
-
cache-name: cached-ios-pods-deps
|
|
138
|
-
with:
|
|
139
|
-
path: example/ios/Pods
|
|
140
|
-
key: ${{ hashFiles('./example/ios/Podfile.lock') }}
|
|
141
|
-
|
|
142
|
-
- name: Install required dependencies on cache miss (Pods)
|
|
143
|
-
if: steps.cache-pods.outputs.cache-hit != 'true'
|
|
144
|
-
run: |
|
|
145
|
-
cd example/ios && pod install
|
|
146
|
-
|
|
147
|
-
- name: Reinstall Pods only if using cached ones
|
|
148
|
-
if: steps.cache-pods.outputs.cache-hit == 'true'
|
|
149
|
-
run: cd example/ios && pod install
|
|
150
|
-
|
|
151
|
-
- name: Use the current package sources in build
|
|
152
|
-
run: cd example && npm run refresh-package
|
|
153
|
-
|
|
154
|
-
- name: Build iOS
|
|
155
|
-
run: |
|
|
156
|
-
device_name='iPhone 13'
|
|
157
|
-
device=$(xcrun simctl list devices "${device_name}" available | grep "${device_name} (")
|
|
158
|
-
re='\(([-0-9A-Fa-f]+)\)'
|
|
159
|
-
[[ $device =~ $re ]] || exit 1
|
|
160
|
-
xcodebuild -workspace example.xcworkspace -scheme example -destination "platform=iOS Simulator,id=${BASH_REMATCH[1]}" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO build
|
|
161
|
-
working-directory: example/ios
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
build-iOS-new-arch-app:
|
|
165
|
-
name: Build example app iOS (Fabric)
|
|
166
|
-
runs-on: macos-latest
|
|
167
|
-
needs: [build-iOS-app]
|
|
168
|
-
steps:
|
|
169
|
-
- uses: actions/checkout@v3
|
|
170
|
-
|
|
171
|
-
- name: Cache node modules
|
|
172
|
-
id: cache-npm
|
|
173
|
-
uses: actions/cache@v3
|
|
174
|
-
env:
|
|
175
|
-
cache-name: cached-ios-npm-deps
|
|
176
|
-
with:
|
|
177
|
-
path: example/node_modules
|
|
178
|
-
key: new-arch-${{ hashFiles('./example/package-lock.json') }}-${{ hashFiles('./package/package-lock.json') }}
|
|
179
|
-
|
|
180
|
-
- name: Install required dependencies on cache miss (npm)
|
|
181
|
-
if: steps.cache-npm.outputs.cache-hit != 'true'
|
|
182
|
-
run: |
|
|
183
|
-
npm install
|
|
184
|
-
|
|
185
|
-
- name: Cache Pods
|
|
186
|
-
id: cache-pods
|
|
187
|
-
uses: actions/cache@v3
|
|
188
|
-
env:
|
|
189
|
-
cache-name: cached-ios-pods-deps
|
|
190
|
-
with:
|
|
191
|
-
path: example/ios/Pods
|
|
192
|
-
key: new-arch-${{ hashFiles('./example/ios/Podfile.lock') }}
|
|
193
|
-
|
|
194
|
-
- name: Install required dependencies on cache miss (Pods)
|
|
195
|
-
if: steps.cache-pods.outputs.cache-hit != 'true'
|
|
196
|
-
run: |
|
|
197
|
-
cd example/ios && RCT_NEW_ARCH_ENABLED=1 pod install
|
|
198
|
-
|
|
199
|
-
- name: Reinstall Pods only if using cached ones
|
|
200
|
-
if: steps.cache-pods.outputs.cache-hit == 'true'
|
|
201
|
-
run: cd example/ios && RCT_NEW_ARCH_ENABLED=1 pod install
|
|
202
|
-
|
|
203
|
-
- name: Use the current package sources in build
|
|
204
|
-
run: cd example && npm run refresh-package
|
|
205
|
-
|
|
206
|
-
- name: Build iOS - Fabric
|
|
207
|
-
run: |
|
|
208
|
-
device_name='iPhone 13'
|
|
209
|
-
device=$(xcrun simctl list devices "${device_name}" available | grep "${device_name} (")
|
|
210
|
-
re='\(([-0-9A-Fa-f]+)\)'
|
|
211
|
-
[[ $device =~ $re ]] || exit 1
|
|
212
|
-
xcodebuild -workspace example.xcworkspace -scheme example -destination "platform=iOS Simulator,id=${BASH_REMATCH[1]}" CODE_SIGNING_ALLOWED=NO COMPILER_INDEX_STORE_ENABLE=NO build
|
|
213
|
-
working-directory: example/ios
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
build-Windows-app:
|
|
217
|
-
name: Build example app Windows
|
|
218
|
-
runs-on: windows-latest
|
|
219
|
-
needs: [verify-example-sources]
|
|
220
|
-
steps:
|
|
221
|
-
- name: Ensure the cross-platform Git on Windows
|
|
222
|
-
run: git config --global core.autocrlf false
|
|
223
|
-
|
|
224
|
-
- name: Checkout repository
|
|
225
|
-
uses: actions/checkout@v3
|
|
226
|
-
|
|
227
|
-
- name: Install dependencies
|
|
228
|
-
run: npm install
|
|
229
|
-
|
|
230
|
-
- name: Build the Windows OS app
|
|
231
|
-
run: cd example; npx react-native run-windows --arch x64 --no-launch --no-deploy --logging
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"Name": "react-native-slider",
|
|
4
|
-
"License": "MIT License",
|
|
5
|
-
"License File":"https://github.com/callstack/react-native-slider/blob/main/LICENSE.md",
|
|
6
|
-
"Version Number": "5.1.2-rc.1",
|
|
7
|
-
"Owner" : ""
|
|
8
|
-
"Upstream URL": "https://github.com/callstack/react-native-slider",
|
|
9
|
-
"Description": "React Native component used to select a single value from a range of values."
|
|
10
|
-
}
|
|
11
|
-
]
|