Socket
Socket
Sign inDemoInstall

react-gantt-timeline

Package Overview
Dependencies
16
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.3.1 to 0.3.2

2

dist/index.js

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

!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)+")")})}}])});
!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.onCreateLink&&e&&n.props.onCreateLink({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,onUpdateTask:this.props.onUpdateTask,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,onUpdateTask:this.props.onUpdateTask,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,onUpdateTask:n.props.onUpdateTask}," ")))}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.onUpdateTask&&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.onUpdateTask(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.1",
"version": "0.3.2",
"description": "",

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

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

if(!this.props.onUpdateItem)
if(!this.props.onUpdateTask)
return;

@@ -90,3 +90,3 @@ if (e.button === 0){

let new_end_date=DateHelper.pixelToDate(this.state.left+this.state.width,this.props.nowposition,this.props.dayWidth);
this.props.onUpdateItem(this.props.item,{start:new_start_date,end:new_end_date})
this.props.onUpdateTask(this.props.item,{start:new_start_date,end:new_end_date})
this.setState({dragging:false,mode:MODE_NONE})

@@ -93,0 +93,0 @@ }

@@ -30,3 +30,3 @@ import React from 'react'

let onChildDrag=jest.fn();
let onUpdateItem=jest.fn();
let onUpdateTask=jest.fn();
let onTaskChanging=jest.fn();

@@ -41,3 +41,3 @@ let item={name:'this Item'}

onChildDrag={onChildDrag}
onUpdateItem={onUpdateItem}
onUpdateTask={onUpdateTask}
onTaskChanging={onTaskChanging}

@@ -71,9 +71,9 @@ item={item}

expect(onChildDrag.mock.calls[1][0]).toBe(false)
expect(onUpdateItem.mock.calls.length).toBe(1);
expect(onUpdateItem.mock.calls[0][0]).toBe(item)
expect(onUpdateTask.mock.calls.length).toBe(1);
expect(onUpdateTask.mock.calls[0][0]).toBe(item)
let new_start_date=DateHelper.pixelToDate(10,nowposition,dayWidth);
let new_end_date=DateHelper.pixelToDate(90,nowposition,dayWidth);
expect(new_start_date.getTime()-onUpdateItem.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateItem.mock.calls[0][1].end.getTime()<10).toBe(true)
expect(new_start_date.getTime()-onUpdateTask.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateTask.mock.calls[0][1].end.getTime()<10).toBe(true)

@@ -84,3 +84,3 @@

let onChildDrag=jest.fn();
let onUpdateItem=jest.fn();
let onUpdateTask=jest.fn();
let onTaskChanging=jest.fn();

@@ -95,3 +95,3 @@ let item={name:'this Item'}

onChildDrag={onChildDrag}
onUpdateItem={onUpdateItem}
onUpdateTask={onUpdateTask}
onTaskChanging={onTaskChanging}

@@ -125,9 +125,9 @@ item={item}

expect(onChildDrag.mock.calls[1][0]).toBe(false)
expect(onUpdateItem.mock.calls.length).toBe(1);
expect(onUpdateItem.mock.calls[0][0]).toBe(item)
expect(onUpdateTask.mock.calls.length).toBe(1);
expect(onUpdateTask.mock.calls[0][0]).toBe(item)
let new_start_date=DateHelper.pixelToDate(10,nowposition,dayWidth);
let new_end_date=DateHelper.pixelToDate(70,nowposition,dayWidth);
expect(new_start_date.getTime()-onUpdateItem.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateItem.mock.calls[0][1].end.getTime()<10).toBe(true)
expect(new_start_date.getTime()-onUpdateTask.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateTask.mock.calls[0][1].end.getTime()<10).toBe(true)

@@ -138,3 +138,3 @@

let onChildDrag=jest.fn();
let onUpdateItem=jest.fn();
let onUpdateTask=jest.fn();
let onTaskChanging=jest.fn();

@@ -149,3 +149,3 @@ let item={name:'this Item'}

onChildDrag={onChildDrag}
onUpdateItem={onUpdateItem}
onUpdateTask={onUpdateTask}
onTaskChanging={onTaskChanging}

@@ -179,9 +179,9 @@ item={item}

expect(onChildDrag.mock.calls[1][0]).toBe(false)
expect(onUpdateItem.mock.calls.length).toBe(1);
expect(onUpdateItem.mock.calls[0][0]).toBe(item)
expect(onUpdateTask.mock.calls.length).toBe(1);
expect(onUpdateTask.mock.calls[0][0]).toBe(item)
let new_start_date=DateHelper.pixelToDate(0,nowposition,dayWidth);
let new_end_date=DateHelper.pixelToDate(90,nowposition,dayWidth);
expect(new_start_date.getTime()-onUpdateItem.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateItem.mock.calls[0][1].end.getTime()<10).toBe(true)
expect(new_start_date.getTime()-onUpdateTask.mock.calls[0][1].start.getTime()<10).toBe(true)
expect(new_end_date.getTime()-onUpdateTask.mock.calls[0][1].end.getTime()<10).toBe(true)

@@ -188,0 +188,0 @@

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

onTaskChanging={this.props.onTaskChanging}
onUpdateItem={this.props.onUpdateItem}> </DataTask>
onUpdateTask={this.props.onUpdateTask}> </DataTask>
</DataRow>);

@@ -83,0 +83,0 @@

@@ -28,3 +28,3 @@ import React from 'react'

// let onChildDrag=jest.fn();
// let onUpdateItem=jest.fn();
// let onUpdateTask=jest.fn();
// let item={name:'this Item'}

@@ -37,3 +37,3 @@ // let dayWidth=30;

// onChildDrag={onChildDrag}
// onUpdateItem={onUpdateItem}
// onUpdateTask={onUpdateTask}
// item={item}

@@ -63,9 +63,9 @@ // left={0}

// expect(onChildDrag.mock.calls[1][0]).toBe(false)
// expect(onUpdateItem.mock.calls.length).toBe(1);
// expect(onUpdateItem.mock.calls[0][0]).toBe(item)
// expect(onUpdateTask.mock.calls.length).toBe(1);
// expect(onUpdateTask.mock.calls[0][0]).toBe(item)
// let new_start_date=DateHelper.pixelToDate(10,nowposition,dayWidth);
// let new_end_date=DateHelper.pixelToDate(90,nowposition,dayWidth);
// expect(new_start_date.getTime()-onUpdateItem.mock.calls[0][1].start.getTime()<10).toBe(true)
// expect(new_end_date.getTime()-onUpdateItem.mock.calls[0][1].end.getTime()<10).toBe(true)
// expect(new_start_date.getTime()-onUpdateTask.mock.calls[0][1].start.getTime()<10).toBe(true)
// expect(new_end_date.getTime()-onUpdateTask.mock.calls[0][1].end.getTime()<10).toBe(true)

@@ -72,0 +72,0 @@

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

console.log(`End Link ${task}`)
if (this.props.onUpdateLink && task){
this.props.onUpdateLink({start:this.state.taskToCreate,end:{task:task,position:position}})
if (this.props.onCreateLink && task){
this.props.onCreateLink({start:this.state.taskToCreate,end:{task:task,position:position}})
}

@@ -338,3 +338,3 @@ this.setState({

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

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

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc