react-big-calendar
Advanced tools
+2
-0
@@ -0,1 +1,3 @@ | ||
| ## v0.19.1 - Thu, 03 May 2018 15:22:43 GMT | ||
| ## v0.19.0 - Fri, 23 Mar 2018 17:13:33 GMT | ||
@@ -2,0 +4,0 @@ |
@@ -25,2 +25,6 @@ 'use strict'; | ||
| var _propTypes3 = require('../../utils/propTypes'); | ||
| var _accessors = require('../../utils/accessors'); | ||
| var _index = require('../../index'); | ||
@@ -76,4 +80,12 @@ | ||
| continuesAfter = _props.continuesAfter; | ||
| var draggableAccessor = this.context.draggableAccessor; | ||
| var isDraggable = draggableAccessor ? !!(0, _accessors.accessor)(event, draggableAccessor) : true; | ||
| /* Event is not draggable, no need to wrap it */ | ||
| if (!isDraggable) { | ||
| return children; | ||
| } | ||
| var StartAnchor = null, | ||
@@ -85,3 +97,3 @@ EndAnchor = null; | ||
| * allDay events and how they are displayed. | ||
| * | ||
| * | ||
| * 1. If the event is being shown in an event row (because | ||
@@ -91,6 +103,6 @@ * it is an allDay event shown in the header row or because as | ||
| * allow east-west resizing. | ||
| * | ||
| * | ||
| * 2. Otherwise the event is being displayed | ||
| * normally, we can drag it north-south to resize the times. | ||
| * | ||
| * | ||
| * See `DropWrappers` for handling of the drop of such events. | ||
@@ -103,2 +115,3 @@ * | ||
| */ | ||
| if (isRow || allDay) { | ||
@@ -156,2 +169,5 @@ var anchor = _react2.default.createElement( | ||
| DraggableEventWrapper.contextTypes = { | ||
| draggableAccessor: _propTypes3.accessor | ||
| }; | ||
| DraggableEventWrapper.propTypes = { | ||
@@ -170,2 +186,3 @@ event: _propTypes2.default.object.isRequired, | ||
| draggable: _propTypes2.default.bool, | ||
| allDay: _propTypes2.default.bool, | ||
@@ -184,3 +201,3 @@ isRow: _propTypes2.default.bool, | ||
| } | ||
| // canDrag: ({ event }) => event.draggable === undefined || event.draggable - e.g. support per-event dragability/sizability | ||
| //canDrag: ({ event }) => true, // support per-event dragability/sizability | ||
| }; | ||
@@ -187,0 +204,0 @@ }; |
@@ -106,3 +106,4 @@ 'use strict'; | ||
| endAccessor: this.props.endAccessor, | ||
| step: this.props.step | ||
| step: this.props.step, | ||
| draggableAccessor: this.props.draggableAccessor | ||
| }; | ||
@@ -176,2 +177,3 @@ }; | ||
| allDayAccessor: _propTypes3.accessor, | ||
| draggableAccessor: _propTypes3.accessor, | ||
| selectable: _propTypes2.default.oneOf([true, false, 'ignoreEvents']), | ||
@@ -187,2 +189,3 @@ resizable: _propTypes2.default.bool, | ||
| allDayAccessor: 'allDay', | ||
| draggableAccessor: null, | ||
| step: 30 | ||
@@ -198,2 +201,3 @@ }; | ||
| endAccessor: _propTypes3.accessor, | ||
| draggableAccessor: _propTypes3.accessor, | ||
| step: _propTypes2.default.number | ||
@@ -200,0 +204,0 @@ }; |
@@ -200,3 +200,4 @@ 'use strict'; | ||
| action = _ref2.action, | ||
| bounds = _ref2.bounds; | ||
| bounds = _ref2.bounds, | ||
| box = _ref2.box; | ||
@@ -207,3 +208,4 @@ if (endIdx !== -1 && startIdx !== -1) this.props.onSelectSlot && this.props.onSelectSlot({ | ||
| action: action, | ||
| bounds: bounds | ||
| bounds: bounds, | ||
| box: box | ||
| }); | ||
@@ -210,0 +212,0 @@ }; |
@@ -99,3 +99,3 @@ 'use strict'; | ||
| row.push(_EventRowMixin2.default.renderSpan(this.props, 1, key, this.renderShowMore(segments, current))); | ||
| row.push(_EventRowMixin2.default.renderSpan(slotCount, 1, key, this.renderShowMore(segments, current))); | ||
| lastEnd = current = current + 1; | ||
@@ -102,0 +102,0 @@ } |
+6
-5
@@ -203,4 +203,3 @@ 'use strict'; | ||
| TimeGrid.prototype.render = function render() { | ||
| var _this3 = this, | ||
| _React$createElement; | ||
| var _this3 = this; | ||
@@ -253,3 +252,3 @@ var _props3 = this.props, | ||
| { className: 'rbc-time-view' }, | ||
| _react2.default.createElement(_TimeGridHeader2.default, (_React$createElement = { | ||
| _react2.default.createElement(_TimeGridHeader2.default, { | ||
| range: range, | ||
@@ -282,4 +281,6 @@ events: allDayEvents, | ||
| onSelectEvent: this.handleSelectAlldayEvent, | ||
| onDoubleClickEvent: this.props.onDoubleClickEvent | ||
| }, _React$createElement['resourceIdAccessor'] = this.props.resourceIdAccessor, _React$createElement.onDrillDown = this.props.onDrillDown, _React$createElement.getDrilldownView = this.props.getDrilldownView, _React$createElement)), | ||
| onDoubleClickEvent: this.props.onDoubleClickEvent, | ||
| onDrillDown: this.props.onDrillDown, | ||
| getDrilldownView: this.props.getDrilldownView | ||
| }), | ||
| _react2.default.createElement( | ||
@@ -286,0 +287,0 @@ 'div', |
@@ -193,3 +193,3 @@ 'use strict'; | ||
| var container = containerEvents.find(function (c) { | ||
| return c.end > event.start; | ||
| return c.end > event.start || Math.abs(event.start - c.start) < 30; | ||
| }); | ||
@@ -196,0 +196,0 @@ |
@@ -49,2 +49,6 @@ 'use strict'; | ||
| // Necessary to be able to select up until the last timeslot in a day | ||
| var lastSlotMinFromStart = slots.length * step; | ||
| slots.push(new Date(start.getFullYear(), start.getMonth(), start.getDate(), 0, minutesFromMidnight + lastSlotMinFromStart, 0, 0)); | ||
| function positionFromDate(date) { | ||
@@ -72,3 +76,3 @@ var diff = _dates2.default.diff(start, date, 'minutes') + getDstOffset(start, date); | ||
| closestSlotToPosition: function closestSlotToPosition(percent) { | ||
| var slot = Math.max(0, Math.floor(percent * numSlots)); | ||
| var slot = Math.min(slots.length - 1, Math.max(0, Math.floor(percent * numSlots))); | ||
| return slots[slot]; | ||
@@ -75,0 +79,0 @@ }, |
+1
-1
| { | ||
| "name": "react-big-calendar", | ||
| "version": "0.19.0", | ||
| "version": "0.19.1", | ||
| "description": "Calendar! with events", | ||
@@ -5,0 +5,0 @@ "author": "Jason Quense <monastic.panic@gmail.com>", |
+5
-0
@@ -16,2 +16,7 @@ # react-big-calendar | ||
| ## Starters | ||
| * [react-big-calendar](https://github.com/arecvlohe/rbc-starter) | ||
| * [react-big-calendar with drag and drop](https://github.com/arecvlohe/rbc-with-dnd-starter) | ||
| ## Run examples locally | ||
@@ -18,0 +23,0 @@ |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
304605
0.34%6677
0.33%60
9.09%