rmc-picker
Advanced tools
Comparing version 3.0.5 to 3.0.6
@@ -1,18 +0,1 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _reactNativePickerAndroid = require('react-native-picker-android'); | ||
Object.defineProperty(exports, 'default', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_reactNativePickerAndroid)["default"]; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
module.exports = exports['default']; | ||
"use strict"; |
@@ -1,15 +0,1 @@ | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _reactNative = require('react-native'); | ||
Object.defineProperty(exports, 'default', { | ||
enumerable: true, | ||
get: function get() { | ||
return _reactNative.Picker; | ||
} | ||
}); | ||
module.exports = exports['default']; | ||
"use strict"; |
@@ -7,2 +7,4 @@ 'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _reactNative = require('react-native'); | ||
@@ -45,5 +47,9 @@ | ||
var children = this.props.children.map(function (c) { | ||
return _reactNative2["default"].createElement(_NativePicker2["default"].Item, _reactNative2["default"].__spread({}, c, { key: c.value + '' })); | ||
return _reactNative2["default"].createElement(_NativePicker2["default"].Item, _extends({}, c, { key: c.value + '' })); | ||
}); | ||
return _reactNative2["default"].createElement(_NativePicker2["default"], _reactNative2["default"].__spread({}, this.props), children); | ||
return _reactNative2["default"].createElement( | ||
_NativePicker2["default"], | ||
this.props, | ||
children | ||
); | ||
}; | ||
@@ -50,0 +56,0 @@ |
@@ -412,5 +412,23 @@ 'use strict'; | ||
var items = children.map(function (item) { | ||
return React.createElement("div", { className: selectedValue === item.value ? selectedItemClassName : itemClassName, key: item.value, "data-value": item.value }, item.label); | ||
return React.createElement( | ||
'div', | ||
{ className: selectedValue === item.value ? selectedItemClassName : itemClassName, key: item.value, 'data-value': item.value }, | ||
item.label | ||
); | ||
}); | ||
return React.createElement(_reactHammerjs2["default"], { vertical: true, onPanStart: this.onPanStart, onPan: this.onPan, onPanEnd: this.onPanEnd, options: hammerOption }, React.createElement("div", { className: '' + prefixCls, "data-role": "component", ref: "component" }, React.createElement("div", { className: prefixCls + '-mask', "data-role": "mask" }), React.createElement("div", { className: prefixCls + '-indicator', "data-role": "indicator", ref: "indicator" }), React.createElement("div", { className: prefixCls + '-content', "data-role": "content", ref: "content" }, items))); | ||
return React.createElement( | ||
_reactHammerjs2["default"], | ||
{ vertical: true, onPanStart: this.onPanStart, onPan: this.onPan, onPanEnd: this.onPanEnd, options: hammerOption }, | ||
React.createElement( | ||
'div', | ||
{ className: '' + prefixCls, 'data-role': 'component', ref: 'component' }, | ||
React.createElement('div', { className: prefixCls + '-mask', 'data-role': 'mask' }), | ||
React.createElement('div', { className: prefixCls + '-indicator', 'data-role': 'indicator', ref: 'indicator' }), | ||
React.createElement( | ||
'div', | ||
{ className: prefixCls + '-content', 'data-role': 'content', ref: 'content' }, | ||
items | ||
) | ||
) | ||
); | ||
}; | ||
@@ -417,0 +435,0 @@ |
@@ -72,3 +72,46 @@ 'use strict'; | ||
return _reactNative2["default"].createElement(_reactNative.Modal, { visible: true, transparent: true, animated: true, animationType: "slide" }, _reactNative2["default"].createElement(_reactNative.View, { style: [styles.modal] }, _reactNative2["default"].createElement(_reactNative.View, { style: [styles.modalContent] }, _reactNative2["default"].createElement(_reactNative.View, { style: [styles.header] }, _reactNative2["default"].createElement(_reactNative.TouchableHighlight, { onPress: this.onDismiss, style: [styles.headerItem], activeOpacity: props.actionTextActiveOpacity, underlayColor: props.actionTextUnderlayColor }, _reactNative2["default"].createElement(_reactNative.Text, { style: [styles.actionText] }, props.dismissText)), _reactNative2["default"].createElement(_reactNative.View, { style: [styles.headerItem] }, _reactNative2["default"].createElement(_reactNative.Text, { style: [styles.title] }, props.title)), _reactNative2["default"].createElement(_reactNative.TouchableHighlight, { onPress: this.onOk, style: [styles.headerItem], activeOpacity: props.actionTextActiveOpacity, underlayColor: props.actionTextUnderlayColor }, _reactNative2["default"].createElement(_reactNative.Text, { style: [styles.actionText] }, props.okText))), props.content))); | ||
return _reactNative2["default"].createElement( | ||
_reactNative.Modal, | ||
{ visible: true, transparent: true, animated: true, animationType: 'slide' }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.View, | ||
{ style: [styles.modal] }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.View, | ||
{ style: [styles.modalContent] }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.View, | ||
{ style: [styles.header] }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.TouchableHighlight, | ||
{ onPress: this.onDismiss, style: [styles.headerItem], activeOpacity: props.actionTextActiveOpacity, underlayColor: props.actionTextUnderlayColor }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.Text, | ||
{ style: [styles.actionText] }, | ||
props.dismissText | ||
) | ||
), | ||
_reactNative2["default"].createElement( | ||
_reactNative.View, | ||
{ style: [styles.headerItem] }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.Text, | ||
{ style: [styles.title] }, | ||
props.title | ||
) | ||
), | ||
_reactNative2["default"].createElement( | ||
_reactNative.TouchableHighlight, | ||
{ onPress: this.onOk, style: [styles.headerItem], activeOpacity: props.actionTextActiveOpacity, underlayColor: props.actionTextUnderlayColor }, | ||
_reactNative2["default"].createElement( | ||
_reactNative.Text, | ||
{ style: [styles.actionText] }, | ||
props.okText | ||
) | ||
) | ||
), | ||
props.content | ||
) | ||
) | ||
); | ||
}; | ||
@@ -95,3 +138,8 @@ | ||
}; | ||
return _reactNative2["default"].createElement(_reactNative.View, { style: props.style }, _reactNative2["default"].cloneElement(child, newChildProps), this.getModal()); | ||
return _reactNative2["default"].createElement( | ||
_reactNative.View, | ||
{ style: props.style }, | ||
_reactNative2["default"].cloneElement(child, newChildProps), | ||
this.getModal() | ||
); | ||
}; | ||
@@ -98,0 +146,0 @@ |
{ | ||
"name": "rmc-picker", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "React Mobile Picker Component(web and react-native)", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
62746
32
1380