rmc-cascader
Advanced tools
Comparing version 2.2.1 to 2.2.2
import * as React from 'react'; | ||
import { CascaderProps, CascaderState } from './CascaderTypes'; | ||
export default class Cascader extends React.Component<CascaderProps, CascaderState> { | ||
getChildrenTree: () => any[]; | ||
getColArray: () => any[]; | ||
onValueChange: (i, v) => any; | ||
render(): JSX.Element; | ||
} | ||
import { CascaderProps } from './CascaderTypes'; | ||
declare const Cascader: React.ClassicComponentClass<CascaderProps>; | ||
export default Cascader; |
@@ -17,6 +17,2 @@ 'use strict'; | ||
var _reactMixin = require('react-mixin'); | ||
var _reactMixin2 = _interopRequireDefault(_reactMixin); | ||
var _CascaderMixin = require('./CascaderMixin'); | ||
@@ -30,10 +26,2 @@ | ||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } | ||
var styles = _reactNative.StyleSheet.create({ | ||
@@ -50,16 +38,9 @@ item: { | ||
}); | ||
var Cascader = React.createClass({ | ||
displayName: 'Cascader', | ||
var Cascader = function (_React$Component) { | ||
_inherits(Cascader, _React$Component); | ||
mixins: [_CascaderMixin2["default"]], | ||
render: function render() { | ||
var _this = this; | ||
function Cascader() { | ||
_classCallCheck(this, Cascader); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
Cascader.prototype.render = function render() { | ||
var _this2 = this; | ||
var props = this.props; | ||
var value = this.state.value; | ||
@@ -74,3 +55,3 @@ var childrenTree = this.getChildrenTree(); | ||
{ pure: false, selectedValue: value[i], onValueChange: function onValueChange(v) { | ||
_this2.onValueChange(i, v); | ||
_this.onValueChange(i, v); | ||
} }, | ||
@@ -86,10 +67,5 @@ childrenTree[i] || [] | ||
); | ||
}; | ||
return Cascader; | ||
}(React.Component); | ||
} | ||
}); | ||
exports["default"] = Cascader; | ||
_reactMixin2["default"].onClass(Cascader, _CascaderMixin2["default"]); | ||
module.exports = exports['default']; |
import * as React from 'react'; | ||
import { CascaderProps, CascaderState } from './CascaderTypes'; | ||
export interface CascaderPropsWeb extends CascaderProps { | ||
prefixCls?: string; | ||
pickerPrefixCls?: string; | ||
className?: string; | ||
} | ||
export default class Cascader extends React.Component<CascaderPropsWeb, CascaderState> { | ||
static defaultProps: { | ||
prefixCls: string; | ||
pickerPrefixCls: string; | ||
}; | ||
getChildrenTree: () => any[]; | ||
getColArray: () => any[]; | ||
onValueChange: (i, v) => any; | ||
render(): JSX.Element; | ||
} | ||
import { CascaderProps } from './CascaderTypes'; | ||
declare const Cascader: React.ClassicComponentClass<CascaderProps>; | ||
export default Cascader; |
@@ -19,6 +19,2 @@ 'use strict'; | ||
var _reactMixin = require('react-mixin'); | ||
var _reactMixin2 = _interopRequireDefault(_reactMixin); | ||
var _CascaderMixin = require('./CascaderMixin'); | ||
@@ -32,22 +28,16 @@ | ||
function _defaults(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; } | ||
var Cascader = React.createClass({ | ||
displayName: 'Cascader', | ||
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } | ||
mixins: [_CascaderMixin2["default"]], | ||
getDefaultProps: function getDefaultProps() { | ||
return { | ||
prefixCls: 'rmc-cascader', | ||
pickerPrefixCls: 'rmc-picker', | ||
data: [] | ||
}; | ||
}, | ||
render: function render() { | ||
var _this = this; | ||
function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; } | ||
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : _defaults(subClass, superClass); } | ||
var Cascader = function (_React$Component) { | ||
_inherits(Cascader, _React$Component); | ||
function Cascader() { | ||
_classCallCheck(this, Cascader); | ||
return _possibleConstructorReturn(this, _React$Component.apply(this, arguments)); | ||
} | ||
Cascader.prototype.render = function render() { | ||
var _this2 = this; | ||
var props = this.props; | ||
@@ -66,3 +56,3 @@ var prefixCls = props.prefixCls; | ||
_Picker2["default"], | ||
{ prefixCls: pickerPrefixCls, selectedValue: value[i], onValueChange: _this2.onValueChange.bind(_this2, i) }, | ||
{ prefixCls: pickerPrefixCls, selectedValue: value[i], onValueChange: _this.onValueChange.bind(_this, i) }, | ||
childrenTree[i] || [] | ||
@@ -77,14 +67,5 @@ ) | ||
); | ||
}; | ||
return Cascader; | ||
}(React.Component); | ||
} | ||
}); | ||
exports["default"] = Cascader; | ||
Cascader.defaultProps = { | ||
prefixCls: 'rmc-cascader', | ||
pickerPrefixCls: 'rmc-picker' | ||
}; | ||
_reactMixin2["default"].onClass(Cascader, _CascaderMixin2["default"]); | ||
module.exports = exports['default']; |
@@ -14,2 +14,8 @@ export declare type CascaderOneValue = string | number; | ||
cols?: number; | ||
/** web only */ | ||
prefixCls?: string; | ||
/** web only */ | ||
pickerPrefixCls?: string; | ||
/** web only */ | ||
className?: string; | ||
} | ||
@@ -16,0 +22,0 @@ export interface CascaderState { |
import * as React from 'react'; | ||
import { PopupPickerPropsWeb } from 'rmc-picker/lib/PopupPickerTypes'; | ||
import { PopupPickerProps } from 'rmc-picker/lib/PopupPickerTypes'; | ||
import { CascaderProps, CascaderValue } from './CascaderTypes'; | ||
export interface PopupCascaderProps extends PopupPickerPropsWeb, CascaderProps { | ||
export interface PopupCascaderProps extends PopupPickerProps, CascaderProps { | ||
popupPrefixCls?: string; | ||
pickerPrefixCls?: string; | ||
styles?: any; | ||
visible?: boolean; | ||
@@ -9,0 +8,0 @@ mode?: string; |
@@ -1,1 +0,18 @@ | ||
"use strict"; | ||
'use strict'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
var _PopupStyles = require('rmc-picker/lib/PopupStyles'); | ||
Object.defineProperty(exports, 'default', { | ||
enumerable: true, | ||
get: function get() { | ||
return _interopRequireDefault(_PopupStyles)["default"]; | ||
} | ||
}); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
module.exports = exports['default']; |
{ | ||
"name": "rmc-cascader", | ||
"version": "2.2.1", | ||
"version": "2.2.2", | ||
"description": "m-cascader ui component for react", | ||
@@ -30,2 +30,3 @@ "keywords": [ | ||
"watch-tsc": "rc-tools run watch-tsc", | ||
"compile": "rc-tools run compile", | ||
"build": "rc-tools run build", | ||
@@ -48,3 +49,3 @@ "gh-pages": "rc-tools run gh-pages", | ||
"rc-tools": "5.x", | ||
"react-native": "0.28.0", | ||
"react-native": "0.30.0", | ||
"react": "15.x", | ||
@@ -61,5 +62,4 @@ "react-addons-test-utils": "15.x", | ||
"classnames": "2.x", | ||
"react-mixin": "~3.0.5", | ||
"rmc-picker": "3.x" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
22651
436
- Removedreact-mixin@~3.0.5
- Removedreact-mixin@3.0.5(transitive)
- Removedsmart-mixin@2.0.0(transitive)