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

react-gantt-timeline

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-gantt-timeline - npm Package Compare versions

Comparing version 0.3.0 to 0.3.1

2

dist/index.js

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

!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("react"),require("moment"),require("react-sizeme")):"function"==typeof define&&define.amd?define("react-gantt-timeline",["React","moment","ReactDOM"],e):"object"==typeof exports?exports["react-gantt-timeline"]=e(require("react"),require("moment"),require("react-sizeme")):t["react-gantt-timeline"]=e(t.React,t.moment,t.ReactDOM)}(window,function(t,e,n){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=7)}([function(e,n){e.exports=t},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var i={header:{month:{dateFormat:"MMM YYYY",style:{backgroundColor:"#333333",fontSize:10,color:"white",textAlign:"center"}},dayOfWeek:{style:{backgroundColor:"chocolate"},selectedStyle:{backgroundColor:"#b13525",fontWeight:"bold"}},dayTime:{style:{background:"grey",fontSize:9},selectedStyle:{backgroundColor:"#b13525",fontWeight:"bold"}}},taskList:{title:{label:"Projects",style:{backgroundColor:"#333333",borderBottom:"solid 1px silver",color:"white",textAlign:"center"}},task:{style:{backgroundColor:"#fbf9f9"}},verticalSeparator:{style:{backgroundColor:"#333333"},grip:{style:{backgroundColor:"#cfcfcd"}}}},dataViewPort:{rows:{style:{backgroundColor:"#fbf9f9",borderBottom:"solid 0.5px #cfcfcd"}},task:{showLabel:!1,style:{position:"absolute",borderRadius:14,color:"white",textAlign:"center"}}},links:{}},r=new(function(){function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.load=function(t){e.data={},t?e.populate(t,i,e.data):e.data=i},this.data=i}return o(t,[{key:"populate",value:function(t,e,n){if(this.isObject(e))for(var o in e)t[o]?(n[o]=t[o],this.populate(t[o],e[o],n[o])):n[o]=e[o]}},{key:"isObject",value:function(t){return"string"!=typeof t&&"boolean"!=typeof t&&"number"!=typeof t}},{key:"values",get:function(){return this.data}}]),t}());e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.MODE_NONE=0,e.MODE_MOVE=1,e.MOVE_RESIZE_LEFT=2,e.MOVE_RESIZE_RIGHT=3,e.BUFFER_DAYS=2,e.DATA_CONTAINER_WIDTH=5e3,e.VIEW_MODE_DAY="day",e.VIEW_MODE_WEEK="week",e.VIEW_MODE_MONTH="month",e.DAY_MONTH_MODE=24,e.DAY_WEEK_MODE=480,e.HOUR_DAY_WEEK=20,e.DAY_DAY_MODE=1440,e.HOUR_DAY_DAY=60,e.LINK_POS_LEFT=0,e.LINK_POS_RIGHT=1},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(2),r=s(n(1)),a=s(n(4));function s(t){return t&&t.__esModule?t:{default:t}}var l=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.dayToPosition=function(t,e,n){return t*n+e}}return o(t,[{key:"dateToPixel",value:function(t,e,n){var o=this.getToday(),i=new Date(t),r=60*(i.getTimezoneOffset()-o.getTimezoneOffset())*1e3;return(i.getTime()-o.getTime()-r)/36e5*(n/24)+e}},{key:"pixelToDate",value:function(t,e,n){var o=24/n,i=t-e,r=this.getToday(),a=r.getTime()+i*o*36e5,s=new Date(a),l=60*(s.getTimezoneOffset()-r.getTimezoneOffset())*1e3;return s.setTime(s.getTime()+l),s}},{key:"getToday",value:function(){var t=new Date;return t.setHours(0,0,0,0),t}},{key:"monthDiff",value:function(t,e){return Math.abs(e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()))}},{key:"daysInMonth",value:function(t,e){return new Date(e,t,0).getDate()}},{key:"calculateMonthData",value:function(t,e,n,o){for(var s={data:[],keys:{}},l="",u="",c=t-i.BUFFER_DAYS;c<e+i.BUFFER_DAYS;c++)u=(l=(0,a.default)().add(c,"days")).format("M-YYYY"),s.data.push({key:u,month:l.format(r.default.values.header.month.dateFormat),left:this.dayToPosition(c-l.date()+1,n,o),width:l.daysInMonth()*o}),s.keys[u]=u,c=c+l.daysInMonth()-l.date();return s}}]),t}());e.default=l},function(t,n){t.exports=e},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}();var i=new(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data={},this.link={}}return o(t,[{key:"registerData",value:function(t){if(t){this.data={};for(var e=0;e<t.length;e++)this.data[t[e].id]={item:t[e],index:e}}}},{key:"registerLinks",value:function(t){if(t){this.link={};for(var e=0,n=0,o=0;o<t.length;o++){e=t[o].start,n=t[o].end;var i={link:t[o],index:o};this.createAddTo(e,this.link,i,o),this.createAddTo(n,this.link,i,o)}}}},{key:"createAddTo",value:function(t,e,n,o){e[t]||(e[t]=[]),-1==e[t].indexOf(n)&&e[t].push(n)}},{key:"getTask",value:function(t){return this.data[t]}},{key:"getLinks",value:function(t){return this.link[t]}}]),t}());e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=(o=r)&&o.__esModule?o:{default:o};var s=20,l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.calcNormCoordinates=function(){var t;return{cpt1:{x:t=n.props.start.x+(n.props.end.x-n.props.start.x)/2,y:n.props.start.y},cpt2:{x:t,y:n.props.end.y}}},n.calcSCoordinates=function(){var t={x:n.props.start.x+s,y:n.props.start.y},e=(n.props.end.y-n.props.start.y)/2,o={x:t.x,y:t.y+e},i={x:n.props.end.x-s,y:o.y};return{cpt1:t,cpt2:o,cpt3:i,cpt4:{x:i.x,y:i.y+e}}},n.getPath=function(){var t=null;return n.props.start.x>n.props.end.x?(t=n.calcSCoordinates(),"M"+n.props.start.x+" "+n.props.start.y+" "+t.cpt1.x+" "+t.cpt1.y+" "+t.cpt2.x+" "+t.cpt2.y+" "+t.cpt3.x+" "+t.cpt3.y+" "+t.cpt4.x+" "+t.cpt4.y+" "+n.props.end.x+" "+n.props.end.y):(t=n.calcNormCoordinates(),"M"+n.props.start.x+" "+n.props.start.y+" "+t.cpt1.x+" "+t.cpt1.y+" "+t.cpt2.x+" "+t.cpt2.y+" "+n.props.end.x+" "+n.props.end.y)},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"render",value:function(){return a.default.createElement("g",{className:"timeline-link",pointerEvents:"none"},a.default.createElement("path",{d:this.getPath(),stroke:"black",strokeLinejoin:"round",fill:"transparent",strokeWidth:"1",markerEnd:"url(#arrow)"}),a.default.createElement("circle",{cx:this.props.start.x,cy:this.props.start.y,r:"3",fill:"white",stroke:"black",strokeWidth:"1"}))}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=b(r),s=b(n(8)),l=b(n(4)),u=b(n(11)),c=b(n(12)),d=b(n(13)),p=b(n(16)),f=b(n(18)),h=b(n(5)),m=n(2),y=b(n(19)),g=b(n(1)),v=b(n(3));function b(t){return t&&t.__esModule?t:{default:t}}n(20);var w=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));k.call(n),n.dragging=!1,n.draggingPosition=0,n.dc=new y.default,n.dc.onNeedData=n.onNeedData,n.initialise=!1,n.pxToScroll=1900;var o=n.getDayWidth(n.props.mode);return g.default.load(n.props.config),n.state={currentday:0,nowposition:0,startRow:0,endRow:10,months:v.default.calculateMonthData(0,30,0,o),sideStyle:{width:200},scrollLeft:0,scrollTop:0,numVisibleRows:40,numVisibleDays:60,dayWidth:o,interactiveMode:!1,taskToCreate:null,links:[],mode:n.props.mode?n.props.mode:m.VIEW_MODE_MONTH,size:{width:1,height:1},changingTask:null},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"getDayWidth",value:function(t){switch(t){case m.VIEW_MODE_DAY:return m.DAY_DAY_MODE;case m.VIEW_MODE_WEEK:return m.DAY_WEEK_MODE;case m.VIEW_MODE_MONTH:default:return m.DAY_MONTH_MODE}}},{key:"checkMode",value:function(){if(this.props.mode!=this.state.mode&&this.props.mode){this.state.mode=this.props.mode;var t=this.getDayWidth(this.state.mode);this.state.dayWidth=t,this.state.numVisibleDays=this.calcNumVisibleDays(this.state.size);var e=Math.ceil(-this.state.currentday*this.state.dayWidth/this.pxToScroll);this.state.nowposition=e*this.pxToScroll;var n=(this.state.currentday*this.state.dayWidth+this.state.nowposition)%this.pxToScroll;this.state.scrollLeft=n,this.state.months=v.default.calculateMonthData(this.state.currentday,this.state.currentday+this.state.numVisibleDays,this.state.nowposition,this.state.dayWidth)}}},{key:"render",value:function(){return this.checkMode(),this.checkNeeeData(),a.default.createElement("div",{className:"timeLine"},a.default.createElement("div",{className:"timeLine-side-main",style:this.state.sideStyle},a.default.createElement(f.default,{ref:"taskViewPort",itemheight:this.props.itemheight,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,selectedItem:this.props.selectedItem,onSelectItem:this.onSelectItem,onUpdateItem:this.onUpdateItem,onScroll:this.verticalChange}),a.default.createElement(u.default,{onTaskListSizing:this.onTaskListSizing})),a.default.createElement("div",{className:"timeLine-main"},a.default.createElement(c.default,{months:this.state.months,numVisibleDays:this.state.numVisibleDays,currentday:this.state.currentday,nowposition:this.state.nowposition,dayWidth:this.state.dayWidth,mode:this.state.mode,scrollLeft:this.state.scrollLeft}),a.default.createElement(d.default,{ref:"dataViewPort",scrollLeft:this.state.scrollLeft,scrollTop:this.state.scrollTop,itemheight:this.props.itemheight,nowposition:this.state.nowposition,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,selectedItem:this.props.selectedItem,dayWidth:this.state.dayWidth,onScroll:this.scrollData,onMouseDown:this.doMouseDown,onMouseMove:this.doMouseMove,onMouseUp:this.doMouseUp,onMouseLeave:this.doMouseLeave,onSelectItem:this.onSelectItem,onUpdateItem:this.onUpdateItem,onTaskChanging:this.onTaskChanging,onStartCreateLink:this.onStartCreateLink,onFinishCreateLink:this.onFinishCreateLink,boundaries:{lower:this.state.scrollLeft,upper:this.state.scrollLeft+this.state.size.width},onSize:this.onSize}),a.default.createElement(p.default,{scrollLeft:this.state.scrollLeft,scrollTop:this.state.scrollTop,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,nowposition:this.state.nowposition,dayWidth:this.state.dayWidth,interactiveMode:this.state.interactiveMode,taskToCreate:this.state.taskToCreate,onFinishCreateLink:this.onFinishCreateLink,changingTask:this.state.changingTask,itemheight:this.props.itemheight,links:this.props.links})))}}]),e}(),k=function(){var t=this;this.onSize=function(e){t.calculateVerticalScrollVariables(e),t.initialise||(t.dc.initialise(t.state.scrollLeft+t.state.nowposition,t.state.scrollLeft+t.state.nowposition+e.width,t.state.nowposition,t.state.dayWidth),t.initialise=!0),t.setStartEnd();var n=Math.ceil(e.height/t.props.itemheight),o=t.calcNumVisibleDays(e),i=t.calculateStartEndRows(n,t.props.data,t.state.scrollTop),r=v.default.calculateMonthData(t.state.currentday,t.state.currentday+o,t.state.nowposition,t.state.dayWidth);t.setState({numVisibleRows:n,numVisibleDays:o,startRow:i.start,endRow:i.end,months:r,size:e})},this.verticalChange=function(e){if(e!=t.state.scrollTop){var n=t.calculateStartEndRows(t.state.numVisibleRows,t.props.data,e);n.start!==t.state.start&&t.setState(t.state={scrollTop:e,startRow:n.start,endRow:n.end})}},this.calculateStartEndRows=function(e,n,o){var i=Math.trunc(o/t.props.itemheight);return{start:i,end:i+e>=n.length?n.length:i+e}},this.setStartEnd=function(){t.dc.setStartEnd(t.state.scrollLeft,t.state.scrollLeft+t.state.size.width,t.state.nowposition,t.state.dayWidth)},this.horizontalChange=function(e){var n=t.state.nowposition,o=-1,i=t.state.months,r=t.state.startRow,a=t.state.endRow;e>t.pxToScroll?(n=t.state.nowposition-t.pxToScroll,o=0):e<=0?(n=t.state.nowposition+t.pxToScroll,o=t.pxToScroll):o=e;var s=Math.trunc((e-t.state.nowposition)/t.state.dayWidth);t.changingMonth(s,s+t.state.numVisibleDays)?i=v.default.calculateMonthData(s,s+t.state.numVisibleDays,n,t.state.dayWidth):-1!=o&&(i=v.default.calculateMonthData(s,s+t.state.numVisibleDays,n,t.state.dayWidth)),a=(r=Math.trunc(t.state.scrollTop/t.props.itemheight))+t.state.numVisibleRows>=t.props.data.length?t.props.data.length-1:r+t.state.numVisibleRows,t.setStartEnd(),t.setState(t.state={currentday:s,nowposition:n,months:i,scrollLeft:o,startRow:r,endRow:a})},this.changingMonth=function(e,n){var o=(0,l.default)().add(e,"days").format("M-YYYY"),i=(0,l.default)().add(n,"days").format("M-YYYY");return!(o in t.state.months.keys&&i in t.state.months.keys)},this.calculateVerticalScrollVariables=function(e){t.pxToScroll=(1-e.width/m.DATA_CONTAINER_WIDTH)*m.DATA_CONTAINER_WIDTH-1},this.onNeedData=function(e,n){t.props.onNeedData&&t.props.onNeedData(e,n)},this.doMouseDown=function(e){t.dragging=!0,t.draggingPosition=e.clientX},this.doMouseMove=function(e){if(t.dragging){var n=t.draggingPosition-e.clientX;0!==n&&(t.draggingPosition=e.clientX,t.horizontalChange(t.state.scrollLeft+n))}},this.doMouseUp=function(e){t.dragging=!1},this.doMouseLeave=function(e){t.dragging=!1},this.onTaskListSizing=function(e){t.setState(function(t){var n=o({},t);return n.sideStyle={width:n.sideStyle.width-e},n})},this.onSelectItem=function(e){t.props.onSelectItem&&t.props.onSelectItem(e)},this.onUpdateItem=function(e,n){t.props.onUpdateItem&&t.props.onUpdateItem(e,n)},this.onStartCreateLink=function(e,n){t.setState({interactiveMode:!0,taskToCreate:{task:e,position:n}})},this.onFinishCreateLink=function(e,n){t.props.onUpdateLink&&e&&t.props.onUpdateLink({start:t.state.taskToCreate,end:{task:e,position:n}}),t.setState({interactiveMode:!1,taskToCreate:null})},this.onTaskChanging=function(e){t.setState({changingTask:e})},this.calcNumVisibleDays=function(e){return Math.ceil(e.width/t.state.dayWidth)+m.BUFFER_DAYS},this.checkNeeeData=function(){t.props.data!=t.state.data&&(t.state.data=t.props.data,h.default.registerData(t.state.data)),t.props.links!=t.state.links&&(t.state.links=t.props.links,h.default.registerLinks(t.props.links))}};w.propTypes={itemheight:s.default.number.isRequired,dayWidth:s.default.number.isRequired},w.defaultProps={itemheight:20,dayWidth:24},e.default=w},function(t,e,n){t.exports=n(9)()},function(t,e,n){"use strict";var o=n(10);function i(){}t.exports=function(){function t(t,e,n,i,r,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e};return n.checkPropTypes=i,n.PropTypes=n,n}},function(t,e,n){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(0),r=s(i),a=s(n(1));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.doMouseMove=n.doMouseMove.bind(n),n.doMouseDown=n.doMouseDown.bind(n),n.doMouseUp=n.doMouseUp.bind(n),n.state={dragging:!1},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),o(e,[{key:"doMouseDown",value:function(t){0===t.button&&(this.draggingPosition=t.clientX,this.setState({dragging:!0}))}},{key:"componentDidUpdate",value:function(t,e){this.state.dragging&&!e.dragging?(document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)):!this.state.dragging&&e.dragging&&(document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp))}},{key:"doMouseMove",value:function(t){if(this.state.dragging){t.stopPropagation();var e=this.draggingPosition-t.clientX;this.draggingPosition=t.clientX,this.props.onTaskListSizing(e)}}},{key:"doMouseUp",value:function(t){this.setState({dragging:!1})}},{key:"render",value:function(){return r.default.createElement("div",{className:"verticalResizer",style:a.default.values.taskList.verticalSeparator.style,onMouseDown:this.doMouseDown},r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}))}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.HeaderDayItem=e.HeaderMonthItem=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=c(r),s=c(n(4)),l=n(2),u=c(n(1));function c(t){return t&&t.__esModule?t:{default:t}}function d(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function p(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function f(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var h=e.HeaderMonthItem=function(t){function e(t){return d(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return f(e,r.Component),i(e,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-header-month-item",style:o({},u.default.values.header.month.style,{left:this.props.left,width:this.props.width})},this.props.label)}}]),e}(),m=e.HeaderDayItem=function(t){function e(t){d(this,e);var n=p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.getFormat=function(){return n.props.mode==l.VIEW_MODE_MONTH?"dd":"dddd D"},n.renderDayMonth=function(){var t=u.default.values.header.dayTime.style;return t=0==n.props.day?o({},t,u.default.values.header.dayTime.selectedStyle):t,a.default.createElement("div",{className:"timeLine-main-header-day-month",style:t},(0,s.default)().add(n.props.day,"days").format("D"))},n.renderDayWeek=function(){for(var t=[],e=0;e<24;e++)t.push(a.default.createElement("div",{key:e,className:"timeLine-main-header-time-item",style:o({},u.default.values.header.dayTime.style,{width:l.HOUR_DAY_WEEK})},e));return t},n.renderTimeWeek=function(){return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayWeek())},n.renderDayDay=function(){for(var t=[],e=0;e<24;e++)t.push(a.default.createElement("div",{key:e,className:"timeLine-main-header-time-item",style:o({},u.default.values.header.dayTime.style,{width:l.HOUR_DAY_DAY})},e+":00"));return t},n.renderBottomInfo=function(){switch(n.props.mode){case l.VIEW_MODE_MONTH:return n.renderDayMonth();case l.VIEW_MODE_WEEK:return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayWeek());case l.VIEW_MODE_DAY:return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayDay());default:return n.renderDayMonth()}},n}return f(e,r.Component),i(e,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-header-day-item",style:{left:this.props.left,width:this.props.width}},a.default.createElement("div",{className:"timeLine-main-header-day-week",style:u.default.values.header.dayOfWeek.style},(0,s.default)().add(this.props.day,"days").format(this.getFormat())),this.renderBottomInfo())}}]),e}(),y=function(t){function e(t){return d(this,e),p(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return f(e,r.Component),i(e,[{key:"renderMonth",value:function(){if(this.props.months)return this.props.months.data.map(function(t){return a.default.createElement(h,{key:t.month,left:t.left,width:t.width,label:t.month})})}},{key:"renderTimeHeader",value:function(){for(var t=[],e=-l.BUFFER_DAYS;e<this.props.numVisibleDays;e++){var n=(this.props.currentday+e)*this.props.dayWidth+this.props.nowposition;t.push(a.default.createElement(m,{key:this.props.currentday+e,day:this.props.currentday+e,width:this.props.dayWidth,mode:this.props.mode,left:n}))}return t}},{key:"render",value:function(){return this.refs.Header&&(this.refs.Header.scrollLeft=this.props.scrollLeft),a.default.createElement("div",{id:"timeline-header",ref:"Header",className:"timeLine-main-header-viewPort"},a.default.createElement("div",{className:"timeLine-main-header-container",style:{width:l.DATA_CONTAINER_WIDTH,maxWidth:l.DATA_CONTAINER_WIDTH}},this.renderMonth(),this.renderTimeHeader()))}}]),e}();e.default=y},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.DataViewPort=e.DataRow=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=p(r),s=n(2),l=p(n(14)),u=p(n(3)),c=p(n(15)),d=p(n(1));function p(t){return t&&t.__esModule?t:{default:t}}function f(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function h(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function m(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}var y=e.DataRow=function(t){function e(t){return f(this,e),h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return m(e,r.Component),i(e,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-row",style:o({},d.default.values.dataViewPort.rows.style,{top:this.props.top,height:this.props.itemheight})},this.props.children)}}]),e}(),g=e.DataViewPort=function(t){function e(t){f(this,e);var n=h(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.onChildDrag=function(t){n.childDragging=t},n.renderRows=function(){for(var t=[],e=n.props.startRow;e<n.props.endRow+1;e++){var o=n.props.data[e];if(!o)break;var i=u.default.dateToPixel(o.start,n.props.nowposition,n.props.dayWidth),r=u.default.dateToPixel(o.end,n.props.nowposition,n.props.dayWidth)-i;t.push(a.default.createElement(y,{key:e,label:o.name,top:e*n.props.itemheight,left:20,itemheight:n.props.itemheight},a.default.createElement(l.default,{item:o,label:o.name,nowposition:n.props.nowposition,dayWidth:n.props.dayWidth,color:o.color,left:i,width:r,height:n.props.itemheight,onChildDrag:n.onChildDrag,isSelected:n.props.selectedItem==o,onSelectItem:n.props.onSelectItem,onStartCreateLink:n.props.onStartCreateLink,onFinishCreateLink:n.props.onFinishCreateLink,onTaskChanging:n.props.onTaskChanging,onUpdateItem:n.props.onUpdateItem}," ")))}return t},n.doMouseDown=function(t){0!==t.button||n.childDragging||n.props.onMouseDown(t)},n.doMouseMove=function(t){n.props.onMouseMove(t,n.refs.dataViewPort)},n.childDragging=!1,n}return m(e,r.Component),i(e,[{key:"getContainerHeight",value:function(t){return t>0?t*this.props.itemheight:10}},{key:"componentDidMount",value:function(){this.refs.dataViewPort.scrollLeft=0}},{key:"render",value:function(){this.refs.dataViewPort&&(this.refs.dataViewPort.scrollLeft=this.props.scrollLeft,this.refs.dataViewPort.scrollTop=this.props.scrollTop);var t=this.getContainerHeight(this.props.data.length);return a.default.createElement("div",{ref:"dataViewPort",id:"timeLinedataViewPort",className:"timeLine-main-data-viewPort",onMouseDown:this.doMouseDown,onMouseMove:this.doMouseMove,onMouseUp:this.props.onMouseUp,onMouseLeave:this.props.onMouseLeave},a.default.createElement("div",{className:"timeLine-main-data-container",style:{height:t,width:s.DATA_CONTAINER_WIDTH,maxWidth:s.DATA_CONTAINER_WIDTH}},this.renderRows()))}}]),e}();e.default=(0,c.default)({monitorWidth:!0,monitorHeight:!0})(g)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=c(r),s=c(n(3)),l=n(2),u=c(n(1));function c(t){return t&&t.__esModule?t:{default:t}}var d=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.onCreateLinkMouseDown=function(t,e){0===t.button&&(t.stopPropagation(),n.props.onStartCreateLink(n.props.item,e))},n.onCreateLinkMouseUp=function(t,e){t.stopPropagation(),n.props.onFinishCreateLink(n.props.item,e)},n.doMouseMove=n.doMouseMove.bind(n),n.doMouseDown=n.doMouseDown.bind(n),n.doMouseUp=n.doMouseUp.bind(n),n.calculateStyle=n.calculateStyle.bind(n),n.state={dragging:!1,left:n.props.left,width:n.props.width,mode:l.MODE_NONE},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,r.Component),i(e,[{key:"doMouseDown",value:function(t,e){0===t.button&&(t.stopPropagation(),this.props.onChildDrag(!0),this.draggingPosition=t.clientX,this.setState({dragging:!0,mode:e,left:this.props.left,width:this.props.width}))}},{key:"componentDidUpdate",value:function(t,e){this.state.dragging&&!e.dragging?(document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)):!this.state.dragging&&e.dragging&&(document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp))}},{key:"doMouseMove",value:function(t){if(this.state.dragging){var e=this.draggingPosition-t.clientX,n=this.state.left,o=this.state.width;switch(this.state.mode){case l.MODE_MOVE:n=this.state.left-e;break;case l.MOVE_RESIZE_LEFT:n=this.state.left-e,o=this.state.width+e;break;case l.MOVE_RESIZE_RIGHT:o=this.state.width-e}var i={item:this.props.item,position:{start:n,end:n+o}};this.props.onTaskChanging(i),this.setState({left:n,width:o}),this.draggingPosition=t.clientX}}},{key:"doMouseUp",value:function(t){this.props.onChildDrag(!1);var e=s.default.pixelToDate(this.state.left,this.props.nowposition,this.props.dayWidth),n=s.default.pixelToDate(this.state.left+this.state.width,this.props.nowposition,this.props.dayWidth);this.props.onUpdateItem(this.props.item,{start:e,end:n}),this.setState({dragging:!1,mode:l.MODE_NONE})}},{key:"calculateStyle",value:function(){return this.state.dragging?o({},u.default.values.dataViewPort.task.style,{backgroundColor:this.props.color,left:this.state.left,width:this.state.width,height:this.props.height-5,top:2}):o({},u.default.values.dataViewPort.task.style,{backgroundColor:this.props.color,left:this.props.left,width:this.props.width,height:this.props.height-5,top:2})}},{key:"render",value:function(){var t=this,e=this.calculateStyle();return a.default.createElement("div",{onMouseDown:function(e){return t.doMouseDown(e,l.MODE_MOVE)},onClick:function(e){t.props.onSelectItem(t.props.item)},style:e},a.default.createElement("div",{className:"timeLine-main-data-task-side",style:{top:0,left:-4,height:e.height},onMouseDown:function(e){return t.doMouseDown(e,l.MOVE_RESIZE_LEFT)}},a.default.createElement("div",{className:"timeLine-main-data-task-side-linker",onMouseUp:function(e){return t.onCreateLinkMouseUp(e,l.LINK_POS_LEFT)}})),a.default.createElement("div",{style:{overflow:"hidden"}},u.default.values.dataViewPort.task.showLabel?this.props.item.name:""),a.default.createElement("div",{className:"timeLine-main-data-task-side",style:{top:0,left:e.width-3,height:e.height},onMouseDown:function(e){return t.doMouseDown(e,l.MOVE_RESIZE_RIGHT)}},a.default.createElement("div",{className:"timeLine-main-data-task-side-linker",onMouseDown:function(e){return t.onCreateLinkMouseDown(e,l.LINK_POS_RIGHT)}})))}}]),e}();e.default=d},function(t,e){t.exports=n},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(0),r=d(i),a=d(n(5)),s=d(n(6)),l=d(n(17)),u=n(2),c=d(n(3));function d(t){return t&&t.__esModule?t:{default:t}}function p(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return Array.from(t)}var f=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.getItemPosition=function(t,e){return{x:c.default.dateToPixel(e,n.props.nowposition,n.props.dayWidth),y:t*n.props.itemheight+n.props.itemheight/2}},n.renderCreateLink=function(){if(n.props.interactiveMode){var t=a.default.getTask(n.props.taskToCreate.task.id),e=n.getItemPosition(t.index,n.props.taskToCreate.position==u.LINK_POS_LEFT?t.item.start:t.item.end);return r.default.createElement(l.default,{start:e,onFinishCreateLink:n.props.onFinishCreateLink})}},n.renderChangingTaskLinks=function(){if(n.props.changingTask!=n.state.changingTask){n.state.changingTask=n.props.changingTask;var t=a.default.getLinks(n.state.changingTask.item.id);if(!t)return;for(var e=null,o=null,i=null,l={},c={},d=0;d<t.length;d++)e=t[d],o=a.default.getTask(e.link.start),i=a.default.getTask(e.link.end),l=n.getItemPosition(o.index,e.link.startPosition==u.LINK_POS_LEFT?o.item.start:o.item.end),n.state.changingTask.item.id==e.link.start&&(l.x=e.link.startPosition==u.LINK_POS_LEFT?n.state.changingTask.position.start:n.state.changingTask.position.end),c=n.getItemPosition(i.index,e.link.endPosition==u.LINK_POS_LEFT?i.item.start:i.item.end),n.state.changingTask.item.id==e.link.end&&(c.x=e.link.endPosition==u.LINK_POS_LEFT?n.state.changingTask.position.start:n.state.changingTask.position.end),n.cache[e.index]=r.default.createElement(s.default,{key:-d-1,start:{x:l.x,y:l.y},end:{x:c.x,y:c.y}}),n.cache=[].concat(p(n.cache))}},n.cache=[],n.state={links:[],data:[]},n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),o(e,[{key:"renderLink",value:function(t,e,n,o){var i=this.getItemPosition(t.index,n.startPosition==u.LINK_POS_LEFT?t.item.start:t.item.end),a=this.getItemPosition(e.index,n.endPosition==u.LINK_POS_LEFT?e.item.start:e.item.end);return r.default.createElement(s.default,{key:o,start:{x:i.x,y:i.y},end:{x:a.x,y:a.y}})}},{key:"renderLinks",value:function(){this.cache=[];var t={},e=void 0,n={};if(0!=this.state.data.length)for(var o=0;o<this.state.links.length;o++){var i=this.state.links[o];!i&&t[i.id]||((e=a.default.getTask(i.start))&&(n=a.default.getTask(i.end))?(this.cache.push(this.renderLink(e,n,i,o)),t[i.id]=""):this.cache.push(null))}}},{key:"refreshData",value:function(){this.props.links==this.state.links&&this.props.data==this.state.data&&this.props.dayWidth==this.state.dayWidth||(this.state.dayWidth=this.props.dayWidth,this.state.links=this.props.links,this.state.data=this.props.data,this.state.links&&this.state.data&&this.renderLinks())}},{key:"render",value:function(){return this.refreshData(),this.renderChangingTaskLinks(),r.default.createElement("svg",{x:0,y:0,width:"100%",pointerEvents:"none",style:{position:"absolute",top:60,userSelect:"none",height:"100%"}},r.default.createElement("defs",null,r.default.createElement("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"9",markerHeight:"9",orient:"auto-start-reverse"},r.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",strokeLinejoin:"round"}))),r.default.createElement("g",{transform:"matrix(1,0,0,1,"+-this.props.scrollLeft+","+-this.props.scrollTop+")"},this.cache,this.renderCreateLink()))}}]),e}();e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),i=n(0),r=s(i),a=s(n(6));function s(t){return t&&t.__esModule?t:{default:t}}var l=function(t){function e(t){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.doMouseMove=function(t){n.init||(n.lastX=t.clientX,n.lastY=t.clientY,n.init=!0);var e=n.state.x+(t.clientX-n.lastX),o=n.state.y+(t.clientY-n.lastY);n.lastX=t.clientX,n.lastY=t.clientY,n.setState({x:e,y:o})},n.doMouseUp=function(t){n.props.onFinishCreateLink()},n.state={x:n.props.start.x,y:n.props.start.y},n.init=!1,n.lastX=-1,n.lastY=-1,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,i.Component),o(e,[{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp)}},{key:"render",value:function(){return r.default.createElement(a.default,{key:-1,start:{x:this.props.start.x,y:this.props.start.y},end:{x:this.state.x,y:this.state.y}})}}]),e}();e.default=l},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.TaskRow=e.VerticalLine=void 0;var o=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},i=function(){function t(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}return function(e,n,o){return n&&t(e.prototype,n),o&&t(e,o),e}}(),r=n(0),a=l(r),s=l(n(1));function l(t){return t&&t.__esModule?t:{default:t}}function u(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function c(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}function d(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}e.VerticalLine=function(t){function e(t){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return d(e,r.Component),i(e,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-verticalLine",style:{left:this.props.left}})}}]),e}();var p=e.TaskRow=function(t){function e(t){return u(this,e),c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t))}return d(e,r.Component),i(e,[{key:"render",value:function(){var t=this;return a.default.createElement("div",{className:"timeLine-side-task-row",contentEditable:!0,suppressContentEditableWarning:!0,style:o({},s.default.values.taskList.task.style,{top:this.props.top,height:this.props.itemheight}),onClick:function(e){return t.props.onSelectItem(t.props.item)}},a.default.createElement("div",null,this.props.label))}}]),e}(),f=function(t){function e(t){u(this,e);var n=c(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,t));return n.doScroll=function(){n.props.onScroll(n.refs.taskViewPort.scrollTop)},n}return d(e,r.Component),i(e,[{key:"getContainerStyle",value:function(t){return{height:t>0?t*this.props.itemheight:10}}},{key:"renderTaskRow",value:function(t){for(var e=[],n=this.props.startRow;n<this.props.endRow+1;n++){var o=t[n];if(!o)break;e.push(a.default.createElement(p,{key:n,item:o,label:o.name,top:n*this.props.itemheight,itemheight:this.props.itemheight,isSelected:this.props.selectedItem==o,onSelectItem:this.props.onSelectItem}))}return e}},{key:"render",value:function(){var t=this.props.data?this.props.data:[];return this.containerStyle=this.getContainerStyle(t.length),a.default.createElement("div",{className:"timeLine-side"},a.default.createElement("div",{className:"timeLine-side-title",style:s.default.values.taskList.title.style},a.default.createElement("div",null,s.default.values.taskList.title.label)),a.default.createElement("div",{ref:"taskViewPort",className:"timeLine-side-task-viewPort",onScroll:this.doScroll},a.default.createElement("div",{className:"timeLine-side-task-container",style:this.containerStyle},this.renderTaskRow(t))))}}]),e}();e.default=f},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o,i=n(3),r=(o=i)&&o.__esModule?o:{default:o};e.default=function t(){var e=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.initialise=function(t,n,o,i){e.nowposition=o,e.daywidth=i,e.setLimits(t,n,o,i),e.loadDataHorizon()},this.setStartEnd=function(t,n,o,i){e.nowposition=o,e.daywidth=i,e.needData(t,n)&&(e.setLimits(t,n),e.loadDataHorizon())},this.needData=function(t,n){return t<e.lower_data_limit||n>e.upper_data_limit},this.setLimits=function(t,n){e.lower_limit=t-1e3,e.lower_data_limit=t-750,e.upper_limit=n+1e3,e.upper_data_limit=n+750},this.loadDataHorizon=function(){var t=r.default.pixelToDate(e.lower_limit,e.nowposition,e.daywidth),n=r.default.pixelToDate(e.upper_limit,e.nowposition,e.daywidth);e.onNeedData(t,n)},this.lower_limit=0,this.upper_limit=0,this._dataToRender=[]}},function(t,e,n){var o=n(21);"string"==typeof o&&(o=[[t.i,o,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(23)(o,i);o.locals&&(t.exports=o.locals)},function(t,e,n){(t.exports=n(22)(!1)).push([t.i,".timeLine{\n display: flex;\n flex-direction: row;\n width:100%;\n height: 100%;\n border:solid 1px rgb(207, 207, 205);\n font-size: 12px;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n/* Main Area */\n\n.timeLine-main{\n flex: 1 1 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n}\n/* Main Area Header*/\n\n.timeLine-main-header-viewPort{\n flex: 0 0 60px;\n position: relative;\n height: 60px ;\n width: 100%;\n background-color: rgb(112, 112, 112);\n overflow: hidden;\n \n}\n\n.timeLine-main-header-container{\n flex: 0 0 60px;\n position: relative;\n top:0;\n left:0;\n height: 100% ;\n background-color: #333333;\n overflow: hidden;\n user-select: none;\n}\n\n.timeLine-main-header-day-item{\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n background-color:rgb(112, 112, 112);\n font-size: 10px;\n text-align: center;\n border-right:solid 1px;\n border-top:solid 1px;\n border-bottom:solid 1px;\n top:20px;\n height:40px;\n color: white;\n text-align: center;\n}\n\n\n.timeLine-main-header-month-item{\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-right:solid 1px white;\n height:20px;\n z-index: 91;\n}\n\n.timeLine-main-header-day-week{\n flex:0 0 12px;\n padding: 4px;\n z-index: 90;\n}\n\n.timeLine-main-header-day-month{\n top:0px;\n position: sticky;\n flex:0 0 15px;\n padding: 5px;\n z-index: 90;\n}\n\n.timeLine-main-header-time{\n display: flex;\n flex-direction: row;\n align-items: stretch;\n height: 22px;\n justify-content: stretch;\n}\n\n.timeLine-main-header-time-item{\n border-left: solid 1px silver;\n border-bottom: solid 1px silver;\n border-top: solid 1px silver;\n text-align: center;\n padding-top: 5px;\n}\n/* Main Area Data*/\n\n.timeLine-main-data-viewPort{\n flex: 1 1 auto;\n position: relative;\n overflow: hidden;\n background-color:#fbf9f9;;\n \n \n}\n.timeLine-main-data-container{\n position: relative;\n top:0;\n left:0;\n height: 100% ;\n background-color: rgb(255, 255, 255);\n}\n\n.timeLine-main-data-row{\n position: absolute;\n width: 100%;\n height: 50px;\n \n}\n\n.timeLine-main-data-task{\n position: absolute;\n background-color:darkorchid;\n border-radius: 14px;\n color: white;\n text-align: center;\n}\n\n.timeLine-main-data-task-side{\n position: absolute;\n width: 10px;\n cursor: col-resize;\n display:flex;\n flex-direction: column;\n justify-content: center;\n}\n.timeLine-main-data-task-side-linker{\n width:8px;\n height: 8px;\n border-radius: 4px;\n cursor: default;\n}\n.timeLine-main-data-task-side-linker:hover{\n background-color: black;\n border: solid 0.5px grey\n}\n/* .timeLine-main-data-task:hover {\n background-color:chocolate;\n border:solid 2px darkorchid;\n cursor: move;\n} */\n\n\n\n.timeLine-main-data-verticalLine{\n flex:1 1 auto;\n height: 100%;\n width: 24px;\n background-color:white;\n border-left-width: 0.5px;\n border-left-color: rgb(207, 207, 205);\n border-left-style: dashed;\n}\n\n/* Side Area */\n\n.timeLine-side-main{\n flex: 0 0 auto;\n width:108px;\n min-width: 108px;\n display: flex;\n flex-direction: row;\n \n}\n\n.timeLine-side{\n flex: 1 0 100px;\n display: flex;\n flex-direction: column;\n border-right:solid 1px rgb(207, 207, 205);\n}\n\n.verticalResizer{\n flex: 0 0 8px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: col-resize;\n border-right:solid 1px rgb(207, 207, 205);\n height: 100%;\n\n}\n.squareGrip{\n flex: 0 0 auto;\n \n border-radius: 50%;\n height: 5px;\n width: 5px;\n margin: 3px 0;\n}\n\n.timeLine-side-title{\n flex: 0 0 60px;\n display: flex;\n justify-content: center;\n align-items: center;\n \n}\n\n.timeLine-side-task-viewPort{\n position: relative;\n flex: 1 1 auto;\n height:100% ;\n background-color:#fbf9f9;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.timeLine-side-task-container{\n position: relative;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.timeLine-side-task-row{\n position: absolute;\n width: 100%;\n background-color: rgb(112, 112, 112);\n border-bottom-width: 0.5px;\n border-bottom-color: rgb(207, 207, 205);\n border-bottom-style: solid;\n height: 30px;\n color: grey;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; \n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n",""])},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n=t[1]||"",o=t[3];if(!o)return n;if(e&&"function"==typeof btoa){var i=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=o.sources.map(function(t){return"/*# sourceURL="+o.sourceRoot+t+" */"});return[n].concat(r).concat([i]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){var o,i,r={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=o.apply(this,arguments)),i}),s=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),l=null,u=0,c=[],d=n(24);function p(t,e){for(var n=0;n<t.length;n++){var o=t[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],e))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(v(o.parts[a],e));r[o.id]={id:o.id,refs:1,parts:s}}}}function f(t,e){for(var n=[],o={},i=0;i<t.length;i++){var r=t[i],a=e.base?r[0]+e.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===t.insertAt)o?o.nextSibling?n.insertBefore(e,o.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),c.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function m(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=c.indexOf(t);e>=0&&c.splice(e,1)}function y(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),g(e,t.attrs),h(t,e),e}function g(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function v(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var a=u++;n=l||(l=y(e)),o=k.bind(null,n,a,!1),i=k.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),h(t,e),e}(e),o=function(t,e,n){var o=n.css,i=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||r)&&(o=d(o));i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(e),o=function(t,e){var n=e.css,o=e.media;o&&t.setAttribute("media",o);if(t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){m(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=f(t,e);return p(n,e),function(t){for(var o=[],i=0;i<n.length;i++){var a=n[i];(s=r[a.id]).refs--,o.push(s)}t&&p(f(t,e),e);for(i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete r[s.id]}}}};var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function k(t,e,n,o){var i=n?"":o.css;if(t.styleSheet)t.styleSheet.cssText=w(e,i);else{var r=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(r,a[e]):t.appendChild(r)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,o=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,r=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?t:(i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("moment"),require("react-sizeme")):"function"==typeof define&&define.amd?define("react-gantt-timeline",["React","moment","ReactDOM"],t):"object"==typeof exports?exports["react-gantt-timeline"]=t(require("react"),require("moment"),require("react-sizeme")):e["react-gantt-timeline"]=t(e.React,e.moment,e.ReactDOM)}(window,function(e,t,n){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=7)}([function(t,n){t.exports=e},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i={header:{month:{dateFormat:"MMM YYYY",style:{backgroundColor:"#333333",fontSize:10,color:"white",textAlign:"center"}},dayOfWeek:{style:{backgroundColor:"chocolate"},selectedStyle:{backgroundColor:"#b13525",fontWeight:"bold"}},dayTime:{style:{background:"grey",fontSize:9},selectedStyle:{backgroundColor:"#b13525",fontWeight:"bold"}}},taskList:{title:{label:"Projects",style:{backgroundColor:"#333333",borderBottom:"solid 1px silver",color:"white",textAlign:"center"}},task:{style:{backgroundColor:"#fbf9f9"}},verticalSeparator:{style:{backgroundColor:"#333333"},grip:{style:{backgroundColor:"#cfcfcd"}}}},dataViewPort:{rows:{style:{backgroundColor:"#fbf9f9",borderBottom:"solid 0.5px #cfcfcd"}},task:{showLabel:!1,style:{position:"absolute",borderRadius:14,color:"white",textAlign:"center",backgroundColor:"grey"}}},links:{}},r=new(function(){function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.load=function(e){t.data={},e?t.populate(e,i,t.data):t.data=i},this.data=i}return o(e,[{key:"populate",value:function(e,t,n){if(this.isObject(t))for(var o in t)e[o]?(n[o]=e[o],this.populate(e[o],t[o],n[o])):n[o]=t[o]}},{key:"isObject",value:function(e){return"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e}},{key:"values",get:function(){return this.data}}]),e}());t.default=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.MODE_NONE=0,t.MODE_MOVE=1,t.MOVE_RESIZE_LEFT=2,t.MOVE_RESIZE_RIGHT=3,t.BUFFER_DAYS=2,t.DATA_CONTAINER_WIDTH=5e3,t.VIEW_MODE_DAY="day",t.VIEW_MODE_WEEK="week",t.VIEW_MODE_MONTH="month",t.DAY_MONTH_MODE=24,t.DAY_WEEK_MODE=480,t.HOUR_DAY_WEEK=20,t.DAY_DAY_MODE=1440,t.HOUR_DAY_DAY=60,t.LINK_POS_LEFT=0,t.LINK_POS_RIGHT=1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(2),r=s(n(1)),a=s(n(4));function s(e){return e&&e.__esModule?e:{default:e}}var l=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.dayToPosition=function(e,t,n){return e*n+t}}return o(e,[{key:"dateToPixel",value:function(e,t,n){var o=this.getToday(),i=new Date(e),r=60*(i.getTimezoneOffset()-o.getTimezoneOffset())*1e3;return(i.getTime()-o.getTime()-r)/36e5*(n/24)+t}},{key:"pixelToDate",value:function(e,t,n){var o=24/n,i=e-t,r=this.getToday(),a=r.getTime()+i*o*36e5,s=new Date(a),l=60*(s.getTimezoneOffset()-r.getTimezoneOffset())*1e3;return s.setTime(s.getTime()+l),s}},{key:"getToday",value:function(){var e=new Date;return e.setHours(0,0,0,0),e}},{key:"monthDiff",value:function(e,t){return Math.abs(t.getMonth()-e.getMonth()+12*(t.getFullYear()-e.getFullYear()))}},{key:"daysInMonth",value:function(e,t){return new Date(t,e,0).getDate()}},{key:"calculateMonthData",value:function(e,t,n,o){for(var s={data:[],keys:{}},l="",u="",c=e-i.BUFFER_DAYS;c<t+i.BUFFER_DAYS;c++)u=(l=(0,a.default)().add(c,"days")).format("M-YYYY"),s.data.push({key:u,month:l.format(r.default.values.header.month.dateFormat),left:this.dayToPosition(c-l.date()+1,n,o),width:l.daysInMonth()*o}),s.keys[u]=u,c=c+l.daysInMonth()-l.date();return s}}]),e}());t.default=l},function(e,n){e.exports=t},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}();var i=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.data={},this.link={}}return o(e,[{key:"registerData",value:function(e){if(e){this.data={};for(var t=0;t<e.length;t++)this.data[e[t].id]={item:e[t],index:t}}}},{key:"registerLinks",value:function(e){if(e){this.link={};for(var t=0,n=0,o=0;o<e.length;o++){t=e[o].start,n=e[o].end;var i={link:e[o],index:o};this.createAddTo(t,this.link,i,o),this.createAddTo(n,this.link,i,o)}}}},{key:"createAddTo",value:function(e,t,n,o){t[e]||(t[e]=[]),-1==t[e].indexOf(n)&&t[e].push(n)}},{key:"getTask",value:function(e){return this.data[e]}},{key:"getLinks",value:function(e){return this.link[e]}}]),e}());t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=(o=r)&&o.__esModule?o:{default:o};var s=20,l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.calcNormCoordinates=function(){var e;return{cpt1:{x:e=n.props.start.x+(n.props.end.x-n.props.start.x)/2,y:n.props.start.y},cpt2:{x:e,y:n.props.end.y}}},n.calcSCoordinates=function(){var e={x:n.props.start.x+s,y:n.props.start.y},t=(n.props.end.y-n.props.start.y)/2,o={x:e.x,y:e.y+t},i={x:n.props.end.x-s,y:o.y};return{cpt1:e,cpt2:o,cpt3:i,cpt4:{x:i.x,y:i.y+t}}},n.getPath=function(){var e=null;return n.props.start.x>n.props.end.x?(e=n.calcSCoordinates(),"M"+n.props.start.x+" "+n.props.start.y+" "+e.cpt1.x+" "+e.cpt1.y+" "+e.cpt2.x+" "+e.cpt2.y+" "+e.cpt3.x+" "+e.cpt3.y+" "+e.cpt4.x+" "+e.cpt4.y+" "+n.props.end.x+" "+n.props.end.y):(e=n.calcNormCoordinates(),"M"+n.props.start.x+" "+n.props.start.y+" "+e.cpt1.x+" "+e.cpt1.y+" "+e.cpt2.x+" "+e.cpt2.y+" "+n.props.end.x+" "+n.props.end.y)},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),i(t,[{key:"render",value:function(){return a.default.createElement("g",{className:"timeline-link",pointerEvents:"none"},a.default.createElement("path",{d:this.getPath(),stroke:"black",strokeLinejoin:"round",fill:"transparent",strokeWidth:"1",markerEnd:"url(#arrow)"}),a.default.createElement("circle",{cx:this.props.start.x,cy:this.props.start.y,r:"3",fill:"white",stroke:"black",strokeWidth:"1"}))}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=b(r),s=b(n(8)),l=b(n(4)),u=b(n(11)),c=b(n(12)),d=b(n(13)),p=b(n(16)),f=b(n(18)),h=b(n(5)),m=n(2),y=b(n(19)),g=b(n(1)),v=b(n(3));function b(e){return e&&e.__esModule?e:{default:e}}n(20);var w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));n.onSize=function(e){n.calculateVerticalScrollVariables(e),n.initialise||(n.dc.initialise(n.state.scrollLeft+n.state.nowposition,n.state.scrollLeft+n.state.nowposition+e.width,n.state.nowposition,n.state.dayWidth),n.initialise=!0),n.setStartEnd();var t=Math.ceil(e.height/n.props.itemheight),o=n.calcNumVisibleDays(e),i=n.calculateStartEndRows(t,n.props.data,n.state.scrollTop),r=v.default.calculateMonthData(n.state.currentday,n.state.currentday+o,n.state.nowposition,n.state.dayWidth);n.setState({numVisibleRows:t,numVisibleDays:o,startRow:i.start,endRow:i.end,months:r,size:e})},n.verticalChange=function(e){if(e!=n.state.scrollTop){var t=n.calculateStartEndRows(n.state.numVisibleRows,n.props.data,e);t.start!==n.state.start&&n.setState(n.state={scrollTop:e,startRow:t.start,endRow:t.end})}},n.calculateStartEndRows=function(e,t,o){var i=Math.trunc(o/n.props.itemheight);return{start:i,end:i+e>=t.length?t.length:i+e}},n.setStartEnd=function(){n.dc.setStartEnd(n.state.scrollLeft,n.state.scrollLeft+n.state.size.width,n.state.nowposition,n.state.dayWidth)},n.horizontalChange=function(e){var t=n.state.nowposition,o=-1,i=n.state.months,r=n.state.startRow,a=n.state.endRow;e>n.pxToScroll?(t=n.state.nowposition-n.pxToScroll,o=0):e<=0?(t=n.state.nowposition+n.pxToScroll,o=n.pxToScroll):o=e;var s=Math.trunc((e-n.state.nowposition)/n.state.dayWidth);n.changingMonth(s,s+n.state.numVisibleDays)?i=v.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth):-1!=o&&(i=v.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth)),a=(r=Math.trunc(n.state.scrollTop/n.props.itemheight))+n.state.numVisibleRows>=n.props.data.length?n.props.data.length-1:r+n.state.numVisibleRows,n.setStartEnd(),n.setState(n.state={currentday:s,nowposition:t,months:i,scrollLeft:o,startRow:r,endRow:a})},n.changingMonth=function(e,t){var o=(0,l.default)().add(e,"days").format("M-YYYY"),i=(0,l.default)().add(t,"days").format("M-YYYY");return!(o in n.state.months.keys&&i in n.state.months.keys)},n.calculateVerticalScrollVariables=function(e){n.pxToScroll=(1-e.width/m.DATA_CONTAINER_WIDTH)*m.DATA_CONTAINER_WIDTH-1},n.onNeedData=function(e,t){n.props.onNeedData&&n.props.onNeedData(e,t)},n.doMouseDown=function(e){n.dragging=!0,n.draggingPosition=e.clientX},n.doMouseMove=function(e){if(n.dragging){var t=n.draggingPosition-e.clientX;0!==t&&(n.draggingPosition=e.clientX,n.horizontalChange(n.state.scrollLeft+t))}},n.doMouseUp=function(e){n.dragging=!1},n.doMouseLeave=function(e){n.dragging=!1},n.onTaskListSizing=function(e){n.setState(function(t){var n=o({},t);return n.sideStyle={width:n.sideStyle.width-e},n})},n.onSelectItem=function(e){n.props.onSelectItem&&n.props.onSelectItem(e)},n.onStartCreateLink=function(e,t){n.setState({interactiveMode:!0,taskToCreate:{task:e,position:t}})},n.onFinishCreateLink=function(e,t){n.props.onUpdateLink&&e&&n.props.onUpdateLink({start:n.state.taskToCreate,end:{task:e,position:t}}),n.setState({interactiveMode:!1,taskToCreate:null})},n.onTaskChanging=function(e){n.setState({changingTask:e})},n.calcNumVisibleDays=function(e){return Math.ceil(e.width/n.state.dayWidth)+m.BUFFER_DAYS},n.checkNeeeData=function(){n.props.data!=n.state.data&&(n.state.data=n.props.data,h.default.registerData(n.state.data)),n.props.links!=n.state.links&&(n.state.links=n.props.links,h.default.registerLinks(n.props.links))},n.dragging=!1,n.draggingPosition=0,n.dc=new y.default,n.dc.onNeedData=n.onNeedData,n.initialise=!1,n.pxToScroll=1900;var i=n.getDayWidth(n.props.mode);return g.default.load(n.props.config),n.state={currentday:0,nowposition:0,startRow:0,endRow:10,months:v.default.calculateMonthData(0,30,0,i),sideStyle:{width:200},scrollLeft:0,scrollTop:0,numVisibleRows:40,numVisibleDays:60,dayWidth:i,interactiveMode:!1,taskToCreate:null,links:[],mode:n.props.mode?n.props.mode:m.VIEW_MODE_MONTH,size:{width:1,height:1},changingTask:null},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),i(t,[{key:"getDayWidth",value:function(e){switch(e){case m.VIEW_MODE_DAY:return m.DAY_DAY_MODE;case m.VIEW_MODE_WEEK:return m.DAY_WEEK_MODE;case m.VIEW_MODE_MONTH:default:return m.DAY_MONTH_MODE}}},{key:"checkMode",value:function(){if(this.props.mode!=this.state.mode&&this.props.mode){this.state.mode=this.props.mode;var e=this.getDayWidth(this.state.mode);this.state.dayWidth=e,this.state.numVisibleDays=this.calcNumVisibleDays(this.state.size);var t=Math.ceil(-this.state.currentday*this.state.dayWidth/this.pxToScroll);this.state.nowposition=t*this.pxToScroll;var n=(this.state.currentday*this.state.dayWidth+this.state.nowposition)%this.pxToScroll;this.state.scrollLeft=n,this.state.months=v.default.calculateMonthData(this.state.currentday,this.state.currentday+this.state.numVisibleDays,this.state.nowposition,this.state.dayWidth)}}},{key:"render",value:function(){return this.checkMode(),this.checkNeeeData(),a.default.createElement("div",{className:"timeLine"},a.default.createElement("div",{className:"timeLine-side-main",style:this.state.sideStyle},a.default.createElement(f.default,{ref:"taskViewPort",itemheight:this.props.itemheight,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,selectedItem:this.props.selectedItem,onSelectItem:this.onSelectItem,onUpdateItem:this.props.onUpdateItem,onScroll:this.verticalChange}),a.default.createElement(u.default,{onTaskListSizing:this.onTaskListSizing})),a.default.createElement("div",{className:"timeLine-main"},a.default.createElement(c.default,{months:this.state.months,numVisibleDays:this.state.numVisibleDays,currentday:this.state.currentday,nowposition:this.state.nowposition,dayWidth:this.state.dayWidth,mode:this.state.mode,scrollLeft:this.state.scrollLeft}),a.default.createElement(d.default,{ref:"dataViewPort",scrollLeft:this.state.scrollLeft,scrollTop:this.state.scrollTop,itemheight:this.props.itemheight,nowposition:this.state.nowposition,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,selectedItem:this.props.selectedItem,dayWidth:this.state.dayWidth,onScroll:this.scrollData,onMouseDown:this.doMouseDown,onMouseMove:this.doMouseMove,onMouseUp:this.doMouseUp,onMouseLeave:this.doMouseLeave,onSelectItem:this.onSelectItem,onUpdateItem:this.props.onUpdateItem,onTaskChanging:this.onTaskChanging,onStartCreateLink:this.onStartCreateLink,onFinishCreateLink:this.onFinishCreateLink,boundaries:{lower:this.state.scrollLeft,upper:this.state.scrollLeft+this.state.size.width},onSize:this.onSize}),a.default.createElement(p.default,{scrollLeft:this.state.scrollLeft,scrollTop:this.state.scrollTop,startRow:this.state.startRow,endRow:this.state.endRow,data:this.props.data,nowposition:this.state.nowposition,dayWidth:this.state.dayWidth,interactiveMode:this.state.interactiveMode,taskToCreate:this.state.taskToCreate,onFinishCreateLink:this.onFinishCreateLink,changingTask:this.state.changingTask,itemheight:this.props.itemheight,links:this.props.links})))}}]),t}();w.propTypes={itemheight:s.default.number.isRequired,dayWidth:s.default.number.isRequired},w.defaultProps={itemheight:20,dayWidth:24},t.default=w},function(e,t,n){e.exports=n(9)()},function(e,t,n){"use strict";var o=n(10);function i(){}e.exports=function(){function e(e,t,n,i,r,a){if(a!==o){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=i,n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),r=s(i),a=s(n(1));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.doMouseMove=n.doMouseMove.bind(n),n.doMouseDown=n.doMouseDown.bind(n),n.doMouseUp=n.doMouseUp.bind(n),n.state={dragging:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"doMouseDown",value:function(e){0===e.button&&(this.draggingPosition=e.clientX,this.setState({dragging:!0}))}},{key:"componentDidUpdate",value:function(e,t){this.state.dragging&&!t.dragging?(document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)):!this.state.dragging&&t.dragging&&(document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp))}},{key:"doMouseMove",value:function(e){if(this.state.dragging){e.stopPropagation();var t=this.draggingPosition-e.clientX;this.draggingPosition=e.clientX,this.props.onTaskListSizing(t)}}},{key:"doMouseUp",value:function(e){this.setState({dragging:!1})}},{key:"render",value:function(){return r.default.createElement("div",{className:"verticalResizer",style:a.default.values.taskList.verticalSeparator.style,onMouseDown:this.doMouseDown},r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),r.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}))}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeaderDayItem=t.HeaderMonthItem=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=c(r),s=c(n(4)),l=n(2),u=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}function d(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function p(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function f(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var h=t.HeaderMonthItem=function(e){function t(e){return d(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return f(t,r.Component),i(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-header-month-item",style:o({},u.default.values.header.month.style,{left:this.props.left,width:this.props.width})},this.props.label)}}]),t}(),m=t.HeaderDayItem=function(e){function t(e){d(this,t);var n=p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getFormat=function(){return n.props.mode==l.VIEW_MODE_MONTH?"dd":"dddd D"},n.renderDayMonth=function(){var e=u.default.values.header.dayTime.style;return e=0==n.props.day?o({},e,u.default.values.header.dayTime.selectedStyle):e,a.default.createElement("div",{className:"timeLine-main-header-day-month",style:e},(0,s.default)().add(n.props.day,"days").format("D"))},n.renderDayWeek=function(){for(var e=[],t=0;t<24;t++)e.push(a.default.createElement("div",{key:t,className:"timeLine-main-header-time-item",style:o({},u.default.values.header.dayTime.style,{width:l.HOUR_DAY_WEEK})},t));return e},n.renderTimeWeek=function(){return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayWeek())},n.renderDayDay=function(){for(var e=[],t=0;t<24;t++)e.push(a.default.createElement("div",{key:t,className:"timeLine-main-header-time-item",style:o({},u.default.values.header.dayTime.style,{width:l.HOUR_DAY_DAY})},t+":00"));return e},n.renderBottomInfo=function(){switch(n.props.mode){case l.VIEW_MODE_MONTH:return n.renderDayMonth();case l.VIEW_MODE_WEEK:return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayWeek());case l.VIEW_MODE_DAY:return a.default.createElement("div",{className:"timeLine-main-header-time"},n.renderDayDay());default:return n.renderDayMonth()}},n}return f(t,r.Component),i(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-header-day-item",style:{left:this.props.left,width:this.props.width}},a.default.createElement("div",{className:"timeLine-main-header-day-week",style:u.default.values.header.dayOfWeek.style},(0,s.default)().add(this.props.day,"days").format(this.getFormat())),this.renderBottomInfo())}}]),t}(),y=function(e){function t(e){return d(this,t),p(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return f(t,r.Component),i(t,[{key:"renderMonth",value:function(){if(this.props.months)return this.props.months.data.map(function(e){return a.default.createElement(h,{key:e.month,left:e.left,width:e.width,label:e.month})})}},{key:"renderTimeHeader",value:function(){for(var e=[],t=-l.BUFFER_DAYS;t<this.props.numVisibleDays;t++){var n=(this.props.currentday+t)*this.props.dayWidth+this.props.nowposition;e.push(a.default.createElement(m,{key:this.props.currentday+t,day:this.props.currentday+t,width:this.props.dayWidth,mode:this.props.mode,left:n}))}return e}},{key:"render",value:function(){return this.refs.Header&&(this.refs.Header.scrollLeft=this.props.scrollLeft),a.default.createElement("div",{id:"timeline-header",ref:"Header",className:"timeLine-main-header-viewPort"},a.default.createElement("div",{className:"timeLine-main-header-container",style:{width:l.DATA_CONTAINER_WIDTH,maxWidth:l.DATA_CONTAINER_WIDTH}},this.renderMonth(),this.renderTimeHeader()))}}]),t}();t.default=y},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DataViewPort=t.DataRow=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=p(r),s=n(2),l=p(n(14)),u=p(n(3)),c=p(n(15)),d=p(n(1));function p(e){return e&&e.__esModule?e:{default:e}}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function h(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var y=t.DataRow=function(e){function t(e){return f(this,t),h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return m(t,r.Component),i(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-row",style:o({},d.default.values.dataViewPort.rows.style,{top:this.props.top,height:this.props.itemheight})},this.props.children)}}]),t}(),g=t.DataViewPort=function(e){function t(e){f(this,t);var n=h(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChildDrag=function(e){n.childDragging=e},n.renderRows=function(){for(var e=[],t=n.props.startRow;t<n.props.endRow+1;t++){var o=n.props.data[t];if(!o)break;var i=u.default.dateToPixel(o.start,n.props.nowposition,n.props.dayWidth),r=u.default.dateToPixel(o.end,n.props.nowposition,n.props.dayWidth)-i;e.push(a.default.createElement(y,{key:t,label:o.name,top:t*n.props.itemheight,left:20,itemheight:n.props.itemheight},a.default.createElement(l.default,{item:o,label:o.name,nowposition:n.props.nowposition,dayWidth:n.props.dayWidth,color:o.color,left:i,width:r,height:n.props.itemheight,onChildDrag:n.onChildDrag,isSelected:n.props.selectedItem==o,onSelectItem:n.props.onSelectItem,onStartCreateLink:n.props.onStartCreateLink,onFinishCreateLink:n.props.onFinishCreateLink,onTaskChanging:n.props.onTaskChanging,onUpdateItem:n.props.onUpdateItem}," ")))}return e},n.doMouseDown=function(e){0!==e.button||n.childDragging||n.props.onMouseDown(e)},n.doMouseMove=function(e){n.props.onMouseMove(e,n.refs.dataViewPort)},n.childDragging=!1,n}return m(t,r.Component),i(t,[{key:"getContainerHeight",value:function(e){return e>0?e*this.props.itemheight:10}},{key:"componentDidMount",value:function(){this.refs.dataViewPort.scrollLeft=0}},{key:"render",value:function(){this.refs.dataViewPort&&(this.refs.dataViewPort.scrollLeft=this.props.scrollLeft,this.refs.dataViewPort.scrollTop=this.props.scrollTop);var e=this.getContainerHeight(this.props.data.length);return a.default.createElement("div",{ref:"dataViewPort",id:"timeLinedataViewPort",className:"timeLine-main-data-viewPort",onMouseDown:this.doMouseDown,onMouseMove:this.doMouseMove,onMouseUp:this.props.onMouseUp,onMouseLeave:this.props.onMouseLeave},a.default.createElement("div",{className:"timeLine-main-data-container",style:{height:e,width:s.DATA_CONTAINER_WIDTH,maxWidth:s.DATA_CONTAINER_WIDTH}},this.renderRows()))}}]),t}();t.default=(0,c.default)({monitorWidth:!0,monitorHeight:!0})(g)},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=c(r),s=c(n(3)),l=n(2),u=c(n(1));function c(e){return e&&e.__esModule?e:{default:e}}var d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onCreateLinkMouseDown=function(e,t){0===e.button&&(e.stopPropagation(),n.props.onStartCreateLink(n.props.item,t))},n.onCreateLinkMouseUp=function(e,t){e.stopPropagation(),n.props.onFinishCreateLink(n.props.item,t)},n.doMouseMove=n.doMouseMove.bind(n),n.doMouseDown=n.doMouseDown.bind(n),n.doMouseUp=n.doMouseUp.bind(n),n.calculateStyle=n.calculateStyle.bind(n),n.state={dragging:!1,left:n.props.left,width:n.props.width,mode:l.MODE_NONE},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,r.Component),i(t,[{key:"doMouseDown",value:function(e,t){this.props.onUpdateItem&&0===e.button&&(e.stopPropagation(),this.props.onChildDrag(!0),this.draggingPosition=e.clientX,this.setState({dragging:!0,mode:t,left:this.props.left,width:this.props.width}))}},{key:"componentDidUpdate",value:function(e,t){this.state.dragging&&!t.dragging?(document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)):!this.state.dragging&&t.dragging&&(document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp))}},{key:"doMouseMove",value:function(e){if(this.state.dragging){var t=this.draggingPosition-e.clientX,n=this.state.left,o=this.state.width;switch(this.state.mode){case l.MODE_MOVE:n=this.state.left-t;break;case l.MOVE_RESIZE_LEFT:n=this.state.left-t,o=this.state.width+t;break;case l.MOVE_RESIZE_RIGHT:o=this.state.width-t}var i={item:this.props.item,position:{start:n,end:n+o}};this.props.onTaskChanging(i),this.setState({left:n,width:o}),this.draggingPosition=e.clientX}}},{key:"doMouseUp",value:function(e){this.props.onChildDrag(!1);var t=s.default.pixelToDate(this.state.left,this.props.nowposition,this.props.dayWidth),n=s.default.pixelToDate(this.state.left+this.state.width,this.props.nowposition,this.props.dayWidth);this.props.onUpdateItem(this.props.item,{start:t,end:n}),this.setState({dragging:!1,mode:l.MODE_NONE})}},{key:"calculateStyle",value:function(){var e=this.props.color?this.props.color:u.default.values.dataViewPort.task.style.backgroundColor;return this.state.dragging?o({},u.default.values.dataViewPort.task.style,{backgroundColor:e,left:this.state.left,width:this.state.width,height:this.props.height-5,top:2}):o({},u.default.values.dataViewPort.task.style,{backgroundColor:e,left:this.props.left,width:this.props.width,height:this.props.height-5,top:2})}},{key:"render",value:function(){var e=this,t=this.calculateStyle();return a.default.createElement("div",{onMouseDown:function(t){return e.doMouseDown(t,l.MODE_MOVE)},onClick:function(t){e.props.onSelectItem(e.props.item)},style:t},a.default.createElement("div",{className:"timeLine-main-data-task-side",style:{top:0,left:-4,height:t.height},onMouseDown:function(t){return e.doMouseDown(t,l.MOVE_RESIZE_LEFT)}},a.default.createElement("div",{className:"timeLine-main-data-task-side-linker",onMouseUp:function(t){return e.onCreateLinkMouseUp(t,l.LINK_POS_LEFT)}})),a.default.createElement("div",{style:{overflow:"hidden"}},u.default.values.dataViewPort.task.showLabel?this.props.item.name:""),a.default.createElement("div",{className:"timeLine-main-data-task-side",style:{top:0,left:t.width-3,height:t.height},onMouseDown:function(t){return e.doMouseDown(t,l.MOVE_RESIZE_RIGHT)}},a.default.createElement("div",{className:"timeLine-main-data-task-side-linker",onMouseDown:function(t){return e.onCreateLinkMouseDown(t,l.LINK_POS_RIGHT)}})))}}]),t}();t.default=d},function(e,t){e.exports=n},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),r=d(i),a=d(n(5)),s=d(n(6)),l=d(n(17)),u=n(2),c=d(n(3));function d(e){return e&&e.__esModule?e:{default:e}}function p(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t<e.length;t++)n[t]=e[t];return n}return Array.from(e)}var f=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.getItemPosition=function(e,t){return{x:c.default.dateToPixel(t,n.props.nowposition,n.props.dayWidth),y:e*n.props.itemheight+n.props.itemheight/2}},n.renderCreateLink=function(){if(n.props.interactiveMode){var e=a.default.getTask(n.props.taskToCreate.task.id),t=n.getItemPosition(e.index,e.item.end);return r.default.createElement(l.default,{start:t,onFinishCreateLink:n.props.onFinishCreateLink})}},n.renderChangingTaskLinks=function(){if(n.props.changingTask!=n.state.changingTask){n.state.changingTask=n.props.changingTask;var e=a.default.getLinks(n.state.changingTask.item.id);if(!e)return;for(var t=null,o=null,i=null,l={},c={},d=0;d<e.length;d++)t=e[d],o=a.default.getTask(t.link.start),i=a.default.getTask(t.link.end),l=n.getItemPosition(o.index,t.link.startPosition==u.LINK_POS_LEFT?o.item.start:o.item.end),n.state.changingTask.item.id==t.link.start&&(l.x=t.link.startPosition==u.LINK_POS_LEFT?n.state.changingTask.position.start:n.state.changingTask.position.end),c=n.getItemPosition(i.index,t.link.endPosition==u.LINK_POS_LEFT?i.item.start:i.item.end),n.state.changingTask.item.id==t.link.end&&(c.x=t.link.endPosition==u.LINK_POS_LEFT?n.state.changingTask.position.start:n.state.changingTask.position.end),n.cache[t.index]=r.default.createElement(s.default,{key:-d-1,start:{x:l.x,y:l.y},end:{x:c.x,y:c.y}}),n.cache=[].concat(p(n.cache))}},n.cache=[],n.state={links:[],data:[]},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"renderLink",value:function(e,t,n,o){var i=this.getItemPosition(e.index,e.item.end),a=this.getItemPosition(t.index,t.item.start);return r.default.createElement(s.default,{key:o,start:{x:i.x,y:i.y},end:{x:a.x,y:a.y}})}},{key:"renderLinks",value:function(){this.cache=[];var e={},t=void 0,n={};if(0!=this.state.data.length)for(var o=0;o<this.state.links.length;o++){var i=this.state.links[o];!i&&e[i.id]||((t=a.default.getTask(i.start))&&(n=a.default.getTask(i.end))?(this.cache.push(this.renderLink(t,n,i,o)),e[i.id]=""):this.cache.push(null))}}},{key:"refreshData",value:function(){this.props.links==this.state.links&&this.props.data==this.state.data&&this.props.dayWidth==this.state.dayWidth||(this.state.dayWidth=this.props.dayWidth,this.state.links=this.props.links,this.state.data=this.props.data,this.state.links&&this.state.data&&this.renderLinks())}},{key:"render",value:function(){return this.refreshData(),this.renderChangingTaskLinks(),r.default.createElement("svg",{x:0,y:0,width:"100%",pointerEvents:"none",style:{position:"absolute",top:60,userSelect:"none",height:"100%"}},r.default.createElement("defs",null,r.default.createElement("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"9",markerHeight:"9",orient:"auto-start-reverse"},r.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",strokeLinejoin:"round"}))),r.default.createElement("g",{transform:"matrix(1,0,0,1,"+-(this.props.scrollLeft-this.props.nowposition)+","+-this.props.scrollTop+")"},this.cache,this.renderCreateLink()))}}]),t}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),i=n(0),r=s(i),a=s(n(6));function s(e){return e&&e.__esModule?e:{default:e}}var l=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.doMouseMove=function(e){n.init||(n.lastX=e.clientX,n.lastY=e.clientY,n.init=!0);var t=n.state.x+(e.clientX-n.lastX),o=n.state.y+(e.clientY-n.lastY);n.lastX=e.clientX,n.lastY=e.clientY,n.setState({x:t,y:o})},n.doMouseUp=function(e){n.props.onFinishCreateLink()},n.state={x:n.props.start.x,y:n.props.start.y},n.init=!1,n.lastX=-1,n.lastY=-1,n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,i.Component),o(t,[{key:"componentDidMount",value:function(){document.addEventListener("mousemove",this.doMouseMove),document.addEventListener("mouseup",this.doMouseUp)}},{key:"componentWillUnmount",value:function(){document.removeEventListener("mousemove",this.doMouseMove),document.removeEventListener("mouseup",this.doMouseUp)}},{key:"render",value:function(){return r.default.createElement(a.default,{key:-1,start:{x:this.props.start.x,y:this.props.start.y},end:{x:this.state.x,y:this.state.y}})}}]),t}();t.default=l},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TaskRow=t.VerticalLine=void 0;var o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},i=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),r=n(0),a=l(r),s=l(n(1));function l(e){return e&&e.__esModule?e:{default:e}}function u(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function d(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}t.VerticalLine=function(e){function t(e){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return d(t,r.Component),i(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-verticalLine",style:{left:this.props.left}})}}]),t}();var p=t.TaskRow=function(e){function t(e){return u(this,t),c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return d(t,r.Component),i(t,[{key:"render",value:function(){var e=this;return a.default.createElement("div",{className:"timeLine-side-task-row",contentEditable:!0,suppressContentEditableWarning:!0,style:o({},s.default.values.taskList.task.style,{top:this.props.top,height:this.props.itemheight}),onClick:function(t){return e.props.onSelectItem(e.props.item)}},a.default.createElement("div",null,this.props.label))}}]),t}(),f=function(e){function t(e){u(this,t);var n=c(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.doScroll=function(){n.props.onScroll(n.refs.taskViewPort.scrollTop)},n}return d(t,r.Component),i(t,[{key:"getContainerStyle",value:function(e){return{height:e>0?e*this.props.itemheight:10}}},{key:"renderTaskRow",value:function(e){for(var t=[],n=this.props.startRow;n<this.props.endRow+1;n++){var o=e[n];if(!o)break;t.push(a.default.createElement(p,{key:n,item:o,label:o.name,top:n*this.props.itemheight,itemheight:this.props.itemheight,isSelected:this.props.selectedItem==o,onSelectItem:this.props.onSelectItem}))}return t}},{key:"render",value:function(){var e=this.props.data?this.props.data:[];return this.containerStyle=this.getContainerStyle(e.length),a.default.createElement("div",{className:"timeLine-side"},a.default.createElement("div",{className:"timeLine-side-title",style:s.default.values.taskList.title.style},a.default.createElement("div",null,s.default.values.taskList.title.label)),a.default.createElement("div",{ref:"taskViewPort",className:"timeLine-side-task-viewPort",onScroll:this.doScroll},a.default.createElement("div",{className:"timeLine-side-task-container",style:this.containerStyle},this.renderTaskRow(e))))}}]),t}();t.default=f},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,i=n(3),r=(o=i)&&o.__esModule?o:{default:o};t.default=function e(){var t=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initialise=function(e,n,o,i){t.nowposition=o,t.daywidth=i,t.setLimits(e,n,o,i),t.loadDataHorizon()},this.setStartEnd=function(e,n,o,i){t.nowposition=o,t.daywidth=i,t.needData(e,n)&&(t.setLimits(e,n),t.loadDataHorizon())},this.needData=function(e,n){return e<t.lower_data_limit||n>t.upper_data_limit},this.setLimits=function(e,n){t.lower_limit=e-1e3,t.lower_data_limit=e-750,t.upper_limit=n+1e3,t.upper_data_limit=n+750},this.loadDataHorizon=function(){var e=r.default.pixelToDate(t.lower_limit,t.nowposition,t.daywidth),n=r.default.pixelToDate(t.upper_limit,t.nowposition,t.daywidth);t.onNeedData(e,n)},this.lower_limit=0,this.upper_limit=0,this._dataToRender=[]}},function(e,t,n){var o=n(21);"string"==typeof o&&(o=[[e.i,o,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n(23)(o,i);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(22)(!1)).push([e.i,".timeLine{\n display: flex;\n flex-direction: row;\n width:100%;\n height: 100%;\n border:solid 1px rgb(207, 207, 205);\n font-size: 12px;\n user-select: none;\n -moz-user-select: none;\n -webkit-user-select: none;\n -ms-user-select: none;\n}\n\n/* Main Area */\n\n.timeLine-main{\n flex: 1 1 100%;\n position: relative;\n display: flex;\n flex-direction: column;\n overflow-y: hidden;\n}\n/* Main Area Header*/\n\n.timeLine-main-header-viewPort{\n flex: 0 0 60px;\n position: relative;\n height: 60px ;\n width: 100%;\n background-color: rgb(112, 112, 112);\n overflow: hidden;\n \n}\n\n.timeLine-main-header-container{\n flex: 0 0 60px;\n position: relative;\n top:0;\n left:0;\n height: 100% ;\n background-color: #333333;\n overflow: hidden;\n user-select: none;\n}\n\n.timeLine-main-header-day-item{\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n background-color:rgb(112, 112, 112);\n font-size: 10px;\n text-align: center;\n border-right:solid 1px;\n border-top:solid 1px;\n border-bottom:solid 1px;\n top:20px;\n height:40px;\n color: white;\n text-align: center;\n}\n\n\n.timeLine-main-header-month-item{\n position: absolute;\n display: flex;\n flex-direction: column;\n justify-content: center;\n border-right:solid 1px white;\n height:20px;\n z-index: 91;\n}\n\n.timeLine-main-header-day-week{\n flex:0 0 12px;\n padding: 4px;\n z-index: 90;\n}\n\n.timeLine-main-header-day-month{\n top:0px;\n position: sticky;\n flex:0 0 15px;\n padding: 5px;\n z-index: 90;\n}\n\n.timeLine-main-header-time{\n display: flex;\n flex-direction: row;\n align-items: stretch;\n height: 22px;\n justify-content: stretch;\n}\n\n.timeLine-main-header-time-item{\n border-left: solid 1px silver;\n border-bottom: solid 1px silver;\n border-top: solid 1px silver;\n text-align: center;\n padding-top: 5px;\n}\n/* Main Area Data*/\n\n.timeLine-main-data-viewPort{\n flex: 1 1 auto;\n position: relative;\n overflow: hidden;\n background-color:#fbf9f9;;\n \n \n}\n.timeLine-main-data-container{\n position: relative;\n top:0;\n left:0;\n height: 100% ;\n background-color: rgb(255, 255, 255);\n}\n\n.timeLine-main-data-row{\n position: absolute;\n width: 100%;\n height: 50px;\n \n}\n\n.timeLine-main-data-task{\n position: absolute;\n background-color:darkorchid;\n border-radius: 14px;\n color: white;\n text-align: center;\n}\n\n.timeLine-main-data-task-side{\n position: absolute;\n width: 10px;\n cursor: col-resize;\n display:flex;\n flex-direction: column;\n justify-content: center;\n}\n.timeLine-main-data-task-side-linker{\n width:8px;\n height: 8px;\n border-radius: 4px;\n cursor: default;\n}\n.timeLine-main-data-task-side-linker:hover{\n background-color: black;\n border: solid 0.5px grey\n}\n/* .timeLine-main-data-task:hover {\n background-color:chocolate;\n border:solid 2px darkorchid;\n cursor: move;\n} */\n\n\n\n.timeLine-main-data-verticalLine{\n flex:1 1 auto;\n height: 100%;\n width: 24px;\n background-color:white;\n border-left-width: 0.5px;\n border-left-color: rgb(207, 207, 205);\n border-left-style: dashed;\n}\n\n/* Side Area */\n\n.timeLine-side-main{\n flex: 0 0 auto;\n width:108px;\n min-width: 108px;\n display: flex;\n flex-direction: row;\n \n}\n\n.timeLine-side{\n flex: 1 0 100px;\n display: flex;\n flex-direction: column;\n border-right:solid 1px rgb(207, 207, 205);\n}\n\n.verticalResizer{\n flex: 0 0 8px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n cursor: col-resize;\n border-right:solid 1px rgb(207, 207, 205);\n height: 100%;\n\n}\n.squareGrip{\n flex: 0 0 auto;\n \n border-radius: 50%;\n height: 5px;\n width: 5px;\n margin: 3px 0;\n}\n\n.timeLine-side-title{\n flex: 0 0 60px;\n display: flex;\n justify-content: center;\n align-items: center;\n \n}\n\n.timeLine-side-task-viewPort{\n position: relative;\n flex: 1 1 auto;\n height:100% ;\n background-color:#fbf9f9;\n overflow-x: hidden;\n overflow-y: auto;\n}\n\n.timeLine-side-task-container{\n position: relative;\n overflow-x: hidden;\n overflow-y: hidden;\n}\n\n.timeLine-side-task-row{\n position: absolute;\n width: 100%;\n background-color: rgb(112, 112, 112);\n border-bottom-width: 0.5px;\n border-bottom-color: rgb(207, 207, 205);\n border-bottom-style: solid;\n height: 30px;\n color: grey;\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis; \n outline: none;\n display: flex;\n justify-content: center;\n align-items: center;\n}\n\n",""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",o=e[3];if(!o)return n;if(t&&"function"==typeof btoa){var i=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),r=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(r).concat([i]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},i=0;i<this.length;i++){var r=this[i][0];"number"==typeof r&&(o[r]=!0)}for(i=0;i<e.length;i++){var a=e[i];"number"==typeof a[0]&&o[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),t.push(a))}},t}},function(e,t,n){var o,i,r={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=o.apply(this,arguments)),i}),s=function(e){var t={};return function(e){if("function"==typeof e)return e();if(void 0===t[e]){var n=function(e){return document.querySelector(e)}.call(this,e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}}(),l=null,u=0,c=[],d=n(24);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],i=r[o.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](o.parts[a]);for(;a<o.parts.length;a++)i.parts.push(v(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(v(o.parts[a],t));r[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],o={},i=0;i<e.length;i++){var r=e[i],a=t.base?r[0]+t.base:r[0],s={css:r[1],media:r[2],sourceMap:r[3]};o[a]?o[a].parts.push(s):n.push(o[a]={id:a,parts:[s]})}return n}function h(e,t){var n=s(e.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var o=c[c.length-1];if("top"===e.insertAt)o?o.nextSibling?n.insertBefore(t,o.nextSibling):n.appendChild(t):n.insertBefore(t,n.firstChild),c.push(t);else if("bottom"===e.insertAt)n.appendChild(t);else{if("object"!=typeof e.insertAt||!e.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,i)}}function m(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e);var t=c.indexOf(e);t>=0&&c.splice(t,1)}function y(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,o,i,r;if(t.transform&&e.css){if(!(r=t.transform(e.css)))return function(){};e.css=r}if(t.singleton){var a=u++;n=l||(l=y(t)),o=k.bind(null,n,a,!1),i=k.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,i=n.sourceMap,r=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||r)&&(o=d(o));i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){m(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),o=function(e,t){var n=t.css,o=t.media;o&&e.setAttribute("media",o);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){m(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return p(n,t),function(e){for(var o=[],i=0;i<n.length;i++){var a=n[i];(s=r[a.id]).refs--,o.push(s)}e&&p(f(e,t),t);for(i=0;i<o.length;i++){var s;if(0===(s=o[i]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete r[s.id]}}}};var b,w=(b=[],function(e,t){return b[e]=t,b.filter(Boolean).join("\n")});function k(e,t,n,o){var i=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,i);else{var r=document.createTextNode(i),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(r,a[t]):e.appendChild(r)}}},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,r=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(r)?e:(i=0===r.indexOf("//")?r:0===r.indexOf("/")?n+r:o+r.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}}])});
{
"name": "react-gantt-timeline",
"version": "0.3.0",
"version": "0.3.1",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -6,5 +6,5 @@

[![MIT License](https://img.shields.io/npm/l/react-list.svg?style=flat-square)](http://opensource.org/licenses/MIT)
[![Travis](https://travis-ci.org/guiqui/react-timeline.svg?branch=master)](https://travis-ci.org/guiqui/react-timeline)
[![codecov](https://codecov.io/gh/guiqui/react-timeline/branch/master/graph/badge.svg)](https://codecov.io/gh/guiqui/react-timeline)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9149e301e65b44cebf2e7b49316aee10)](https://www.codacy.com/app/gquiman/react-timeline?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=guiqui/react-timeline&amp;utm_campaign=Badge_Grade)
[![Travis](https://travis-ci.org/guiqui/react-timeline-gantt.svg?branch=master)](https://travis-ci.org/guiqui/react-timeline)
[![codecov](https://codecov.io/gh/guiqui/react-timeline-gantt/branch/master/graph/badge.svg)](https://codecov.io/gh/guiqui/react-timeline-gantt)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9149e301e65b44cebf2e7b49316aee10)](https://www.codacy.com/app/gquiman/react-timeline-gantt?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=guiqui/react-timeline-gantt&amp;utm_campaign=Badge_Grade)

@@ -15,23 +15,22 @@ A react timeline gantt component.

## Intro
React-timeline-gantt is an awesome blazing fast timeline - gantt component 😛.
These are the feature currently supported:
- Virtual rendering. Can render really fast a huge number of records.
- Infinite scrolling.
- Calendar View
- Zoom mode can be set to Day ,week or Month.
- Redux Compatible.Implement all necessary call backs to trigger actions and update store.
- Task update and resizing.
- Task dependencies.
- Support paging.
## About
React-timeline-gantt is a component built to display and manage calendar gantt charts.
It use virtual rendering to be reactive an efficient.
Here is a demo [video](https://youtu.be/ASGD1FXOafw) that shows how to use the component.
Here is a working [demo](https://guiqui.github.io/react-timeline-gantt/index.html) .
The component is capable of:
- Can handle 100 thousands
- Infinite calendar scrolling
- Three Zoom levels : day, week, month
- Fully customizable.
- Support all CRUD operations.
- Task and Link creation.
- Support Paging.
- Can be easily integrated with Redux
## Road Map
- Hierarchical tasks.(currently under development)
- Style customisation.(currently under development)
- Zoom to task.Plan for release 4.~
To watch a demo take a look at [video](https://youtu.be/ASGD1FXOafw) that shows how to use the component.
To play with a live [demo](https://guiqui.github.io/react-timeline-gantt/index.html) .
## Installation

@@ -41,17 +40,47 @@ ```javascript

```
## Timeline Data
The timeline data can be set with the data property of the time line.
The data needs to be an array of object.
Each item of the array needs to contain the following elements.
The component has the following dependencies: moment, react-sizeme
## Getting started
The first thing to once the component has been install and all it dependencies is create the data that the timeline component consume.The time line has two data providers **data** and **links**.
**Data** :is an array of objects that contains the task to be shown. Each one of the object that are part of the array need to have the following compulsory fields
| Property | value | Descriptions |
| ------------- |:-------:| -----------------------------------:|
| start | date | The start date of the task |
| end | date | The end date of the task |
| name | string | The name of the task to be diplayed |
| ------------- |:-------:| :-----------------------------------|
| id | String/Number | An unique identifier for the class|
| start | Date | The start date of the task |
| end | Date | The end date of the task |
| name | String | The name of the task to be diplayed |
| color (optional)| String | The color of the task to be diplayed |
An example of data definition:
```javascript
let data=[ {start:new Date(), end:new Date()+1 ,name:'Demo Task'}]
let data=[ {id:1,start:new Date(), end:new Date()+1 ,name:'Demo Task 1'},
{id:2,start:new Date(), end:new Date()+1 ,name:'Demo Task 2'}]
```
**Links** :is also an array of objects that contains links between task. Each one of the object that are part of the array need to have the following compulsory fields:
| Property | value | Descriptions |
| ------------- |:-------:| :-----------------------------------|
| id | String/Number | An unique identifier for the class|
| start | String/Number | The id of the start task |
| end | String/Number | The id of the end task |
An example of data definition:
```javascript
let links=[ {id:1,start:1, end:2},
{id:2,start:1, end:3}]
```
Once the data is define we just need to declare the component and populate it with both data providers.
```javascript
<TimeLine data={data} links={links}/>);
```
Here is the demo code:
[![Edit 1y2on87jj](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/1y2on87jj)
## Timeline Events

@@ -58,0 +87,0 @@ | name | params | Descriptions |

@@ -17,4 +17,4 @@ import React,{Component} from 'react'

let startPosition = this.getItemPosition(startItem.index,link.startPosition==LINK_POS_LEFT?startItem.item.start:startItem.item.end)
let endPosition = this.getItemPosition(endItem.index,link.endPosition==LINK_POS_LEFT?endItem.item.start:endItem.item.end)
let startPosition = this.getItemPosition(startItem.index,startItem.item.end)
let endPosition = this.getItemPosition(endItem.index,endItem.item.start)
return<Link key={key} start={{x:startPosition.x,y:startPosition.y}} end={{x:endPosition.x,y:endPosition.y}} />

@@ -73,3 +73,3 @@ }

let record=Registry.getTask(this.props.taskToCreate.task.id)
let position =this.getItemPosition(record.index,this.props.taskToCreate.position==LINK_POS_LEFT?record.item.start:record.item.end)
let position =this.getItemPosition(record.index,record.item.end)
return <CreateLink start={position} onFinishCreateLink={this.props.onFinishCreateLink}/>

@@ -120,3 +120,3 @@ }

</defs>
<g transform={`matrix(1,0,0,1,${-this.props.scrollLeft},${-this.props.scrollTop})`}>
<g transform={`matrix(1,0,0,1,${-(this.props.scrollLeft-this.props.nowposition)},${-this.props.scrollTop})`}>
{this.cache}

@@ -123,0 +123,0 @@ {this.renderCreateLink()}

@@ -36,3 +36,4 @@ import React,{Component} from 'react'

if(!this.props.onUpdateItem)
return;
if (e.button === 0){

@@ -94,7 +95,8 @@ e.stopPropagation();

calculateStyle(){
let backgroundColor= this.props.color?this.props.color:Config.values.dataViewPort.task.style.backgroundColor
if(this.state.dragging){
return {...Config.values.dataViewPort.task.style,backgroundColor: this.props.color,left:this.state.left,width:this.state.width,height:this.props.height-5,top:2}
return {...Config.values.dataViewPort.task.style,backgroundColor: backgroundColor,left:this.state.left,width:this.state.width,height:this.props.height-5,top:2}
}else{
return {...Config.values.dataViewPort.task.style,backgroundColor: this.props.color,left:this.props.left,width:this.props.width,height:this.props.height-5,top:2}
return {...Config.values.dataViewPort.task.style,backgroundColor: backgroundColor,left:this.props.left,width:this.props.width,height:this.props.height-5,top:2}
}

@@ -101,0 +103,0 @@

@@ -73,3 +73,4 @@ const defvalues={

color: 'white',
textAlign:'center'
textAlign:'center',
backgroundColor:'grey'
}

@@ -76,0 +77,0 @@ }

@@ -260,7 +260,3 @@ import React,{Component} from 'react'

onUpdateItem=(item,props)=>{
if (this.props.onUpdateItem)
this.props.onUpdateItem(item,props)
}
onStartCreateLink=(task,position)=>{

@@ -342,3 +338,3 @@ console.log(`Start Link ${task}`)

onSelectItem={this.onSelectItem}
onUpdateItem={this.onUpdateItem}
onUpdateItem={this.props.onUpdateItem}
onScroll={this.verticalChange}/>

@@ -372,3 +368,3 @@ <VerticalSpliter onTaskListSizing={this.onTaskListSizing}/>

onSelectItem={this.onSelectItem}
onUpdateItem={this.onUpdateItem}
onUpdateItem={this.props.onUpdateItem}
onTaskChanging={this.onTaskChanging}

@@ -375,0 +371,0 @@ onStartCreateLink={this.onStartCreateLink}

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