@react-native-ohos/slider 5.0.1-rc.1

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.
Files changed (56) hide show
  1. package/LICENSE +9 -0
  2. package/README.OpenSource +11 -0
  3. package/README.md +13 -0
  4. package/dist/RNCSliderNativeComponent.js +1 -0
  5. package/dist/Slider.js +1 -0
  6. package/dist/components/StepNumber.js +1 -0
  7. package/dist/components/StepsIndicator.js +1 -0
  8. package/dist/components/TrackMark.js +1 -0
  9. package/dist/index.js +1 -0
  10. package/dist/utils/constants.js +1 -0
  11. package/dist/utils/styles.js +1 -0
  12. package/harmony/slider/.idea/misc.xml +6 -0
  13. package/harmony/slider/.idea/modules.xml +8 -0
  14. package/harmony/slider/.idea/slider.iml +8 -0
  15. package/harmony/slider/LICENSE +21 -0
  16. package/harmony/slider/OAT.xml +42 -0
  17. package/harmony/slider/README.OpenSource +11 -0
  18. package/harmony/slider/build-profile.json5 +8 -0
  19. package/harmony/slider/hvigorfile.ts +1 -0
  20. package/harmony/slider/index.ets +25 -0
  21. package/harmony/slider/obfuscation-rules.txt +18 -0
  22. package/harmony/slider/oh-package-lock.json5 +18 -0
  23. package/harmony/slider/oh-package.json5 +11 -0
  24. package/harmony/slider/src/main/cpp/CMakeLists.txt +7 -0
  25. package/harmony/slider/src/main/cpp/ComponentDescriptor.h +36 -0
  26. package/harmony/slider/src/main/cpp/EventEmitters.cpp +68 -0
  27. package/harmony/slider/src/main/cpp/EventEmitters.h +67 -0
  28. package/harmony/slider/src/main/cpp/Props.cpp +49 -0
  29. package/harmony/slider/src/main/cpp/Props.h +56 -0
  30. package/harmony/slider/src/main/cpp/ShadowNodes.cpp +33 -0
  31. package/harmony/slider/src/main/cpp/ShadowNodes.h +46 -0
  32. package/harmony/slider/src/main/cpp/SliderEventEmiRequestHandler.h +93 -0
  33. package/harmony/slider/src/main/cpp/SliderJSIBinder.h +67 -0
  34. package/harmony/slider/src/main/cpp/SliderNapiBinder.h +47 -0
  35. package/harmony/slider/src/main/cpp/SliderPackage.h +53 -0
  36. package/harmony/slider/src/main/ets/Logger.ets +64 -0
  37. package/harmony/slider/src/main/ets/Slider.ets +182 -0
  38. package/harmony/slider/src/main/ets/SliderDescriptorWrapper.ets +78 -0
  39. package/harmony/slider/src/main/module.json5 +9 -0
  40. package/harmony/slider/src/main/resources/base/element/color.json +8 -0
  41. package/harmony/slider/src/main/resources/base/element/string.json +16 -0
  42. package/harmony/slider/src/main/resources/base/media/icon.png +0 -0
  43. package/harmony/slider/src/main/resources/base/profile/main_pages.json +5 -0
  44. package/harmony/slider/src/main/resources/en_US/element/string.json +16 -0
  45. package/harmony/slider/src/main/resources/zh_CN/element/string.json +16 -0
  46. package/harmony/slider.har +0 -0
  47. package/package.json +98 -0
  48. package/src/RNCSliderNativeComponent.ts +47 -0
  49. package/src/Slider.tsx +350 -0
  50. package/src/components/StepNumber.tsx +17 -0
  51. package/src/components/StepsIndicator.tsx +83 -0
  52. package/src/components/TrackMark.tsx +50 -0
  53. package/src/index.ts +3 -0
  54. package/src/utils/constants.ts +11 -0
  55. package/src/utils/styles.ts +55 -0
  56. package/typings/index.d.ts +208 -0
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 react-native-community
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,11 @@
1
+ [
2
+ {
3
+ "Name": "@react-native-community/slider",
4
+ "License": "MIT License",
5
+ "License File": " LICENSE.md ",
6
+ "Version Number": "5.0.0",
7
+ "Owner" : "xiafeng@huawei.com",
8
+ "Upstream URL": "https://github.com/callstack/react-native-slider",
9
+ "Description": "React Native component exposing Slider from iOS and SeekBar from Android"
10
+ }
11
+ ]
package/README.md ADDED
@@ -0,0 +1,13 @@
1
+ # @react-native-ohos/slider
2
+
3
+ This project is based on [react-native-slider](https://github.com/callstack/react-native-slider)
4
+
5
+ ## Documentation
6
+
7
+ [中文](https://gitee.com/react-native-oh-library/usage-docs/blob/master/zh-cn/react-native-community-slider.md)
8
+
9
+ [English](https://gitee.com/react-native-oh-library/usage-docs/blob/master/en/react-native-community-slider.md)
10
+
11
+ ## License
12
+
13
+ This library is licensed under [The MIT License (MIT)](https://github.com/callstack/react-native-slider/blob/main/LICENSE.md)
@@ -0,0 +1 @@
1
+ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.__INTERNAL_VIEW_CONFIG=void 0;var _codegenNativeComponent=_interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));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 ADDED
@@ -0,0 +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:\\old\\rntpc_react-native-slider-yes\\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?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;
@@ -0,0 +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:\\old\\rntpc_react-native-slider-yes\\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})});};
@@ -0,0 +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:\\old\\rntpc_react-native-slider-yes\\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);})});};
@@ -0,0 +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:\\old\\rntpc_react-native-slider-yes\\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/index.js ADDED
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.default=void 0;var RNCSlider=require('./RNCSliderNativeComponent').default;var _default=exports.default=RNCSlider;
@@ -0,0 +1 @@
1
+ Object.defineProperty(exports,"__esModule",{value:true});exports.constants=void 0;var _reactNative=require("react-native");var constants=exports.constants={SLIDER_DEFAULT_INITIAL_VALUE:0,MARGIN_HORIZONTAL_PADDING:0.05,STEP_NUMBER_TEXT_FONT_SMALL:8,STEP_NUMBER_TEXT_FONT_BIG:12,LIMIT_MIN_VALUE:Number.MIN_SAFE_INTEGER,LIMIT_MAX_VALUE:Number.MAX_SAFE_INTEGER,DEFAULT_STEP_RESOLUTION:_reactNative.Platform.OS==='android'?128:1000};
@@ -0,0 +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'}});
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="MarkdownSettingsMigration">
4
+ <option name="stateVersion" value="1" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/slider.iml" filepath="$PROJECT_DIR$/.idea/slider.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="EMPTY_MODULE" version="4">
3
+ <component name="NewModuleRootManager">
4
+ <content url="file://$MODULE_DIR$" />
5
+ <orderEntry type="inheritedJdk" />
6
+ <orderEntry type="sourceFolder" forTests="false" />
7
+ </component>
8
+ </module>
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 react-native-community
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,42 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <configuration>
3
+ <oatconfig>
4
+ <licensefile>LICENSE</licensefile>
5
+ <filefilterlist>
6
+ <filefilter name="copyrightPolicyFilter" desc="Filters for compatibility,license header policies">
7
+ <filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加版权头"/>
8
+ <filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加版权头"/>
9
+ <filteritem type="filename" name="*.proto" desc="资源文件,不需要添加版权头"/>
10
+ <filteritem type="filename" name="*.json" desc="资源文件,不需要添加版权头"/>
11
+ <filteritem type="filename" name="*.test.ts" desc="测试文件,不需要添加版权头"/>
12
+ <filteritem type="filename" name="index.ets" desc="入口文件,不需要添加版权头"/>
13
+ <filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
14
+ <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
15
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
16
+ <filteritem type="filename" name="LICENSE" desc="工程文件,不修改版权头"/>
17
+ </filefilter>
18
+ <filefilter name="defaultPolicyFilter" desc="Filters for compatibility,license header policies">
19
+ <filteritem type="filename" name="hvigorfile.ts" desc="hvigor构建脚本,DevEco Studio自动生成,不需要添加许可证头"/>
20
+ <filteritem type="filename" name="*.json5" desc="hvigor工程配置文件,DevEco Studio自动生成,不需要添加许可证头"/>
21
+ <filteritem type="filename" name="LICENSE" desc="原三方库证书文件无需更改,因此添加过滤"/>
22
+ <filteritem type="filename" name="*.proto" desc="资源文件,不需要添加许可证头"/>
23
+ <filteritem type="filename" name="*.json" desc="资源文件,不需要添加许可证头"/>
24
+ <filteritem type="filename" name="*.test.ts" desc="测试文件,不需要添加版权头"/>
25
+ <filteritem type="filename" name="index.ets" desc="入口文件,不需要添加版权头"/>
26
+ <filteritem type="filepath" name="hvigorw" desc="工程模板,不修改版权头,以防有修改版权风险"/>
27
+ <filteritem type="filepath" name="hvigorw.bat" desc="工程模板,不修改版权头,以防有修改版权风险"/>
28
+ <filteritem type="filepath" name="hvigor/hvigor-wrapper.js" desc="工程模板,不修改版权头,以防有修改版权风险"/>
29
+ </filefilter>
30
+ <filefilter name="binaryFileTypePolicyFilter" desc="Filters for resources files policies">
31
+ <filteritem type="filename" name="icon.png" desc="应用图标"/>
32
+ <filteritem type="filename" name="app_icon.png" desc="应用图标"/>
33
+ <filteritem type="filename" name="warn.png" desc="页面展示图标"/>
34
+ </filefilter>
35
+ </filefilterlist>
36
+ <policylist>
37
+ <policy name="projectPolicy" desc="">
38
+ <policyitem type="license" name="MIT" path=".*" desc="license under the MIT"/>
39
+ </policy>
40
+ </policylist>
41
+ </oatconfig>
42
+ </configuration>
@@ -0,0 +1,11 @@
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": "4.4.3-0.1.3",
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
+ ]
@@ -0,0 +1,8 @@
1
+ {
2
+ "apiType": "stageMode",
3
+ "targets": [
4
+ {
5
+ "name": "default"
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1 @@
1
+ export { harTasks } from '@ohos/hvigor-ohos-plugin';
@@ -0,0 +1,25 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2021 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANT KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ export * from './src/main/ets/Slider'
@@ -0,0 +1,18 @@
1
+ # Define project specific obfuscation rules here.
2
+ # You can include the obfuscation configuration files in the current module's build-profile.json5.
3
+ #
4
+ # For more details, see
5
+ # https://gitee.com/openharmony/arkcompiler_ets_frontend/blob/master/arkguard/README.md
6
+
7
+ # Obfuscation options:
8
+ # -disable-obfuscation: disable all obfuscations
9
+ # -enable-property-obfuscation: obfuscate the property names
10
+ # -enable-toplevel-obfuscation: obfuscate the names in the global scope
11
+ # -compact: remove unnecessary blank spaces and all line feeds
12
+ # -remove-log: remove all console.* statements
13
+ # -print-namecache: print the name cache that contains the mapping from the old names to new names
14
+ # -apply-namecache: reuse the given cache file
15
+
16
+ # Keep options:
17
+ # -keep-property-name: specifies property names that you want to keep
18
+ # -keep-global-name: specifies names that you want to keep in the global scope
@@ -0,0 +1,18 @@
1
+ {
2
+ "meta": {
3
+ "stableOrder": true
4
+ },
5
+ "lockfileVersion": 3,
6
+ "ATTENTION": "THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.",
7
+ "specifiers": {
8
+ "@rnoh/react-native-openharmony@../react_native_openharmony.har": "@rnoh/react-native-openharmony@../react_native_openharmony.har"
9
+ },
10
+ "packages": {
11
+ "@rnoh/react-native-openharmony@../react_native_openharmony.har": {
12
+ "name": "@rnoh/react-native-openharmony",
13
+ "version": "0.77.10",
14
+ "resolved": "../react_native_openharmony.har",
15
+ "registryType": "local"
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@react-native-ohos/slider",
3
+ "version": "5.0.1-rc.1",
4
+ "description": "@react-native-community/slider for HarmonyOS",
5
+ "main": "index.ets",
6
+ "author": "Huawei",
7
+ "license": "MIT",
8
+ "dependencies": {
9
+ "@rnoh/react-native-openharmony": "file:../react_native_openharmony.har"
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ cmake_minimum_required(VERSION 3.13)
2
+ set(CMAKE_VERBOSE_MAKEFILE on)
3
+
4
+ file(GLOB rnoh_slider_SRC CONFIGURE_DEPENDS *.cpp)
5
+ add_library(rnoh_slider SHARED ${rnoh_slider_SRC})
6
+ target_include_directories(rnoh_slider PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
7
+ target_link_libraries(rnoh_slider PUBLIC rnoh)
@@ -0,0 +1,36 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #pragma once
26
+
27
+ #include "ShadowNodes.h"
28
+ #include <react/renderer/core/ConcreteComponentDescriptor.h>
29
+
30
+ namespace facebook {
31
+ namespace react {
32
+
33
+ using RNCSliderComponentDescriptor = ConcreteComponentDescriptor<RNCSliderShadowNode>;
34
+
35
+ } // namespace react
36
+ } // namespace facebook
@@ -0,0 +1,68 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #include <glog/logging.h>
26
+ #include "EventEmitters.h"
27
+
28
+ namespace facebook {
29
+ namespace react {
30
+
31
+ void RNCSliderEventEmitter::onChange(OnChange event) const {
32
+ dispatchEvent("change", [event = std::move(event)](jsi::Runtime &runtime) {
33
+ auto payload = jsi::Object(runtime);
34
+ payload.setProperty(runtime, "value", event.value);
35
+ // payload.setProperty(runtime, "fromUser", event.fromUser);
36
+ return payload;
37
+ });
38
+ }
39
+
40
+ void RNCSliderEventEmitter::onRNCSliderSlidingStart(OnRNCSliderSlidingStart event) const {
41
+ dispatchEvent("rNCSliderSlidingStart", [event = std::move(event)](jsi::Runtime &runtime) {
42
+ auto payload = jsi::Object(runtime);
43
+ payload.setProperty(runtime, "value", event.value);
44
+ // payload.setProperty(runtime, "fromUser", event.fromUser);
45
+ return payload;
46
+ });
47
+ }
48
+
49
+ void RNCSliderEventEmitter::onRNCSliderSlidingComplete(OnRNCSliderSlidingComplete event) const {
50
+ dispatchEvent("rNCSliderSlidingComplete", [event = std::move(event)](jsi::Runtime &runtime) {
51
+ auto payload = jsi::Object(runtime);
52
+ payload.setProperty(runtime, "value", event.value);
53
+ // payload.setProperty(runtime, "fromUser", event.fromUser);
54
+ return payload;
55
+ });
56
+ }
57
+
58
+ void RNCSliderEventEmitter::onRNCSliderValueChange(OnRNCSliderValueChange event) const {
59
+ dispatchEvent("rNCSliderValueChange", [event = std::move(event)](jsi::Runtime &runtime) {
60
+ auto payload = jsi::Object(runtime);
61
+ payload.setProperty(runtime, "value", event.value);
62
+ // payload.setProperty(runtime, "fromUser", event.fromUser);
63
+ return payload;
64
+ });
65
+ }
66
+
67
+ } // namespace react
68
+ } // namespace facebook
@@ -0,0 +1,67 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #pragma once
26
+
27
+ #include <react/renderer/components/view/ViewEventEmitter.h>
28
+ #include <jsi/jsi.h>
29
+
30
+ namespace facebook {
31
+ namespace react {
32
+
33
+ class JSI_EXPORT RNCSliderEventEmitter : public ViewEventEmitter {
34
+ public:
35
+ using ViewEventEmitter::ViewEventEmitter;
36
+
37
+ struct OnChange {
38
+ Float value;
39
+ // bool fromUser;
40
+ };
41
+
42
+ struct OnRNCSliderSlidingStart {
43
+ Float value;
44
+ // bool fromUser;
45
+ };
46
+
47
+ struct OnRNCSliderSlidingComplete {
48
+ Float value;
49
+ // bool fromUser;
50
+ };
51
+
52
+ struct OnRNCSliderValueChange {
53
+ Float value;
54
+ // bool fromUser;
55
+ };
56
+
57
+ void onChange(OnChange value) const;
58
+
59
+ void onRNCSliderSlidingStart(OnRNCSliderSlidingStart value) const;
60
+
61
+ void onRNCSliderSlidingComplete(OnRNCSliderSlidingComplete value) const;
62
+
63
+ void onRNCSliderValueChange(OnRNCSliderValueChange value) const;
64
+ };
65
+
66
+ } // namespace react
67
+ } // namespace facebook
@@ -0,0 +1,49 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #include <react/renderer/core/PropsParserContext.h>
26
+ #include <react/renderer/core/propsConversions.h>
27
+ #include "Props.h"
28
+
29
+ namespace facebook {
30
+ namespace react {
31
+
32
+ RNCSliderProps::RNCSliderProps(
33
+ const PropsParserContext &context,
34
+ const RNCSliderProps &sourceProps,
35
+ const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),
36
+
37
+ // accessibilityUnits(convertRawProp(context, rawProps, "accessibilityUnits", sourceProps.accessibilityUnits, {})),
38
+ // accessibilityIncrements(convertRawProp(context, rawProps, "accessibilityIncrements", sourceProps.accessibilityIncrements, {})),
39
+ // maximumTrackImage(convertRawProp(context, rawProps, "maximumTrackImage", sourceProps.maximumTrackImage, {})),
40
+ maximumTrackTintColor(convertRawProp(context, rawProps, "maximumTrackTintColor", sourceProps.maximumTrackTintColor, {})),
41
+ // minimumTrackImage(convertRawProp(context, rawProps, "minimumTrackImage", sourceProps.minimumTrackImage, {})),
42
+ minimumTrackTintColor(convertRawProp(context, rawProps, "minimumTrackTintColor", sourceProps.minimumTrackTintColor, {})),
43
+ thumbImage(convertRawProp(context, rawProps, "thumbImage", sourceProps.thumbImage, {})),
44
+ thumbTintColor(convertRawProp(context, rawProps, "thumbTintColor", sourceProps.thumbTintColor, {}))
45
+ // trackImage(convertRawProp(context, rawProps, "trackImage", sourceProps.trackImage, {})),
46
+ {}
47
+
48
+ } // namespace react
49
+ } // namespace facebook
@@ -0,0 +1,56 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #pragma once
26
+
27
+ #include <jsi/jsi.h>
28
+ #include <react/renderer/components/image/conversions.h>
29
+ #include <react/renderer/components/view/ViewProps.h>
30
+ #include <react/renderer/core/PropsParserContext.h>
31
+ #include <react/renderer/imagemanager/primitives.h>
32
+ #include <vector>
33
+
34
+ namespace facebook {
35
+ namespace react {
36
+
37
+ class JSI_EXPORT RNCSliderProps final : public ViewProps {
38
+ public:
39
+ RNCSliderProps() = default;
40
+ RNCSliderProps(const PropsParserContext& context, const RNCSliderProps &sourceProps, const RawProps &rawProps);
41
+
42
+ #pragma mark - Props
43
+
44
+ // std::string accessibilityUnits{};
45
+ // std::vector<std::string> accessibilityIncrements{};
46
+ // ImageSource maximumTrackImage{};
47
+ SharedColor maximumTrackTintColor{};
48
+ // ImageSource minimumTrackImage{};
49
+ SharedColor minimumTrackTintColor{};
50
+ ImageSource thumbImage{};
51
+ SharedColor thumbTintColor{};
52
+ // ImageSource trackImage{};
53
+ };
54
+
55
+ } // namespace react
56
+ } // namespace facebook
@@ -0,0 +1,33 @@
1
+ /**
2
+ * MIT License
3
+ *
4
+ * Copyright (C) 2023 Huawei Device Co., Ltd.
5
+ *
6
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ * of this software and associated documentation files (the "Software"), to deal
8
+ * in the Software without restriction, including without limitation the rights
9
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ * copies of the Software, and to permit persons to whom the Software is
11
+ * furnished to do so, subject to the following conditions:
12
+ *
13
+ * The above copyright notice and this permission notice shall be included in all
14
+ * copies or substantial portions of the Software.
15
+ *
16
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ * SOFTWARE.
23
+ */
24
+
25
+ #include "ShadowNodes.h"
26
+
27
+ namespace facebook {
28
+ namespace react {
29
+
30
+ extern const char RNCSliderComponentName[] = "RNCSlider";
31
+
32
+ } // namespace react
33
+ } // namespace facebook