@ray-js/components 0.5.3 → 0.5.5
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
@@ -1 +1,90 @@
|
|
1
|
-
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
import React, { useRef } from 'react';
|
3
|
+
import { useEventListener } from 'ahooks';
|
4
|
+
import { defaultPageContainerProps } from './props';
|
5
|
+
import handleProps from '../utils/handleProps';
|
6
|
+
|
7
|
+
var PageContainer = function (props) {
|
8
|
+
var children = props.children;
|
9
|
+
var currentNode = useRef(null);
|
10
|
+
useEventListener('clickoverlay', function (e) {
|
11
|
+
var _props$onClickOverlay;
|
12
|
+
|
13
|
+
(_props$onClickOverlay = props.onClickOverlay) === null || _props$onClickOverlay === void 0 ? void 0 : _props$onClickOverlay.call(props, {
|
14
|
+
type: 'clickoverlay',
|
15
|
+
origin: e
|
16
|
+
});
|
17
|
+
}, {
|
18
|
+
target: currentNode
|
19
|
+
});
|
20
|
+
useEventListener('beforeenter', function (e) {
|
21
|
+
var _props$onBeforeEnter;
|
22
|
+
|
23
|
+
(_props$onBeforeEnter = props.onBeforeEnter) === null || _props$onBeforeEnter === void 0 ? void 0 : _props$onBeforeEnter.call(props, {
|
24
|
+
type: 'beforeenter',
|
25
|
+
origin: e
|
26
|
+
});
|
27
|
+
}, {
|
28
|
+
target: currentNode
|
29
|
+
});
|
30
|
+
useEventListener('enter', function (e) {
|
31
|
+
var _props$onEnter;
|
32
|
+
|
33
|
+
(_props$onEnter = props.onEnter) === null || _props$onEnter === void 0 ? void 0 : _props$onEnter.call(props, {
|
34
|
+
type: 'enter',
|
35
|
+
origin: e
|
36
|
+
});
|
37
|
+
}, {
|
38
|
+
target: currentNode
|
39
|
+
});
|
40
|
+
useEventListener('afterenter', function (e) {
|
41
|
+
var _props$onAfterEnter;
|
42
|
+
|
43
|
+
(_props$onAfterEnter = props.onAfterEnter) === null || _props$onAfterEnter === void 0 ? void 0 : _props$onAfterEnter.call(props, {
|
44
|
+
type: 'afterenter',
|
45
|
+
origin: e
|
46
|
+
});
|
47
|
+
}, {
|
48
|
+
target: currentNode
|
49
|
+
});
|
50
|
+
useEventListener('beforeleave', function (e) {
|
51
|
+
var _props$onBeforeLeave;
|
52
|
+
|
53
|
+
(_props$onBeforeLeave = props.onBeforeLeave) === null || _props$onBeforeLeave === void 0 ? void 0 : _props$onBeforeLeave.call(props, {
|
54
|
+
type: 'beforeleave',
|
55
|
+
origin: e
|
56
|
+
});
|
57
|
+
}, {
|
58
|
+
target: currentNode
|
59
|
+
});
|
60
|
+
useEventListener('leave', function (e) {
|
61
|
+
var _props$onLeave;
|
62
|
+
|
63
|
+
(_props$onLeave = props.onLeave) === null || _props$onLeave === void 0 ? void 0 : _props$onLeave.call(props, {
|
64
|
+
type: 'leave',
|
65
|
+
origin: e
|
66
|
+
});
|
67
|
+
}, {
|
68
|
+
target: currentNode
|
69
|
+
});
|
70
|
+
useEventListener('afterleave', function (e) {
|
71
|
+
var _props$onAfterLeave;
|
72
|
+
|
73
|
+
(_props$onAfterLeave = props.onAfterLeave) === null || _props$onAfterLeave === void 0 ? void 0 : _props$onAfterLeave.call(props, {
|
74
|
+
type: 'afterleave',
|
75
|
+
origin: e
|
76
|
+
});
|
77
|
+
}, {
|
78
|
+
target: currentNode
|
79
|
+
});
|
80
|
+
return (
|
81
|
+
/*#__PURE__*/
|
82
|
+
// @ts-ignore
|
83
|
+
React.createElement("v-page-container", _extends({}, handleProps(props), {
|
84
|
+
ref: currentNode
|
85
|
+
}), children)
|
86
|
+
);
|
87
|
+
};
|
88
|
+
|
89
|
+
PageContainer.defaultProps = defaultPageContainerProps;
|
90
|
+
export default PageContainer;
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import { PageContainer as _PageContainer } from "@ray-core/wechat/esm/hostComponents/PageContainer/index";
|
2
1
|
import * as React from 'react';
|
2
|
+
import { PageContainer as RemaxPageContainer } from '@ray-core/wechat';
|
3
3
|
|
4
4
|
function PageContainer(props) {
|
5
|
-
return /*#__PURE__*/React.createElement(
|
5
|
+
return /*#__PURE__*/React.createElement(RemaxPageContainer, props);
|
6
6
|
}
|
7
7
|
|
8
8
|
export default PageContainer;
|
@@ -0,0 +1,181 @@
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
7
|
+
import React from 'react';
|
8
|
+
import { View, Text, TouchableOpacity, StyleSheet, Platform } from 'react-native';
|
9
|
+
import { IDefaultPickerProps } from './props';
|
10
|
+
import Modal from '../Modal';
|
11
|
+
import PickerView from '../PickerView';
|
12
|
+
import { isTwoArray } from '../utils';
|
13
|
+
|
14
|
+
var Picker = /*#__PURE__*/function (_React$Component) {
|
15
|
+
_inherits(Picker, _React$Component);
|
16
|
+
|
17
|
+
var _super = _createSuper(Picker);
|
18
|
+
|
19
|
+
function Picker(props) {
|
20
|
+
var _this;
|
21
|
+
|
22
|
+
_classCallCheck(this, Picker);
|
23
|
+
|
24
|
+
_this = _super.call(this, props);
|
25
|
+
|
26
|
+
_defineProperty(_assertThisInitialized(_this), "_handleCancel", function () {
|
27
|
+
var onCancel = _this.props.onCancel;
|
28
|
+
typeof onCancel === 'function' && onCancel({
|
29
|
+
type: 'cancel',
|
30
|
+
origin: null
|
31
|
+
});
|
32
|
+
|
33
|
+
_this.setState({
|
34
|
+
visible: false
|
35
|
+
});
|
36
|
+
});
|
37
|
+
|
38
|
+
_defineProperty(_assertThisInitialized(_this), "_handleConfirm", function () {
|
39
|
+
var onChange = _this.props.onChange;
|
40
|
+
var changeValue = _this.state.changeValue;
|
41
|
+
typeof onChange === 'function' && onChange({
|
42
|
+
type: 'change',
|
43
|
+
value: changeValue,
|
44
|
+
origin: null
|
45
|
+
});
|
46
|
+
|
47
|
+
_this.setState({
|
48
|
+
visible: false,
|
49
|
+
value: changeValue
|
50
|
+
});
|
51
|
+
});
|
52
|
+
|
53
|
+
_defineProperty(_assertThisInitialized(_this), "_handlePickerChange", function (event) {
|
54
|
+
var value = event.value,
|
55
|
+
column = event.column;
|
56
|
+
var _this$props = _this.props,
|
57
|
+
range = _this$props.range,
|
58
|
+
onColumnChange = _this$props.onColumnChange;
|
59
|
+
var isOnly = !isTwoArray(range);
|
60
|
+
|
61
|
+
if (!isOnly) {
|
62
|
+
typeof onColumnChange === 'function' && onColumnChange({
|
63
|
+
type: 'columnchange',
|
64
|
+
value: value[column],
|
65
|
+
column: column,
|
66
|
+
origin: null
|
67
|
+
});
|
68
|
+
}
|
69
|
+
|
70
|
+
_this.setState({
|
71
|
+
changeValue: value
|
72
|
+
});
|
73
|
+
});
|
74
|
+
|
75
|
+
_defineProperty(_assertThisInitialized(_this), "renderTitleView", function () {
|
76
|
+
var _this$props2 = _this.props,
|
77
|
+
confirmText = _this$props2.confirmText,
|
78
|
+
cancelText = _this$props2.cancelText;
|
79
|
+
return /*#__PURE__*/React.createElement(View, {
|
80
|
+
style: styles.title
|
81
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
82
|
+
style: styles.button,
|
83
|
+
activeOpacity: 0.8,
|
84
|
+
onPress: _this._handleCancel
|
85
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
86
|
+
style: styles.text
|
87
|
+
}, cancelText)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
88
|
+
style: styles.button,
|
89
|
+
activeOpacity: 0.8,
|
90
|
+
onPress: _this._handleConfirm
|
91
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
92
|
+
style: [styles.text, {
|
93
|
+
color: '#007AFF'
|
94
|
+
}]
|
95
|
+
}, confirmText)));
|
96
|
+
});
|
97
|
+
|
98
|
+
_this.state = {
|
99
|
+
visible: false,
|
100
|
+
value: props.value,
|
101
|
+
changeValue: props.value
|
102
|
+
};
|
103
|
+
return _this;
|
104
|
+
}
|
105
|
+
|
106
|
+
_createClass(Picker, [{
|
107
|
+
key: "componentDidUpdate",
|
108
|
+
value: function componentDidUpdate(prevProps) {
|
109
|
+
if (this.props.value !== prevProps.value) {
|
110
|
+
this.setState({
|
111
|
+
value: this.props.value,
|
112
|
+
changeValue: this.props.value
|
113
|
+
});
|
114
|
+
}
|
115
|
+
}
|
116
|
+
}, {
|
117
|
+
key: "render",
|
118
|
+
value: function render() {
|
119
|
+
var _this2 = this;
|
120
|
+
|
121
|
+
var _this$props3 = this.props,
|
122
|
+
children = _this$props3.children,
|
123
|
+
range = _this$props3.range,
|
124
|
+
disabled = _this$props3.disabled;
|
125
|
+
var _this$state = this.state,
|
126
|
+
visible = _this$state.visible,
|
127
|
+
value = _this$state.value;
|
128
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
129
|
+
onPress: function onPress() {
|
130
|
+
return _this2.setState({
|
131
|
+
visible: true
|
132
|
+
});
|
133
|
+
},
|
134
|
+
disabled: disabled,
|
135
|
+
activeOpacity: 0.8
|
136
|
+
}, children), /*#__PURE__*/React.createElement(Modal, {
|
137
|
+
show: visible,
|
138
|
+
position: 'bottom'
|
139
|
+
}, this.renderTitleView(), Platform.OS === 'android' && /*#__PURE__*/React.createElement(View, {
|
140
|
+
style: {
|
141
|
+
backgroundColor: '#fff',
|
142
|
+
height: 2
|
143
|
+
}
|
144
|
+
}), /*#__PURE__*/React.createElement(PickerView, {
|
145
|
+
range: range,
|
146
|
+
value: value,
|
147
|
+
style: {
|
148
|
+
backgroundColor: '#fff'
|
149
|
+
},
|
150
|
+
onChange: this._handlePickerChange
|
151
|
+
})));
|
152
|
+
}
|
153
|
+
}]);
|
154
|
+
|
155
|
+
return Picker;
|
156
|
+
}(React.Component);
|
157
|
+
|
158
|
+
_defineProperty(Picker, "displayName", '_Picker');
|
159
|
+
|
160
|
+
_defineProperty(Picker, "defaultProps", IDefaultPickerProps);
|
161
|
+
|
162
|
+
export { Picker as default };
|
163
|
+
var styles = StyleSheet.create({
|
164
|
+
button: {
|
165
|
+
height: 54,
|
166
|
+
width: 68,
|
167
|
+
alignItems: 'center',
|
168
|
+
justifyContent: 'center'
|
169
|
+
},
|
170
|
+
title: {
|
171
|
+
flexDirection: 'row',
|
172
|
+
justifyContent: 'space-between',
|
173
|
+
backgroundColor: '#fff',
|
174
|
+
borderBottomColor: 'rgba(0, 0, 0, 0.05)',
|
175
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
176
|
+
},
|
177
|
+
text: {
|
178
|
+
fontSize: 18,
|
179
|
+
color: '#333'
|
180
|
+
}
|
181
|
+
});
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { Picker as _Picker } from "@ray-core/wechat/esm/hostComponents/Picker/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
2
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
4
3
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
@@ -6,6 +5,7 @@ var _excluded = ["className", "style", "id", "onChange", "onLongClick", "onTouch
|
|
6
5
|
import clsx from 'clsx';
|
7
6
|
import * as React from 'react';
|
8
7
|
import { inlineStyle, useTouch } from '@ray-js/framework-shared';
|
8
|
+
import { Picker as RemaxPicker } from '@ray-core/wechat';
|
9
9
|
var countArr = 1;
|
10
10
|
|
11
11
|
var Picker = function (props) {
|
@@ -46,7 +46,7 @@ var Picker = function (props) {
|
|
46
46
|
return countArr;
|
47
47
|
};
|
48
48
|
|
49
|
-
return /*#__PURE__*/React.createElement(
|
49
|
+
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
50
50
|
onChange: function handleChange(e) {
|
51
51
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
52
52
|
type: e.type,
|
@@ -0,0 +1,175 @@
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
3
|
+
import _assertThisInitialized from "@babel/runtime/helpers/esm/assertThisInitialized";
|
4
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
5
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
6
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
7
|
+
import "core-js/modules/es.array.map.js";
|
8
|
+
import "core-js/modules/es.array.concat.js";
|
9
|
+
import * as React from 'react';
|
10
|
+
import { Platform, requireNativeComponent, processColor, View } from 'react-native';
|
11
|
+
import { RatioUtils } from '@ray-js/ray-panel-utils';
|
12
|
+
import { isTwoArray } from '../utils';
|
13
|
+
var width = RatioUtils.width;
|
14
|
+
var TYRCTPicker = requireNativeComponent('TYRCTPicker');
|
15
|
+
var WheelPickerView = requireNativeComponent('TYRCTWheelViewManager');
|
16
|
+
|
17
|
+
var _Picker = /*#__PURE__*/function (_React$Component) {
|
18
|
+
_inherits(_Picker, _React$Component);
|
19
|
+
|
20
|
+
var _super = _createSuper(_Picker);
|
21
|
+
|
22
|
+
function _Picker(props) {
|
23
|
+
var _this;
|
24
|
+
|
25
|
+
_classCallCheck(this, _Picker);
|
26
|
+
|
27
|
+
_this = _super.call(this, props);
|
28
|
+
|
29
|
+
_defineProperty(_assertThisInitialized(_this), "getItem", function () {
|
30
|
+
var range = _this.props.range;
|
31
|
+
var isOnly = !isTwoArray(range);
|
32
|
+
|
33
|
+
if (isOnly) {
|
34
|
+
return range.map(function (item) {
|
35
|
+
return {
|
36
|
+
label: item,
|
37
|
+
value: item
|
38
|
+
};
|
39
|
+
});
|
40
|
+
}
|
41
|
+
|
42
|
+
return range.map(function (item) {
|
43
|
+
return item.map(function (data) {
|
44
|
+
return {
|
45
|
+
label: data,
|
46
|
+
value: data
|
47
|
+
};
|
48
|
+
});
|
49
|
+
});
|
50
|
+
});
|
51
|
+
|
52
|
+
_defineProperty(_assertThisInitialized(_this), "onItemSelected", function (event, isOnly, index) {
|
53
|
+
var newIndex = event.nativeEvent.newIndex;
|
54
|
+
var onChange = _this.props.onChange;
|
55
|
+
|
56
|
+
if (isOnly) {
|
57
|
+
_this.setState({
|
58
|
+
selectIdx: newIndex
|
59
|
+
});
|
60
|
+
|
61
|
+
typeof onChange === 'function' && onChange({
|
62
|
+
type: 'change',
|
63
|
+
value: newIndex
|
64
|
+
});
|
65
|
+
} else {
|
66
|
+
var selectIdx = _this.state.selectIdx;
|
67
|
+
var newSelectArr = selectIdx.concat([]);
|
68
|
+
newSelectArr[index] = newIndex;
|
69
|
+
typeof onChange === 'function' && onChange({
|
70
|
+
type: 'change',
|
71
|
+
value: newSelectArr,
|
72
|
+
column: index
|
73
|
+
});
|
74
|
+
|
75
|
+
_this.setState({
|
76
|
+
selectIdx: newSelectArr
|
77
|
+
});
|
78
|
+
}
|
79
|
+
});
|
80
|
+
|
81
|
+
_defineProperty(_assertThisInitialized(_this), "renderPickerItem", function (item, selectIdx, isOnly, index) {
|
82
|
+
var _this$props = _this.props,
|
83
|
+
style = _this$props.style,
|
84
|
+
fontSize = _this$props.fontSize;
|
85
|
+
|
86
|
+
var items = _this.getItem();
|
87
|
+
|
88
|
+
var theme = {
|
89
|
+
dividerColor: 'rgba(0, 0, 0, 0.05)',
|
90
|
+
fontColor: 'rgba(0,0,0,0.9)',
|
91
|
+
fontSize: fontSize || isOnly ? 24 : items.length < 3 ? 24 : 20
|
92
|
+
};
|
93
|
+
var length = isOnly ? 1 : items.length;
|
94
|
+
return Platform.OS === 'android' ? /*#__PURE__*/React.createElement(WheelPickerView, {
|
95
|
+
key: index,
|
96
|
+
style: [{
|
97
|
+
width: width / length,
|
98
|
+
height: 216
|
99
|
+
}, style],
|
100
|
+
items: item,
|
101
|
+
itemTextColor: theme.fontColor,
|
102
|
+
selectedItemTextColor: theme.fontColor,
|
103
|
+
dividerColor: theme.dividerColor,
|
104
|
+
visibleItemCount: 5,
|
105
|
+
itemAlign: 'center',
|
106
|
+
selectedIndex: selectIdx,
|
107
|
+
textSize: theme.fontSize,
|
108
|
+
loop: false,
|
109
|
+
onChange: function onChange(e) {
|
110
|
+
return _this.onItemSelected(e, isOnly, index);
|
111
|
+
}
|
112
|
+
}) : /*#__PURE__*/React.createElement(TYRCTPicker, {
|
113
|
+
key: index,
|
114
|
+
style: [{
|
115
|
+
width: width / length,
|
116
|
+
height: 216
|
117
|
+
}, style],
|
118
|
+
items: item,
|
119
|
+
itemPadding: 14,
|
120
|
+
selectedIndex: selectIdx,
|
121
|
+
separatorColor: processColor(theme.dividerColor),
|
122
|
+
color: processColor(theme.fontColor),
|
123
|
+
textAlign: 1,
|
124
|
+
fontSize: theme.fontSize,
|
125
|
+
fontWeight: 'normal',
|
126
|
+
onChange: function onChange(e) {
|
127
|
+
return _this.onItemSelected(e, isOnly, index);
|
128
|
+
}
|
129
|
+
});
|
130
|
+
});
|
131
|
+
|
132
|
+
_this.state = {
|
133
|
+
selectIdx: props.value
|
134
|
+
};
|
135
|
+
return _this;
|
136
|
+
}
|
137
|
+
|
138
|
+
_createClass(_Picker, [{
|
139
|
+
key: "componentDidUpdate",
|
140
|
+
value: function componentDidUpdate(prevProps) {
|
141
|
+
if (prevProps.value !== this.props.value) {
|
142
|
+
this.setState({
|
143
|
+
selectIdx: this.props.value
|
144
|
+
});
|
145
|
+
}
|
146
|
+
}
|
147
|
+
}, {
|
148
|
+
key: "render",
|
149
|
+
value: function render() {
|
150
|
+
var _this2 = this;
|
151
|
+
|
152
|
+
var selectIdx = this.state.selectIdx;
|
153
|
+
var items = this.getItem();
|
154
|
+
var isOnly = !isTwoArray(items);
|
155
|
+
return isOnly ? this.renderPickerItem(items, selectIdx, isOnly, 0) : /*#__PURE__*/React.createElement(View, {
|
156
|
+
style: {
|
157
|
+
flexDirection: 'row',
|
158
|
+
overflow: 'hidden'
|
159
|
+
}
|
160
|
+
}, items.map(function (item, idx) {
|
161
|
+
return _this2.renderPickerItem(item, selectIdx[idx], isOnly, idx);
|
162
|
+
}));
|
163
|
+
}
|
164
|
+
}]);
|
165
|
+
|
166
|
+
return _Picker;
|
167
|
+
}(React.Component);
|
168
|
+
|
169
|
+
_defineProperty(_Picker, "displayName", '_PickerView');
|
170
|
+
|
171
|
+
_defineProperty(_Picker, "defaultProps", {
|
172
|
+
value: 0
|
173
|
+
});
|
174
|
+
|
175
|
+
export { _Picker as default };
|
@@ -1,6 +1,4 @@
|
|
1
|
-
import { PickerView as _PickerView } from "@ray-core/wechat/esm/hostComponents/PickerView/index";
|
2
1
|
import _extends from "@babel/runtime/helpers/esm/extends";
|
3
|
-
import { PickerViewColumn as _PickerViewColumn } from "@ray-core/wechat/esm/hostComponents/PickerViewColumn/index";
|
4
2
|
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
5
3
|
var _excluded = ["className", "style", "id", "onChange", "range", "children"];
|
6
4
|
import "core-js/modules/es.array.map.js";
|
@@ -8,6 +6,7 @@ import clsx from 'clsx';
|
|
8
6
|
import * as React from 'react';
|
9
7
|
import { inlineStyle } from '@ray-js/framework-shared';
|
10
8
|
import { View } from '@ray-js/components';
|
9
|
+
import { PickerView as RemaxPickerView, PickerViewColumn as RemaxPickerViewColumn } from '@ray-core/wechat';
|
11
10
|
import styles from './index.module.less';
|
12
11
|
|
13
12
|
var Picker = function (props) {
|
@@ -37,7 +36,7 @@ var Picker = function (props) {
|
|
37
36
|
return multiarr(array);
|
38
37
|
};
|
39
38
|
|
40
|
-
return /*#__PURE__*/React.createElement(
|
39
|
+
return /*#__PURE__*/React.createElement(RemaxPickerView, _extends({
|
41
40
|
onChange: function handleChange(e) {
|
42
41
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
43
42
|
type: 'change',
|
@@ -52,7 +51,7 @@ var Picker = function (props) {
|
|
52
51
|
}() || function renderPickerColumn() {
|
53
52
|
if (countArray(props.range) > 1) {
|
54
53
|
return props.range.map(function (item, index) {
|
55
|
-
return /*#__PURE__*/React.createElement(
|
54
|
+
return /*#__PURE__*/React.createElement(RemaxPickerViewColumn, {
|
56
55
|
key: index
|
57
56
|
}, item.map(function (i, id) {
|
58
57
|
return /*#__PURE__*/React.createElement(View, {
|
@@ -62,7 +61,7 @@ var Picker = function (props) {
|
|
62
61
|
}));
|
63
62
|
});
|
64
63
|
} else {
|
65
|
-
return /*#__PURE__*/React.createElement(
|
64
|
+
return /*#__PURE__*/React.createElement(RemaxPickerViewColumn, null, range.map(function (item, index) {
|
66
65
|
return /*#__PURE__*/React.createElement(View, {
|
67
66
|
key: index,
|
68
67
|
className: styles.pcWrp
|