@oddle.me/react-calendar-timeline 0.28.1-0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/LICENSE.md +8 -0
  2. package/README.md +1298 -0
  3. package/lib/Timeline.css +110 -0
  4. package/lib/index.js +77 -0
  5. package/lib/lib/Timeline.js +966 -0
  6. package/lib/lib/columns/Columns.js +137 -0
  7. package/lib/lib/default-config.js +73 -0
  8. package/lib/lib/headers/CustomDateHeader.js +48 -0
  9. package/lib/lib/headers/CustomHeader.js +276 -0
  10. package/lib/lib/headers/DateHeader.js +206 -0
  11. package/lib/lib/headers/HeadersContext.js +94 -0
  12. package/lib/lib/headers/Interval.js +131 -0
  13. package/lib/lib/headers/SidebarHeader.js +130 -0
  14. package/lib/lib/headers/TimelineHeaders.js +180 -0
  15. package/lib/lib/headers/constants.js +10 -0
  16. package/lib/lib/interaction/PreventClickOnDrag.js +99 -0
  17. package/lib/lib/items/Item.js +627 -0
  18. package/lib/lib/items/Items.js +178 -0
  19. package/lib/lib/items/defaultItemRenderer.js +40 -0
  20. package/lib/lib/items/styles.js +65 -0
  21. package/lib/lib/layout/Sidebar.js +138 -0
  22. package/lib/lib/markers/MarkerCanvas.js +164 -0
  23. package/lib/lib/markers/MarkerCanvasContext.js +28 -0
  24. package/lib/lib/markers/TimelineMarkersContext.js +157 -0
  25. package/lib/lib/markers/TimelineMarkersRenderer.js +69 -0
  26. package/lib/lib/markers/implementations/CursorMarker.js +137 -0
  27. package/lib/lib/markers/implementations/CustomMarker.js +79 -0
  28. package/lib/lib/markers/implementations/TodayMarker.js +123 -0
  29. package/lib/lib/markers/implementations/shared.js +51 -0
  30. package/lib/lib/markers/markerType.js +12 -0
  31. package/lib/lib/markers/public/CursorMarker.js +97 -0
  32. package/lib/lib/markers/public/CustomMarker.js +116 -0
  33. package/lib/lib/markers/public/TimelineMarkers.js +27 -0
  34. package/lib/lib/markers/public/TodayMarker.js +121 -0
  35. package/lib/lib/row/GroupRow.js +94 -0
  36. package/lib/lib/row/GroupRows.js +117 -0
  37. package/lib/lib/scroll/ScrollElement.js +285 -0
  38. package/lib/lib/timeline/TimelineStateContext.js +155 -0
  39. package/lib/lib/utility/calendar.js +672 -0
  40. package/lib/lib/utility/dom-helpers.js +62 -0
  41. package/lib/lib/utility/events.js +23 -0
  42. package/lib/lib/utility/generic.js +44 -0
  43. package/lib/resize-detector/container.js +36 -0
  44. package/lib/resize-detector/window.js +25 -0
  45. package/package.json +162 -0
  46. package/src/global.d.ts +373 -0
@@ -0,0 +1,285 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = void 0;
7
+
8
+ var _react = _interopRequireWildcard(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _domHelpers = require("../utility/dom-helpers");
13
+
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+
16
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj["default"] = obj; return newObj; } }
17
+
18
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
19
+
20
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
+
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
+
24
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
27
+
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
+
30
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
+
32
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
+
34
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
+
36
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
+
38
+ var ScrollElement =
39
+ /*#__PURE__*/
40
+ function (_Component) {
41
+ _inherits(ScrollElement, _Component);
42
+
43
+ function ScrollElement() {
44
+ var _this;
45
+
46
+ _classCallCheck(this, ScrollElement);
47
+
48
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(ScrollElement).call(this));
49
+
50
+ _defineProperty(_assertThisInitialized(_this), "handleScroll", function () {
51
+ var scrollX = _this.scrollComponent.scrollLeft;
52
+ var scrollY = _this.scrollComponent.scrollTop;
53
+
54
+ _this.props.onScroll(scrollX, scrollY);
55
+ });
56
+
57
+ _defineProperty(_assertThisInitialized(_this), "refHandler", function (el) {
58
+ _this.scrollComponent = el;
59
+
60
+ _this.props.scrollRef(el);
61
+
62
+ if (el) {
63
+ el.addEventListener('wheel', _this.handleWheel, {
64
+ passive: false
65
+ });
66
+ }
67
+ });
68
+
69
+ _defineProperty(_assertThisInitialized(_this), "handleWheel", function (e) {
70
+ var traditionalZoom = _this.props.traditionalZoom; // zoom in the time dimension
71
+
72
+ if (e.ctrlKey || e.metaKey || e.altKey) {
73
+ if (!traditionalZoom) {
74
+ e.preventDefault();
75
+ var parentPosition = (0, _domHelpers.getParentPosition)(e.currentTarget);
76
+ var xPosition = e.clientX - parentPosition.x;
77
+ var speed = e.ctrlKey ? 10 : e.metaKey ? 3 : 1; // convert vertical zoom to horiziontal
78
+
79
+ _this.props.onWheelZoom(speed, xPosition, e.deltaY);
80
+ }
81
+ } else if (e.shiftKey) {
82
+ e.preventDefault();
83
+ /*shift+scroll event from a mouse wheel has deltaX, but shift+scroll event from a touchpad has the potential to change both delatX deltaY when moving diagonally
84
+ checking deltaX first in this ternary prevents bugs when both deltaY and deltaX are changing by prioritizing deltaX*/
85
+
86
+ _this.props.onScroll(_this.scrollComponent.scrollLeft + (e.deltaX || e.deltaY));
87
+ }
88
+ });
89
+
90
+ _defineProperty(_assertThisInitialized(_this), "handleMouseDown", function (e) {
91
+ if (e.button === 0) {
92
+ //make drag position variables contain both x and y
93
+ _this.dragStartPosition = {
94
+ x: e.pageX,
95
+ y: e.pageY
96
+ };
97
+ _this.dragLastPosition = {
98
+ x: e.pageX,
99
+ y: e.pageY
100
+ };
101
+
102
+ _this.setState({
103
+ isDragging: true
104
+ });
105
+ }
106
+ });
107
+
108
+ _defineProperty(_assertThisInitialized(_this), "handleMouseMove", function (e) {
109
+ // this.props.onMouseMove(e)
110
+ //why is interacting with item important?
111
+ if (_this.state.isDragging && !_this.props.isInteractingWithItem) {
112
+ //scroll window for vertical scrolling along with scrolling the component horizontally
113
+ var yPositionChange = _this.dragLastPosition.y - e.pageY;
114
+ window.scrollBy(0, yPositionChange);
115
+
116
+ _this.props.onScroll(_this.scrollComponent.scrollLeft + _this.dragLastPosition.x - e.pageX, _this.scrollComponent.scrollTop + _this.dragLastPosition.y - e.pageY);
117
+
118
+ _this.dragLastPosition = {
119
+ x: e.pageX,
120
+ y: e.pageY
121
+ };
122
+ }
123
+ });
124
+
125
+ _defineProperty(_assertThisInitialized(_this), "handleMouseUp", function () {
126
+ _this.dragStartPosition = null;
127
+ _this.dragLastPosition = null;
128
+
129
+ _this.setState({
130
+ isDragging: false
131
+ });
132
+ });
133
+
134
+ _defineProperty(_assertThisInitialized(_this), "handleMouseLeave", function () {
135
+ // this.props.onMouseLeave(e)
136
+ _this.dragStartPosition = null;
137
+ _this.dragLastPosition = null;
138
+
139
+ _this.setState({
140
+ isDragging: false
141
+ });
142
+ });
143
+
144
+ _defineProperty(_assertThisInitialized(_this), "handleTouchStart", function (e) {
145
+ if (e.touches.length === 2) {
146
+ e.preventDefault();
147
+ _this.lastTouchDistance = Math.abs(e.touches[0].screenX - e.touches[1].screenX);
148
+ _this.singleTouchStart = null;
149
+ _this.lastSingleTouch = null;
150
+ } else if (e.touches.length === 1) {
151
+ e.preventDefault();
152
+ var x = e.touches[0].clientX;
153
+ var y = e.touches[0].clientY;
154
+ _this.lastTouchDistance = null;
155
+ _this.singleTouchStart = {
156
+ x: x,
157
+ y: y,
158
+ screenY: window.pageYOffset
159
+ };
160
+ _this.lastSingleTouch = {
161
+ x: x,
162
+ y: y,
163
+ screenY: window.pageYOffset
164
+ };
165
+ }
166
+ });
167
+
168
+ _defineProperty(_assertThisInitialized(_this), "handleTouchMove", function (e) {
169
+ var _this$props = _this.props,
170
+ isInteractingWithItem = _this$props.isInteractingWithItem,
171
+ width = _this$props.width,
172
+ onZoom = _this$props.onZoom;
173
+
174
+ if (isInteractingWithItem) {
175
+ e.preventDefault();
176
+ return;
177
+ }
178
+
179
+ if (_this.lastTouchDistance && e.touches.length === 2) {
180
+ e.preventDefault();
181
+ var touchDistance = Math.abs(e.touches[0].screenX - e.touches[1].screenX);
182
+ var parentPosition = (0, _domHelpers.getParentPosition)(e.currentTarget);
183
+ var xPosition = (e.touches[0].screenX + e.touches[1].screenX) / 2 - parentPosition.x;
184
+
185
+ if (touchDistance !== 0 && _this.lastTouchDistance !== 0) {
186
+ onZoom(_this.lastTouchDistance / touchDistance, xPosition / width);
187
+ _this.lastTouchDistance = touchDistance;
188
+ }
189
+ } else if (_this.lastSingleTouch && e.touches.length === 1) {
190
+ e.preventDefault();
191
+ var x = e.touches[0].clientX;
192
+ var y = e.touches[0].clientY;
193
+ var deltaX = x - _this.lastSingleTouch.x;
194
+ var deltaY = x - _this.lastSingleTouch.y;
195
+ var deltaX0 = x - _this.singleTouchStart.x;
196
+ var deltaY0 = y - _this.singleTouchStart.y;
197
+ _this.lastSingleTouch = {
198
+ x: x,
199
+ y: y
200
+ };
201
+ var moveX = Math.abs(deltaX0) * 3 > Math.abs(deltaY0);
202
+ var moveY = Math.abs(deltaY0) * 3 > Math.abs(deltaX0);
203
+
204
+ if (deltaX !== 0 && moveX || deltaY !== 0 && moveY) {
205
+ _this.props.onScroll(_this.scrollComponent.scrollLeft - deltaX, _this.scrollComponent.scrollTop - deltaY);
206
+ }
207
+ }
208
+ });
209
+
210
+ _defineProperty(_assertThisInitialized(_this), "handleTouchEnd", function () {
211
+ if (_this.lastTouchDistance) {
212
+ _this.lastTouchDistance = null;
213
+ }
214
+
215
+ if (_this.lastSingleTouch) {
216
+ _this.lastSingleTouch = null;
217
+ _this.singleTouchStart = null;
218
+ }
219
+ });
220
+
221
+ _this.state = {
222
+ isDragging: false
223
+ };
224
+ return _this;
225
+ }
226
+ /**
227
+ * needed to handle scrolling with trackpad
228
+ */
229
+
230
+
231
+ _createClass(ScrollElement, [{
232
+ key: "componentWillUnmount",
233
+ value: function componentWillUnmount() {
234
+ if (this.scrollComponent) {
235
+ this.scrollComponent.removeEventListener('wheel', this.handleWheel);
236
+ }
237
+ }
238
+ }, {
239
+ key: "render",
240
+ value: function render() {
241
+ var _this$props2 = this.props,
242
+ width = _this$props2.width,
243
+ height = _this$props2.height,
244
+ children = _this$props2.children;
245
+ var isDragging = this.state.isDragging;
246
+ var scrollComponentStyle = {
247
+ width: "".concat(width, "px"),
248
+ height: "".concat(height + 20, "px"),
249
+ //20px to push the scroll element down off screen...?
250
+ cursor: isDragging ? 'move' : 'default',
251
+ position: 'relative'
252
+ };
253
+ return _react["default"].createElement("div", {
254
+ ref: this.refHandler,
255
+ className: "rct-scroll",
256
+ style: scrollComponentStyle,
257
+ onMouseDown: this.handleMouseDown,
258
+ onMouseMove: this.handleMouseMove,
259
+ onMouseUp: this.handleMouseUp,
260
+ onMouseLeave: this.handleMouseLeave,
261
+ onTouchStart: this.handleTouchStart,
262
+ onTouchMove: this.handleTouchMove,
263
+ onTouchEnd: this.handleTouchEnd,
264
+ onScroll: this.handleScroll
265
+ }, children);
266
+ }
267
+ }]);
268
+
269
+ return ScrollElement;
270
+ }(_react.Component);
271
+
272
+ _defineProperty(ScrollElement, "propTypes", {
273
+ children: _propTypes["default"].element.isRequired,
274
+ width: _propTypes["default"].number.isRequired,
275
+ height: _propTypes["default"].number.isRequired,
276
+ traditionalZoom: _propTypes["default"].bool.isRequired,
277
+ scrollRef: _propTypes["default"].func.isRequired,
278
+ isInteractingWithItem: _propTypes["default"].bool.isRequired,
279
+ onZoom: _propTypes["default"].func.isRequired,
280
+ onWheelZoom: _propTypes["default"].func.isRequired,
281
+ onScroll: _propTypes["default"].func.isRequired
282
+ });
283
+
284
+ var _default = ScrollElement;
285
+ exports["default"] = _default;
@@ -0,0 +1,155 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.TimelineStateConsumer = exports.TimelineStateProvider = void 0;
7
+
8
+ var _react = _interopRequireDefault(require("react"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _createReactContext2 = _interopRequireDefault(require("create-react-context"));
13
+
14
+ var _calendar = require("../utility/calendar");
15
+
16
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
17
+
18
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
19
+
20
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
21
+
22
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
23
+
24
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
25
+
26
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
27
+
28
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
29
+
30
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
31
+
32
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
33
+
34
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
35
+
36
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
37
+
38
+ /* this context will hold all information regarding timeline state:
39
+ 1. timeline width
40
+ 2. visible time start and end
41
+ 3. canvas time start and end
42
+ 4. helpers for calculating left offset of items (and really...anything)
43
+ */
44
+
45
+ /* eslint-disable no-console */
46
+ var defaultContextState = {
47
+ getTimelineState: function getTimelineState() {
48
+ console.warn('"getTimelineState" default func is being used');
49
+ },
50
+ getLeftOffsetFromDate: function getLeftOffsetFromDate() {
51
+ console.warn('"getLeftOffsetFromDate" default func is being used');
52
+ },
53
+ getDateFromLeftOffsetPosition: function getDateFromLeftOffsetPosition() {
54
+ console.warn('"getDateFromLeftOffsetPosition" default func is being used');
55
+ },
56
+ showPeriod: function showPeriod() {
57
+ console.warn('"showPeriod" default func is being used');
58
+ }
59
+ /* eslint-enable */
60
+
61
+ };
62
+
63
+ var _createReactContext = (0, _createReactContext2["default"])(defaultContextState),
64
+ Consumer = _createReactContext.Consumer,
65
+ Provider = _createReactContext.Provider;
66
+
67
+ var TimelineStateProvider =
68
+ /*#__PURE__*/
69
+ function (_React$Component) {
70
+ _inherits(TimelineStateProvider, _React$Component);
71
+
72
+ /* eslint-disable react/no-unused-prop-types */
73
+ function TimelineStateProvider(props) {
74
+ var _this;
75
+
76
+ _classCallCheck(this, TimelineStateProvider);
77
+
78
+ _this = _possibleConstructorReturn(this, _getPrototypeOf(TimelineStateProvider).call(this, props));
79
+
80
+ _defineProperty(_assertThisInitialized(_this), "getTimelineState", function () {
81
+ var _this$props = _this.props,
82
+ visibleTimeStart = _this$props.visibleTimeStart,
83
+ visibleTimeEnd = _this$props.visibleTimeEnd,
84
+ canvasTimeStart = _this$props.canvasTimeStart,
85
+ canvasTimeEnd = _this$props.canvasTimeEnd,
86
+ canvasWidth = _this$props.canvasWidth,
87
+ timelineUnit = _this$props.timelineUnit,
88
+ timelineWidth = _this$props.timelineWidth;
89
+ return {
90
+ visibleTimeStart: visibleTimeStart,
91
+ visibleTimeEnd: visibleTimeEnd,
92
+ canvasTimeStart: canvasTimeStart,
93
+ canvasTimeEnd: canvasTimeEnd,
94
+ canvasWidth: canvasWidth,
95
+ timelineUnit: timelineUnit,
96
+ timelineWidth: timelineWidth // REVIEW,
97
+
98
+ };
99
+ });
100
+
101
+ _defineProperty(_assertThisInitialized(_this), "getLeftOffsetFromDate", function (date) {
102
+ var _this$props2 = _this.props,
103
+ canvasTimeStart = _this$props2.canvasTimeStart,
104
+ canvasTimeEnd = _this$props2.canvasTimeEnd,
105
+ canvasWidth = _this$props2.canvasWidth;
106
+ return (0, _calendar.calculateXPositionForTime)(canvasTimeStart, canvasTimeEnd, canvasWidth, date);
107
+ });
108
+
109
+ _defineProperty(_assertThisInitialized(_this), "getDateFromLeftOffsetPosition", function (leftOffset) {
110
+ var _this$props3 = _this.props,
111
+ canvasTimeStart = _this$props3.canvasTimeStart,
112
+ canvasTimeEnd = _this$props3.canvasTimeEnd,
113
+ canvasWidth = _this$props3.canvasWidth;
114
+ return (0, _calendar.calculateTimeForXPosition)(canvasTimeStart, canvasTimeEnd, canvasWidth, leftOffset);
115
+ });
116
+
117
+ _this.state = {
118
+ timelineContext: {
119
+ getTimelineState: _this.getTimelineState,
120
+ getLeftOffsetFromDate: _this.getLeftOffsetFromDate,
121
+ getDateFromLeftOffsetPosition: _this.getDateFromLeftOffsetPosition,
122
+ showPeriod: _this.props.showPeriod
123
+ }
124
+ };
125
+ return _this;
126
+ }
127
+
128
+ _createClass(TimelineStateProvider, [{
129
+ key: "render",
130
+ value: function render() {
131
+ return _react["default"].createElement(Provider, {
132
+ value: this.state.timelineContext
133
+ }, this.props.children);
134
+ }
135
+ }]);
136
+
137
+ return TimelineStateProvider;
138
+ }(_react["default"].Component);
139
+
140
+ exports.TimelineStateProvider = TimelineStateProvider;
141
+
142
+ _defineProperty(TimelineStateProvider, "propTypes", {
143
+ children: _propTypes["default"].element.isRequired,
144
+ visibleTimeStart: _propTypes["default"].number.isRequired,
145
+ visibleTimeEnd: _propTypes["default"].number.isRequired,
146
+ canvasTimeStart: _propTypes["default"].number.isRequired,
147
+ canvasTimeEnd: _propTypes["default"].number.isRequired,
148
+ canvasWidth: _propTypes["default"].number.isRequired,
149
+ showPeriod: _propTypes["default"].func.isRequired,
150
+ timelineUnit: _propTypes["default"].string.isRequired,
151
+ timelineWidth: _propTypes["default"].number.isRequired
152
+ });
153
+
154
+ var TimelineStateConsumer = Consumer;
155
+ exports.TimelineStateConsumer = TimelineStateConsumer;