Skip to content

Commit c6b8b83

Browse files
committed
0.28.0
1 parent 98d742f commit c6b8b83

File tree

5 files changed

+22
-74
lines changed

5 files changed

+22
-74
lines changed

CHANGELOG.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,17 @@ and this project adheres (more or less) to [Semantic Versioning](http://semver.o
77

88
## Unreleased
99

10-
* Add unit argument to onZoom and onTimeChange callbacks
10+
11+
## 0.28.0
12+
13+
* Add unit argument to onZoom and onTimeChange callbacks @hckr #655
1114
* Add `className` prop to Timeline component to override `react-calendar-timeline` class #682
12-
* Fix injecting custom vertical line's class names for time periods longer than day
15+
* support zoom level seconds #835 @horizon-plaza
16+
* custom buffer prop (help with controlled scrolling) @Ilaiwi
17+
* Fix injecting custom vertical line's class names for time periods longer than day @RafikiTiki
18+
* fix Context Menu unintentionally disabled by default @dsgipe #769
19+
* delete props `headerLabelFormats` and `subHeaderLabelFormats` not you can pass `formatLabel` function to `DateHeader` with label width and start and end time of intervals
20+
1321

1422
## 0.26.7
1523

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# ⚠️⚠️⚠️⚠️ HELP WANTED
2+
please email me [[email protected]](mailto:[email protected]) and we will setup some time to speak and see if you can help maintain this library.
3+
14
# React Calendar Timeline
25

36
A modern and responsive React timeline component.
@@ -210,6 +213,7 @@ What percentage of the height of the line is taken by the item? Default `0.65`
210213

211214
Smallest time the calendar can zoom to in milliseconds. Default `60 * 60 * 1000` (1 hour)
212215

216+
__notes__: please note than second won't show up unless you change this to `60 * 1000`
213217
## maxZoom
214218

215219
Largest time the calendar can zoom to in milliseconds. Default `5 * 365.24 * 86400 * 1000` (5 years)
@@ -923,7 +927,13 @@ by default we provide a responsive format for the dates based on the label width
923927
mediumLong: 'HH:mm',
924928
medium: 'HH:mm',
925929
short: 'mm',
926-
}
930+
},
931+
second: {
932+
"long": 'mm:ss',
933+
mediumLong: 'mm:ss',
934+
medium: 'mm:ss',
935+
"short": 'ss'
936+
}
927937
}
928938
```
929939

demo/app/demo-controlled-scrolling/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ export default class App extends Component {
201201
onItemResize={this.handleItemResize}
202202
onItemDoubleClick={this.handleItemDoubleClick}
203203
buffer={1}
204-
// onTimeChange={this.handleTimeChange}
204+
onTimeChange={this.handleTimeChange}
205205
// moveResizeValidator={this.moveResizeValidator}
206206
>
207207
<TimelineMarkers>

src/lib/Timeline.js

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ import { _get, _length } from './utility/generic'
2121
import {
2222
defaultKeys,
2323
defaultTimeSteps,
24-
defaultHeaderLabelFormats,
25-
defaultSubHeaderLabelFormats
2624
} from './default-config'
2725
import { TimelineStateProvider } from './timeline/TimelineStateContext'
2826
import { TimelineMarkersProvider } from './markers/TimelineMarkersContext'
@@ -116,37 +114,6 @@ export default class ReactCalendarTimeline extends Component {
116114

117115
selected: PropTypes.array,
118116

119-
headerLabelFormats: PropTypes.shape({
120-
yearShort: PropTypes.string,
121-
yearLong: PropTypes.string,
122-
monthShort: PropTypes.string,
123-
monthMedium: PropTypes.string,
124-
monthMediumLong: PropTypes.string,
125-
monthLong: PropTypes.string,
126-
dayShort: PropTypes.string,
127-
dayLong: PropTypes.string,
128-
hourShort: PropTypes.string,
129-
hourMedium: PropTypes.string,
130-
hourMediumLong: PropTypes.string,
131-
hourLong: PropTypes.string
132-
}),
133-
134-
subHeaderLabelFormats: PropTypes.shape({
135-
yearShort: PropTypes.string,
136-
yearLong: PropTypes.string,
137-
monthShort: PropTypes.string,
138-
monthMedium: PropTypes.string,
139-
monthLong: PropTypes.string,
140-
dayShort: PropTypes.string,
141-
dayMedium: PropTypes.string,
142-
dayMediumLong: PropTypes.string,
143-
dayLong: PropTypes.string,
144-
hourShort: PropTypes.string,
145-
hourLong: PropTypes.string,
146-
minuteShort: PropTypes.string,
147-
minuteLong: PropTypes.string
148-
}),
149-
150117
resizeDetector: PropTypes.shape({
151118
addListener: PropTypes.func,
152119
removeListener: PropTypes.func
@@ -227,9 +194,6 @@ export default class ReactCalendarTimeline extends Component {
227194
onBoundsChange: null,
228195
children: null,
229196

230-
headerLabelFormats: defaultHeaderLabelFormats,
231-
subHeaderLabelFormats: defaultSubHeaderLabelFormats,
232-
233197
selected: null
234198
}
235199

src/lib/default-config.js

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -64,37 +64,3 @@ export const defaultHeaderFormats = {
6464
"short": 'ss'
6565
}
6666
}
67-
68-
//TODO: delete this
69-
export const defaultHeaderLabelFormats = {
70-
yearShort: 'YY',
71-
yearLong: 'YYYY',
72-
monthShort: 'MM/YY',
73-
monthMedium: 'MM/YYYY',
74-
monthMediumLong: 'MMM YYYY',
75-
monthLong: 'MMMM YYYY',
76-
dayShort: 'L',
77-
dayLong: 'dddd, LL',
78-
hourShort: 'HH',
79-
hourMedium: 'HH:00',
80-
hourMediumLong: 'L, HH:00',
81-
hourLong: 'dddd, LL, HH:00',
82-
time: 'LLL'
83-
}
84-
85-
//TODO: delete this
86-
export const defaultSubHeaderLabelFormats = {
87-
yearShort: 'YY',
88-
yearLong: 'YYYY',
89-
monthShort: 'MM',
90-
monthMedium: 'MMM',
91-
monthLong: 'MMMM',
92-
dayShort: 'D',
93-
dayMedium: 'dd D',
94-
dayMediumLong: 'ddd, Do',
95-
dayLong: 'dddd, Do',
96-
hourShort: 'HH',
97-
hourLong: 'HH:00',
98-
minuteShort: 'mm',
99-
minuteLong: 'HH:mm'
100-
}

0 commit comments

Comments
 (0)