Socket
Socket
Sign inDemoInstall

react-big-calendar

Package Overview
Dependencies
52
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.1 to 0.7.0

8

CHANGELOG.md

@@ -0,1 +1,9 @@

v0.7.0 - Tue, 15 Sep 2015 08:37:50 GMT
--------------------------------------
- [8ad4ee7](../../commit/8ad4ee7) [changed] selection bound to Calendar container, respects overlays
- [98b3dad](../../commit/98b3dad) [fixed] selecting events in All Day row of week/Day views
v0.6.1 - Sun, 13 Sep 2015 16:52:20 GMT

@@ -2,0 +10,0 @@ --------------------------------------

11

lib/BackgroundCells.js

@@ -25,2 +25,4 @@ 'use strict';

var _utilsHelpers = require('./utils/helpers');
var _utilsSelection = require('./utils/selection');

@@ -86,3 +88,3 @@

var node = _reactDom.findDOMNode(this);
var selector = this._selector = new _Selection2['default']();
var selector = this._selector = new _Selection2['default'](this.props.container);

@@ -95,4 +97,6 @@ selector.on('selecting', function (box) {

if (!_this.state.selecting) _this._initial = { x: box.x, y: box.y };
if (!_this.state.selecting) {
_utilsHelpers.notify(_this.props.onSelectStart, [box]);
_this._initial = { x: box.x, y: box.y };
}
if (selector.isSelected(node)) {

@@ -134,2 +138,3 @@ var nodeBox = _Selection.getBoundsForNode(node);

_this.setState({ selecting: false });
_utilsHelpers.notify(_this.props.onSelectEnd, [_this.state]);
});

@@ -136,0 +141,0 @@ };

@@ -234,3 +234,5 @@ 'use strict';

var node = _reactDom.findDOMNode(this);
var selector = this._selector = new _Selection2['default'](node);
var selector = this._selector = new _Selection2['default'](function () {
return _reactDom.findDOMNode(_this2);
});

@@ -237,0 +239,0 @@ selector.on('selecting', function (_ref2) {

@@ -267,2 +267,5 @@ 'use strict';

return _react2['default'].createElement(_BackgroundCells2['default'], {
container: function () {
return _reactDom.findDOMNode(_this4);
},
selectable: this.props.selectable,

@@ -269,0 +272,0 @@ slots: 7,

@@ -28,2 +28,6 @@ 'use strict';

function isOverContainer(container, x, y) {
return !container || _domHelpersQueryContains2['default'](container, document.elementFromPoint(x, y));
}
var Selection = (function () {

@@ -101,3 +105,3 @@ function Selection(node) {

Selection.prototype._mouseDown = function _mouseDown(e) {
var node = this.container,
var node = this.container(),
collides,

@@ -107,5 +111,5 @@ offsetData;

// Right clicks
if (e.which === 3 || e.button === 2) return;
if (e.which === 3 || e.button === 2 || !isOverContainer(node, e.pageX, e.pageY)) return;
if (node && !_domHelpersQueryContains2['default'](node, e.target) && !this.globalMouse) {
if (!this.globalMouse && node && !_domHelpersQueryContains2['default'](node, e.target)) {
var _normalizeDistance = normalizeDistance(0);

@@ -156,3 +160,3 @@

var inRoot = !this.container || _domHelpersQueryContains2['default'](this.container, e.target);
var inRoot = !this.container || _domHelpersQueryContains2['default'](this.container(), e.target);
var bounds = this._selectRect;

@@ -159,0 +163,0 @@ var click = Math.abs(e.pageX - x) <= clickTolerance && Math.abs(e.pageY - y) <= clickTolerance;

@@ -172,4 +172,10 @@ 'use strict';

'div',
{ className: 'rbc-allday-cell' },
_react2['default'].createElement(_BackgroundCells2['default'], { slots: range.length }),
{ ref: 'allDay', className: 'rbc-allday-cell' },
_react2['default'].createElement(_BackgroundCells2['default'], {
slots: range.length,
container: function () {
return _this.refs.allDay;
},
selectable: this.props.selectable
}),
_react2['default'].createElement(

@@ -233,3 +239,3 @@ 'div',

allDayAccessor: _this3.props.allDayAccessor,
onEventClick: _this3.props.onEventClick,
onSelect: _this3._selectEvent,
slots: _this3._slots,

@@ -271,2 +277,10 @@ key: idx,

_selectEvent: function _selectEvent() {
for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
_utilsHelpers.notify(this.props.onSelectEvent, args);
},
_adjustGutter: function _adjustGutter() {

@@ -273,0 +287,0 @@ var header = this.refs.headerCell;

@@ -30,3 +30,3 @@ 'use strict';

span = Math.min(Math.max(span, 1), slots);
span = Math.max(Math.min(span, slots), 1);

@@ -33,0 +33,0 @@ var padding = _dates2['default'].diff(first, start, 'day');

{
"name": "react-big-calendar",
"version": "0.6.1",
"version": "0.7.0",
"description": "Calendar! with events",

@@ -24,3 +24,2 @@ "author": "Jason Quense <monastic.panic@gmail.com>",

"scripts": {
"prepublish": "npm run test && npm run build",
"clean": "rimraf lib",

@@ -27,0 +26,0 @@ "clean:examples": "rimraf examples/static",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc