@ray-js/components 0.5.4 → 0.5.6-beta-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.
- package/lib/Button/Button.native.js +229 -0
- package/lib/Button/Button.wechat.js +2 -2
- package/lib/Checkbox/Checkbox.native.js +118 -0
- package/lib/Checkbox/Checkbox.wechat.js +2 -2
- package/lib/CheckboxGroup/CheckboxGroup.native.js +99 -0
- package/lib/CheckboxGroup/CheckboxGroup.wechat.js +2 -2
- package/lib/ClickableSimplified/index.native.js +166 -0
- package/lib/CoverView/CoverView.js +7 -1
- package/lib/DatePicker/DatePicker.native.js +449 -0
- package/lib/DatePicker/DatePicker.wechat.js +2 -2
- package/lib/Form/Form.native.js +8 -0
- package/lib/Form/Form.wechat.js +2 -2
- package/lib/Icon/Icon.native.js +48 -0
- package/lib/Image/Image.native.js +219 -0
- package/lib/Image/Image.wechat.js +2 -2
- package/lib/Input/Input.native.js +212 -0
- package/lib/Input/Input.wechat.js +2 -2
- package/lib/IpcPlayer/IpcPlayer.js +7 -1
- package/lib/Label/Label.native.js +29 -0
- package/lib/Label/Label.wechat.js +2 -2
- package/lib/LinearGradient/LinearGradient.native.js +60 -0
- package/lib/Modal/Modal.native.js +98 -0
- package/lib/Motion/Fade/index.native.js +3 -0
- package/lib/Motion/PullUp/index.native.js +3 -0
- package/lib/Motion/PushDown/index.native.js +3 -0
- package/lib/Motion/ScaleFadeIn/index.native.js +3 -0
- package/lib/Motion/ScalePullDown/index.native.js +3 -0
- package/lib/PageContainer/PageContainer.js +90 -1
- package/lib/PageContainer/PageContainer.wechat.js +2 -2
- package/lib/Picker/Picker.native.js +181 -0
- package/lib/Picker/Picker.wechat.js +2 -2
- package/lib/PickerView/PickerView.native.js +175 -0
- package/lib/PickerView/PickerView.wechat.js +4 -5
- package/lib/PickerViewColumn/PickerViewColumn.native.js +175 -0
- package/lib/RadialGradient/RadialGradient.native.js +52 -0
- package/lib/Radio/Radio.native.js +132 -0
- package/lib/Radio/Radio.wechat.js +2 -2
- package/lib/RadioGroup/RadioGroup.native.js +99 -0
- package/lib/RadioGroup/RadioGroup.wechat.js +2 -2
- package/lib/ScrollView/ScrollView.native.js +283 -0
- package/lib/ScrollView/ScrollView.wechat.js +2 -2
- package/lib/Slider/Slider.native.js +114 -0
- package/lib/Slider/Slider.wechat.js +2 -2
- package/lib/Swiper/Swiper.native.js +68 -0
- package/lib/Swiper/Swiper.wechat.js +3 -4
- package/lib/SwiperItem/SwiperItem.js +14 -1
- package/lib/Switch/Switch.native.js +128 -0
- package/lib/Switch/Switch.wechat.js +2 -2
- package/lib/Text/Text.native.js +37 -0
- package/lib/Text/Text.wechat.js +2 -2
- package/lib/Textarea/Textarea.native.js +26 -0
- package/lib/Textarea/Textarea.wechat.js +2 -2
- package/lib/TimePicker/TimePicker.native.js +319 -0
- package/lib/TimePicker/TimePicker.wechat.js +2 -2
- package/lib/View/View.native.js +35 -0
- package/lib/View/View.wechat.js +3 -3
- package/package.json +7 -7
- package/lib/Button/Button.android.js +0 -1
- package/lib/Button/Button.ios.js +0 -1
- package/lib/Button/Button.web.js +0 -15
- package/lib/Button/index.android.js +0 -1
- package/lib/Button/index.ios.js +0 -1
- package/lib/Button/index.tuya.js +0 -3
- package/lib/Button/index.web.js +0 -3
- package/lib/Button/index.wechat.js +0 -3
- package/lib/Button/props.android.js +0 -1
- package/lib/Button/props.ios.js +0 -1
- package/lib/Button/props.tuya.js +0 -10
- package/lib/Button/props.web.js +0 -10
- package/lib/Button/props.wechat.js +0 -10
- package/lib/Checkbox/Checkbox.android.js +0 -1
- package/lib/Checkbox/Checkbox.ios.js +0 -1
- package/lib/Checkbox/Checkbox.web.js +0 -10
- package/lib/Checkbox/index.android.js +0 -1
- package/lib/Checkbox/index.ios.js +0 -1
- package/lib/Checkbox/index.tuya.js +0 -3
- package/lib/Checkbox/index.web.js +0 -3
- package/lib/Checkbox/index.wechat.js +0 -3
- package/lib/Checkbox/props.android.js +0 -1
- package/lib/Checkbox/props.ios.js +0 -1
- package/lib/Checkbox/props.tuya.js +0 -1
- package/lib/Checkbox/props.web.js +0 -1
- package/lib/Checkbox/props.wechat.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.android.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.ios.js +0 -1
- package/lib/CheckboxGroup/CheckboxGroup.web.js +0 -52
- package/lib/CheckboxGroup/index.android.js +0 -1
- package/lib/CheckboxGroup/index.ios.js +0 -1
- package/lib/CheckboxGroup/index.tuya.js +0 -3
- package/lib/CheckboxGroup/index.web.js +0 -3
- package/lib/CheckboxGroup/index.wechat.js +0 -3
- package/lib/CheckboxGroup/props.android.js +0 -1
- package/lib/CheckboxGroup/props.ios.js +0 -1
- package/lib/CheckboxGroup/props.tuya.js +0 -1
- package/lib/CheckboxGroup/props.web.js +0 -1
- package/lib/CheckboxGroup/props.wechat.js +0 -1
- package/lib/ClickableSimplified/index.android.js +0 -1
- package/lib/ClickableSimplified/index.ios.js +0 -1
- package/lib/CoverView/CoverView.android.js +0 -1
- package/lib/CoverView/CoverView.ios.js +0 -1
- package/lib/CoverView/CoverView.web.js +0 -7
- package/lib/CoverView/index.android.js +0 -1
- package/lib/CoverView/index.ios.js +0 -1
- package/lib/CoverView/index.tuya.js +0 -2
- package/lib/CoverView/index.web.js +0 -2
- package/lib/CoverView/index.wechat.js +0 -2
- package/lib/CoverView/props.android.js +0 -1
- package/lib/CoverView/props.ios.js +0 -1
- package/lib/CoverView/props.tuya.js +0 -1
- package/lib/CoverView/props.web.js +0 -1
- package/lib/CoverView/props.wechat.js +0 -1
- package/lib/DatePicker/DatePicker.android.js +0 -1
- package/lib/DatePicker/DatePicker.ios.js +0 -1
- package/lib/DatePicker/DatePicker.web.js +0 -61
- package/lib/DatePicker/index.android.js +0 -1
- package/lib/DatePicker/index.ios.js +0 -1
- package/lib/DatePicker/index.tuya.js +0 -3
- package/lib/DatePicker/index.web.js +0 -3
- package/lib/DatePicker/index.wechat.js +0 -3
- package/lib/DatePicker/props.android.js +0 -1
- package/lib/DatePicker/props.ios.js +0 -1
- package/lib/DatePicker/props.tuya.js +0 -7
- package/lib/DatePicker/props.web.js +0 -7
- package/lib/DatePicker/props.wechat.js +0 -7
- package/lib/Form/Form.android.js +0 -1
- package/lib/Form/Form.ios.js +0 -1
- package/lib/Form/Form.web.js +0 -37
- package/lib/Form/index.android.js +0 -1
- package/lib/Form/index.ios.js +0 -1
- package/lib/Form/index.tuya.js +0 -3
- package/lib/Form/index.web.js +0 -3
- package/lib/Form/index.wechat.js +0 -3
- package/lib/Form/props.android.js +0 -1
- package/lib/Form/props.ios.js +0 -1
- package/lib/Form/props.tuya.js +0 -1
- package/lib/Form/props.web.js +0 -1
- package/lib/Form/props.wechat.js +0 -1
- package/lib/Icon/Icon.android.js +0 -1
- package/lib/Icon/Icon.ios.js +0 -1
- package/lib/Icon/Icon.web.js +0 -23
- package/lib/Icon/iconfont/iconfont.android.js +0 -1
- package/lib/Icon/iconfont/iconfont.ios.js +0 -1
- package/lib/Icon/iconfont/iconfont.tuya.js +0 -47
- package/lib/Icon/iconfont/iconfont.web.js +0 -47
- package/lib/Icon/iconfont/iconfont.wechat.js +0 -47
- package/lib/Icon/index.android.js +0 -1
- package/lib/Icon/index.ios.js +0 -1
- package/lib/Icon/index.tuya.js +0 -3
- package/lib/Icon/index.web.js +0 -3
- package/lib/Icon/index.wechat.js +0 -3
- package/lib/Icon/props.android.js +0 -1
- package/lib/Icon/props.ios.js +0 -1
- package/lib/Icon/props.tuya.js +0 -5
- package/lib/Icon/props.web.js +0 -5
- package/lib/Icon/props.wechat.js +0 -5
- package/lib/Image/Image.android.js +0 -1
- package/lib/Image/Image.ios.js +0 -1
- package/lib/Image/Image.web.js +0 -39
- package/lib/Image/index.android.js +0 -1
- package/lib/Image/index.ios.js +0 -1
- package/lib/Image/index.tuya.js +0 -3
- package/lib/Image/index.web.js +0 -3
- package/lib/Image/index.wechat.js +0 -3
- package/lib/Image/props.android.js +0 -1
- package/lib/Image/props.ios.js +0 -1
- package/lib/Image/props.tuya.js +0 -4
- package/lib/Image/props.web.js +0 -4
- package/lib/Image/props.wechat.js +0 -4
- package/lib/Input/Input.android.js +0 -1
- package/lib/Input/Input.ios.js +0 -1
- package/lib/Input/Input.web.js +0 -76
- package/lib/Input/index.android.js +0 -1
- package/lib/Input/index.ios.js +0 -1
- package/lib/Input/index.tuya.js +0 -3
- package/lib/Input/index.web.js +0 -3
- package/lib/Input/index.wechat.js +0 -3
- package/lib/Input/props.android.js +0 -1
- package/lib/Input/props.ios.js +0 -1
- package/lib/Input/props.tuya.js +0 -7
- package/lib/Input/props.web.js +0 -7
- package/lib/Input/props.wechat.js +0 -7
- package/lib/IpcPlayer/IpcPlayer.android.js +0 -1
- package/lib/IpcPlayer/IpcPlayer.ios.js +0 -1
- package/lib/IpcPlayer/IpcPlayer.web.js +0 -7
- package/lib/IpcPlayer/index.android.js +0 -1
- package/lib/IpcPlayer/index.ios.js +0 -1
- package/lib/IpcPlayer/index.tuya.js +0 -3
- package/lib/IpcPlayer/index.web.js +0 -3
- package/lib/IpcPlayer/index.wechat.js +0 -3
- package/lib/IpcPlayer/props.android.js +0 -1
- package/lib/IpcPlayer/props.ios.js +0 -1
- package/lib/IpcPlayer/props.tuya.js +0 -20
- package/lib/IpcPlayer/props.web.js +0 -20
- package/lib/IpcPlayer/props.wechat.js +0 -20
- package/lib/Label/Label.android.js +0 -1
- package/lib/Label/Label.ios.js +0 -1
- package/lib/Label/Label.web.js +0 -17
- package/lib/Label/index.android.js +0 -1
- package/lib/Label/index.ios.js +0 -1
- package/lib/Label/index.tuya.js +0 -3
- package/lib/Label/index.web.js +0 -3
- package/lib/Label/index.wechat.js +0 -3
- package/lib/Label/props.android.js +0 -1
- package/lib/Label/props.ios.js +0 -1
- package/lib/Label/props.tuya.js +0 -1
- package/lib/Label/props.web.js +0 -1
- package/lib/Label/props.wechat.js +0 -1
- package/lib/LinearGradient/LinearGradient.android.js +0 -1
- package/lib/LinearGradient/LinearGradient.ios.js +0 -1
- package/lib/LinearGradient/LinearGradient.web.js +0 -8
- package/lib/LinearGradient/index.android.js +0 -1
- package/lib/LinearGradient/index.ios.js +0 -1
- package/lib/LinearGradient/index.tuya.js +0 -3
- package/lib/LinearGradient/index.web.js +0 -3
- package/lib/LinearGradient/index.wechat.js +0 -3
- package/lib/LinearGradient/props.android.js +0 -1
- package/lib/LinearGradient/props.ios.js +0 -1
- package/lib/LinearGradient/props.tuya.js +0 -11
- package/lib/LinearGradient/props.web.js +0 -11
- package/lib/LinearGradient/props.wechat.js +0 -11
- package/lib/Modal/Modal.android.js +0 -1
- package/lib/Modal/Modal.ios.js +0 -1
- package/lib/Modal/Modal.web.js +0 -10
- package/lib/Modal/index.android.js +0 -1
- package/lib/Modal/index.ios.js +0 -1
- package/lib/Modal/index.tuya.js +0 -3
- package/lib/Modal/index.web.js +0 -3
- package/lib/Modal/index.wechat.js +0 -3
- package/lib/Modal/props.android.js +0 -1
- package/lib/Modal/props.ios.js +0 -1
- package/lib/Modal/props.tuya.js +0 -1
- package/lib/Modal/props.web.js +0 -1
- package/lib/Modal/props.wechat.js +0 -1
- package/lib/Motion/Fade/index.android.js +0 -1
- package/lib/Motion/Fade/index.ios.js +0 -1
- package/lib/Motion/Fade/index.web.js +0 -28
- package/lib/Motion/PullUp/index.android.js +0 -1
- package/lib/Motion/PullUp/index.ios.js +0 -1
- package/lib/Motion/PullUp/index.web.js +0 -28
- package/lib/Motion/PushDown/index.android.js +0 -1
- package/lib/Motion/PushDown/index.ios.js +0 -1
- package/lib/Motion/PushDown/index.web.js +0 -28
- package/lib/Motion/ScaleFadeIn/index.android.js +0 -1
- package/lib/Motion/ScaleFadeIn/index.ios.js +0 -1
- package/lib/Motion/ScaleFadeIn/index.web.js +0 -28
- package/lib/Motion/ScalePullDown/index.android.js +0 -1
- package/lib/Motion/ScalePullDown/index.ios.js +0 -1
- package/lib/Motion/ScalePullDown/index.web.js +0 -28
- package/lib/Motion/index.android.js +0 -1
- package/lib/Motion/index.ios.js +0 -1
- package/lib/Motion/index.tuya.js +0 -14
- package/lib/Motion/index.web.js +0 -14
- package/lib/Motion/index.wechat.js +0 -14
- package/lib/Motion/props.android.js +0 -1
- package/lib/Motion/props.ios.js +0 -1
- package/lib/Motion/props.tuya.js +0 -62
- package/lib/Motion/props.web.js +0 -62
- package/lib/Motion/props.wechat.js +0 -62
- package/lib/MovableArea/MovableArea.android.js +0 -1
- package/lib/MovableArea/MovableArea.ios.js +0 -1
- package/lib/MovableArea/MovableArea.tuya.js +0 -11
- package/lib/MovableArea/MovableArea.wechat.js +0 -11
- package/lib/MovableArea/index.android.js +0 -1
- package/lib/MovableArea/index.ios.js +0 -1
- package/lib/MovableArea/index.tuya.js +0 -3
- package/lib/MovableArea/index.web.js +0 -3
- package/lib/MovableArea/index.wechat.js +0 -3
- package/lib/MovableArea/props.android.js +0 -1
- package/lib/MovableArea/props.ios.js +0 -1
- package/lib/MovableArea/props.tuya.js +0 -3
- package/lib/MovableArea/props.web.js +0 -3
- package/lib/MovableArea/props.wechat.js +0 -3
- package/lib/MovableView/MovableView.android.js +0 -1
- package/lib/MovableView/MovableView.ios.js +0 -1
- package/lib/MovableView/MovableView.tuya.js +0 -11
- package/lib/MovableView/MovableView.wechat.js +0 -11
- package/lib/MovableView/index.android.js +0 -1
- package/lib/MovableView/index.ios.js +0 -1
- package/lib/MovableView/index.tuya.js +0 -3
- package/lib/MovableView/index.web.js +0 -3
- package/lib/MovableView/index.wechat.js +0 -3
- package/lib/MovableView/props.android.js +0 -1
- package/lib/MovableView/props.ios.js +0 -1
- package/lib/MovableView/props.tuya.js +0 -15
- package/lib/MovableView/props.web.js +0 -15
- package/lib/MovableView/props.wechat.js +0 -15
- package/lib/PageContainer/PageContainer.android.js +0 -1
- package/lib/PageContainer/PageContainer.ios.js +0 -1
- package/lib/PageContainer/PageContainer.web.js +0 -90
- package/lib/PageContainer/index.android.js +0 -1
- package/lib/PageContainer/index.ios.js +0 -1
- package/lib/PageContainer/index.tuya.js +0 -3
- package/lib/PageContainer/index.web.js +0 -3
- package/lib/PageContainer/index.wechat.js +0 -3
- package/lib/PageContainer/props.android.js +0 -1
- package/lib/PageContainer/props.ios.js +0 -1
- package/lib/PageContainer/props.tuya.js +0 -9
- package/lib/PageContainer/props.web.js +0 -9
- package/lib/PageContainer/props.wechat.js +0 -9
- package/lib/Picker/Picker.android.js +0 -1
- package/lib/Picker/Picker.ios.js +0 -1
- package/lib/Picker/Picker.web.js +0 -74
- package/lib/Picker/index.android.js +0 -1
- package/lib/Picker/index.ios.js +0 -1
- package/lib/Picker/index.tuya.js +0 -3
- package/lib/Picker/index.web.js +0 -3
- package/lib/Picker/index.wechat.js +0 -3
- package/lib/Picker/props.android.js +0 -1
- package/lib/Picker/props.ios.js +0 -1
- package/lib/Picker/props.tuya.js +0 -4
- package/lib/Picker/props.web.js +0 -4
- package/lib/Picker/props.wechat.js +0 -4
- package/lib/PickerView/PickerView.android.js +0 -1
- package/lib/PickerView/PickerView.ios.js +0 -1
- package/lib/PickerView/PickerView.web.js +0 -76
- package/lib/PickerView/index.android.js +0 -1
- package/lib/PickerView/index.ios.js +0 -1
- package/lib/PickerView/index.tuya.js +0 -3
- package/lib/PickerView/index.web.js +0 -3
- package/lib/PickerView/index.wechat.js +0 -3
- package/lib/PickerView/props.android.js +0 -1
- package/lib/PickerView/props.ios.js +0 -1
- package/lib/PickerView/props.tuya.js +0 -1
- package/lib/PickerView/props.web.js +0 -1
- package/lib/PickerView/props.wechat.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.android.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.ios.js +0 -1
- package/lib/PickerViewColumn/PickerViewColumn.web.js +0 -14
- package/lib/PickerViewColumn/index.android.js +0 -1
- package/lib/PickerViewColumn/index.ios.js +0 -1
- package/lib/PickerViewColumn/index.tuya.js +0 -3
- package/lib/PickerViewColumn/index.web.js +0 -3
- package/lib/PickerViewColumn/index.wechat.js +0 -3
- package/lib/PickerViewColumn/props.android.js +0 -1
- package/lib/PickerViewColumn/props.ios.js +0 -1
- package/lib/PickerViewColumn/props.tuya.js +0 -1
- package/lib/PickerViewColumn/props.web.js +0 -1
- package/lib/PickerViewColumn/props.wechat.js +0 -1
- package/lib/RadialGradient/RadialGradient.android.js +0 -1
- package/lib/RadialGradient/RadialGradient.ios.js +0 -1
- package/lib/RadialGradient/RadialGradient.web.js +0 -8
- package/lib/RadialGradient/index.android.js +0 -1
- package/lib/RadialGradient/index.ios.js +0 -1
- package/lib/RadialGradient/index.tuya.js +0 -3
- package/lib/RadialGradient/index.web.js +0 -3
- package/lib/RadialGradient/index.wechat.js +0 -3
- package/lib/RadialGradient/props.android.js +0 -1
- package/lib/RadialGradient/props.ios.js +0 -1
- package/lib/RadialGradient/props.tuya.js +0 -16
- package/lib/RadialGradient/props.web.js +0 -16
- package/lib/RadialGradient/props.wechat.js +0 -16
- package/lib/Radio/Radio.android.js +0 -1
- package/lib/Radio/Radio.ios.js +0 -1
- package/lib/Radio/Radio.web.js +0 -10
- package/lib/Radio/index.android.js +0 -1
- package/lib/Radio/index.ios.js +0 -1
- package/lib/Radio/index.tuya.js +0 -3
- package/lib/Radio/index.web.js +0 -3
- package/lib/Radio/index.wechat.js +0 -3
- package/lib/Radio/props.android.js +0 -1
- package/lib/Radio/props.ios.js +0 -1
- package/lib/Radio/props.tuya.js +0 -1
- package/lib/Radio/props.web.js +0 -1
- package/lib/Radio/props.wechat.js +0 -1
- package/lib/RadioGroup/RadioGroup.android.js +0 -1
- package/lib/RadioGroup/RadioGroup.ios.js +0 -1
- package/lib/RadioGroup/RadioGroup.web.js +0 -57
- package/lib/RadioGroup/index.android.js +0 -1
- package/lib/RadioGroup/index.ios.js +0 -1
- package/lib/RadioGroup/index.tuya.js +0 -3
- package/lib/RadioGroup/index.web.js +0 -3
- package/lib/RadioGroup/index.wechat.js +0 -3
- package/lib/RadioGroup/props.android.js +0 -1
- package/lib/RadioGroup/props.ios.js +0 -1
- package/lib/RadioGroup/props.tuya.js +0 -1
- package/lib/RadioGroup/props.web.js +0 -1
- package/lib/RadioGroup/props.wechat.js +0 -1
- package/lib/RichText/RichText.android.js +0 -1
- package/lib/RichText/RichText.ios.js +0 -1
- package/lib/RichText/RichText.tuya.js +0 -9
- package/lib/RichText/RichText.wechat.js +0 -9
- package/lib/RichText/index.android.js +0 -1
- package/lib/RichText/index.ios.js +0 -1
- package/lib/RichText/index.tuya.js +0 -3
- package/lib/RichText/index.web.js +0 -3
- package/lib/RichText/index.wechat.js +0 -3
- package/lib/RichText/props.android.js +0 -0
- package/lib/RichText/props.ios.js +0 -0
- package/lib/RichText/props.tuya.js +0 -1
- package/lib/RichText/props.web.js +0 -1
- package/lib/RichText/props.wechat.js +0 -1
- package/lib/ScrollView/ScrollView.android.js +0 -1
- package/lib/ScrollView/ScrollView.ios.js +0 -1
- package/lib/ScrollView/ScrollView.web.js +0 -54
- package/lib/ScrollView/index.android.js +0 -1
- package/lib/ScrollView/index.ios.js +0 -1
- package/lib/ScrollView/index.tuya.js +0 -3
- package/lib/ScrollView/index.web.js +0 -3
- package/lib/ScrollView/index.wechat.js +0 -3
- package/lib/ScrollView/props.android.js +0 -1
- package/lib/ScrollView/props.ios.js +0 -1
- package/lib/ScrollView/props.tuya.js +0 -5
- package/lib/ScrollView/props.web.js +0 -5
- package/lib/ScrollView/props.wechat.js +0 -5
- package/lib/Slider/Slider.android.js +0 -1
- package/lib/Slider/Slider.ios.js +0 -1
- package/lib/Slider/Slider.web.js +0 -39
- package/lib/Slider/index.android.js +0 -1
- package/lib/Slider/index.ios.js +0 -1
- package/lib/Slider/index.tuya.js +0 -3
- package/lib/Slider/index.web.js +0 -3
- package/lib/Slider/index.wechat.js +0 -3
- package/lib/Slider/props.android.js +0 -1
- package/lib/Slider/props.ios.js +0 -1
- package/lib/Slider/props.tuya.js +0 -11
- package/lib/Slider/props.web.js +0 -11
- package/lib/Slider/props.wechat.js +0 -11
- package/lib/Swiper/Swiper.android.js +0 -1
- package/lib/Swiper/Swiper.ios.js +0 -1
- package/lib/Swiper/Swiper.web.js +0 -74
- package/lib/Swiper/index.android.js +0 -1
- package/lib/Swiper/index.ios.js +0 -1
- package/lib/Swiper/index.tuya.js +0 -3
- package/lib/Swiper/index.web.js +0 -3
- package/lib/Swiper/index.wechat.js +0 -3
- package/lib/Swiper/props.android.js +0 -1
- package/lib/Swiper/props.ios.js +0 -1
- package/lib/Swiper/props.tuya.js +0 -16
- package/lib/Swiper/props.web.js +0 -16
- package/lib/Swiper/props.wechat.js +0 -16
- package/lib/SwiperItem/SwiperItem.android.js +0 -1
- package/lib/SwiperItem/SwiperItem.ios.js +0 -1
- package/lib/SwiperItem/SwiperItem.web.js +0 -14
- package/lib/SwiperItem/index.android.js +0 -1
- package/lib/SwiperItem/index.ios.js +0 -1
- package/lib/SwiperItem/index.tuya.js +0 -3
- package/lib/SwiperItem/index.web.js +0 -3
- package/lib/SwiperItem/index.wechat.js +0 -3
- package/lib/SwiperItem/props.android.js +0 -1
- package/lib/SwiperItem/props.ios.js +0 -1
- package/lib/SwiperItem/props.tuya.js +0 -1
- package/lib/SwiperItem/props.web.js +0 -1
- package/lib/SwiperItem/props.wechat.js +0 -1
- package/lib/Switch/Switch.android.js +0 -1
- package/lib/Switch/Switch.ios.js +0 -1
- package/lib/Switch/Switch.web.js +0 -27
- package/lib/Switch/index.android.js +0 -1
- package/lib/Switch/index.ios.js +0 -1
- package/lib/Switch/index.tuya.js +0 -3
- package/lib/Switch/index.web.js +0 -3
- package/lib/Switch/index.wechat.js +0 -3
- package/lib/Switch/props.android.js +0 -1
- package/lib/Switch/props.ios.js +0 -1
- package/lib/Switch/props.tuya.js +0 -5
- package/lib/Switch/props.web.js +0 -5
- package/lib/Switch/props.wechat.js +0 -5
- package/lib/Text/Text.android.js +0 -1
- package/lib/Text/Text.ios.js +0 -1
- package/lib/Text/Text.web.js +0 -13
- package/lib/Text/index.android.js +0 -1
- package/lib/Text/index.ios.js +0 -1
- package/lib/Text/index.tuya.js +0 -3
- package/lib/Text/index.web.js +0 -3
- package/lib/Text/index.wechat.js +0 -3
- package/lib/Text/props.android.js +0 -1
- package/lib/Text/props.ios.js +0 -1
- package/lib/Text/props.tuya.js +0 -1
- package/lib/Text/props.web.js +0 -1
- package/lib/Text/props.wechat.js +0 -1
- package/lib/Textarea/Textarea.android.js +0 -1
- package/lib/Textarea/Textarea.ios.js +0 -1
- package/lib/Textarea/Textarea.web.js +0 -66
- package/lib/Textarea/index.android.js +0 -1
- package/lib/Textarea/index.ios.js +0 -1
- package/lib/Textarea/index.tuya.js +0 -3
- package/lib/Textarea/index.web.js +0 -3
- package/lib/Textarea/index.wechat.js +0 -3
- package/lib/Textarea/props.android.js +0 -1
- package/lib/Textarea/props.ios.js +0 -1
- package/lib/Textarea/props.tuya.js +0 -1
- package/lib/Textarea/props.web.js +0 -1
- package/lib/Textarea/props.wechat.js +0 -1
- package/lib/TimePicker/TimePicker.android.js +0 -1
- package/lib/TimePicker/TimePicker.ios.js +0 -1
- package/lib/TimePicker/TimePicker.web.js +0 -41
- package/lib/TimePicker/index.android.js +0 -1
- package/lib/TimePicker/index.ios.js +0 -1
- package/lib/TimePicker/index.tuya.js +0 -3
- package/lib/TimePicker/index.web.js +0 -3
- package/lib/TimePicker/index.wechat.js +0 -3
- package/lib/TimePicker/props.android.js +0 -1
- package/lib/TimePicker/props.ios.js +0 -1
- package/lib/TimePicker/props.tuya.js +0 -6
- package/lib/TimePicker/props.web.js +0 -6
- package/lib/TimePicker/props.wechat.js +0 -6
- package/lib/View/View.android.js +0 -1
- package/lib/View/View.ios.js +0 -1
- package/lib/View/View.web.js +0 -71
- package/lib/View/index.android.js +0 -1
- package/lib/View/index.ios.js +0 -1
- package/lib/View/index.tuya.js +0 -3
- package/lib/View/index.web.js +0 -3
- package/lib/View/index.wechat.js +0 -3
- package/lib/View/props.android.js +0 -1
- package/lib/View/props.ios.js +0 -1
- package/lib/View/props.tuya.js +0 -4
- package/lib/View/props.web.js +0 -4
- package/lib/View/props.wechat.js +0 -4
- package/lib/assets/icons.android.js +0 -1
- package/lib/assets/icons.ios.js +0 -1
- package/lib/assets/icons.tuya.js +0 -7
- package/lib/assets/icons.web.js +0 -7
- package/lib/assets/icons.wechat.js +0 -7
- package/lib/core/index.android.js +0 -1
- package/lib/core/index.ios.js +0 -1
- package/lib/core/index.tuya.js +0 -25
- package/lib/core/index.web.js +0 -25
- package/lib/core/index.wechat.js +0 -25
- package/lib/index.android.js +0 -1
- package/lib/index.ios.js +0 -1
- package/lib/index.tuya.js +0 -33
- package/lib/index.web.js +0 -33
- package/lib/index.wechat.js +0 -33
- package/lib/types/event.android.js +0 -0
- package/lib/types/event.ios.js +0 -0
- package/lib/types/event.tuya.js +0 -1
- package/lib/types/event.web.js +0 -1
- package/lib/types/event.wechat.js +0 -1
- package/lib/types/index.android.js +0 -1
- package/lib/types/index.ios.js +0 -1
- package/lib/types/index.tuya.js +0 -9
- package/lib/types/index.web.js +0 -9
- package/lib/types/index.wechat.js +0 -9
- package/lib/utils/handleProps.android.js +0 -1
- package/lib/utils/handleProps.ios.js +0 -1
- package/lib/utils/handleProps.tuya.js +0 -78
- package/lib/utils/handleProps.web.js +0 -78
- package/lib/utils/handleProps.wechat.js +0 -78
- package/lib/utils/index.android.js +0 -1
- package/lib/utils/index.ios.js +0 -1
- package/lib/utils/index.tuya.js +0 -90
- package/lib/utils/index.web.js +0 -90
- package/lib/utils/index.wechat.js +0 -90
- package/lib/utils/interface.android.js +0 -1
- package/lib/utils/interface.ios.js +0 -1
- package/lib/utils/interface.tuya.js +0 -1
- package/lib/utils/interface.web.js +0 -1
- package/lib/utils/interface.wechat.js +0 -1
@@ -0,0 +1,283 @@
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
3
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
4
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
+
import "core-js/modules/es.array.concat.js";
|
9
|
+
import * as React from 'react';
|
10
|
+
import { ScrollView, StyleSheet } from 'react-native';
|
11
|
+
import { omit } from '../utils';
|
12
|
+
|
13
|
+
var _ScrollView = /*#__PURE__*/function (_React$Component) {
|
14
|
+
_inherits(_ScrollView, _React$Component);
|
15
|
+
|
16
|
+
var _super = _createSuper(_ScrollView);
|
17
|
+
|
18
|
+
function _ScrollView() {
|
19
|
+
var _this;
|
20
|
+
|
21
|
+
_classCallCheck(this, _ScrollView);
|
22
|
+
|
23
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
24
|
+
args[_key] = arguments[_key];
|
25
|
+
}
|
26
|
+
|
27
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
28
|
+
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
30
|
+
snapScrollTop: 0,
|
31
|
+
snapScrollLeft: 0
|
32
|
+
});
|
33
|
+
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "_scrollMetrics", {
|
35
|
+
contentLength: 0,
|
36
|
+
dOffset: 0,
|
37
|
+
dt: 10,
|
38
|
+
offset: 0,
|
39
|
+
offsetX: 0,
|
40
|
+
offsetY: 0,
|
41
|
+
timestamp: 0,
|
42
|
+
velocity: 0,
|
43
|
+
visibleLength: 0
|
44
|
+
});
|
45
|
+
|
46
|
+
_defineProperty(_assertThisInitialized(_this), "$scrollView", /*#__PURE__*/React.createRef());
|
47
|
+
|
48
|
+
_defineProperty(_assertThisInitialized(_this), "_sentEndForContentLength", 0);
|
49
|
+
|
50
|
+
_defineProperty(_assertThisInitialized(_this), "_scrollEventThrottle", 50);
|
51
|
+
|
52
|
+
_defineProperty(_assertThisInitialized(_this), "_hasCallScrollToUpperInRange", true);
|
53
|
+
|
54
|
+
_defineProperty(_assertThisInitialized(_this), "_hasCallScrollToLowerInRange", false);
|
55
|
+
|
56
|
+
_defineProperty(_assertThisInitialized(_this), "_selectLength", function (metrics) {
|
57
|
+
var scrollX = _this.props.scrollX;
|
58
|
+
return !scrollX ? metrics.height : metrics.width;
|
59
|
+
});
|
60
|
+
|
61
|
+
_defineProperty(_assertThisInitialized(_this), "_selectOffset", function (metrics) {
|
62
|
+
var scrollX = _this.props.scrollX;
|
63
|
+
return !scrollX ? metrics.y : metrics.x;
|
64
|
+
});
|
65
|
+
|
66
|
+
_defineProperty(_assertThisInitialized(_this), "_maybeCallOnStartReached", function (e) {
|
67
|
+
var _this$props = _this.props,
|
68
|
+
onScrollToUpper = _this$props.onScrollToUpper,
|
69
|
+
upperThreshold = _this$props.upperThreshold,
|
70
|
+
scrollX = _this$props.scrollX;
|
71
|
+
var offset = _this._scrollMetrics.offset;
|
72
|
+
|
73
|
+
if (onScrollToUpper && offset <= upperThreshold) {
|
74
|
+
if (!_this._hasCallScrollToUpperInRange) {
|
75
|
+
typeof onScrollToUpper === 'function' && onScrollToUpper({
|
76
|
+
type: 'scrolltoupper',
|
77
|
+
direction: scrollX ? 'left' : 'top',
|
78
|
+
// distanceFromTop: offset,
|
79
|
+
origin: e
|
80
|
+
});
|
81
|
+
_this._hasCallScrollToUpperInRange = true;
|
82
|
+
}
|
83
|
+
} else {
|
84
|
+
_this._hasCallScrollToUpperInRange = false;
|
85
|
+
}
|
86
|
+
});
|
87
|
+
|
88
|
+
_defineProperty(_assertThisInitialized(_this), "_maybeCallOnEndReached", function (e) {
|
89
|
+
var _this$props2 = _this.props,
|
90
|
+
onScrollToLower = _this$props2.onScrollToLower,
|
91
|
+
lowerThreshold = _this$props2.lowerThreshold,
|
92
|
+
scrollX = _this$props2.scrollX;
|
93
|
+
var _this$_scrollMetrics = _this._scrollMetrics,
|
94
|
+
contentLength = _this$_scrollMetrics.contentLength,
|
95
|
+
visibleLength = _this$_scrollMetrics.visibleLength,
|
96
|
+
offset = _this$_scrollMetrics.offset;
|
97
|
+
|
98
|
+
if (onScrollToLower && contentLength - visibleLength - offset < lowerThreshold) {
|
99
|
+
if (!_this._hasCallScrollToLowerInRange) {
|
100
|
+
_this._hasDataChangedSinceEndReached = false;
|
101
|
+
_this._hasCallScrollToLowerInRange = true;
|
102
|
+
_this._sentEndForContentLength = _this._scrollMetrics.contentLength;
|
103
|
+
typeof onScrollToLower === 'function' && onScrollToLower({
|
104
|
+
type: 'scrolltolower',
|
105
|
+
direction: scrollX ? 'right' : 'bottom',
|
106
|
+
// distanceFromEnd,
|
107
|
+
origin: e
|
108
|
+
});
|
109
|
+
}
|
110
|
+
} else {
|
111
|
+
_this._hasCallScrollToLowerInRange = false;
|
112
|
+
}
|
113
|
+
});
|
114
|
+
|
115
|
+
_defineProperty(_assertThisInitialized(_this), "_onContentSizeChange", function (width, height) {
|
116
|
+
_this._scrollMetrics.contentLength = _this._selectLength({
|
117
|
+
height: height,
|
118
|
+
width: width
|
119
|
+
});
|
120
|
+
});
|
121
|
+
|
122
|
+
_defineProperty(_assertThisInitialized(_this), "_onScrollEndDrag", function (e) {
|
123
|
+
var velocity = e.nativeEvent.velocity;
|
124
|
+
|
125
|
+
if (velocity) {
|
126
|
+
_this._scrollMetrics.velocity = _this._selectOffset(velocity);
|
127
|
+
}
|
128
|
+
});
|
129
|
+
|
130
|
+
_defineProperty(_assertThisInitialized(_this), "_onMomentumScrollEnd", function () {
|
131
|
+
_this._scrollMetrics.velocity = 0;
|
132
|
+
});
|
133
|
+
|
134
|
+
_defineProperty(_assertThisInitialized(_this), "_onLayout", function (e) {
|
135
|
+
_this._scrollMetrics.visibleLength = _this._selectLength(e.nativeEvent.layout);
|
136
|
+
});
|
137
|
+
|
138
|
+
_defineProperty(_assertThisInitialized(_this), "_onScroll", function (e) {
|
139
|
+
var onScroll = _this.props.onScroll;
|
140
|
+
var scrollLeft = e.nativeEvent.contentOffset.x;
|
141
|
+
var scrollTop = e.nativeEvent.contentOffset.y;
|
142
|
+
var scrollHeight = e.nativeEvent.contentSize.height;
|
143
|
+
var scrollWidth = e.nativeEvent.contentSize.width;
|
144
|
+
typeof onScroll === 'function' && onScroll({
|
145
|
+
type: 'scroll',
|
146
|
+
scrollLeft: scrollLeft,
|
147
|
+
scrollTop: scrollTop,
|
148
|
+
scrollHeight: scrollHeight,
|
149
|
+
scrollWidth: scrollWidth,
|
150
|
+
deltaX: scrollLeft - _this._scrollMetrics.offsetX,
|
151
|
+
deltaY: scrollTop - _this._scrollMetrics.offsetY,
|
152
|
+
origin: e
|
153
|
+
});
|
154
|
+
var timestamp = e.timeStamp;
|
155
|
+
|
156
|
+
var visibleLength = _this._selectLength(e.nativeEvent.layoutMeasurement);
|
157
|
+
|
158
|
+
var contentLength = _this._selectLength(e.nativeEvent.contentSize);
|
159
|
+
|
160
|
+
var offset = _this._selectOffset(e.nativeEvent.contentOffset);
|
161
|
+
|
162
|
+
var dt = Math.max(1, timestamp - _this._scrollMetrics.timestamp);
|
163
|
+
var dOffset = offset - _this._scrollMetrics.offset;
|
164
|
+
_this._scrollMetrics = {
|
165
|
+
contentLength: contentLength,
|
166
|
+
dt: dt,
|
167
|
+
dOffset: dOffset,
|
168
|
+
offset: offset,
|
169
|
+
offsetX: scrollLeft,
|
170
|
+
offsetY: scrollTop,
|
171
|
+
timestamp: timestamp,
|
172
|
+
velocity: dOffset / dt,
|
173
|
+
visibleLength: visibleLength
|
174
|
+
};
|
175
|
+
|
176
|
+
_this._maybeCallOnStartReached(e);
|
177
|
+
|
178
|
+
_this._maybeCallOnEndReached(e);
|
179
|
+
});
|
180
|
+
|
181
|
+
_defineProperty(_assertThisInitialized(_this), "scrollToOffset", function () {
|
182
|
+
var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
183
|
+
var y = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
184
|
+
var node = _this.$scrollView.current;
|
185
|
+
|
186
|
+
if (node) {
|
187
|
+
node.scrollTo({
|
188
|
+
x: x,
|
189
|
+
y: y,
|
190
|
+
animated: !!_this.props.scrollWithAnimation
|
191
|
+
});
|
192
|
+
}
|
193
|
+
});
|
194
|
+
|
195
|
+
return _this;
|
196
|
+
}
|
197
|
+
|
198
|
+
_createClass(_ScrollView, [{
|
199
|
+
key: "componentDidMount",
|
200
|
+
value: function componentDidMount() {
|
201
|
+
var _this2 = this;
|
202
|
+
|
203
|
+
if (this.state.snapScrollTop || this.state.snapScrollLeft) {
|
204
|
+
this._initialScrollIndexTimeout = setTimeout(function () {
|
205
|
+
_this2.scrollToOffset(_this2.state.snapScrollLeft, _this2.state.snapScrollTop);
|
206
|
+
}, 0);
|
207
|
+
}
|
208
|
+
}
|
209
|
+
}, {
|
210
|
+
key: "getSnapshotBeforeUpdate",
|
211
|
+
value: function getSnapshotBeforeUpdate(prevProps, prevState) {
|
212
|
+
if (prevProps.scrollTop !== undefined) {
|
213
|
+
return this._scrollMetrics.offsetY !== this.state.snapScrollTop || this._scrollMetrics.offsetX !== this.state.snapScrollLeft;
|
214
|
+
}
|
215
|
+
|
216
|
+
return prevState.snapScrollTop !== this.state.snapScrollTop || prevState.snapScrollLeft !== this.state.snapScrollLeft;
|
217
|
+
}
|
218
|
+
}, {
|
219
|
+
key: "componentDidUpdate",
|
220
|
+
value: function componentDidUpdate(prevProps, prevState, snapshot) {
|
221
|
+
if (snapshot) {
|
222
|
+
this.scrollToOffset(this.state.snapScrollLeft, this.state.snapScrollTop);
|
223
|
+
}
|
224
|
+
}
|
225
|
+
}, {
|
226
|
+
key: "componentWillUnmount",
|
227
|
+
value: function componentWillUnmount() {
|
228
|
+
this._initialScrollIndexTimeout && clearTimeout(this._initialScrollIndexTimeout);
|
229
|
+
}
|
230
|
+
}, {
|
231
|
+
key: "render",
|
232
|
+
value: function render() {
|
233
|
+
var _this$props3 = this.props,
|
234
|
+
children = _this$props3.children,
|
235
|
+
style = _this$props3.style,
|
236
|
+
scrollX = _this$props3.scrollX;
|
237
|
+
var flattenStyle = StyleSheet.flatten(style);
|
238
|
+
var wrapperStyle = omit(flattenStyle, ['alignItems', 'justifyContent']);
|
239
|
+
var _contentContainerStyle = {};
|
240
|
+
|
241
|
+
if (flattenStyle) {
|
242
|
+
flattenStyle.alignItems && (_contentContainerStyle.alignItems = flattenStyle.alignItems);
|
243
|
+
flattenStyle.justifyContent && (_contentContainerStyle.justifyContent = flattenStyle.justifyContent);
|
244
|
+
}
|
245
|
+
|
246
|
+
var scrollElementProps = _objectSpread(_objectSpread({
|
247
|
+
horizontal: scrollX,
|
248
|
+
onContentSizeChange: this._onContentSizeChange,
|
249
|
+
onLayout: this._onLayout,
|
250
|
+
onScroll: this._onScroll,
|
251
|
+
onScrollEndDrag: this._onScrollEndDrag,
|
252
|
+
onMomentumScrollEnd: this._onMomentumScrollEnd,
|
253
|
+
scrollEventThrottle: this._scrollEventThrottle,
|
254
|
+
style: wrapperStyle,
|
255
|
+
contentContainerStyle: [_contentContainerStyle]
|
256
|
+
}, omit(this.props, [// props
|
257
|
+
'style', 'scrollX', 'upperThreshold', 'lowerThreshold', 'scrollTop', 'scrollLeft', 'scrollWithAnimation', 'onScrollToUpper', 'onScrollToLower', 'onScroll', 'contentContainerStyle', // SProps
|
258
|
+
'horizontal', 'onContentSizeChange', 'onLayout', 'onScroll', 'onScrollEndDrag', 'onMomentumScrollEnd', 'scrollEventThrottle', 'scrollsToTop', 'style', 'contentContainerStyle', 'data', 'renderItem', 'keyExtractor'])), {}, {
|
259
|
+
ref: this.$scrollView
|
260
|
+
});
|
261
|
+
|
262
|
+
return /*#__PURE__*/React.createElement(ScrollView, scrollElementProps, children);
|
263
|
+
}
|
264
|
+
}], [{
|
265
|
+
key: "getDerivedStateFromProps",
|
266
|
+
value: function getDerivedStateFromProps(props, state) {
|
267
|
+
return state.snapScrollTop !== props.scrollTop || state.snapScrollLeft !== props.scrollLeft ? {
|
268
|
+
snapScrollTop: props.scrollTop || 0,
|
269
|
+
snapScrollLeft: props.scrollLeft || 0
|
270
|
+
} : null;
|
271
|
+
}
|
272
|
+
}]);
|
273
|
+
|
274
|
+
return _ScrollView;
|
275
|
+
}(React.Component);
|
276
|
+
|
277
|
+
_defineProperty(_ScrollView, "defaultProps", {
|
278
|
+
upperThreshold: 50,
|
279
|
+
lowerThreshold: 50,
|
280
|
+
scrollX: false
|
281
|
+
});
|
282
|
+
|
283
|
+
export default _ScrollView;
|
@@ -1,16 +1,16 @@
|
|
1
|
-
import { ScrollView as _ScrollView } from "@ray-core/wechat/esm/hostComponents/ScrollView/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
3
|
var _excluded = ["style"];
|
5
4
|
import * as React from 'react';
|
6
5
|
import { inlineStyle } from '@ray-js/framework-shared';
|
6
|
+
import { ScrollView as RemaxScrollView } from '@ray-core/wechat';
|
7
7
|
import { defaultScrollViewProps } from './props';
|
8
8
|
|
9
9
|
var ScrollView = function (props) {
|
10
10
|
var style = props.style,
|
11
11
|
restProps = _objectWithoutProperties(props, _excluded);
|
12
12
|
|
13
|
-
return /*#__PURE__*/React.createElement(
|
13
|
+
return /*#__PURE__*/React.createElement(RemaxScrollView, _extends({
|
14
14
|
style: inlineStyle(style),
|
15
15
|
enhanced: true
|
16
16
|
}, restProps));
|
@@ -0,0 +1,114 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
5
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
6
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
7
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
8
|
+
var _excluded = ["min", "max", "step", "backgroundColor", "activeColor", "blockSize", "blockColor", "onChange", "onChanging", "showValue"];
|
9
|
+
import React from 'react';
|
10
|
+
import { View, Text } from 'react-native';
|
11
|
+
import SliderBase from 'tuya-panel-slider/lib/slider';
|
12
|
+
import { sliderDefault } from './props';
|
13
|
+
|
14
|
+
var Slider = /*#__PURE__*/function (_React$Component) {
|
15
|
+
_inherits(Slider, _React$Component);
|
16
|
+
|
17
|
+
var _super = _createSuper(Slider);
|
18
|
+
|
19
|
+
function Slider(props) {
|
20
|
+
var _this;
|
21
|
+
|
22
|
+
_classCallCheck(this, Slider);
|
23
|
+
|
24
|
+
_this = _super.call(this, props);
|
25
|
+
_this.state = {
|
26
|
+
currentValue: props.value
|
27
|
+
};
|
28
|
+
return _this;
|
29
|
+
}
|
30
|
+
|
31
|
+
_createClass(Slider, [{
|
32
|
+
key: "componentDidUpdate",
|
33
|
+
value: function componentDidUpdate(prevProps) {
|
34
|
+
if (prevProps.value !== this.props.value) {
|
35
|
+
this.setState({
|
36
|
+
currentValue: this.props.value
|
37
|
+
});
|
38
|
+
}
|
39
|
+
}
|
40
|
+
}, {
|
41
|
+
key: "render",
|
42
|
+
value: function render() {
|
43
|
+
var _this2 = this;
|
44
|
+
|
45
|
+
var _this$props = this.props,
|
46
|
+
min = _this$props.min,
|
47
|
+
max = _this$props.max,
|
48
|
+
step = _this$props.step,
|
49
|
+
backgroundColor = _this$props.backgroundColor,
|
50
|
+
activeColor = _this$props.activeColor,
|
51
|
+
blockSize = _this$props.blockSize,
|
52
|
+
blockColor = _this$props.blockColor,
|
53
|
+
onChange = _this$props.onChange,
|
54
|
+
onChanging = _this$props.onChanging,
|
55
|
+
showValue = _this$props.showValue,
|
56
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
57
|
+
|
58
|
+
return /*#__PURE__*/React.createElement(View, {
|
59
|
+
style: {
|
60
|
+
flexDirection: 'row',
|
61
|
+
alignItems: 'center'
|
62
|
+
}
|
63
|
+
}, /*#__PURE__*/React.createElement(SliderBase, _extends({
|
64
|
+
trackStyle: {
|
65
|
+
width: 312,
|
66
|
+
height: 4
|
67
|
+
}
|
68
|
+
}, rest, {
|
69
|
+
minimumValue: min,
|
70
|
+
maximumValue: max,
|
71
|
+
stepValue: step,
|
72
|
+
maximumTrackTintColor: backgroundColor,
|
73
|
+
minimumTrackTintColor: activeColor,
|
74
|
+
thumbTouchSize: {
|
75
|
+
width: blockSize,
|
76
|
+
height: blockSize
|
77
|
+
},
|
78
|
+
thumbTintColor: blockColor,
|
79
|
+
onSlidingComplete: function onSlidingComplete(value) {
|
80
|
+
_this2.setState({
|
81
|
+
currentValue: value
|
82
|
+
});
|
83
|
+
|
84
|
+
typeof onChange === 'function' && onChange({
|
85
|
+
type: 'change',
|
86
|
+
value: value,
|
87
|
+
origin: undefined
|
88
|
+
});
|
89
|
+
},
|
90
|
+
onValueChange: function onValueChange(value) {
|
91
|
+
_this2.setState({
|
92
|
+
currentValue: value
|
93
|
+
});
|
94
|
+
|
95
|
+
typeof onChanging === 'function' && onChanging({
|
96
|
+
type: 'changing',
|
97
|
+
value: value,
|
98
|
+
origin: undefined
|
99
|
+
});
|
100
|
+
}
|
101
|
+
})), showValue && /*#__PURE__*/React.createElement(Text, {
|
102
|
+
style: {
|
103
|
+
marginLeft: 15
|
104
|
+
}
|
105
|
+
}, this.state.currentValue));
|
106
|
+
}
|
107
|
+
}]);
|
108
|
+
|
109
|
+
return Slider;
|
110
|
+
}(React.Component);
|
111
|
+
|
112
|
+
_defineProperty(Slider, "defaultProps", sliderDefault);
|
113
|
+
|
114
|
+
export { Slider as default };
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { Slider as _Slider } from "@ray-core/wechat/esm/hostComponents/Slider/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
3
|
var _excluded = ["id", "style", "className", "children", "onChange", "onChanging", "activeColor"];
|
5
4
|
import * as React from 'react';
|
6
5
|
import { inlineStyle } from '@ray-js/framework-shared';
|
6
|
+
import { Slider as RemaxSlider } from '@ray-core/wechat';
|
7
7
|
|
8
8
|
var Slider = function (props) {
|
9
9
|
var id = props.id,
|
@@ -15,7 +15,7 @@ var Slider = function (props) {
|
|
15
15
|
activeColor = props.activeColor,
|
16
16
|
restProps = _objectWithoutProperties(props, _excluded);
|
17
17
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
18
|
+
return /*#__PURE__*/React.createElement(RemaxSlider, _extends({
|
19
19
|
id: id,
|
20
20
|
style: inlineStyle(style),
|
21
21
|
onChange: function handleChange(e) {
|
@@ -0,0 +1,68 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
3
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
4
|
+
var _excluded = ["style", "vertical", "circular", "autoplay", "current", "dotActiveColor", "dotColor", "dots", "interval", "dataSource", "renderItem", "onAfterChange", "onchange"],
|
5
|
+
_excluded2 = ["width", "height"];
|
6
|
+
import "core-js/modules/es.array.map.js";
|
7
|
+
import React from 'react';
|
8
|
+
import OriginSwiper from 'react-native-swiper';
|
9
|
+
import { defaultSwiperProps } from './props';
|
10
|
+
|
11
|
+
var Swiper = function (props) {
|
12
|
+
var style = props.style,
|
13
|
+
vertical = props.vertical,
|
14
|
+
circular = props.circular,
|
15
|
+
autoplay = props.autoplay,
|
16
|
+
current = props.current,
|
17
|
+
dotActiveColor = props.dotActiveColor,
|
18
|
+
dotColor = props.dotColor,
|
19
|
+
dots = props.dots,
|
20
|
+
interval = props.interval,
|
21
|
+
dataSource = props.dataSource,
|
22
|
+
renderItem = props.renderItem,
|
23
|
+
onAfterChange = props.onAfterChange,
|
24
|
+
onchange = props.onchange,
|
25
|
+
rest = _objectWithoutProperties(props, _excluded);
|
26
|
+
|
27
|
+
var width = style.width,
|
28
|
+
height = style.height,
|
29
|
+
restStyle = _objectWithoutProperties(style, _excluded2);
|
30
|
+
|
31
|
+
if (!dataSource || dataSource.length === 0 || !renderItem) return null;
|
32
|
+
return /*#__PURE__*/React.createElement(OriginSwiper, _extends({}, rest, {
|
33
|
+
style: _objectSpread({}, restStyle),
|
34
|
+
width: width,
|
35
|
+
height: height,
|
36
|
+
showsButtons: false,
|
37
|
+
horizontal: !vertical,
|
38
|
+
loop: circular,
|
39
|
+
autoplay: autoplay,
|
40
|
+
index: current,
|
41
|
+
activeDotColor: dotActiveColor,
|
42
|
+
dotColor: dotColor,
|
43
|
+
showsPagination: dots,
|
44
|
+
autoplayTimeout: interval / 1000,
|
45
|
+
onIndexChanged: function _handleIndexChange(index) {
|
46
|
+
typeof onchange === 'function' && onchange({
|
47
|
+
type: 'change',
|
48
|
+
current: index,
|
49
|
+
origin: null
|
50
|
+
});
|
51
|
+
},
|
52
|
+
onMomentumScrollEnd: function _handleIndexChangeEnd(event, state) {
|
53
|
+
var index = state.index;
|
54
|
+
typeof onAfterChange === 'function' && onAfterChange({
|
55
|
+
type: 'afterchange',
|
56
|
+
current: index,
|
57
|
+
origin: null
|
58
|
+
});
|
59
|
+
}
|
60
|
+
}), dataSource.map(function (item, index) {
|
61
|
+
if (renderItem) {
|
62
|
+
return renderItem(item, index);
|
63
|
+
}
|
64
|
+
}));
|
65
|
+
};
|
66
|
+
|
67
|
+
Swiper.defaultProps = defaultSwiperProps;
|
68
|
+
export default Swiper;
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { Swiper as _Swiper } from "@ray-core/wechat/esm/hostComponents/Swiper/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
|
-
import { SwiperItem as _SwiperItem } from "@ray-core/wechat/esm/hostComponents/SwiperItem/index";
|
4
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
5
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
6
4
|
var _excluded = ["id", "style", "className", "current", "dataSource", "onAfterChange", "onChange", "renderItem", "children"];
|
@@ -8,6 +6,7 @@ import "core-js/modules/es.array.map.js";
|
|
8
6
|
import clsx from 'clsx';
|
9
7
|
import * as React from 'react';
|
10
8
|
import { inlineStyle } from '@ray-js/framework-shared';
|
9
|
+
import { Swiper as RemaxSwiper, SwiperItem as RemaxSwiperItem } from '@ray-core/wechat';
|
11
10
|
import { propsAlias } from '../core';
|
12
11
|
import { SwiperPropsAlias, defaultSwiperProps } from './props';
|
13
12
|
|
@@ -35,7 +34,7 @@ function Swiper(props) {
|
|
35
34
|
bufferCurrent.current = current;
|
36
35
|
}
|
37
36
|
}, [current]);
|
38
|
-
return /*#__PURE__*/React.createElement(
|
37
|
+
return /*#__PURE__*/React.createElement(RemaxSwiper, _extends({
|
39
38
|
id: id,
|
40
39
|
style: inlineStyle(style),
|
41
40
|
className: clsx('ray-swiper', className),
|
@@ -50,7 +49,7 @@ function Swiper(props) {
|
|
50
49
|
return children;
|
51
50
|
}() || function () {
|
52
51
|
return dataSource.map(function (item, index) {
|
53
|
-
return /*#__PURE__*/React.createElement(
|
52
|
+
return /*#__PURE__*/React.createElement(RemaxSwiperItem, {
|
54
53
|
key: index
|
55
54
|
}, renderItem(item, index));
|
56
55
|
});
|
@@ -1 +1,14 @@
|
|
1
|
-
|
1
|
+
import * as React from 'react';
|
2
|
+
import handleProps from '../utils/handleProps';
|
3
|
+
|
4
|
+
var SwiperItem = function (props) {
|
5
|
+
var children = props.children;
|
6
|
+
return (
|
7
|
+
/*#__PURE__*/
|
8
|
+
// @ts-ignore
|
9
|
+
React.createElement("v-swiper-item", handleProps(props), children)
|
10
|
+
);
|
11
|
+
};
|
12
|
+
|
13
|
+
SwiperItem.displayName = 'SwiperItem';
|
14
|
+
export default SwiperItem;
|
@@ -0,0 +1,128 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
4
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
5
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
7
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
8
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
9
|
+
var _excluded = ["style", "color", "disabled", "type"];
|
10
|
+
import "core-js/modules/es.array.concat.js";
|
11
|
+
import React from 'react';
|
12
|
+
import Switch from 'tuya-panel-switch/lib/switch';
|
13
|
+
import Checkbox from '../Checkbox';
|
14
|
+
import { defaultSwitchProps } from './props';
|
15
|
+
|
16
|
+
var _Switch = /*#__PURE__*/function (_React$Component) {
|
17
|
+
_inherits(_Switch, _React$Component);
|
18
|
+
|
19
|
+
var _super = _createSuper(_Switch);
|
20
|
+
|
21
|
+
function _Switch() {
|
22
|
+
var _this;
|
23
|
+
|
24
|
+
_classCallCheck(this, _Switch);
|
25
|
+
|
26
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
27
|
+
args[_key] = arguments[_key];
|
28
|
+
}
|
29
|
+
|
30
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
31
|
+
|
32
|
+
_defineProperty(_assertThisInitialized(_this), "$touchable", /*#__PURE__*/React.createRef());
|
33
|
+
|
34
|
+
_defineProperty(_assertThisInitialized(_this), "state", {
|
35
|
+
checked: !!_this.props.checked
|
36
|
+
});
|
37
|
+
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "_simulateNativePress", function (evt) {
|
39
|
+
var type = _this.props.type;
|
40
|
+
|
41
|
+
if (type === 'checkbox') {
|
42
|
+
var node = _this.$touchable.current;
|
43
|
+
node && node._simulateNativePress(evt);
|
44
|
+
} else {
|
45
|
+
_this.setState({
|
46
|
+
checked: !_this.state.checked
|
47
|
+
});
|
48
|
+
}
|
49
|
+
});
|
50
|
+
|
51
|
+
_defineProperty(_assertThisInitialized(_this), "onCheckedChange", function (event) {
|
52
|
+
var checked = event.checked;
|
53
|
+
var onChange = _this.props.onChange;
|
54
|
+
typeof onChange === 'function' && onChange({
|
55
|
+
type: 'change',
|
56
|
+
value: checked
|
57
|
+
});
|
58
|
+
|
59
|
+
_this.setState({
|
60
|
+
checked: checked
|
61
|
+
});
|
62
|
+
});
|
63
|
+
|
64
|
+
_defineProperty(_assertThisInitialized(_this), "onSwitchChange", function (isChecked) {
|
65
|
+
var onChange = _this.props.onChange;
|
66
|
+
typeof onChange === 'function' && onChange({
|
67
|
+
type: 'change',
|
68
|
+
value: isChecked
|
69
|
+
});
|
70
|
+
|
71
|
+
_this.setState({
|
72
|
+
checked: isChecked
|
73
|
+
});
|
74
|
+
});
|
75
|
+
|
76
|
+
return _this;
|
77
|
+
}
|
78
|
+
|
79
|
+
_createClass(_Switch, [{
|
80
|
+
key: "render",
|
81
|
+
value: function render() {
|
82
|
+
var _this$props = this.props,
|
83
|
+
style = _this$props.style,
|
84
|
+
color = _this$props.color,
|
85
|
+
disabled = _this$props.disabled,
|
86
|
+
type = _this$props.type,
|
87
|
+
rest = _objectWithoutProperties(_this$props, _excluded);
|
88
|
+
|
89
|
+
var checked = this.state.checked;
|
90
|
+
|
91
|
+
if (type === 'checkbox') {
|
92
|
+
return /*#__PURE__*/React.createElement(Checkbox, {
|
93
|
+
checked: this.state.checked,
|
94
|
+
style: style,
|
95
|
+
disabled: disabled,
|
96
|
+
onChange: this.onCheckedChange,
|
97
|
+
ref: this.$touchable
|
98
|
+
});
|
99
|
+
}
|
100
|
+
|
101
|
+
return /*#__PURE__*/React.createElement(Switch, _extends({
|
102
|
+
size: {
|
103
|
+
width: 50,
|
104
|
+
height: 30,
|
105
|
+
activeSize: 26,
|
106
|
+
margin: 2
|
107
|
+
},
|
108
|
+
thumbTintColor: "#FFFFFF",
|
109
|
+
tintColor: 'rgba(0,0,0,0.12)'
|
110
|
+
}, rest, {
|
111
|
+
value: checked,
|
112
|
+
onValueChange: this.onSwitchChange,
|
113
|
+
style: style,
|
114
|
+
onTintColor: color,
|
115
|
+
disabled: disabled,
|
116
|
+
ref: this.$touchable
|
117
|
+
}));
|
118
|
+
}
|
119
|
+
}]);
|
120
|
+
|
121
|
+
return _Switch;
|
122
|
+
}(React.Component);
|
123
|
+
|
124
|
+
_defineProperty(_Switch, "displayName", 'Switch');
|
125
|
+
|
126
|
+
_defineProperty(_Switch, "defaultProps", defaultSwitchProps);
|
127
|
+
|
128
|
+
export { _Switch as default };
|