react-calendar-timeline
Advanced tools
Comparing version 0.25.0 to 0.25.1
@@ -10,4 +10,9 @@ # Change Log | ||
## 0.24.0 | ||
## 0.25.1 | ||
- fix error when using `week` unit causing format error in `DateHeader` #562 @dkarnutsch | ||
- fix Wheel/Mousewheel Event errors on chrome 73 #541 @ilaiwi | ||
## 0.25.0 | ||
### Custom Headers | ||
@@ -149,5 +154,5 @@ | ||
* Provided a new key `groupLabelKey` to allow splitting of the key used to render the Sidebar and the InfoLabel visible during drag operations. `groupTitleKey` continues to be used to render the Sidebar. #442 @thiagosatoshi | ||
* fix scroll left/right causes item move/edit to be at incorrect time #401 @acemac | ||
* now `getResizeProps` take `leftClassName` and `rightClassName` and returns className for left and right props @acemac | ||
* fix functionality of `itemTitle` and `itemDivTitle` [issue](https://github.com/namespace-ee/react-calendar-timeline/issues/429#issuecomment-426456693) @acemac | ||
* fix scroll left/right causes item move/edit to be at incorrect time #401 @acemac | ||
* now `getResizeProps` take `leftClassName` and `rightClassName` and returns className for left and right props @acemac | ||
* fix functionality of `itemTitle` and `itemDivTitle` [issue](https://github.com/namespace-ee/react-calendar-timeline/issues/429#issuecomment-426456693) @acemac | ||
@@ -154,0 +159,0 @@ ### 0.21.0 |
@@ -41,2 +41,8 @@ 'use strict'; | ||
}, | ||
week: { | ||
long: 'w', | ||
mediumLong: 'w', | ||
medium: 'w', | ||
short: 'w' | ||
}, | ||
day: { | ||
@@ -43,0 +49,0 @@ long: 'dddd, LL', |
@@ -38,2 +38,5 @@ 'use strict'; | ||
_this.props.scrollRef(el); | ||
if (el) { | ||
el.addEventListener('wheel', _this.handleWheel, { passive: false }); | ||
} | ||
}; | ||
@@ -180,2 +183,9 @@ | ||
_createClass(ScrollElement, [{ | ||
key: 'componentWillUnmount', | ||
value: function componentWillUnmount() { | ||
if (this.scrollComponent) { | ||
this.scrollComponent.removeEventListener('wheel', this.handleWheel); | ||
} | ||
} | ||
}, { | ||
key: 'render', | ||
@@ -205,3 +215,2 @@ value: function render() { | ||
onScroll: this.handleScroll, | ||
onWheel: this.handleWheel, | ||
onMouseDown: this.handleMouseDown, | ||
@@ -208,0 +217,0 @@ onMouseMove: this.handleMouseMove, |
{ | ||
"name": "react-calendar-timeline", | ||
"version": "0.25.0", | ||
"version": "0.25.1", | ||
"description": "react calendar timeline", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
@@ -9,2 +9,12 @@ # React Calendar Timeline | ||
# Contents | ||
- [Getting Started](#getting-started) | ||
- [Usage](#usage) | ||
- [API](#api) | ||
- [Timeline Markers](#timeline-markers) | ||
- [Timeline Headers](#timeline-headers) | ||
- [FAQ](#faq) | ||
- [Contribute](#contribute) | ||
# Getting started | ||
@@ -797,3 +807,3 @@ | ||
_Note_ : the Child function renderer can be a component or a function for convenience | ||
_Note_ : the Child function renderer can be a component or a function for convenience | ||
@@ -813,3 +823,3 @@ ### `DateHeader` | ||
| `labelFormat` | `Function` or `string`| controls the how to format the interval label | | ||
| `intervalRenderer`| `Function`| render prop to render each interval in the header | ||
| `intervalRenderer`| `Function`| render prop to render each interval in the header | ||
| `headerData` | `any`| Contextual data to be passed to the item renderer as a data prop | | ||
@@ -824,5 +834,5 @@ | `height` | `number` default (30)| height of the header in pixels | | ||
If `primaryHeader` is passed to unit, it will override the unit with a unit a unit larger by 1 of the timeline unit. | ||
If `primaryHeader` is passed to unit, it will override the unit with a unit a unit larger by 1 of the timeline unit. | ||
If `unit` is set, the unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. | ||
If `unit` is set, the unit of the header will be the unit passed though the prop and can be any `unit of time` from `momentjs`. | ||
@@ -856,3 +866,3 @@ #### Label format | ||
const format : LabelFormat = { | ||
year: { | ||
year: { | ||
long: 'YYYY', | ||
@@ -862,28 +872,34 @@ mediumLong: 'YYYY', | ||
short: 'YY' | ||
}, | ||
month: { | ||
long: 'MMMM YYYY', | ||
mediumLong: 'MMMM', | ||
medium: 'MMMM', | ||
short: 'MM/YY' | ||
}, | ||
day: { | ||
long: 'dddd, LL', | ||
mediumLong: 'dddd, LL', | ||
medium: 'dd D', | ||
short: 'D' | ||
}, | ||
hour: { | ||
long: 'dddd, LL, HH:00', | ||
mediumLong: 'L, HH:00', | ||
medium: 'HH:00', | ||
short: 'HH' | ||
}, | ||
minute: { | ||
long: 'HH:mm', | ||
mediumLong: 'HH:mm', | ||
medium: 'HH:mm', | ||
short: 'mm', | ||
} | ||
}, | ||
month: { | ||
long: 'MMMM YYYY', | ||
mediumLong: 'MMMM', | ||
medium: 'MMMM', | ||
short: 'MM/YY' | ||
}, | ||
week: { | ||
long: 'w', | ||
mediumLong: 'w', | ||
medium: 'w', | ||
short: 'w' | ||
}, | ||
day: { | ||
long: 'dddd, LL', | ||
mediumLong: 'dddd, LL', | ||
medium: 'dd D', | ||
short: 'D' | ||
}, | ||
hour: { | ||
long: 'dddd, LL, HH:00', | ||
mediumLong: 'L, HH:00', | ||
medium: 'HH:00', | ||
short: 'HH' | ||
}, | ||
minute: { | ||
long: 'HH:mm', | ||
mediumLong: 'HH:mm', | ||
medium: 'HH:mm', | ||
short: 'mm', | ||
} | ||
} | ||
``` | ||
@@ -900,3 +916,3 @@ | ||
_Note_ : the renderProp can be a component or a function for convenience | ||
_Note_ : the renderProp can be a component or a function for convenience | ||
@@ -934,3 +950,3 @@ ##### interval context | ||
data passed through headerData | ||
data passed through headerData | ||
@@ -979,3 +995,3 @@ #### example | ||
| ----------------- | --------------- | ---| | ||
| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (default `timelineUnit`) | intervals | | ||
| `unit`| `second`, `minute`, `hour`, `day`, `week`, `month`, `year` (default `timelineUnit`) | intervals | | ||
| `children` | `Function`| function as a child component to render the header| | ||
@@ -995,3 +1011,3 @@ | `headerData` | `any`| Contextual data to be passed to the item renderer as a data prop | | ||
_Note_ : the Child function renderer can be a component or a function for convenience | ||
_Note_ : the Child function renderer can be a component or a function for convenience | ||
@@ -1071,3 +1087,3 @@ ``` | ||
pass through the `headerData` prop content | ||
pass through the `headerData` prop content | ||
@@ -1229,3 +1245,3 @@ #### example | ||
## Contribute | ||
# Contribute | ||
@@ -1232,0 +1248,0 @@ If you like to improve React Calendar Timeline fork the repo and get started by running the following: |
@@ -36,2 +36,8 @@ export const defaultKeys = { | ||
}, | ||
week: { | ||
long: 'w', | ||
mediumLong: 'w', | ||
medium: 'w', | ||
short: 'w' | ||
}, | ||
day: { | ||
@@ -38,0 +44,0 @@ long: 'dddd, LL', |
@@ -28,2 +28,5 @@ import React, { Component } from 'react' | ||
this.props.scrollRef(el) | ||
if(el){ | ||
el.addEventListener('wheel', this.handleWheel, {passive: false}); | ||
} | ||
} | ||
@@ -166,2 +169,8 @@ | ||
componentWillUnmount(){ | ||
if(this.scrollComponent){ | ||
this.scrollComponent.removeEventListener('wheel', this.handleWheel); | ||
} | ||
} | ||
render() { | ||
@@ -185,3 +194,2 @@ const { width, height, children } = this.props | ||
onScroll={this.handleScroll} | ||
onWheel={this.handleWheel} | ||
onMouseDown={this.handleMouseDown} | ||
@@ -188,0 +196,0 @@ onMouseMove={this.handleMouseMove} |
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
443968
9358
1261