diff --git a/lib/app_bar/AppBar.js b/lib/app_bar/AppBar.js index 9d79919e..4ae2106e 100644 --- a/lib/app_bar/AppBar.js +++ b/lib/app_bar/AppBar.js @@ -38,7 +38,7 @@ var factory = function factory(IconButton) { _inherits(AppBar, _React$Component); function AppBar() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -48,7 +48,7 @@ var factory = function factory(IconButton) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(AppBar)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { hidden: false, height: 0 }, _this.initializeScroll = function () { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = AppBar.__proto__ || Object.getPrototypeOf(AppBar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { hidden: false, height: 0 }, _this.initializeScroll = function () { window.addEventListener('scroll', _this.handleScroll); var _this$rootNode$getBou = _this.rootNode.getBoundingClientRect(); diff --git a/lib/autocomplete/Autocomplete.js b/lib/autocomplete/Autocomplete.js index 8b323568..5fa0e59e 100644 --- a/lib/autocomplete/Autocomplete.js +++ b/lib/autocomplete/Autocomplete.js @@ -64,7 +64,7 @@ var factory = function factory(Chip, Input) { _inherits(Autocomplete, _Component); function Autocomplete() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -74,7 +74,7 @@ var factory = function factory(Chip, Input) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Autocomplete)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Autocomplete.__proto__ || Object.getPrototypeOf(Autocomplete)).call.apply(_ref, [this].concat(args))), _this), _this.state = { direction: _this.props.direction, focus: false, showAllSuggestions: _this.props.showSuggestionsWhenValueIsSet, @@ -334,11 +334,11 @@ var factory = function factory(Chip, Input) { var _this2 = this; if (this.props.multiple) { - var selectedItems = [].concat(_toConsumableArray(this.values())).map(function (_ref) { - var _ref2 = _slicedToArray(_ref, 2); + var selectedItems = [].concat(_toConsumableArray(this.values())).map(function (_ref2) { + var _ref3 = _slicedToArray(_ref2, 2); - var key = _ref2[0]; - var value = _ref2[1]; + var key = _ref3[0]; + var value = _ref3[1]; return _react2.default.createElement( Chip, @@ -366,11 +366,11 @@ var factory = function factory(Chip, Input) { var theme = this.props.theme; - var suggestions = [].concat(_toConsumableArray(this.suggestions())).map(function (_ref3) { - var _ref4 = _slicedToArray(_ref3, 2); + var suggestions = [].concat(_toConsumableArray(this.suggestions())).map(function (_ref4) { + var _ref5 = _slicedToArray(_ref4, 2); - var key = _ref4[0]; - var value = _ref4[1]; + var key = _ref5[0]; + var value = _ref5[1]; var className = (0, _classnames5.default)(theme.suggestion, _defineProperty({}, theme.active, _this3.state.active === key)); return _react2.default.createElement( diff --git a/lib/button/Button.js b/lib/button/Button.js index 2b9e424f..b38aeb3b 100644 --- a/lib/button/Button.js +++ b/lib/button/Button.js @@ -46,7 +46,7 @@ var factory = function factory(ripple, FontIcon) { _inherits(Button, _Component); function Button() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -56,7 +56,7 @@ var factory = function factory(ripple, FontIcon) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Button)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleMouseUp = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Button.__proto__ || Object.getPrototypeOf(Button)).call.apply(_ref, [this].concat(args))), _this), _this.handleMouseUp = function (event) { _this.refs.button.blur(); if (_this.props.onMouseUp) _this.props.onMouseUp(event); }, _this.handleMouseLeave = function (event) { diff --git a/lib/button/IconButton.js b/lib/button/IconButton.js index 98f6331b..40f22fd9 100644 --- a/lib/button/IconButton.js +++ b/lib/button/IconButton.js @@ -46,7 +46,7 @@ var factory = function factory(ripple, FontIcon) { _inherits(IconButton, _Component); function IconButton() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -56,7 +56,7 @@ var factory = function factory(ripple, FontIcon) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(IconButton)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleMouseUp = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = IconButton.__proto__ || Object.getPrototypeOf(IconButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleMouseUp = function (event) { _this.refs.button.blur(); if (_this.props.onMouseUp) _this.props.onMouseUp(event); }, _this.handleMouseLeave = function (event) { diff --git a/lib/checkbox/Checkbox.js b/lib/checkbox/Checkbox.js index 5b4ae9bd..136f82e8 100644 --- a/lib/checkbox/Checkbox.js +++ b/lib/checkbox/Checkbox.js @@ -46,7 +46,7 @@ var factory = function factory(Check) { _inherits(Checkbox, _Component); function Checkbox() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -56,7 +56,7 @@ var factory = function factory(Check) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Checkbox)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleToggle = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Checkbox.__proto__ || Object.getPrototypeOf(Checkbox)).call.apply(_ref, [this].concat(args))), _this), _this.handleToggle = function (event) { if (event.pageX !== 0 && event.pageY !== 0) _this.blur(); if (!_this.props.disabled && _this.props.onChange) { _this.props.onChange(!_this.props.checked, event); diff --git a/lib/date_picker/Calendar.js b/lib/date_picker/Calendar.js index ddbea1ba..3e0f8ae9 100644 --- a/lib/date_picker/Calendar.js +++ b/lib/date_picker/Calendar.js @@ -43,7 +43,7 @@ var factory = function factory(IconButton) { _inherits(Calendar, _Component); function Calendar() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -53,7 +53,7 @@ var factory = function factory(IconButton) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Calendar)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Calendar.__proto__ || Object.getPrototypeOf(Calendar)).call.apply(_ref, [this].concat(args))), _this), _this.state = { viewDate: _this.props.selectedDate }, _this.handleDayClick = function (day) { _this.props.onChange(_time2.default.setDay(_this.state.viewDate, day), true); diff --git a/lib/date_picker/CalendarDay.js b/lib/date_picker/CalendarDay.js index 023206fd..af1b4a94 100644 --- a/lib/date_picker/CalendarDay.js +++ b/lib/date_picker/CalendarDay.js @@ -32,7 +32,7 @@ var Day = function (_Component) { _inherits(Day, _Component); function Day() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -42,7 +42,7 @@ var Day = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Day)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleClick = function () { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Day.__proto__ || Object.getPrototypeOf(Day)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function () { if (!_this.props.disabled && _this.props.onClick) { _this.props.onClick(_this.props.day); } diff --git a/lib/date_picker/CalendarMonth.js b/lib/date_picker/CalendarMonth.js index 772c665e..ad3afbe2 100644 --- a/lib/date_picker/CalendarMonth.js +++ b/lib/date_picker/CalendarMonth.js @@ -36,7 +36,7 @@ var Month = function (_Component) { _inherits(Month, _Component); function Month() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -46,7 +46,7 @@ var Month = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Month)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleDayClick = function (day) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Month.__proto__ || Object.getPrototypeOf(Month)).call.apply(_ref, [this].concat(args))), _this), _this.handleDayClick = function (day) { if (_this.props.onDayClick) _this.props.onDayClick(day); }, _temp), _possibleConstructorReturn(_this, _ret); } diff --git a/lib/date_picker/DatePicker.js b/lib/date_picker/DatePicker.js index 1ac61bc7..a0755403 100644 --- a/lib/date_picker/DatePicker.js +++ b/lib/date_picker/DatePicker.js @@ -66,7 +66,7 @@ var factory = function factory(Input, DatePickerDialog) { _inherits(DatePicker, _Component); function DatePicker() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -76,7 +76,7 @@ var factory = function factory(Input, DatePickerDialog) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(DatePicker)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = DatePicker.__proto__ || Object.getPrototypeOf(DatePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: _this.props.active }, _this.handleDismiss = function () { _this.setState({ active: false }); diff --git a/lib/date_picker/DatePickerDialog.js b/lib/date_picker/DatePickerDialog.js index eca03655..c9f934b2 100644 --- a/lib/date_picker/DatePickerDialog.js +++ b/lib/date_picker/DatePickerDialog.js @@ -31,7 +31,7 @@ var factory = function factory(Dialog, Calendar) { _inherits(CalendarDialog, _Component); function CalendarDialog() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -41,7 +41,7 @@ var factory = function factory(Dialog, Calendar) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(CalendarDialog)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = CalendarDialog.__proto__ || Object.getPrototypeOf(CalendarDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { display: 'months', date: _this.props.value }, _this.handleNewDate = function (value, dayClick) { diff --git a/lib/dropdown/Dropdown.js b/lib/dropdown/Dropdown.js index 4f9d2dbf..66bafcab 100644 --- a/lib/dropdown/Dropdown.js +++ b/lib/dropdown/Dropdown.js @@ -50,7 +50,7 @@ var factory = function factory(Input) { _inherits(Dropdown, _Component); function Dropdown() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -60,7 +60,7 @@ var factory = function factory(Input) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Dropdown)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Dropdown.__proto__ || Object.getPrototypeOf(Dropdown)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false, up: false }, _this.close = function () { diff --git a/lib/form/Form.js b/lib/form/Form.js index 7de399c9..fe56e77f 100644 --- a/lib/form/Form.js +++ b/lib/form/Form.js @@ -80,7 +80,7 @@ var factory = function factory(Autocomplete, Button, Checkbox, DatePicker, Dropd _inherits(Form, _Component); function Form() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -90,7 +90,7 @@ var factory = function factory(Autocomplete, Button, Checkbox, DatePicker, Dropd args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Form)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.onSubmit = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Form.__proto__ || Object.getPrototypeOf(Form)).call.apply(_ref, [this].concat(args))), _this), _this.onSubmit = function (event) { event.preventDefault(); if (_this.props.onSubmit) _this.props.onSubmit(event); }, _this.onChange = function (field, value, event) { diff --git a/lib/hoc/ActivableRenderer.js b/lib/hoc/ActivableRenderer.js index e64654f7..b43301a5 100644 --- a/lib/hoc/ActivableRenderer.js +++ b/lib/hoc/ActivableRenderer.js @@ -23,7 +23,7 @@ function _possibleConstructorReturn(self, call) { if (!self) { throw new Referen 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) : subClass.__proto__ = superClass; } var ActivableRendererFactory = function ActivableRendererFactory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? { delay: 500 } : arguments[0]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { delay: 500 }; return function (ActivableComponent) { var _class, _temp2; @@ -31,7 +31,7 @@ var ActivableRendererFactory = function ActivableRendererFactory() { _inherits(ActivableRenderer, _Component); function ActivableRenderer() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -41,7 +41,7 @@ var ActivableRendererFactory = function ActivableRendererFactory() { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ActivableRenderer)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ActivableRenderer.__proto__ || Object.getPrototypeOf(ActivableRenderer)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: _this.props.active, rendered: _this.props.active }, _temp), _possibleConstructorReturn(_this, _ret); diff --git a/lib/hoc/Portal.js b/lib/hoc/Portal.js index bf12d903..0d8cda45 100644 --- a/lib/hoc/Portal.js +++ b/lib/hoc/Portal.js @@ -28,7 +28,7 @@ var Portal = function (_Component) { function Portal() { _classCallCheck(this, Portal); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Portal).apply(this, arguments)); + return _possibleConstructorReturn(this, (Portal.__proto__ || Object.getPrototypeOf(Portal)).apply(this, arguments)); } _createClass(Portal, [{ diff --git a/lib/input/Input.js b/lib/input/Input.js index d29f218b..7383da6e 100644 --- a/lib/input/Input.js +++ b/lib/input/Input.js @@ -7,7 +7,7 @@ exports.Input = exports.inputFactory = undefined; 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 _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; }; +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); @@ -44,7 +44,7 @@ var factory = function factory(FontIcon) { _inherits(Input, _React$Component); function Input() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -54,7 +54,7 @@ var factory = function factory(FontIcon) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Input)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleChange = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Input.__proto__ || Object.getPrototypeOf(Input)).call.apply(_ref, [this].concat(args))), _this), _this.handleChange = function (event) { var _this$props = _this.props; var onChange = _this$props.onChange; var multiline = _this$props.multiline; diff --git a/lib/list/List.js b/lib/list/List.js index cd315c95..eac163f8 100644 --- a/lib/list/List.js +++ b/lib/list/List.js @@ -38,7 +38,7 @@ var factory = function factory(ListItem) { function List() { _classCallCheck(this, List); - return _possibleConstructorReturn(this, Object.getPrototypeOf(List).apply(this, arguments)); + return _possibleConstructorReturn(this, (List.__proto__ || Object.getPrototypeOf(List)).apply(this, arguments)); } _createClass(List, [{ diff --git a/lib/list/ListItem.js b/lib/list/ListItem.js index 193dec03..3358acdd 100644 --- a/lib/list/ListItem.js +++ b/lib/list/ListItem.js @@ -44,7 +44,7 @@ var factory = function factory(ripple, ListItemLayout, ListItemContent) { _inherits(ListItem, _Component); function ListItem() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -54,7 +54,7 @@ var factory = function factory(ripple, ListItemLayout, ListItemContent) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(ListItem)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleClick = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = ListItem.__proto__ || Object.getPrototypeOf(ListItem)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { if (_this.props.onClick && !_this.props.disabled) { _this.props.onClick(event); } diff --git a/lib/list/ListItemContent.js b/lib/list/ListItemContent.js index 25b92207..e8296af0 100644 --- a/lib/list/ListItemContent.js +++ b/lib/list/ListItemContent.js @@ -42,7 +42,7 @@ var factory = function factory(ListItemText) { function ListItemContent() { _classCallCheck(this, ListItemContent); - return _possibleConstructorReturn(this, Object.getPrototypeOf(ListItemContent).apply(this, arguments)); + return _possibleConstructorReturn(this, (ListItemContent.__proto__ || Object.getPrototypeOf(ListItemContent)).apply(this, arguments)); } _createClass(ListItemContent, [{ diff --git a/lib/menu/IconMenu.js b/lib/menu/IconMenu.js index f076af1b..70bff718 100644 --- a/lib/menu/IconMenu.js +++ b/lib/menu/IconMenu.js @@ -40,7 +40,7 @@ var factory = function factory(IconButton, Menu) { _inherits(IconMenu, _Component); function IconMenu() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -50,7 +50,7 @@ var factory = function factory(IconButton, Menu) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(IconMenu)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = IconMenu.__proto__ || Object.getPrototypeOf(IconMenu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false }, _this.handleButtonClick = function (event) { _this.setState({ active: !_this.state.active }); diff --git a/lib/menu/Menu.js b/lib/menu/Menu.js index ca67b900..fb8199dc 100644 --- a/lib/menu/Menu.js +++ b/lib/menu/Menu.js @@ -53,7 +53,7 @@ var factory = function factory(MenuItem) { _inherits(Menu, _Component); function Menu() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -63,7 +63,7 @@ var factory = function factory(MenuItem) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Menu)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Menu.__proto__ || Object.getPrototypeOf(Menu)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: _this.props.active, rippled: false }, _this.handleDocumentClick = function (event) { diff --git a/lib/menu/MenuItem.js b/lib/menu/MenuItem.js index 7562dfa0..2670f432 100644 --- a/lib/menu/MenuItem.js +++ b/lib/menu/MenuItem.js @@ -46,7 +46,7 @@ var factory = function factory(ripple) { _inherits(MenuItem, _Component); function MenuItem() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -56,7 +56,7 @@ var factory = function factory(ripple) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(MenuItem)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleClick = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = MenuItem.__proto__ || Object.getPrototypeOf(MenuItem)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { if (_this.props.onClick && !_this.props.disabled) { _this.props.onClick(event, _this); } diff --git a/lib/overlay/Overlay.js b/lib/overlay/Overlay.js index 21d96c8c..f5662715 100644 --- a/lib/overlay/Overlay.js +++ b/lib/overlay/Overlay.js @@ -39,7 +39,7 @@ var Overlay = function (_Component) { function Overlay() { _classCallCheck(this, Overlay); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Overlay).apply(this, arguments)); + return _possibleConstructorReturn(this, (Overlay.__proto__ || Object.getPrototypeOf(Overlay)).apply(this, arguments)); } _createClass(Overlay, [{ diff --git a/lib/progress_bar/ProgressBar.js b/lib/progress_bar/ProgressBar.js index c1a36201..f8a16e85 100644 --- a/lib/progress_bar/ProgressBar.js +++ b/lib/progress_bar/ProgressBar.js @@ -39,7 +39,7 @@ var ProgressBar = function (_Component) { function ProgressBar() { _classCallCheck(this, ProgressBar); - return _possibleConstructorReturn(this, Object.getPrototypeOf(ProgressBar).apply(this, arguments)); + return _possibleConstructorReturn(this, (ProgressBar.__proto__ || Object.getPrototypeOf(ProgressBar)).apply(this, arguments)); } _createClass(ProgressBar, [{ diff --git a/lib/radio/RadioButton.js b/lib/radio/RadioButton.js index 7fe8abe0..71ee095a 100644 --- a/lib/radio/RadioButton.js +++ b/lib/radio/RadioButton.js @@ -44,7 +44,7 @@ var factory = function factory(Radio) { _inherits(RadioButton, _Component); function RadioButton() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -54,7 +54,7 @@ var factory = function factory(Radio) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RadioButton)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleClick = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = RadioButton.__proto__ || Object.getPrototypeOf(RadioButton)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { var _this$props = _this.props; var checked = _this$props.checked; var disabled = _this$props.disabled; diff --git a/lib/radio/RadioGroup.js b/lib/radio/RadioGroup.js index aa7ff0bc..15c87f02 100644 --- a/lib/radio/RadioGroup.js +++ b/lib/radio/RadioGroup.js @@ -34,7 +34,7 @@ var factory = function factory(RadioButton) { _inherits(RadioGroup, _Component); function RadioGroup() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -44,7 +44,7 @@ var factory = function factory(RadioButton) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RadioGroup)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleChange = function (value) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = RadioGroup.__proto__ || Object.getPrototypeOf(RadioGroup)).call.apply(_ref, [this].concat(args))), _this), _this.handleChange = function (value) { if (_this.props.onChange) _this.props.onChange(value); }, _temp), _possibleConstructorReturn(_this, _ret); } diff --git a/lib/ripple/Ripple.js b/lib/ripple/Ripple.js index 9d728173..79a0f35b 100644 --- a/lib/ripple/Ripple.js +++ b/lib/ripple/Ripple.js @@ -61,7 +61,7 @@ var defaults = { }; var rippleFactory = function rippleFactory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _defaults$options = _extends({}, defaults, options); @@ -78,7 +78,7 @@ var rippleFactory = function rippleFactory() { _inherits(RippledComponent, _Component); function RippledComponent() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -88,7 +88,7 @@ var rippleFactory = function rippleFactory() { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(RippledComponent)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = RippledComponent.__proto__ || Object.getPrototypeOf(RippledComponent)).call.apply(_ref, [this].concat(args))), _this), _this.state = { ripples: {} }, _this.handleMouseDown = function (event) { if (_this.props.onMouseDown) _this.props.onMouseDown(event); @@ -304,14 +304,14 @@ var rippleFactory = function rippleFactory() { } }, { key: 'renderRipple', - value: function renderRipple(key, className, _ref) { + value: function renderRipple(key, className, _ref2) { var _classnames; - var active = _ref.active; - var left = _ref.left; - var restarting = _ref.restarting; - var top = _ref.top; - var width = _ref.width; + var active = _ref2.active; + var left = _ref2.left; + var restarting = _ref2.restarting; + var top = _ref2.top; + var width = _ref2.width; var scale = restarting ? 0 : 1; var transform = 'translate3d(' + (-width / 2 + left) + 'px, ' + (-width / 2 + top) + 'px, 0) scale(' + scale + ')'; diff --git a/lib/slider/Slider.js b/lib/slider/Slider.js index cfd2171b..0ec33d19 100644 --- a/lib/slider/Slider.js +++ b/lib/slider/Slider.js @@ -54,7 +54,7 @@ var factory = function factory(ProgressBar, Input) { _inherits(Slider, _Component); function Slider() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -64,7 +64,7 @@ var factory = function factory(ProgressBar, Input) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Slider)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Slider.__proto__ || Object.getPrototypeOf(Slider)).call.apply(_ref, [this].concat(args))), _this), _this.state = { inputFocused: false, inputValue: null, sliderLength: 0, diff --git a/lib/snackbar/Snackbar.js b/lib/snackbar/Snackbar.js index bbb90867..18ea4227 100644 --- a/lib/snackbar/Snackbar.js +++ b/lib/snackbar/Snackbar.js @@ -52,7 +52,7 @@ var factory = function factory(Overlay, Button) { function Snackbar() { _classCallCheck(this, Snackbar); - return _possibleConstructorReturn(this, Object.getPrototypeOf(Snackbar).apply(this, arguments)); + return _possibleConstructorReturn(this, (Snackbar.__proto__ || Object.getPrototypeOf(Snackbar)).apply(this, arguments)); } _createClass(Snackbar, [{ @@ -79,6 +79,7 @@ var factory = function factory(Overlay, Button) { var _props = this.props; var action = _props.action; var active = _props.active; + var children = _props.children; var icon = _props.icon; var label = _props.label; var onClick = _props.onClick; @@ -97,7 +98,8 @@ var factory = function factory(Overlay, Button) { _react2.default.createElement( 'span', { className: theme.label }, - label + label, + children ), action ? _react2.default.createElement(Button, { className: theme.button, label: action, onClick: onClick }) : null ) @@ -111,9 +113,10 @@ var factory = function factory(Overlay, Button) { Snackbar.propTypes = { action: _react.PropTypes.string, active: _react.PropTypes.bool, + children: _react.PropTypes.node, className: _react.PropTypes.string, icon: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), - label: _react.PropTypes.string, + label: _react.PropTypes.oneOfType([_react.PropTypes.string, _react.PropTypes.element]), onClick: _react.PropTypes.func, onTimeout: _react.PropTypes.func, theme: _react.PropTypes.shape({ diff --git a/lib/switch/Switch.js b/lib/switch/Switch.js index 96ad9977..b723eccb 100644 --- a/lib/switch/Switch.js +++ b/lib/switch/Switch.js @@ -44,7 +44,7 @@ var factory = function factory(Thumb) { _inherits(Switch, _Component); function Switch() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -54,7 +54,7 @@ var factory = function factory(Thumb) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Switch)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleToggle = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Switch.__proto__ || Object.getPrototypeOf(Switch)).call.apply(_ref, [this].concat(args))), _this), _this.handleToggle = function (event) { if (event.pageX !== 0 && event.pageY !== 0) _this.blur(); if (!_this.props.disabled && _this.props.onChange) { _this.props.onChange(!_this.props.checked, event); diff --git a/lib/table/Table.js b/lib/table/Table.js index a9903815..aadc261c 100644 --- a/lib/table/Table.js +++ b/lib/table/Table.js @@ -46,7 +46,7 @@ var factory = function factory(TableHead, TableRow) { _inherits(Table, _Component); function Table() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -56,7 +56,7 @@ var factory = function factory(TableHead, TableRow) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Table)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleFullSelect = function () { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Table.__proto__ || Object.getPrototypeOf(Table)).call.apply(_ref, [this].concat(args))), _this), _this.handleFullSelect = function () { if (_this.props.onSelect) { var _this$props = _this.props; var source = _this$props.source; diff --git a/lib/table/TableRow.js b/lib/table/TableRow.js index c2cbe306..c7140602 100644 --- a/lib/table/TableRow.js +++ b/lib/table/TableRow.js @@ -33,7 +33,7 @@ var factory = function factory(Checkbox) { _inherits(TableRow, _Component); function TableRow() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -43,7 +43,7 @@ var factory = function factory(Checkbox) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(TableRow)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleInputChange = function (index, key, type, event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = TableRow.__proto__ || Object.getPrototypeOf(TableRow)).call.apply(_ref, [this].concat(args))), _this), _this.handleInputChange = function (index, key, type, event) { var value = void 0; switch (type) { case 'checkbox': diff --git a/lib/tabs/Tab.js b/lib/tabs/Tab.js index f1c272a0..901468ff 100644 --- a/lib/tabs/Tab.js +++ b/lib/tabs/Tab.js @@ -39,7 +39,7 @@ var Tab = function (_Component) { _inherits(Tab, _Component); function Tab() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -49,7 +49,7 @@ var Tab = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Tab)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleClick = function (event) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Tab.__proto__ || Object.getPrototypeOf(Tab)).call.apply(_ref, [this].concat(args))), _this), _this.handleClick = function (event) { if (!_this.props.disabled && _this.props.onClick) { _this.props.onClick(event); } diff --git a/lib/tabs/TabContent.js b/lib/tabs/TabContent.js index 96f3538b..65bd7a6a 100644 --- a/lib/tabs/TabContent.js +++ b/lib/tabs/TabContent.js @@ -35,7 +35,7 @@ var TabContent = function (_Component) { function TabContent() { _classCallCheck(this, TabContent); - return _possibleConstructorReturn(this, Object.getPrototypeOf(TabContent).apply(this, arguments)); + return _possibleConstructorReturn(this, (TabContent.__proto__ || Object.getPrototypeOf(TabContent)).apply(this, arguments)); } _createClass(TabContent, [{ diff --git a/lib/tabs/Tabs.js b/lib/tabs/Tabs.js index 01664685..2e0d4de0 100644 --- a/lib/tabs/Tabs.js +++ b/lib/tabs/Tabs.js @@ -42,7 +42,7 @@ var factory = function factory(Tab, TabContent) { _inherits(Tabs, _Component); function Tabs() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -52,7 +52,7 @@ var factory = function factory(Tab, TabContent) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Tabs)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Tabs.__proto__ || Object.getPrototypeOf(Tabs)).call.apply(_ref, [this].concat(args))), _this), _this.state = { pointer: {} }, _this.handleHeaderClick = function (event) { var idx = parseInt(event.currentTarget.id); diff --git a/lib/tabs/__tests__/index.spec.js b/lib/tabs/__tests__/index.spec.js index de59ddee..32bca1a3 100644 --- a/lib/tabs/__tests__/index.spec.js +++ b/lib/tabs/__tests__/index.spec.js @@ -63,7 +63,7 @@ describe('Tabs', function () { function Composition() { _classCallCheck(this, Composition); - var _this = _possibleConstructorReturn(this, Object.getPrototypeOf(Composition).call(this)); + var _this = _possibleConstructorReturn(this, (Composition.__proto__ || Object.getPrototypeOf(Composition)).call(this)); _this.state = { index: 0 }; return _this; diff --git a/lib/time_picker/Clock.js b/lib/time_picker/Clock.js index 2b74f0a1..aaa55acc 100644 --- a/lib/time_picker/Clock.js +++ b/lib/time_picker/Clock.js @@ -40,7 +40,7 @@ var Clock = function (_Component) { _inherits(Clock, _Component); function Clock() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -50,7 +50,7 @@ var Clock = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Clock)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Clock.__proto__ || Object.getPrototypeOf(Clock)).call.apply(_ref, [this].concat(args))), _this), _this.state = { center: { x: null, y: null }, radius: 0 }, _this.handleHourChange = function (hours) { diff --git a/lib/time_picker/ClockFace.js b/lib/time_picker/ClockFace.js index 54ca2640..b2604a0c 100644 --- a/lib/time_picker/ClockFace.js +++ b/lib/time_picker/ClockFace.js @@ -28,7 +28,7 @@ var Face = function (_Component) { _inherits(Face, _Component); function Face() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -38,7 +38,7 @@ var Face = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Face)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.renderNumber = function (number, idx) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Face.__proto__ || Object.getPrototypeOf(Face)).call.apply(_ref, [this].concat(args))), _this), _this.renderNumber = function (number, idx) { var _this$props = _this.props; var active = _this$props.active; var radius = _this$props.radius; diff --git a/lib/time_picker/ClockHand.js b/lib/time_picker/ClockHand.js index 053b19e0..d16bdaea 100644 --- a/lib/time_picker/ClockHand.js +++ b/lib/time_picker/ClockHand.js @@ -34,7 +34,7 @@ var Hand = function (_Component) { _inherits(Hand, _Component); function Hand() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -44,7 +44,7 @@ var Hand = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Hand)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Hand.__proto__ || Object.getPrototypeOf(Hand)).call.apply(_ref, [this].concat(args))), _this), _this.state = { knobWidth: 0 }, _this.handleMouseMove = function (event) { _this.move(_events2.default.getMousePosition(event)); diff --git a/lib/time_picker/ClockHours.js b/lib/time_picker/ClockHours.js index 85a711ab..3b4ee10f 100644 --- a/lib/time_picker/ClockHours.js +++ b/lib/time_picker/ClockHours.js @@ -41,7 +41,7 @@ var Hours = function (_Component) { _inherits(Hours, _Component); function Hours() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -51,7 +51,7 @@ var Hours = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Hours)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Hours.__proto__ || Object.getPrototypeOf(Hours)).call.apply(_ref, [this].concat(args))), _this), _this.state = { inner: _this.props.format === '24hr' && _this.props.selected > 0 && _this.props.selected <= 12 }, _this.handleHandMove = function (degrees, radius) { var currentInner = radius < _this.props.radius - _this.props.spacing * innerSpacing; diff --git a/lib/time_picker/ClockMinutes.js b/lib/time_picker/ClockMinutes.js index 780a90ba..0b21e74a 100644 --- a/lib/time_picker/ClockMinutes.js +++ b/lib/time_picker/ClockMinutes.js @@ -37,7 +37,7 @@ var Minutes = function (_Component) { _inherits(Minutes, _Component); function Minutes() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -47,7 +47,7 @@ var Minutes = function (_Component) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(Minutes)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.handleHandMove = function (degrees) { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = Minutes.__proto__ || Object.getPrototypeOf(Minutes)).call.apply(_ref, [this].concat(args))), _this), _this.handleHandMove = function (degrees) { _this.props.onChange(degrees / step); }, _this.handleMouseDown = function (event) { _this.refs.hand.mouseStart(event); diff --git a/lib/time_picker/TimePicker.js b/lib/time_picker/TimePicker.js index 59c6e8b4..530f5f77 100644 --- a/lib/time_picker/TimePicker.js +++ b/lib/time_picker/TimePicker.js @@ -58,7 +58,7 @@ var factory = function factory(TimePickerDialog, Input) { _inherits(TimePicker, _Component); function TimePicker() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -68,7 +68,7 @@ var factory = function factory(TimePickerDialog, Input) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(TimePicker)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = TimePicker.__proto__ || Object.getPrototypeOf(TimePicker)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: _this.props.active }, _this.handleDismiss = function () { _this.setState({ active: false }); diff --git a/lib/time_picker/TimePickerDialog.js b/lib/time_picker/TimePickerDialog.js index 92e55b2d..9d4dcefb 100644 --- a/lib/time_picker/TimePickerDialog.js +++ b/lib/time_picker/TimePickerDialog.js @@ -35,7 +35,7 @@ var factory = function factory(Dialog) { _inherits(TimePickerDialog, _Component); function TimePickerDialog() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -45,7 +45,7 @@ var factory = function factory(Dialog) { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(TimePickerDialog)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = TimePickerDialog.__proto__ || Object.getPrototypeOf(TimePickerDialog)).call.apply(_ref, [this].concat(args))), _this), _this.state = { display: 'hours', displayTime: _this.props.value }, _this.handleClockChange = function (value) { diff --git a/lib/tooltip/Tooltip.js b/lib/tooltip/Tooltip.js index cf4b75bf..6b3f8071 100644 --- a/lib/tooltip/Tooltip.js +++ b/lib/tooltip/Tooltip.js @@ -62,7 +62,7 @@ var defaults = { }; var tooltipFactory = function tooltipFactory() { - var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; + var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var _defaults$options = _extends({}, defaults, options); @@ -78,7 +78,7 @@ var tooltipFactory = function tooltipFactory() { _inherits(TooltippedComponent, _Component); function TooltippedComponent() { - var _Object$getPrototypeO; + var _ref; var _temp, _this, _ret; @@ -88,7 +88,7 @@ var tooltipFactory = function tooltipFactory() { args[_key] = arguments[_key]; } - return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_Object$getPrototypeO = Object.getPrototypeOf(TooltippedComponent)).call.apply(_Object$getPrototypeO, [this].concat(args))), _this), _this.state = { + return _ret = (_temp = (_this = _possibleConstructorReturn(this, (_ref = TooltippedComponent.__proto__ || Object.getPrototypeOf(TooltippedComponent)).call.apply(_ref, [this].concat(args))), _this), _this.state = { active: false, position: _this.props.tooltipPosition, visible: false @@ -118,12 +118,12 @@ var tooltipFactory = function tooltipFactory() { } }, { key: 'activate', - value: function activate(_ref) { + value: function activate(_ref2) { var _this2 = this; - var top = _ref.top; - var left = _ref.left; - var position = _ref.position; + var top = _ref2.top; + var left = _ref2.left; + var position = _ref2.position; if (this.timeout) clearTimeout(this.timeout); this.setState({ visible: true, position: position }); diff --git a/lib/utils/events.js b/lib/utils/events.js index 6e5978de..eb283ace 100644 --- a/lib/utils/events.js +++ b/lib/utils/events.js @@ -62,7 +62,7 @@ var TRANSITIONS = { function transitionEventNamesFor(element) { for (var transition in TRANSITIONS) { - if (element.style[transition] !== undefined) { + if (element && element.style[transition] !== undefined) { return TRANSITIONS[transition]; } } diff --git a/lib/utils/prefixer.js b/lib/utils/prefixer.js index 895313f8..34cb4aa2 100644 --- a/lib/utils/prefixer.js +++ b/lib/utils/prefixer.js @@ -31,7 +31,7 @@ function addPrefixesTo(style, property, value) { } function prefixer(style) { - var defaultValue = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; + var defaultValue = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var _style = defaultValue; for (var property in style) { diff --git a/lib/utils/testing.js b/lib/utils/testing.js index d8f2a1dd..e82f7793 100644 --- a/lib/utils/testing.js +++ b/lib/utils/testing.js @@ -16,8 +16,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de exports.default = { renderComponent: function renderComponent(Component) { - var props = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; - var state = arguments.length <= 2 || arguments[2] === undefined ? {} : arguments[2]; + var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var state = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var component = _reactAddonsTestUtils2.default.renderIntoDocument(_react2.default.createElement(Component, props)); if (state !== {}) { diff --git a/lib/utils/time.js b/lib/utils/time.js index f7229353..c8addd50 100644 --- a/lib/utils/time.js +++ b/lib/utils/time.js @@ -141,33 +141,33 @@ var time = { return d.getHours() >= 12 ? 'pm' : 'am'; }, getFullMonth: function getFullMonth(d) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; var month = d.getMonth(); var l = (typeof locale === 'string' ? dateLocales[locale] : locale) || dateLocales.en; return l.hasOwnProperty('months') ? l.months[month] || 'Unknown' : 'Unknown'; }, getShortMonth: function getShortMonth(d) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; var month = d.getMonth(); var l = (typeof locale === 'string' ? dateLocales[locale] : locale) || dateLocales.en; return l.hasOwnProperty('monthsShort') ? l.monthsShort[month] || 'Unknown' : 'Unknown'; }, getFullDayOfWeek: function getFullDayOfWeek(day) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; var l = (typeof locale === 'string' ? dateLocales[locale] : locale) || dateLocales.en; return l.hasOwnProperty('weekdays') ? l.weekdays[day] || 'Unknown' : 'Unknown'; }, getShortDayOfWeek: function getShortDayOfWeek(day) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; var l = (typeof locale === 'string' ? dateLocales[locale] : locale) || dateLocales.en; return l.hasOwnProperty('weekdaysShort') ? l.weekdaysShort[day] || 'Unknown' : 'Unknown'; }, getDayOfWeekLetter: function getDayOfWeekLetter(day) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; var l = (typeof locale === 'string' ? dateLocales[locale] : locale) || dateLocales.en; return l.hasOwnProperty('weekdaysLetter') ? l.weekdaysLetter[day] || this.getFullDayOfWeek(day, locale).charAt(0) : 'Unknown'; @@ -262,7 +262,7 @@ var time = { return diff1 < diff2 ? date1 : date2; }, formatDate: function formatDate(date) { - var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en' : arguments[1]; + var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en'; if (locale === 'en') { return date.getDate() + ' ' + time.getFullMonth(date, locale) + ' ' + date.getFullYear(); diff --git a/lib/utils/utils.js b/lib/utils/utils.js index e95ea63c..80d7d513 100644 --- a/lib/utils/utils.js +++ b/lib/utils/utils.js @@ -13,9 +13,9 @@ exports.default = { return angle < 0 ? 360 + angle : angle; }, range: function range() { - var start = arguments.length <= 0 || arguments[0] === undefined ? 0 : arguments[0]; - var stop = arguments.length <= 1 || arguments[1] === undefined ? null : arguments[1]; - var step = arguments.length <= 2 || arguments[2] === undefined ? 1 : arguments[2]; + var start = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0; + var stop = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; + var step = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 1; var _start = 0; var _stop = start;