react-big-calendar
Advanced tools
Comparing version 0.14.4 to 0.15.0
@@ -0,1 +1,8 @@ | ||
v0.15.0 - Tue, 29 Aug 2017 18:20:39 GMT | ||
--------------------------------------- | ||
v0.14.4 - Fri, 23 Jun 2017 13:59:31 GMT | ||
@@ -2,0 +9,0 @@ --------------------------------------- |
@@ -384,2 +384,15 @@ 'use strict'; | ||
/** | ||
* Optionally provide a function that returns an object of className or style props | ||
* to be applied to the the time-slot node. Caution! Styles that change layout or | ||
* position may break the calendar in unexpected ways. | ||
* | ||
* ```js | ||
* ( | ||
* date: Date, | ||
* ) => { className?: string, style?: Object } | ||
* ``` | ||
*/ | ||
slotPropGetter: _propTypes2.default.func, | ||
/** | ||
* Accessor for the event title, used to display event information. Should | ||
@@ -386,0 +399,0 @@ * resolve to a `renderable` value. |
@@ -109,3 +109,3 @@ 'use strict'; | ||
var style = { | ||
top: top - topOffset, | ||
top: Math.max(0, top - topOffset), | ||
left: left - leftOffset, | ||
@@ -112,0 +112,0 @@ minWidth: width + width / 2 |
@@ -54,2 +54,3 @@ 'use strict'; | ||
step = _props.step, | ||
slotPropGetter = _props.slotPropGetter, | ||
timeGutterFormat = _props.timeGutterFormat, | ||
@@ -64,2 +65,3 @@ culture = _props.culture; | ||
step: step, | ||
slotPropGetter: slotPropGetter, | ||
culture: culture, | ||
@@ -128,2 +130,3 @@ timeslots: timeslots, | ||
slotPropGetter: _propTypes2.default.func, | ||
dayWrapperComponent: _propTypes3.elementType | ||
@@ -130,0 +133,0 @@ }; |
@@ -37,6 +37,12 @@ 'use strict'; | ||
TimeSlot.prototype.render = function render() { | ||
var value = this.props.value; | ||
var _props = this.props, | ||
value = _props.value, | ||
slotPropGetter = _props.slotPropGetter; | ||
var Wrapper = this.props.dayWrapperComponent; | ||
var _ref = slotPropGetter && slotPropGetter(value) || {}, | ||
className = _ref.className, | ||
style = _ref.style; | ||
return _react2.default.createElement( | ||
@@ -48,3 +54,4 @@ Wrapper, | ||
{ | ||
className: (0, _classnames2.default)('rbc-time-slot', this.props.showLabel && 'rbc-label', this.props.isNow && 'rbc-now') | ||
style: style, | ||
className: (0, _classnames2.default)('rbc-time-slot', className, this.props.showLabel && 'rbc-label', this.props.isNow && 'rbc-now') | ||
}, | ||
@@ -69,3 +76,4 @@ this.props.showLabel && _react2.default.createElement( | ||
content: _propTypes2.default.string, | ||
culture: _propTypes2.default.string | ||
culture: _propTypes2.default.string, | ||
slotPropGetter: _propTypes2.default.func | ||
}; | ||
@@ -72,0 +80,0 @@ TimeSlot.defaultProps = { |
@@ -49,6 +49,8 @@ 'use strict'; | ||
isNow = _props.isNow, | ||
culture = _props.culture; | ||
culture = _props.culture, | ||
slotPropGetter = _props.slotPropGetter; | ||
return _react2.default.createElement(_TimeSlot2.default, { | ||
key: slotNumber, | ||
slotPropGetter: slotPropGetter, | ||
dayWrapperComponent: dayWrapperComponent, | ||
@@ -93,2 +95,3 @@ showLabel: showLabels && !slotNumber, | ||
isNow: _propTypes2.default.bool, | ||
slotPropGetter: _propTypes2.default.func, | ||
timeGutterFormat: _propTypes2.default.string, | ||
@@ -95,0 +98,0 @@ culture: _propTypes2.default.string |
@@ -55,3 +55,3 @@ 'use strict'; | ||
var per = span / slots * 100 + '%'; | ||
return { flexBasis: per, maxWidth: per }; // IE10/11 need max-width. flex-basis doesn't respect box-sizing | ||
return { WebkitFlexBasis: per, flexBasis: per, maxWidth: per }; // IE10/11 need max-width. flex-basis doesn't respect box-sizing | ||
} | ||
@@ -58,0 +58,0 @@ |
@@ -80,3 +80,3 @@ 'use strict'; | ||
*/ | ||
var views = exports.views = _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.oneOf(viewNames)), (0, _all2.default)([_propTypes2.default.object, function (props, name) { | ||
var views = exports.views = _propTypes2.default.oneOfType([_propTypes2.default.arrayOf(_propTypes2.default.oneOf(viewNames)), (0, _all2.default)(_propTypes2.default.object, function (props, name) { | ||
for (var _len = arguments.length, args = Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) { | ||
@@ -96,2 +96,2 @@ args[_key - 2] = arguments[_key]; | ||
return err || null; | ||
}])]); | ||
})]); |
@@ -28,5 +28,8 @@ 'use strict'; | ||
function getRangeBounds(range) { | ||
var start = range[0]; | ||
var end = range[range.length - 1]; | ||
return { start: start, end: end }; | ||
if (Array.isArray(range)) { | ||
var start = range[0]; | ||
var end = range[range.length - 1]; | ||
return { start: start, end: end }; | ||
} | ||
return range; | ||
} | ||
@@ -33,0 +36,0 @@ |
{ | ||
"name": "react-big-calendar", | ||
"version": "0.14.4", | ||
"version": "0.15.0", | ||
"description": "Calendar! with events", | ||
@@ -27,3 +27,3 @@ "author": "Jason Quense <monastic.panic@gmail.com>", | ||
"clean:examples": "rimraf examples/static", | ||
"l": "lessc --autoprefix=\"ie >= 10, last 2 versions\" ", | ||
"l": "lessc --autoprefix=\"ie >= 10, safari >= 8, last 2 versions\" ", | ||
"less": "npm run l src/less/styles.less ./lib/css/react-big-calendar.css && npm run less-dnd", | ||
@@ -62,2 +62,3 @@ "less-dnd": "npm run l src/addons/dragAndDrop/styles.less ./lib/addons/dragAndDrop/styles.css", | ||
"less": "^2.7.2", | ||
"less-plugin-autoprefix": "^1.5.1", | ||
"markdown-jsx-loader": "^2.0.1", | ||
@@ -64,0 +65,0 @@ "marked": "^0.3.5", |
Sorry, the diff of this file is not supported yet
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
255319
5519
30