@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
@@ -0,0 +1,449 @@
|
|
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.object.to-string.js";
|
8
|
+
import "core-js/modules/web.dom-collections.for-each.js";
|
9
|
+
import "core-js/modules/es.array.index-of.js";
|
10
|
+
import "core-js/modules/es.array.concat.js";
|
11
|
+
import "core-js/modules/es.number.constructor.js";
|
12
|
+
import React from 'react';
|
13
|
+
import { View, TouchableOpacity, Platform, Text, StyleSheet } from 'react-native';
|
14
|
+
import { defaultProps } from './props';
|
15
|
+
import Modal from '../Modal';
|
16
|
+
import PickerView from '../PickerView';
|
17
|
+
|
18
|
+
var DatePicker = /*#__PURE__*/function (_React$Component) {
|
19
|
+
_inherits(DatePicker, _React$Component);
|
20
|
+
|
21
|
+
var _super = _createSuper(DatePicker);
|
22
|
+
|
23
|
+
function DatePicker(props) {
|
24
|
+
var _this;
|
25
|
+
|
26
|
+
_classCallCheck(this, DatePicker);
|
27
|
+
|
28
|
+
_this = _super.call(this, props);
|
29
|
+
|
30
|
+
_defineProperty(_assertThisInitialized(_this), "format", function (time) {
|
31
|
+
var year = time.getFullYear(); //获取年份。
|
32
|
+
|
33
|
+
var month = time.getMonth() + 1; //获取月份。
|
34
|
+
|
35
|
+
var day = time.getDate(); //获取天
|
36
|
+
|
37
|
+
return {
|
38
|
+
year: year,
|
39
|
+
month: month,
|
40
|
+
day: day
|
41
|
+
};
|
42
|
+
});
|
43
|
+
|
44
|
+
_defineProperty(_assertThisInitialized(_this), "getDateListArr", function () {
|
45
|
+
var _this$props = _this.props,
|
46
|
+
start = _this$props.start,
|
47
|
+
end = _this$props.end; //获取开始时间和结束时间的时间戳
|
48
|
+
|
49
|
+
var startTime = new Date(start).getTime();
|
50
|
+
var endTime = new Date(end).getTime();
|
51
|
+
var dateArr = []; // 存放区间数据的数组
|
52
|
+
|
53
|
+
var stamp;
|
54
|
+
|
55
|
+
for (stamp = startTime; stamp <= endTime;) {
|
56
|
+
dateArr.push(_this.format(new Date(stamp)));
|
57
|
+
stamp += 24 * 60 * 60 * 1000;
|
58
|
+
} //此时的dateArr 格式为[{year: 2020, month: 10, day: 1},{year: 2020, month: 10, day: 2},....] 可以在这里打印下看看
|
59
|
+
|
60
|
+
|
61
|
+
var listArr = []; // 存放转换后的数组 把扁平化的数据转换为 层级结构的
|
62
|
+
|
63
|
+
dateArr.forEach(function (item, index) {
|
64
|
+
if (index === 0) {
|
65
|
+
listArr.push({
|
66
|
+
year: item.year,
|
67
|
+
monthArr: [{
|
68
|
+
yearItem: item.year,
|
69
|
+
month: item.month,
|
70
|
+
dayArr: [item.day]
|
71
|
+
}]
|
72
|
+
});
|
73
|
+
} else {
|
74
|
+
// 不是第一次,就需要两个数组对比如果有一样的就再对比
|
75
|
+
//some()函数 用于检测数组中的元素是否满足指定条件.
|
76
|
+
// 如果有一个元素满足条件,则表达式返回true , 剩余的元素不会再执行检测
|
77
|
+
var yearFlag = listArr.some(function (listItem) {
|
78
|
+
// 如果年份相等,就要循环月份数组
|
79
|
+
if (listItem.year == item.year) {
|
80
|
+
// 如果有一个元素满足条件,则表达式返回true , 剩余的元素不会再执行检测
|
81
|
+
var monthFlag = listItem.monthArr.some(function (monthItem) {
|
82
|
+
// 如果月份相等,就把天push进去,return true
|
83
|
+
if (monthItem.month == item.month) {
|
84
|
+
monthItem.dayArr.push(item.day);
|
85
|
+
return true;
|
86
|
+
}
|
87
|
+
}); // 如果月开关是fasle 就代表月份没有一样的 push就行了
|
88
|
+
|
89
|
+
if (!monthFlag) {
|
90
|
+
listItem.monthArr.push({
|
91
|
+
yearItem: item.year,
|
92
|
+
month: item.month,
|
93
|
+
dayArr: [item.day]
|
94
|
+
});
|
95
|
+
}
|
96
|
+
|
97
|
+
return true;
|
98
|
+
}
|
99
|
+
}); // 如果年开关是fasle 就代表年份没有一样的 push就行了
|
100
|
+
|
101
|
+
if (!yearFlag) {
|
102
|
+
// 如果年份不相等,年份数组push
|
103
|
+
listArr.push({
|
104
|
+
year: item.year,
|
105
|
+
monthArr: [{
|
106
|
+
yearItem: item.year,
|
107
|
+
month: item.month,
|
108
|
+
dayArr: [item.day]
|
109
|
+
}]
|
110
|
+
});
|
111
|
+
}
|
112
|
+
}
|
113
|
+
});
|
114
|
+
return listArr;
|
115
|
+
});
|
116
|
+
|
117
|
+
_defineProperty(_assertThisInitialized(_this), "getCurrentValue", function (value) {
|
118
|
+
var valueTime = new Date(value).getTime();
|
119
|
+
|
120
|
+
var _this$format = _this.format(new Date(valueTime)),
|
121
|
+
year = _this$format.year,
|
122
|
+
month = _this$format.month,
|
123
|
+
day = _this$format.day;
|
124
|
+
|
125
|
+
return {
|
126
|
+
currentYear: year,
|
127
|
+
currentMonth: month,
|
128
|
+
currentDay: day
|
129
|
+
};
|
130
|
+
});
|
131
|
+
|
132
|
+
_defineProperty(_assertThisInitialized(_this), "calculateValue", function (value) {
|
133
|
+
if (value < 10) {
|
134
|
+
return "0".concat(value);
|
135
|
+
} else {
|
136
|
+
return "".concat(value);
|
137
|
+
}
|
138
|
+
});
|
139
|
+
|
140
|
+
_defineProperty(_assertThisInitialized(_this), "getRangeAndValue", function (value) {
|
141
|
+
var fields = _this.props.fields;
|
142
|
+
|
143
|
+
var dateListArr = _this.getDateListArr();
|
144
|
+
|
145
|
+
var _this$getCurrentValue = _this.getCurrentValue(value),
|
146
|
+
currentYear = _this$getCurrentValue.currentYear,
|
147
|
+
currentMonth = _this$getCurrentValue.currentMonth,
|
148
|
+
currentDay = _this$getCurrentValue.currentDay;
|
149
|
+
|
150
|
+
var yearArr = [];
|
151
|
+
var monthArr = [];
|
152
|
+
var dayArr = [];
|
153
|
+
var range = [];
|
154
|
+
dateListArr.forEach(function (item) {
|
155
|
+
yearArr.push("".concat(item.year));
|
156
|
+
|
157
|
+
if (item.year === currentYear) {
|
158
|
+
item.monthArr.forEach(function (monthItem) {
|
159
|
+
monthArr.push(_this.calculateValue(monthItem.month));
|
160
|
+
|
161
|
+
if (monthItem.month === currentMonth) {
|
162
|
+
monthItem.dayArr.forEach(function (dayItem) {
|
163
|
+
dayArr.push(_this.calculateValue(dayItem));
|
164
|
+
});
|
165
|
+
}
|
166
|
+
});
|
167
|
+
}
|
168
|
+
});
|
169
|
+
|
170
|
+
switch (fields) {
|
171
|
+
case 'year':
|
172
|
+
range.push.apply(range, yearArr);
|
173
|
+
return {
|
174
|
+
range: range,
|
175
|
+
currentValue: yearArr.indexOf("".concat(currentYear)),
|
176
|
+
dateListArr: dateListArr
|
177
|
+
};
|
178
|
+
|
179
|
+
case 'month':
|
180
|
+
range.push(yearArr, monthArr);
|
181
|
+
return {
|
182
|
+
range: range,
|
183
|
+
currentValue: [yearArr.indexOf("".concat(currentYear)), monthArr.indexOf(_this.calculateValue(currentMonth))],
|
184
|
+
dateListArr: dateListArr
|
185
|
+
};
|
186
|
+
|
187
|
+
case 'day':
|
188
|
+
range.push(yearArr, monthArr, dayArr);
|
189
|
+
return {
|
190
|
+
range: range,
|
191
|
+
currentValue: [yearArr.indexOf("".concat(currentYear)), monthArr.indexOf(_this.calculateValue(currentMonth)), dayArr.indexOf(_this.calculateValue(currentDay))],
|
192
|
+
dateListArr: dateListArr
|
193
|
+
};
|
194
|
+
|
195
|
+
default:
|
196
|
+
return {
|
197
|
+
range: [],
|
198
|
+
currentValue: [],
|
199
|
+
dateListArr: dateListArr
|
200
|
+
};
|
201
|
+
}
|
202
|
+
});
|
203
|
+
|
204
|
+
_defineProperty(_assertThisInitialized(_this), "_handleCancel", function () {
|
205
|
+
var onCancel = _this.props.onCancel;
|
206
|
+
typeof onCancel === 'function' && onCancel({
|
207
|
+
type: 'cancel',
|
208
|
+
origin: null
|
209
|
+
});
|
210
|
+
|
211
|
+
_this.setState({
|
212
|
+
visible: false
|
213
|
+
});
|
214
|
+
});
|
215
|
+
|
216
|
+
_defineProperty(_assertThisInitialized(_this), "_handleConfirm", function () {
|
217
|
+
var _this$state = _this.state,
|
218
|
+
changeValue = _this$state.changeValue,
|
219
|
+
range = _this$state.range;
|
220
|
+
var _this$props2 = _this.props,
|
221
|
+
onChange = _this$props2.onChange,
|
222
|
+
fields = _this$props2.fields;
|
223
|
+
var result = '';
|
224
|
+
|
225
|
+
if (fields === 'day') {
|
226
|
+
result = range[0][changeValue[0]] + '-' + range[1][changeValue[1]] + '-' + range[2][changeValue[2]];
|
227
|
+
} else if (fields === 'month') {
|
228
|
+
result = range[0][changeValue[0]] + '-' + range[1][changeValue[1]];
|
229
|
+
} else {
|
230
|
+
result = range[changeValue];
|
231
|
+
}
|
232
|
+
|
233
|
+
console.log('result', result);
|
234
|
+
typeof onChange === 'function' && onChange({
|
235
|
+
type: 'change',
|
236
|
+
value: result,
|
237
|
+
origin: null
|
238
|
+
});
|
239
|
+
|
240
|
+
_this.setState({
|
241
|
+
visible: false,
|
242
|
+
value: changeValue
|
243
|
+
});
|
244
|
+
});
|
245
|
+
|
246
|
+
_defineProperty(_assertThisInitialized(_this), "_handlePickerChange", function (event) {
|
247
|
+
var value = event.value,
|
248
|
+
column = event.column;
|
249
|
+
var fields = _this.props.fields;
|
250
|
+
var range = _this.state.range;
|
251
|
+
|
252
|
+
if (fields === 'year') {
|
253
|
+
_this.setState({
|
254
|
+
changeValue: value
|
255
|
+
});
|
256
|
+
} else if (fields === 'month') {
|
257
|
+
var year = "".concat(range[0][value[0]]);
|
258
|
+
var month = "".concat(range[1][value[1]]);
|
259
|
+
var endYear = range[0][range[0].length - 1];
|
260
|
+
|
261
|
+
var _this$getRangeAndValu = _this.getRangeAndValue(year),
|
262
|
+
newRange = _this$getRangeAndValu.range;
|
263
|
+
|
264
|
+
var monthIndex = newRange[1].indexOf(month);
|
265
|
+
value[1] = monthIndex === -1 ? year === endYear ? newRange[1].length - 1 : 0 : monthIndex;
|
266
|
+
|
267
|
+
if (column === 0) {
|
268
|
+
_this.setState({
|
269
|
+
changeValue: value,
|
270
|
+
range: newRange
|
271
|
+
});
|
272
|
+
} else {
|
273
|
+
_this.setState({
|
274
|
+
changeValue: value,
|
275
|
+
range: newRange
|
276
|
+
});
|
277
|
+
}
|
278
|
+
} else {
|
279
|
+
var _year = "".concat(range[0][value[0]]);
|
280
|
+
|
281
|
+
var _month = "".concat(range[1][value[1]]);
|
282
|
+
|
283
|
+
var day = "".concat(range[2][value[2]]);
|
284
|
+
|
285
|
+
if (column === 0) {
|
286
|
+
var _this$getRangeAndValu2 = _this.getRangeAndValue("".concat(_year, "-").concat(_month, "-").concat(day)),
|
287
|
+
_newRange = _this$getRangeAndValu2.range;
|
288
|
+
|
289
|
+
var _monthIndex = _newRange[1].indexOf(_month);
|
290
|
+
|
291
|
+
var startMonth = _newRange[1][0];
|
292
|
+
value[1] = _monthIndex === -1 ? Number(_month) < Number(startMonth) ? 0 : _newRange[1].length - 1 : _monthIndex; // 订正月份
|
293
|
+
|
294
|
+
_month = "".concat(_newRange[1][value[1]]);
|
295
|
+
|
296
|
+
var _this$getRangeAndValu3 = _this.getRangeAndValue("".concat(_year, "-").concat(_month, "-").concat(day)),
|
297
|
+
modifiedRange = _this$getRangeAndValu3.range;
|
298
|
+
|
299
|
+
var dayIndex = modifiedRange[2].indexOf(day);
|
300
|
+
var startDay = modifiedRange[2][0];
|
301
|
+
value[2] = dayIndex === -1 ? Number(day) < Number(startDay) ? 0 : modifiedRange[2].length - 1 : dayIndex;
|
302
|
+
|
303
|
+
_this.setState({
|
304
|
+
changeValue: value,
|
305
|
+
range: modifiedRange
|
306
|
+
});
|
307
|
+
} else if (column === 1) {
|
308
|
+
var _this$getRangeAndValu4 = _this.getRangeAndValue("".concat(_year, "-").concat(_month)),
|
309
|
+
_newRange2 = _this$getRangeAndValu4.range;
|
310
|
+
|
311
|
+
var _dayIndex = _newRange2[2].indexOf(day);
|
312
|
+
|
313
|
+
var _startDay = _newRange2[2][0];
|
314
|
+
value[2] = _dayIndex === -1 ? Number(day) < Number(_startDay) ? 0 : _newRange2[2].length - 1 : _dayIndex;
|
315
|
+
|
316
|
+
_this.setState({
|
317
|
+
changeValue: value,
|
318
|
+
range: _newRange2
|
319
|
+
});
|
320
|
+
} else {
|
321
|
+
_this.setState({
|
322
|
+
changeValue: value
|
323
|
+
});
|
324
|
+
}
|
325
|
+
}
|
326
|
+
});
|
327
|
+
|
328
|
+
_defineProperty(_assertThisInitialized(_this), "renderTitleView", function () {
|
329
|
+
var _this$props3 = _this.props,
|
330
|
+
confirmText = _this$props3.confirmText,
|
331
|
+
cancelText = _this$props3.cancelText;
|
332
|
+
return /*#__PURE__*/React.createElement(View, {
|
333
|
+
style: styles.title
|
334
|
+
}, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
335
|
+
style: styles.button,
|
336
|
+
activeOpacity: 0.8,
|
337
|
+
onPress: _this._handleCancel
|
338
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
339
|
+
style: styles.text
|
340
|
+
}, cancelText)), /*#__PURE__*/React.createElement(TouchableOpacity, {
|
341
|
+
style: styles.button,
|
342
|
+
activeOpacity: 0.8,
|
343
|
+
onPress: _this._handleConfirm
|
344
|
+
}, /*#__PURE__*/React.createElement(Text, {
|
345
|
+
style: [styles.text, {
|
346
|
+
color: '#007AFF'
|
347
|
+
}]
|
348
|
+
}, confirmText)));
|
349
|
+
});
|
350
|
+
|
351
|
+
var _this$getRangeAndValu5 = _this.getRangeAndValue(props.value || props.start),
|
352
|
+
_range = _this$getRangeAndValu5.range,
|
353
|
+
currentValue = _this$getRangeAndValu5.currentValue,
|
354
|
+
_dateListArr = _this$getRangeAndValu5.dateListArr;
|
355
|
+
|
356
|
+
_this.state = {
|
357
|
+
visible: false,
|
358
|
+
value: currentValue,
|
359
|
+
changeValue: currentValue,
|
360
|
+
dateListArr: _dateListArr,
|
361
|
+
range: _range
|
362
|
+
};
|
363
|
+
return _this;
|
364
|
+
}
|
365
|
+
|
366
|
+
_createClass(DatePicker, [{
|
367
|
+
key: "componentDidUpdate",
|
368
|
+
value: function componentDidUpdate(prevProps) {
|
369
|
+
var _this$props4 = this.props,
|
370
|
+
value = _this$props4.value,
|
371
|
+
start = _this$props4.start;
|
372
|
+
|
373
|
+
var _this$getRangeAndValu6 = this.getRangeAndValue(value || start),
|
374
|
+
range = _this$getRangeAndValu6.range,
|
375
|
+
currentValue = _this$getRangeAndValu6.currentValue;
|
376
|
+
|
377
|
+
if (value !== prevProps.value) {
|
378
|
+
this.setState({
|
379
|
+
value: currentValue,
|
380
|
+
range: range
|
381
|
+
});
|
382
|
+
}
|
383
|
+
}
|
384
|
+
}, {
|
385
|
+
key: "render",
|
386
|
+
value: function render() {
|
387
|
+
var _this2 = this;
|
388
|
+
|
389
|
+
var _this$props5 = this.props,
|
390
|
+
children = _this$props5.children,
|
391
|
+
disabled = _this$props5.disabled;
|
392
|
+
var _this$state2 = this.state,
|
393
|
+
visible = _this$state2.visible,
|
394
|
+
value = _this$state2.value,
|
395
|
+
range = _this$state2.range;
|
396
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TouchableOpacity, {
|
397
|
+
onPress: function onPress() {
|
398
|
+
return _this2.setState({
|
399
|
+
visible: true
|
400
|
+
});
|
401
|
+
},
|
402
|
+
disabled: disabled,
|
403
|
+
activeOpacity: 0.8
|
404
|
+
}, children), /*#__PURE__*/React.createElement(Modal, {
|
405
|
+
show: visible,
|
406
|
+
position: 'bottom'
|
407
|
+
}, this.renderTitleView(), Platform.OS === 'android' && /*#__PURE__*/React.createElement(View, {
|
408
|
+
style: {
|
409
|
+
backgroundColor: '#fff',
|
410
|
+
height: 2
|
411
|
+
}
|
412
|
+
}), /*#__PURE__*/React.createElement(PickerView, {
|
413
|
+
range: range,
|
414
|
+
value: value,
|
415
|
+
style: {
|
416
|
+
backgroundColor: '#fff'
|
417
|
+
},
|
418
|
+
onChange: this._handlePickerChange
|
419
|
+
})));
|
420
|
+
}
|
421
|
+
}]);
|
422
|
+
|
423
|
+
return DatePicker;
|
424
|
+
}(React.Component);
|
425
|
+
|
426
|
+
_defineProperty(DatePicker, "displayName", '_DatePicker');
|
427
|
+
|
428
|
+
_defineProperty(DatePicker, "defaultProps", defaultProps);
|
429
|
+
|
430
|
+
export { DatePicker as default };
|
431
|
+
var styles = StyleSheet.create({
|
432
|
+
button: {
|
433
|
+
height: 54,
|
434
|
+
width: 68,
|
435
|
+
alignItems: 'center',
|
436
|
+
justifyContent: 'center'
|
437
|
+
},
|
438
|
+
title: {
|
439
|
+
flexDirection: 'row',
|
440
|
+
justifyContent: 'space-between',
|
441
|
+
backgroundColor: '#fff',
|
442
|
+
borderBottomColor: 'rgba(0, 0, 0, 0.05)',
|
443
|
+
borderBottomWidth: StyleSheet.hairlineWidth
|
444
|
+
},
|
445
|
+
text: {
|
446
|
+
fontSize: 18,
|
447
|
+
color: '#333'
|
448
|
+
}
|
449
|
+
});
|
@@ -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", "onLongClick", "onTouchStart", "onT
|
|
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
|
|
10
10
|
var DatePicker = function (props) {
|
11
11
|
var className = props.className,
|
@@ -33,7 +33,7 @@ var DatePicker = function (props) {
|
|
33
33
|
touching = _useTouch2[0],
|
34
34
|
handlers = _useTouch2[1];
|
35
35
|
|
36
|
-
return /*#__PURE__*/React.createElement(
|
36
|
+
return /*#__PURE__*/React.createElement(RemaxPicker, _extends({
|
37
37
|
mode: "date",
|
38
38
|
onChange: function handleChange(e) {
|
39
39
|
onChange === null || onChange === void 0 ? void 0 : onChange({
|
package/lib/Form/Form.wechat.js
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
import { Form as _Form } from "@ray-core/wechat/esm/hostComponents/Form/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";
|
5
4
|
var _excluded = ["onClick", "onLongClick", "onTouchCancel", "onTouchEnd", "onTouchMove", "onTouchStart"];
|
6
5
|
import * as React from 'react';
|
6
|
+
import { Form as RemaxForm } from '@ray-core/wechat';
|
7
7
|
import { useTouch } from '@ray-js/framework-shared';
|
8
8
|
|
9
9
|
var Form = function (props) {
|
@@ -27,7 +27,7 @@ var Form = function (props) {
|
|
27
27
|
touching = _useTouch2[0],
|
28
28
|
handlers = _useTouch2[1];
|
29
29
|
|
30
|
-
return /*#__PURE__*/React.createElement(
|
30
|
+
return /*#__PURE__*/React.createElement(RemaxForm, _extends({}, restProps, handlers));
|
31
31
|
};
|
32
32
|
|
33
33
|
export default Form;
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
2
|
+
|
3
|
+
/**
|
4
|
+
* ✔ type
|
5
|
+
* ✔ size
|
6
|
+
* ✔ color
|
7
|
+
*/
|
8
|
+
import React from 'react';
|
9
|
+
import { View, Image } from 'react-native';
|
10
|
+
import IconFont from 'tuya-panel-icon';
|
11
|
+
import { iconList } from '../assets/icons';
|
12
|
+
import iconJson from './iconfont-rn/iconfont.json';
|
13
|
+
|
14
|
+
var _Icon = function (props) {
|
15
|
+
var style = props.style,
|
16
|
+
_props$type = props.type,
|
17
|
+
type = _props$type === void 0 ? 'success_no_circle' : _props$type,
|
18
|
+
_props$size = props.size,
|
19
|
+
size = _props$size === void 0 ? 23 : _props$size,
|
20
|
+
color = props.color;
|
21
|
+
var iconColor = color;
|
22
|
+
|
23
|
+
if (iconJson[type]) {
|
24
|
+
return /*#__PURE__*/React.createElement(IconFont, _extends({}, props, {
|
25
|
+
d: iconJson[type],
|
26
|
+
size: size,
|
27
|
+
color: iconColor
|
28
|
+
}));
|
29
|
+
}
|
30
|
+
|
31
|
+
return /*#__PURE__*/React.createElement(View, {
|
32
|
+
style: [style, {
|
33
|
+
width: size,
|
34
|
+
height: size
|
35
|
+
}]
|
36
|
+
}, /*#__PURE__*/React.createElement(Image, {
|
37
|
+
source: iconList[type],
|
38
|
+
style: {
|
39
|
+
width: size,
|
40
|
+
height: size,
|
41
|
+
tintColor: iconColor
|
42
|
+
},
|
43
|
+
tintColor: iconColor
|
44
|
+
}));
|
45
|
+
};
|
46
|
+
|
47
|
+
_Icon.displayName = '_Icon';
|
48
|
+
export default _Icon;
|