diff --git a/.size-snapshot.json b/.size-snapshot.json index ed467b52f..b6e1a03e1 100644 --- a/.size-snapshot.json +++ b/.size-snapshot.json @@ -1,25 +1,25 @@ { "./dist/react-big-calendar.js": { - "bundled": 507436, - "minified": 149016, - "gzipped": 45496 + "bundled": 509547, + "minified": 149932, + "gzipped": 45769 }, "./dist/react-big-calendar.min.js": { - "bundled": 444328, - "minified": 130089, - "gzipped": 41174 + "bundled": 446246, + "minified": 130919, + "gzipped": 41339 }, "dist/react-big-calendar.esm.js": { - "bundled": 174497, - "minified": 83179, - "gzipped": 20739, + "bundled": 176376, + "minified": 84316, + "gzipped": 21023, "treeshaked": { "rollup": { - "code": 60400, - "import_statements": 1578 + "code": 60196, + "import_statements": 1590 }, "webpack": { - "code": 64923 + "code": 64714 } } } diff --git a/README.md b/README.md index 6c1f6ef48..bf73bfa7c 100644 --- a/README.md +++ b/README.md @@ -31,8 +31,8 @@ $ yarn examples ### Localization and Date Formatting -`react-big-calendar` includes two options for handling the date formatting and culture localization, depending -on your preference of DateTime libraries. You can use either the [Moment.js](http://momentjs.com/) or [Globalize.js](https://github.com/jquery/globalize) localizers. +`react-big-calendar` includes three options for handling the date formatting and culture localization, depending +on your preference of DateTime libraries. You can use either the [Moment.js](https://momentjs.com/), [Globalize.js](https://github.com/jquery/globalize) or [date-fns](https://date-fns.org/) localizers. Regardless of your choice, you **must** choose a localizer to use this library: @@ -126,4 +126,4 @@ Big Calendar. Carefully test each change accordingly. ## Join us on Reactiflux Discord -Join us on [Reactiflux Discord](https://discord.gg/PPgj6tb) community under the channel #libraries if you have any questions. +Join us on [Reactiflux Discord](https://discord.gg/reactiflux) community under the channel #libraries if you have any questions. diff --git a/examples/demos/dndOutsideSource.js b/examples/demos/dndOutsideSource.js index 979b5b9c5..0c130653e 100644 --- a/examples/demos/dndOutsideSource.js +++ b/examples/demos/dndOutsideSource.js @@ -67,7 +67,7 @@ class Dnd extends React.Component { this.newEvent(event) } - moveEvent({ event, start, end, isAllDay: droppedOnAllDaySlot }) { + moveEvent = ({ event, start, end, isAllDay: droppedOnAllDaySlot }) => { const { events } = this.state const idx = events.indexOf(event) @@ -107,7 +107,7 @@ class Dnd extends React.Component { //alert(`${event.title} was resized to ${start}-${end}`) } - newEvent(event) { + newEvent = event => { let idList = this.state.events.map(a => a.id) let newId = Math.max(...idList) + 1 let hour = { diff --git a/package.json b/package.json index 131c17ae8..b157e9836 100644 --- a/package.json +++ b/package.json @@ -137,7 +137,7 @@ "lodash-es": "^4.17.11", "memoize-one": "^5.1.1", "prop-types": "^15.7.2", - "react-overlays": "^2.0.0-0", + "react-overlays": "^4.1.1", "uncontrollable": "^7.0.0" }, "resolutions": { diff --git a/src/BackgroundCells.js b/src/BackgroundCells.js index 31e44a22b..7b3d492d9 100644 --- a/src/BackgroundCells.js +++ b/src/BackgroundCells.js @@ -160,6 +160,7 @@ class BackgroundCells extends React.Component { action, bounds, box, + resourceId: this.props.resourceId, }) } } @@ -183,6 +184,7 @@ BackgroundCells.propTypes = { range: PropTypes.arrayOf(PropTypes.instanceOf(Date)), rtl: PropTypes.bool, type: PropTypes.string, + resourceId: PropTypes.any, } export default BackgroundCells diff --git a/src/Calendar.js b/src/Calendar.js index ac12b667f..0aa64227a 100644 --- a/src/Calendar.js +++ b/src/Calendar.js @@ -335,6 +335,15 @@ class Calendar extends React.Component { */ onDoubleClickEvent: PropTypes.func, + /** + * Callback fired when a focused calendar event recieves a key press. + * + * ```js + * (event: Object, e: SyntheticEvent) => void + * ``` + */ + onKeyPressEvent: PropTypes.func, + /** * Callback fired when dragging a selection in the Time views. * @@ -355,6 +364,14 @@ class Calendar extends React.Component { */ onShowMore: PropTypes.func, + /** + * Displays all events on the month view instead of + * having some hidden behind +{count} more. This will + * cause the rows in the month view to be scrollable if + * the number of events exceed the height of the row. + */ + showAllEvents: PropTypes.bool, + /** * The selected event, if any. */ @@ -952,6 +969,7 @@ class Calendar extends React.Component { onDrillDown={this.handleDrillDown} onSelectEvent={this.handleSelectEvent} onDoubleClickEvent={this.handleDoubleClickEvent} + onKeyPressEvent={this.handleKeyPressEvent} onSelectSlot={this.handleSelectSlot} onShowMore={onShowMore} /> @@ -1019,6 +1037,10 @@ class Calendar extends React.Component { notify(this.props.onDoubleClickEvent, args) } + handleKeyPressEvent = (...args) => { + notify(this.props.onKeyPressEvent, args) + } + handleSelectSlot = slotInfo => { notify(this.props.onSelectSlot, slotInfo) } diff --git a/src/DateContentRow.js b/src/DateContentRow.js index a0954c44c..d00333086 100644 --- a/src/DateContentRow.js +++ b/src/DateContentRow.js @@ -9,6 +9,8 @@ import * as dates from './utils/dates' import BackgroundCells from './BackgroundCells' import EventRow from './EventRow' import EventEndingRow from './EventEndingRow' +import NoopWrapper from './NoopWrapper' +import ScrollableWeekWrapper from './ScrollableWeekWrapper' import * as DateSlotMetrics from './utils/DateSlotMetrics' class DateContentRow extends React.Component { @@ -71,10 +73,15 @@ class DateContentRow extends React.Component { } renderDummy = () => { - let { className, range, renderHeader } = this.props + let { className, range, renderHeader, showAllEvents } = this.props return (
-
+
{renderHeader && (
{range.map(this.renderHeadingCell)} @@ -113,9 +120,12 @@ class DateContentRow extends React.Component { onSelectStart, onSelectEnd, onDoubleClick, + onKeyPress, resourceId, longPressThreshold, isAllDay, + resizable, + showAllEvents, } = this.props if (renderForMeasure) return this.renderDummy() @@ -123,6 +133,9 @@ class DateContentRow extends React.Component { let metrics = this.slotMetrics(this.props) let { levels, extra } = metrics + let ScrollableWeekComponent = showAllEvents + ? ScrollableWeekWrapper + : NoopWrapper let WeekWrapper = components.weekWrapper const eventRowProps = { @@ -133,8 +146,10 @@ class DateContentRow extends React.Component { components, onSelect, onDoubleClick, + onKeyPress, resourceId, slotMetrics: metrics, + resizable, } return ( @@ -152,26 +167,34 @@ class DateContentRow extends React.Component { onSelectSlot={this.handleSelectSlot} components={components} longPressThreshold={longPressThreshold} + resourceId={resourceId} /> -
+
{renderHeader && (
{range.map(this.renderHeadingCell)}
)} - - {levels.map((segs, idx) => ( - - ))} - {!!extra.length && ( - - )} - + + + {levels.map((segs, idx) => ( + + ))} + {!!extra.length && ( + + )} + +
) @@ -184,6 +207,7 @@ DateContentRow.propTypes = { range: PropTypes.array.isRequired, rtl: PropTypes.bool, + resizable: PropTypes.bool, resourceId: PropTypes.any, renderForMeasure: PropTypes.bool, renderHeader: PropTypes.func, @@ -194,11 +218,13 @@ DateContentRow.propTypes = { longPressThreshold: PropTypes.number, onShowMore: PropTypes.func, + showAllEvents: PropTypes.bool, onSelectSlot: PropTypes.func, onSelect: PropTypes.func, onSelectEnd: PropTypes.func, onSelectStart: PropTypes.func, onDoubleClick: PropTypes.func, + onKeyPress: PropTypes.func, dayPropGetter: PropTypes.func, getNow: PropTypes.func.isRequired, diff --git a/src/DayColumn.js b/src/DayColumn.js index 83974cdd7..550cbf515 100644 --- a/src/DayColumn.js +++ b/src/DayColumn.js @@ -189,6 +189,7 @@ class DayColumn extends React.Component { step, timeslots, dayLayoutAlgorithm, + resizable, } = this.props const { slotMetrics } = this @@ -236,6 +237,8 @@ class DayColumn extends React.Component { onClick={e => this._select(event, e)} onDoubleClick={e => this._doubleClick(event, e)} isBackgroundEvent={isBackgroundEvent} + onKeyPress={e => this._keyPress(event, e)} + resizable={resizable} /> ) }) @@ -375,6 +378,10 @@ class DayColumn extends React.Component { _doubleClick = (...args) => { notify(this.props.onDoubleClickEvent, args) } + + _keyPress = (...args) => { + notify(this.props.onKeyPressEvent, args) + } } DayColumn.propTypes = { @@ -388,6 +395,7 @@ DayColumn.propTypes = { isNow: PropTypes.bool, rtl: PropTypes.bool, + resizable: PropTypes.bool, accessors: PropTypes.object.isRequired, components: PropTypes.object.isRequired, @@ -407,6 +415,7 @@ DayColumn.propTypes = { onSelectSlot: PropTypes.func.isRequired, onSelectEvent: PropTypes.func.isRequired, onDoubleClickEvent: PropTypes.func.isRequired, + onKeyPressEvent: PropTypes.func, className: PropTypes.string, dragThroughEvents: PropTypes.bool, diff --git a/src/EventCell.js b/src/EventCell.js index ff59ed8b8..0c5bc88ae 100644 --- a/src/EventCell.js +++ b/src/EventCell.js @@ -13,6 +13,7 @@ class EventCell extends React.Component { isAllDay, onSelect, onDoubleClick, + onKeyPress, localizer, continuesPrior, continuesAfter, @@ -24,6 +25,7 @@ class EventCell extends React.Component { slotEnd, ...props } = this.props + delete props.resizable let title = accessors.title(event) let tooltip = accessors.tooltip(event) @@ -69,6 +71,7 @@ class EventCell extends React.Component { })} onClick={e => onSelect && onSelect(event, e)} onDoubleClick={e => onDoubleClick && onDoubleClick(event, e)} + onKeyPress={e => onKeyPress && onKeyPress(event, e)} > {typeof children === 'function' ? children(content) : content}
@@ -82,6 +85,7 @@ EventCell.propTypes = { slotStart: PropTypes.instanceOf(Date), slotEnd: PropTypes.instanceOf(Date), + resizable: PropTypes.bool, selected: PropTypes.bool, isAllDay: PropTypes.bool, continuesPrior: PropTypes.bool, @@ -94,6 +98,7 @@ EventCell.propTypes = { onSelect: PropTypes.func, onDoubleClick: PropTypes.func, + onKeyPress: PropTypes.func, } export default EventCell diff --git a/src/EventRowMixin.js b/src/EventRowMixin.js index 6c2efb81a..135d7d3fc 100644 --- a/src/EventRowMixin.js +++ b/src/EventRowMixin.js @@ -18,6 +18,7 @@ export default { onSelect: PropTypes.func, onDoubleClick: PropTypes.func, + onKeyPress: PropTypes.func, }, defaultProps: { @@ -33,9 +34,11 @@ export default { getters, onSelect, onDoubleClick, + onKeyPress, localizer, slotMetrics, components, + resizable, } = props let continuesPrior = slotMetrics.continuesPrior(event) @@ -50,11 +53,13 @@ export default { components={components} onSelect={onSelect} onDoubleClick={onDoubleClick} + onKeyPress={onKeyPress} continuesPrior={continuesPrior} continuesAfter={continuesAfter} slotStart={slotMetrics.first} slotEnd={slotMetrics.last} selected={isSelected(event, selected)} + resizable={resizable} /> ) }, diff --git a/src/Month.js b/src/Month.js index 1bb8ded8f..70cc667c2 100644 --- a/src/Month.js +++ b/src/Month.js @@ -102,6 +102,7 @@ class MonthView extends React.Component { longPressThreshold, accessors, getters, + showAllEvents, } = this.props const { needLimitMeasure, rowLimit } = this.state @@ -120,7 +121,7 @@ class MonthView extends React.Component { date={date} range={week} events={events} - maxRows={rowLimit} + maxRows={showAllEvents ? Infinity : rowLimit} selected={selected} selectable={selectable} components={components} @@ -132,9 +133,12 @@ class MonthView extends React.Component { onShowMore={this.handleShowMore} onSelect={this.handleSelectEvent} onDoubleClick={this.handleDoubleClickEvent} + onKeyPress={this.handleKeyPressEvent} onSelectSlot={this.handleSelectSlot} longPressThreshold={longPressThreshold} rtl={this.props.rtl} + resizable={this.props.resizable} + showAllEvents={showAllEvents} /> ) } @@ -220,6 +224,7 @@ class MonthView extends React.Component { slotEnd={overlay.end} onSelect={this.handleSelectEvent} onDoubleClick={this.handleDoubleClickEvent} + onKeyPress={this.handleKeyPressEvent} handleDragStart={this.props.handleDragStart} /> )} @@ -257,6 +262,11 @@ class MonthView extends React.Component { notify(this.props.onDoubleClickEvent, args) } + handleKeyPressEvent = (...args) => { + this.clearSelection() + notify(this.props.onKeyPressEvent, args) + } + handleShowMore = (events, date, cell, slot, target) => { const { popup, onDrillDown, onShowMore, getDrilldownView } = this.props //cancel any pending selections so only the event click goes through. @@ -316,6 +326,7 @@ MonthView.propTypes = { scrollToTime: PropTypes.instanceOf(Date), rtl: PropTypes.bool, + resizable: PropTypes.bool, width: PropTypes.number, accessors: PropTypes.object.isRequired, @@ -331,7 +342,9 @@ MonthView.propTypes = { onSelectSlot: PropTypes.func, onSelectEvent: PropTypes.func, onDoubleClickEvent: PropTypes.func, + onKeyPressEvent: PropTypes.func, onShowMore: PropTypes.func, + showAllEvents: PropTypes.bool, onDrillDown: PropTypes.func, getDrilldownView: PropTypes.func.isRequired, diff --git a/src/Popup.js b/src/Popup.js index ecf3a3b2b..7421ea45b 100644 --- a/src/Popup.js +++ b/src/Popup.js @@ -38,6 +38,7 @@ class Popup extends React.Component { components, onSelect, onDoubleClick, + onKeyPress, slotStart, slotEnd, localizer, @@ -73,6 +74,7 @@ class Popup extends React.Component { accessors={accessors} components={components} onDoubleClick={onDoubleClick} + onKeyPress={onKeyPress} continuesPrior={dates.lt(accessors.end(event), slotStart, 'day')} continuesAfter={dates.gte(accessors.start(event), slotEnd, 'day')} slotStart={slotStart} @@ -106,6 +108,7 @@ Popup.propTypes = { localizer: PropTypes.object.isRequired, onSelect: PropTypes.func, onDoubleClick: PropTypes.func, + onKeyPress: PropTypes.func, handleDragStart: PropTypes.func, show: PropTypes.func, slotStart: PropTypes.instanceOf(Date), diff --git a/src/ScrollableWeekWrapper.js b/src/ScrollableWeekWrapper.js new file mode 100644 index 000000000..51eccb412 --- /dev/null +++ b/src/ScrollableWeekWrapper.js @@ -0,0 +1,7 @@ +import React from 'react' + +const ScrollableWeekWrapper = ({ children }) => { + return
{children}
+} + +export default ScrollableWeekWrapper diff --git a/src/TimeGrid.js b/src/TimeGrid.js index 110292a64..38676bf3c 100644 --- a/src/TimeGrid.js +++ b/src/TimeGrid.js @@ -101,6 +101,7 @@ export default class TimeGrid extends Component { start: slots[0], end: slots[slots.length - 1], action: slotInfo.action, + resourceId: slotInfo.resourceId, }) } @@ -178,6 +179,7 @@ export default class TimeGrid extends Component { max, showMultiDayTimes, longPressThreshold, + resizable, } = this.props width = width || this.state.gutterWidth @@ -242,8 +244,10 @@ export default class TimeGrid extends Component { onSelectSlot={this.handleSelectAllDaySlot} onSelectEvent={this.handleSelectAlldayEvent} onDoubleClickEvent={this.props.onDoubleClickEvent} + onKeyPressEvent={this.props.onKeyPressEvent} onDrillDown={this.props.onDrillDown} getDrilldownView={this.props.getDrilldownView} + resizable={resizable} />
) } @@ -121,6 +124,7 @@ class TimeGridHeader extends React.Component { timeGutterHeader: TimeGutterHeader, resourceHeader: ResourceHeaderComponent = ResourceHeader, }, + resizable, } = this.props let style = {} @@ -180,8 +184,10 @@ class TimeGridHeader extends React.Component { localizer={localizer} onSelect={this.props.onSelectEvent} onDoubleClick={this.props.onDoubleClickEvent} + onKeyPress={this.props.onKeyPressEvent} onSelectSlot={this.props.onSelectSlot} longPressThreshold={this.props.longPressThreshold} + resizable={resizable} />
))} @@ -198,6 +204,7 @@ TimeGridHeader.propTypes = { isOverflowing: PropTypes.bool, rtl: PropTypes.bool, + resizable: PropTypes.bool, width: PropTypes.number, localizer: PropTypes.object.isRequired, @@ -212,6 +219,7 @@ TimeGridHeader.propTypes = { onSelectSlot: PropTypes.func, onSelectEvent: PropTypes.func, onDoubleClickEvent: PropTypes.func, + onKeyPressEvent: PropTypes.func, onDrillDown: PropTypes.func, getDrilldownView: PropTypes.func.isRequired, scrollRef: PropTypes.any, diff --git a/src/addons/dragAndDrop/EventWrapper.js b/src/addons/dragAndDrop/EventWrapper.js index 0ea5c4818..8e3de2779 100644 --- a/src/addons/dragAndDrop/EventWrapper.js +++ b/src/addons/dragAndDrop/EventWrapper.js @@ -27,6 +27,7 @@ class EventWrapper extends React.Component { continuesAfter: PropTypes.bool, isDragging: PropTypes.bool, isResizing: PropTypes.bool, + resizable: PropTypes.bool, } handleResizeUp = e => { @@ -68,7 +69,13 @@ class EventWrapper extends React.Component { } render() { - const { event, type, continuesPrior, continuesAfter } = this.props + const { + event, + type, + continuesPrior, + continuesAfter, + resizable, + } = this.props let { children } = this.props @@ -111,9 +118,8 @@ class EventWrapper extends React.Component { * in the middle of events when showMultiDay is true, and to * events at the edges of the calendar's min/max location. */ - const isResizable = resizableAccessor - ? !!get(event, resizableAccessor) - : true + const isResizable = + resizable && (resizableAccessor ? !!get(event, resizableAccessor) : true) if (isResizable || isDraggable) { /* diff --git a/src/addons/dragAndDrop/WeekWrapper.js b/src/addons/dragAndDrop/WeekWrapper.js index c829255c8..f94b752a1 100644 --- a/src/addons/dragAndDrop/WeekWrapper.js +++ b/src/addons/dragAndDrop/WeekWrapper.js @@ -80,7 +80,7 @@ class WeekWrapper extends React.Component { } handleMove = ({ x, y }, node, draggedEvent) => { - const { event = draggedEvent } = this.context.draggable.dragAndDropAction + const event = this.context.draggable.dragAndDropAction.event || draggedEvent const metrics = this.props.slotMetrics const { accessors } = this.props @@ -138,6 +138,8 @@ class WeekWrapper extends React.Component { const { accessors, slotMetrics: metrics } = this.props let { start, end } = eventTimes(event, accessors) + let originalStart = start + let originalEnd = end let rowBox = getBoundsForNode(node) let cursorInRow = pointInBox(rowBox, point) @@ -145,13 +147,8 @@ class WeekWrapper extends React.Component { if (direction === 'RIGHT') { if (cursorInRow) { if (metrics.last < start) return this.reset() - // add min - end = dates.add( - metrics.getDateForSlot( - getSlotAtX(rowBox, point.x, false, metrics.slots) - ), - 1, - 'day' + end = metrics.getDateForSlot( + getSlotAtX(rowBox, point.x, false, metrics.slots) ) } else if ( dates.inRange(start, metrics.first, metrics.last) || @@ -162,8 +159,10 @@ class WeekWrapper extends React.Component { this.setState({ segment: null }) return } - - end = dates.max(end, dates.add(start, 1, 'day')) + end = dates.merge(end, accessors.end(event)) + if (dates.lt(end, start)) { + end = originalEnd + } } else if (direction === 'LEFT') { // inbetween Row if (cursorInRow) { @@ -181,8 +180,10 @@ class WeekWrapper extends React.Component { this.reset() return } - - start = dates.min(dates.add(end, -1, 'day'), start) + start = dates.merge(start, accessors.start(event)) + if (dates.gt(start, end)) { + start = originalStart + } } this.update(event, start, end) @@ -217,8 +218,13 @@ class WeekWrapper extends React.Component { selector.on('select', point => { const bounds = getBoundsForNode(node) - if (!this.state.segment || !pointInBox(bounds, point)) return - this.handleInteractionEnd() + if (!this.state.segment) return + + if (!pointInBox(bounds, point)) { + this.reset() + } else { + this.handleInteractionEnd() + } }) selector.on('dropFromOutside', point => { diff --git a/src/addons/dragAndDrop/withDragAndDrop.js b/src/addons/dragAndDrop/withDragAndDrop.js index 759ca5c15..f2b7eeb5f 100644 --- a/src/addons/dragAndDrop/withDragAndDrop.js +++ b/src/addons/dragAndDrop/withDragAndDrop.js @@ -18,7 +18,8 @@ import { mergeComponents } from './common' * export default withDragAndDrop(Calendar) * ``` * - * Set `resizable` to true in your calendar if you want events to be resizable. + * Set `resizable` to false in your calendar if you don't want events to be resizable. + * `resizable` is set to true by default. * * The HOC adds `onEventDrop`, `onEventResize`, and `onDragStart` callback properties if the events are * moved or resized. These callbacks are called with these signatures: @@ -89,6 +90,7 @@ export default function withDragAndDrop(Calendar) { components: {}, draggableAccessor: null, resizableAccessor: null, + resizable: true, step: 30, } diff --git a/src/less/styles.less b/src/less/styles.less index fb351c70a..6bee557bb 100644 --- a/src/less/styles.less +++ b/src/less/styles.less @@ -81,6 +81,25 @@ z-index: 4; } +.rbc-row-content-scrollable { + display: flex; + flex-direction: column; + height: 100%; + + .rbc-row-content-scroll-container { + height: 100%; + overflow-y: scroll; + + /* Hide scrollbar for Chrome, Safari and Opera */ + &::-webkit-scrollbar { + display: none; + } + + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } +} + .rbc-today { background-color: @today-highlight-bg; } diff --git a/src/sass/styles.scss b/src/sass/styles.scss index 9607aca00..4eeae6941 100644 --- a/src/sass/styles.scss +++ b/src/sass/styles.scss @@ -80,6 +80,25 @@ z-index: 4; } +.rbc-row-content-scrollable { + display: flex; + flex-direction: column; + height: 100%; + + .rbc-row-content-scroll-container { + height: 100%; + overflow-y: scroll; + + /* Hide scrollbar for Chrome, Safari and Opera */ + &::-webkit-scrollbar { + display: none; + } + + -ms-overflow-style: none; /* IE and Edge */ + scrollbar-width: none; /* Firefox */ + } +} + .rbc-today { background-color: $today-highlight-bg; } @@ -88,4 +107,4 @@ @import './event'; @import './month'; @import './agenda'; -@import './time-grid'; \ No newline at end of file +@import './time-grid'; diff --git a/src/utils/TimeSlots.js b/src/utils/TimeSlots.js index 1b962ac81..4132c10c3 100644 --- a/src/utils/TimeSlots.js +++ b/src/utils/TimeSlots.js @@ -131,7 +131,7 @@ export function getSlotMetrics({ min: start, max: end, step, timeslots }) { const rangeStartMin = positionFromDate(rangeStart) const rangeEndMin = positionFromDate(rangeEnd) const top = - rangeEndMin > step * (numSlots - 1) && !dates.eq(end, rangeEnd) + rangeEndMin > step * numSlots && !dates.eq(end, rangeEnd) ? ((rangeStartMin - step) / (step * numSlots)) * 100 : (rangeStartMin / (step * numSlots)) * 100 diff --git a/yarn.lock b/yarn.lock index f7333f979..4ff68d9b8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3606,7 +3606,7 @@ commander@2.17.x: resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@^2.14.1, commander@^2.19.0, commander@^2.8.1, commander@^2.9.0, commander@~2.20.0: +commander@^2.14.1, commander@^2.19.0, commander@^2.8.1, commander@^2.9.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -6215,13 +6215,14 @@ handle-thing@^2.0.0: integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ== handlebars@^4.0.3, handlebars@^4.1.0: - version "4.1.2" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" - integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== + version "4.7.6" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.7.6.tgz#d4c05c1baf90e9945f77aa68a7a219aa4a7df74e" + integrity sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA== dependencies: + minimist "^1.2.5" neo-async "^2.6.0" - optimist "^0.6.1" source-map "^0.6.1" + wordwrap "^1.0.0" optionalDependencies: uglify-js "^3.1.4" @@ -8781,15 +8782,10 @@ minimist@0.0.8: resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" integrity sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0= -minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" - integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= - -minimist@~0.0.1: - version "0.0.10" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" - integrity sha1-3j+YVD2/lggr5IrRoMfNqDYwHc8= +minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: + version "1.2.5" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" + integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== minipass@^2.2.1, minipass@^2.3.4: version "2.3.5" @@ -8949,9 +8945,9 @@ negotiator@0.6.2: integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== neo-async@^2.5.0, neo-async@^2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.0.tgz#b9d15e4d71c6762908654b5183ed38b753340835" - integrity sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA== + version "2.6.2" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== nested-error-stacks@^2.0.0, nested-error-stacks@^2.1.0: version "2.1.0" @@ -9385,14 +9381,6 @@ opn@^5.4.0, opn@^5.5.0: dependencies: is-wsl "^1.1.0" -optimist@^0.6.1: - version "0.6.1" - resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" - integrity sha1-2j6nRob6IaGaERwybpDrFaAZZoY= - dependencies: - minimist "~0.0.1" - wordwrap "~0.0.2" - optimize-css-assets-webpack-plugin@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/optimize-css-assets-webpack-plugin/-/optimize-css-assets-webpack-plugin-5.0.1.tgz#9eb500711d35165b45e7fd60ba2df40cb3eb9159" @@ -12876,12 +12864,9 @@ uglify-js@3.4.x: source-map "~0.6.1" uglify-js@^3.1.4: - version "3.5.11" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.5.11.tgz#833442c0aa29b3a7d34344c7c63adaa3f3504f6a" - integrity sha512-izPJg8RsSyqxbdnqX36ExpbH3K7tDBsAU/VfNv89VkMFy3z39zFjunQGsSHOlGlyIfGLGprGeosgQno3bo2/Kg== - dependencies: - commander "~2.20.0" - source-map "~0.6.1" + version "3.10.4" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.10.4.tgz#dd680f5687bc0d7a93b14a3482d16db6eba2bfbb" + integrity sha512-kBFT3U4Dcj4/pJ52vfjCSfyLyvG9VYYuGYPmrPvAxRw/i7xHiT4VvCev+uiEMcEEiu6UNB6KgWmGtSUYIWScbw== uncontrollable@^5.0.0: version "5.1.0" @@ -13478,12 +13463,7 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -wordwrap@~0.0.2: - version "0.0.3" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" - integrity sha1-o9XabNXAvAAI03I0u68b7WMFkQc= - -wordwrap@~1.0.0: +wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" integrity sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=