Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-big-calendar

Package Overview
Dependencies
Maintainers
2
Versions
181
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-big-calendar - npm Package Compare versions

Comparing version 0.20.1 to 0.20.2

28

CHANGELOG.md

@@ -0,1 +1,29 @@

## [0.20.2](https://github.com/intljusticemission/react-big-calendar/compare/v0.20.0...v0.20.2) (2018-11-07)
### Bug Fixes
* add runtime to deps ([ade68bb](https://github.com/intljusticemission/react-big-calendar/commit/ade68bb))
* calculation of slots number for date when DST ends. ([#1046](https://github.com/intljusticemission/react-big-calendar/issues/1046)) ([2ca0226](https://github.com/intljusticemission/react-big-calendar/commit/2ca0226))
* dragging is disabled if resizing is not allowed ([#1072](https://github.com/intljusticemission/react-big-calendar/issues/1072)) ([#1073](https://github.com/intljusticemission/react-big-calendar/issues/1073)) ([0d5ed30](https://github.com/intljusticemission/react-big-calendar/commit/0d5ed30))
* elements position on TimeGrid if max prop is set ([#1057](https://github.com/intljusticemission/react-big-calendar/issues/1057)) ([f174a60](https://github.com/intljusticemission/react-big-calendar/commit/f174a60))
* move [@babel](https://github.com/babel)/cli to devDependencies ([#1062](https://github.com/intljusticemission/react-big-calendar/issues/1062)) ([4cfcb1f](https://github.com/intljusticemission/react-big-calendar/commit/4cfcb1f))
* onRangeChange not passing localizer ([#1056](https://github.com/intljusticemission/react-big-calendar/issues/1056)) ([80855e8](https://github.com/intljusticemission/react-big-calendar/commit/80855e8))
* proptype warnings ([#1084](https://github.com/intljusticemission/react-big-calendar/issues/1084)) ([08c2494](https://github.com/intljusticemission/react-big-calendar/commit/08c2494))
* reference to draggable/resizable Accessor ([#1070](https://github.com/intljusticemission/react-big-calendar/issues/1070)) ([1889a51](https://github.com/intljusticemission/react-big-calendar/commit/1889a51))
### Features
* hide single day header with css ([#1019](https://github.com/intljusticemission/react-big-calendar/issues/1019)) ([5857d8f](https://github.com/intljusticemission/react-big-calendar/commit/5857d8f))
### Performance Improvements
* increase startup time of event dragging ([#1020](https://github.com/intljusticemission/react-big-calendar/issues/1020)) ([167b69f](https://github.com/intljusticemission/react-big-calendar/commit/167b69f))
## v0.19.2 - Wed, 27 Jun 2018 14:24:55 GMT

@@ -2,0 +30,0 @@

44

lib/addons/dragAndDrop/EventWrapper.js

@@ -93,6 +93,5 @@ "use strict";

});
var _this$context = this.context,
draggableAccessor = _this$context.draggableAccessor,
resizableAccessor = _this$context.resizableAccessor,
draggable = _this$context.draggable;
var draggable = this.context.draggable;
var draggableAccessor = draggable.draggableAccessor,
resizableAccessor = draggable.resizableAccessor;
var isDraggable = draggableAccessor ? !!(0, _accessors.accessor)(event, draggableAccessor) : true;

@@ -104,5 +103,2 @@ /* Event is not draggable, no need to wrap it */

}
var StartAnchor = null;
var EndAnchor = null;
/*

@@ -128,12 +124,6 @@ * The resizability of events depends on whether they are

var isResizable = resizableAccessor ? !!(0, _accessors.accessor)(event, resizableAccessor) : true;
if (isResizable) {
if (type === 'date') {
StartAnchor = !continuesPrior && this.renderAnchor('Left');
EndAnchor = !continuesAfter && this.renderAnchor('Right');
} else {
StartAnchor = !continuesPrior && this.renderAnchor('Up');
EndAnchor = !continuesAfter && this.renderAnchor('Down');
}
if (isResizable || isDraggable) {
/*

@@ -147,12 +137,24 @@ * props.children is the singular <Event> component.

*/
var newProps = {
onMouseDown: this.handleStartDragging,
onTouchStart: this.handleStartDragging,
onTouchStart: this.handleStartDragging
};
if (isResizable) {
// replace original event child with anchor-embellished child
children: _react.default.createElement("div", {
var StartAnchor = null;
var EndAnchor = null;
if (type === 'date') {
StartAnchor = !continuesPrior && this.renderAnchor('Left');
EndAnchor = !continuesAfter && this.renderAnchor('Right');
} else {
StartAnchor = !continuesPrior && this.renderAnchor('Up');
EndAnchor = !continuesAfter && this.renderAnchor('Down');
}
newProps.children = _react.default.createElement("div", {
className: "rbc-addons-dnd-resizable"
}, StartAnchor, children.props.children, EndAnchor)
};
}, StartAnchor, children.props.children, EndAnchor);
}

@@ -159,0 +161,0 @@ if (draggable.dragAndDropAction.interacting && // if an event is being dragged right now

@@ -94,3 +94,3 @@ "use strict";

_this.handleInteractionStart = function () {
_this.setState({
if (_this.state.interacting === false) _this.setState({
interacting: true

@@ -124,3 +124,5 @@ });

});
_this.state = {};
_this.state = {
interacting: false
};
return _this;

@@ -127,0 +129,0 @@ }

@@ -79,10 +79,3 @@ "use strict";

/**
*
*
* @static
* @memberof Calendar
*/
var Calendar =

@@ -140,7 +133,11 @@ /*#__PURE__*/

_this.handleRangeChange = function (date, view) {
var onRangeChange = _this.props.onRangeChange;
var _this$props2 = _this.props,
onRangeChange = _this$props2.onRangeChange,
localizer = _this$props2.localizer;
if (onRangeChange) {
if (view.range) {
onRangeChange(view.range(date, {}));
onRangeChange(view.range(date, {
localizer: localizer
}));
} else {

@@ -153,8 +150,8 @@ process.env.NODE_ENV !== "production" ? (0, _warning.default)(true, 'onRangeChange prop not supported for this view') : void 0;

_this.handleNavigate = function (action, newDate) {
var _this$props2 = _this.props,
view = _this$props2.view,
date = _this$props2.date,
getNow = _this$props2.getNow,
onNavigate = _this$props2.onNavigate,
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props2, ["view", "date", "getNow", "onNavigate"]);
var _this$props3 = _this.props,
view = _this$props3.view,
date = _this$props3.date,
getNow = _this$props3.getNow,
onNavigate = _this$props3.onNavigate,
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props3, ["view", "date", "getNow", "onNavigate"]);

@@ -291,18 +288,18 @@ var ViewComponent = _this.getView();

_proto.render = function render() {
var _this$props3 = this.props,
view = _this$props3.view,
toolbar = _this$props3.toolbar,
events = _this$props3.events,
style = _this$props3.style,
className = _this$props3.className,
elementProps = _this$props3.elementProps,
current = _this$props3.date,
getNow = _this$props3.getNow,
length = _this$props3.length,
showMultiDayTimes = _this$props3.showMultiDayTimes,
_0 = _this$props3.components,
_1 = _this$props3.formats,
_2 = _this$props3.messages,
_3 = _this$props3.culture,
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props3, ["view", "toolbar", "events", "style", "className", "elementProps", "date", "getNow", "length", "showMultiDayTimes", "components", "formats", "messages", "culture"]);
var _this$props4 = this.props,
view = _this$props4.view,
toolbar = _this$props4.toolbar,
events = _this$props4.events,
style = _this$props4.style,
className = _this$props4.className,
elementProps = _this$props4.elementProps,
current = _this$props4.date,
getNow = _this$props4.getNow,
length = _this$props4.length,
showMultiDayTimes = _this$props4.showMultiDayTimes,
_0 = _this$props4.components,
_1 = _this$props4.formats,
_2 = _this$props4.messages,
_3 = _this$props4.culture,
props = (0, _objectWithoutPropertiesLoose2.default)(_this$props4, ["view", "toolbar", "events", "style", "className", "elementProps", "date", "getNow", "length", "showMultiDayTimes", "components", "formats", "messages", "culture"]);
current = current || getNow();

@@ -399,3 +396,3 @@ var View = this.getView();

* - whether its an "all day" event or not
* - any resource the event may be a related too
* - any resource the event may be related to
*

@@ -557,3 +554,3 @@ * Each of these properties can be customized or generated dynamically by

*
* Cutom views may return something different.
* Custom views may return something different.
*/

@@ -931,5 +928,26 @@ onRangeChange: _propTypes.default.func,

* event: MyEvent, // used by each view (Month, Day, Week)
* eventWrapper: MyEventWrapper,
* eventContainerWrapper: MyEventContainerWrapper,
* dayWrapper: MyDayWrapper,
* dateCellWrapper: MyDateCellWrapper,
* timeSlotWrapper: MyTimeSlotWrapper,
* timeGutterHeader: MyTimeGutterWrapper,
* toolbar: MyToolbar,
* agenda: {
* event: MyAgendaEvent // with the agenda view use a different component to render events
* time: MyAgendaTime,
* date: MyAgendaDate,
* },
* day: {
* header: MyDayHeader,
* event: MyDayEvent,
* },
* week: {
* header: MyWeekHeader,
* event: MyWeekEvent,
* },
* month: {
* header: MyMonthHeader,
* dateHeader: MyMonthDateHeader,
* event: MyMonthEvent,
* }

@@ -936,0 +954,0 @@ * }

@@ -33,3 +33,3 @@ "use strict";

getters: _propTypes.default.object.isRequired,
localizer: _propTypes.default.object.isRequired,
localizer: _propTypes.default.object,
onSelect: _propTypes.default.func,

@@ -36,0 +36,0 @@ onDoubleClick: _propTypes.default.func

@@ -40,3 +40,3 @@ "use strict";

onDoubleClick: _propTypes.default.func,
slotStart: _propTypes.default.number,
slotStart: _propTypes.default.instanceOf(Date),
slotEnd: _propTypes.default.number

@@ -43,0 +43,0 @@ };

@@ -172,4 +172,4 @@ "use strict";

className: "rbc-header"
}, accessors.resourceTitle(resource))), range.length > 1 && _react.default.createElement("div", {
className: "rbc-row rbc-time-header-cell"
}, accessors.resourceTitle(resource))), _react.default.createElement("div", {
className: "rbc-row rbc-time-header-cell" + (range.length <= 1 ? ' rbc-time-header-cell-single-day' : '')
}, _this3.renderHeaderCells(range)), _react.default.createElement(_DateContentRow.default, {

@@ -176,0 +176,0 @@ isAllDay: true,

@@ -11,3 +11,3 @@ "use strict";

var getDstOffset = function getDstOffset(start, end) {
return Math.abs(start.getTimezoneOffset() - end.getTimezoneOffset());
return start.getTimezoneOffset() - end.getTimezoneOffset();
};

@@ -107,6 +107,6 @@

var rangeEndMin = positionFromDate(rangeEnd);
var top = rangeStartMin / totalMin * 100;
var top = rangeStartMin / (step * numSlots) * 100;
return {
top: top,
height: rangeEndMin / totalMin * 100 - top,
height: rangeEndMin / (step * numSlots) * 100 - top,
start: positionFromDate(rangeStart),

@@ -113,0 +113,0 @@ startDate: rangeStart,

{
"name": "react-big-calendar",
"version": "0.20.1",
"version": "0.20.2",
"description": "Calendar! with events",

@@ -65,7 +65,8 @@ "author": "Jason Quense <monastic.panic@gmail.com>",

"@4c/rollout": "^1.2.0",
"@babel/core": "^7.1.0",
"@babel/cli": "^7.1.0",
"@babel/core": "^7.1.5",
"@storybook/addon-actions": "^3.4.11",
"@storybook/react": "3.4.11",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^9.0.0",
"babel-eslint": "^10.0.1",
"babel-jest": "^23.6.0",

@@ -76,5 +77,5 @@ "babel-preset-jason": "^6.0.1",

"cpy-cli": "^2.0.0",
"eslint": "^5.6.0",
"eslint": "^5.8.0",
"eslint-config-jason": "^4.1.0",
"eslint-config-prettier": "^3.0.1",
"eslint-config-prettier": "^3.1.0",
"eslint-import-resolver-webpack": "^0.10.1",

@@ -89,28 +90,27 @@ "eslint-plugin-import": "^2.14.0",

"less-plugin-autoprefix": "^1.5.1",
"lint-staged": "^7.3.0",
"lint-staged": "^8.0.4",
"markdown-jsx-loader": "^3.0.2",
"marked": "^0.5.0",
"marked": "^0.5.1",
"moment": "^2.22.2",
"mt-changelog": "^0.6.1",
"prettier": "^1.14.3",
"react": "^16.5.2",
"prettier": "^1.15.1",
"react": "^16.6.1",
"react-bootstrap": "^0.32.4",
"react-docgen": "^3.0.0-rc.1",
"react-dom": "^16.5.2",
"react-dom": "^16.6.1",
"react-tackle-box": "^2.1.0",
"rimraf": "^2.4.2",
"webpack": "^4.19.1",
"webpack": "^4.25.1",
"webpack-atoms": "^8.0.0",
"webpack-cli": "^3.1.0",
"webpack-dev-server": "^3.1.8"
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"dependencies": {
"@babel/cli": "^7.1.0",
"@babel/runtime": "^7.0.0",
"@babel/runtime": "^7.1.5",
"classnames": "^2.2.6",
"date-arithmetic": "^3.0.0",
"dom-helpers": "^2.3.0 || ^3.0.0",
"dom-helpers": "^3.4.0",
"invariant": "^2.2.4",
"lodash": "^4.17.11",
"memoize-one": "^4.0.2",
"memoize-one": "^4.0.3",
"prop-types": "^15.6.2",

@@ -117,0 +117,0 @@ "prop-types-extra": "^1.1.0",

@@ -45,3 +45,14 @@ # react-big-calendar

BigCalendar.setLocalizer(BigCalendar.momentLocalizer(moment))
const localizer = BigCalendar.momentLocalizer(moment)
const MyCalendar = props => (
<div>
<BigCalendar
localizer={localizer}
events={myEventsList}
startAccessor="start"
endAccessor="end"
/>
</div>
)
```

@@ -55,3 +66,14 @@

BigCalendar.setLocalizer(BigCalendar.globalizeLocalizer(globalize))
const localizer = BigCalendar.globalizeLocalizer(globalize)
const MyCalendar = props => (
<div>
<BigCalendar
localizer={localizer}
events={myEventsList}
startAccessor="start"
endAccessor="end"
/>
</div>
)
```

@@ -58,0 +80,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc