react-gantt-timeline
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -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 r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));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 r={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:{}},i=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,r,t.data):t.data=r},this.data=r}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=i},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}}(),r=n(2),i=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(),r=new Date(e),i=60*(r.getTimezoneOffset()-o.getTimezoneOffset())*1e3;return(r.getTime()-o.getTime()-i)/36e5*(n/24)+t}},{key:"pixelToDate",value:function(e,t,n){var o=24/n,r=e-t,i=this.getToday(),a=i.getTime()+r*o*36e5,s=new Date(a),l=60*(s.getTimezoneOffset()-i.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-r.BUFFER_DAYS;c<t+r.BUFFER_DAYS;c++)u=(l=(0,a.default)().add(c,"days")).format("M-YYYY"),s.data.push({key:u,month:l.format(i.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 r=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 r={link:e[o],index:o};this.createAddTo(t,this.link,r,o),this.createAddTo(n,this.link,r,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=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=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),a=(o=i)&&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},r={x:n.props.end.x-s,y:o.y};return{cpt1:e,cpt2:o,cpt3:r,cpt4:{x:r.x,y:r.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,i.Component),r(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},r=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),a=b(i),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(20)),v=b(n(1)),g=b(n(3));function b(e){return e&&e.__esModule?e:{default:e}}n(21);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),r=n.calculateStartEndRows(t,n.props.data,n.state.scrollTop),i=g.default.calculateMonthData(n.state.currentday,n.state.currentday+o,n.state.nowposition,n.state.dayWidth);n.setState({numVisibleRows:t,numVisibleDays:o,startRow:r.start,endRow:r.end,months:i,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 r=Math.trunc(o/n.props.itemheight);return{start:r,end:r+e>=t.length?t.length:r+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,r=n.state.months,i=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)?r=g.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth):-1!=o&&(r=g.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth)),a=(i=Math.trunc(n.state.scrollTop/n.props.itemheight))+n.state.numVisibleRows>=n.props.data.length?n.props.data.length-1:i+n.state.numVisibleRows,n.setStartEnd(),n.setState(n.state={currentday:s,nowposition:t,months:r,scrollLeft:o,startRow:i,endRow:a})},n.changingMonth=function(e,t){var o=(0,l.default)().add(e,"days").format("M-YYYY"),r=(0,l.default)().add(t,"days").format("M-YYYY");return!(o in n.state.months.keys&&r 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 r=n.getDayWidth(n.props.mode);return v.default.load(n.props.config),n.state={currentday:0,nowposition:0,startRow:0,endRow:10,months:g.default.calculateMonthData(0,30,0,r),sideStyle:{width:200},scrollLeft:0,scrollTop:0,numVisibleRows:40,numVisibleDays:60,dayWidth:r,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,i.Component),r(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=g.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 r(){}e.exports=function(){function e(e,t,n,r,i,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=r,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}}(),r=n(0),i=s(r),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,r.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 i.default.createElement("div",{className:"verticalResizer",style:a.default.values.taskList.verticalSeparator.style,onMouseDown:this.doMouseDown},i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.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},r=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),a=c(i),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,i.Component),r(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,i.Component),r(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,i.Component),r(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},r=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),a=p(i),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,i.Component),r(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}(),v=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 r=u.default.dateToPixel(o.start,n.props.nowposition,n.props.dayWidth),i=u.default.dateToPixel(o.end,n.props.nowposition,n.props.dayWidth)-r;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:r,width:i,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,i.Component),r(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})(v)},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},r=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),a=c(i),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,i.Component),r(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 r={item:this.props.item,position:{start:n-this.props.nowposition,end:n+o-this.props.nowposition}};this.props.onTaskChanging(r),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}}(),r=n(0),i=c(r),a=c(n(5)),s=c(n(6)),l=c(n(17)),u=(n(2),c(n(3)));function c(e){return e&&e.__esModule?e:{default:e}}function d(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 p=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:u.default.dateToPixel(t,0,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 i.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,r=null,l={},u={},c=0;c<e.length;c++)t=e[c],o=a.default.getTask(t.link.start),r=a.default.getTask(t.link.end),l=n.getItemPosition(o.index,o.item.end),n.state.changingTask.item.id==t.link.start&&(l.x=n.state.changingTask.position.end),u=n.getItemPosition(r.index,r.item.start),n.state.changingTask.item.id==t.link.end&&(u.x=n.state.changingTask.position.start),n.cache[t.index]=i.default.createElement(s.default,{key:-c-1,start:{x:l.x,y:l.y},end:{x:u.x,y:u.y}}),n.cache=[].concat(d(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,r.Component),o(t,[{key:"renderLink",value:function(e,t,n,o){var r=this.getItemPosition(e.index,e.item.end),a=this.getItemPosition(t.index,t.item.start);return i.default.createElement(s.default,{key:o,start:{x:r.x,y:r.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 r=this.state.links[o];!r&&e[r.id]||((t=a.default.getTask(r.start))&&(n=a.default.getTask(r.end))?(this.cache.push(this.renderLink(t,n,r,o)),e[r.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(),i.default.createElement("svg",{x:0,y:0,width:"100%",pointerEvents:"none",style:{position:"absolute",top:60,userSelect:"none",height:"100%"}},i.default.createElement("defs",null,i.default.createElement("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"9",markerHeight:"9",orient:"auto-start-reverse"},i.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",strokeLinejoin:"round"}))),i.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=p},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}}(),r=n(0),i=s(r),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,r.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 i.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},r=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),a=u(i),s=u(n(1)),l=u(n(19));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 p(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 c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return p(t,i.Component),r(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-verticalLine",style:{left:this.props.left}})}}]),t}();var f=t.TaskRow=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChange=function(e){n.props.onUpdateTask&&n.props.onUpdateTask(n.props.item,{name:e})},n}return p(t,i.Component),r(t,[{key:"render",value:function(){var e=this;return a.default.createElement("div",{className:"timeLine-side-task-row",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(l.default,{value:this.props.label,index:this.props.index,onChange:this.onChange}))}}]),t}(),h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.doScroll=function(){n.props.onScroll(n.refs.taskViewPort.scrollTop)},n}return p(t,i.Component),r(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(f,{key:n,index:n,item:o,label:o.name,top:n*this.props.itemheight,itemheight:this.props.itemheight,isSelected:this.props.selectedItem==o,onUpdateTask:this.props.onUpdateTask,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=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=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),a=(o=i)&&o.__esModule?o:{default:o};var s=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.onFocus=function(){n.setState({editing:!0})},n.onBlur=function(){n.finishEditing()},n.handleKey=function(e){13===(e.keyCode||e.which)&&n.finishEditing()},n.finishEditing=function(){n.isFocus=!1,n.setState({editing:!1}),n.props.onChange&&n.props.onChange(n.state.value)},n.handleChange=function(e){n.setState({value:e.target.value})},n.renderDiv=function(){return a.default.createElement("div",{tabIndex:n.props.index,onClick:n.onFocus,onFocus:n.onFocus,style:{width:"100%"}}," ",n.state.value)},n.renderEditor=function(){return a.default.createElement("input",{ref:"textInput",onBlur:n.onBlur,style:{width:"100%",outlineColor:"black",outlineStyle:"oinset"},type:"text",name:"name",value:n.state.value,onKeyUp:n.handleKey,onChange:n.handleChange})},n.isFocus=!1,n.state={editing:!1,value:n.props.value},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),r(t,[{key:"componentDidUpdate",value:function(e,t){this.refs.textInput&&!this.isFocus&&(this.refs.textInput.focus(),this.isFocus=!0)}},{key:"shouldComponentUpdate",value:function(e,t){return e.value!=this.props.value&&(this.state.value=e.value),!0}},{key:"render",value:function(){return this.state.editing?this.renderEditor():this.renderDiv()}}]),t}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(3),i=(o=r)&&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,r){t.nowposition=o,t.daywidth=r,t.setLimits(e,n,o,r),t.loadDataHorizon()},this.setStartEnd=function(e,n,o,r){t.nowposition=o,t.daywidth=r,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=i.default.pixelToDate(t.lower_limit,t.nowposition,t.daywidth),n=i.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(22);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(24)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(23)(!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 r=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).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={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"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,r,i={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),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(25);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=i[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(g(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(g(o.parts[a],t));i[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[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 r=s(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}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"),v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=l||(l=y(t)),o=k.bind(null,n,a,!1),r=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",v(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=d(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=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),r=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 r()}}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=[],r=0;r<n.length;r++){var a=n[r];(s=i[a.id]).refs--,o.push(s)}e&&p(f(e,t),t);for(r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[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 r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},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 r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}])}); | ||
!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 r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.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 r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));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 r={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:{}},i=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,r,t.data):t.data=r},this.data=r}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=i},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}}(),r=n(2),i=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(),r=new Date(e),i=60*(r.getTimezoneOffset()-o.getTimezoneOffset())*1e3;return(r.getTime()-o.getTime()-i)/36e5*(n/24)+t}},{key:"pixelToDate",value:function(e,t,n){var o=24/n,r=e-t,i=this.getToday(),a=i.getTime()+r*o*36e5,s=new Date(a),l=60*(s.getTimezoneOffset()-i.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-r.BUFFER_DAYS;c<t+r.BUFFER_DAYS;c++)u=(l=(0,a.default)().add(c,"days")).format("M-YYYY"),s.data.push({key:u,month:l.format(i.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 r=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 r={link:e[o],index:o};this.createAddTo(t,this.link,r,o),this.createAddTo(n,this.link,r,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=r},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=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),a=(o=i)&&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},r={x:n.props.end.x-s,y:o.y};return{cpt1:e,cpt2:o,cpt3:r,cpt4:{x:r.x,y:r.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,i.Component),r(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},r=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),a=b(i),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(20)),v=b(n(1)),g=b(n(3));function b(e){return e&&e.__esModule?e:{default:e}}n(21);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),r=n.calculateStartEndRows(t,n.props.data,n.state.scrollTop),i=g.default.calculateMonthData(n.state.currentday,n.state.currentday+o,n.state.nowposition,n.state.dayWidth);n.setState({numVisibleRows:t,numVisibleDays:o,startRow:r.start,endRow:r.end,months:i,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 r=Math.trunc(o/n.props.itemheight);return{start:r,end:r+e>=t.length?t.length:r+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,r=n.state.months,i=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)?r=g.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth):-1!=o&&(r=g.default.calculateMonthData(s,s+n.state.numVisibleDays,t,n.state.dayWidth)),a=(i=Math.trunc(n.state.scrollTop/n.props.itemheight))+n.state.numVisibleRows>=n.props.data.length?n.props.data.length-1:i+n.state.numVisibleRows,n.setStartEnd(),n.setState(n.state={currentday:s,nowposition:t,months:r,scrollLeft:o,startRow:i,endRow:a})},n.changingMonth=function(e,t){var o=(0,l.default)().add(e,"days").format("M-YYYY"),r=(0,l.default)().add(t,"days").format("M-YYYY");return!(o in n.state.months.keys&&r 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 r=n.getDayWidth(n.props.mode);return v.default.load(n.props.config),n.state={currentday:0,nowposition:0,startRow:0,endRow:10,months:g.default.calculateMonthData(0,30,0,r),sideStyle:{width:200},scrollLeft:0,scrollTop:0,numVisibleRows:40,numVisibleDays:60,dayWidth:r,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,i.Component),r(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=g.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 r(){}e.exports=function(){function e(e,t,n,r,i,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=r,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}}(),r=n(0),i=s(r),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,r.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 i.default.createElement("div",{className:"verticalResizer",style:a.default.values.taskList.verticalSeparator.style,onMouseDown:this.doMouseDown},i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.default.createElement("div",{className:"squareGrip",style:a.default.values.taskList.verticalSeparator.grip.style}),i.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},r=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),a=c(i),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,i.Component),r(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,i.Component),r(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,i.Component),r(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},r=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),a=p(i),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,i.Component),r(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}(),v=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 r=u.default.dateToPixel(o.start,n.props.nowposition,n.props.dayWidth),i=u.default.dateToPixel(o.end,n.props.nowposition,n.props.dayWidth)-r;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:r,width:i,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,i.Component),r(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})(v)},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},r=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),a=c(i),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,i.Component),r(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 r={item:this.props.item,position:{start:n-this.props.nowposition,end:n+o-this.props.nowposition}};this.props.onTaskChanging(r),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}}(),r=n(0),i=c(r),a=c(n(5)),s=c(n(6)),l=c(n(17)),u=(n(2),c(n(3)));function c(e){return e&&e.__esModule?e:{default:e}}function d(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 p=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:u.default.dateToPixel(t,0,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 i.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,r=null,l={},u={},c=0;c<e.length;c++)t=e[c],(o=a.default.getTask(t.link.start))&&(r=a.default.getTask(t.link.end))&&(l=n.getItemPosition(o.index,o.item.end),n.state.changingTask.item.id==t.link.start&&(l.x=n.state.changingTask.position.end),u=n.getItemPosition(r.index,r.item.start),n.state.changingTask.item.id==t.link.end&&(u.x=n.state.changingTask.position.start),n.cache[t.index]=i.default.createElement(s.default,{key:-c-1,start:{x:l.x,y:l.y},end:{x:u.x,y:u.y}}),n.cache=[].concat(d(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,r.Component),o(t,[{key:"renderLink",value:function(e,t,n,o){var r=this.getItemPosition(e.index,e.item.end),a=this.getItemPosition(t.index,t.item.start);return i.default.createElement(s.default,{key:o,start:{x:r.x,y:r.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 r=this.state.links[o];!r&&e[r.id]||((t=a.default.getTask(r.start))&&(n=a.default.getTask(r.end))?(this.cache.push(this.renderLink(t,n,r,o)),e[r.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(),i.default.createElement("svg",{x:0,y:0,width:"100%",pointerEvents:"none",style:{position:"absolute",top:60,userSelect:"none",height:"100%"}},i.default.createElement("defs",null,i.default.createElement("marker",{id:"arrow",viewBox:"0 0 10 10",refX:"5",refY:"5",markerWidth:"9",markerHeight:"9",orient:"auto-start-reverse"},i.default.createElement("path",{d:"M 0 0 L 10 5 L 0 10 z",strokeLinejoin:"round"}))),i.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=p},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}}(),r=n(0),i=s(r),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,r.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 i.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},r=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),a=u(i),s=u(n(1)),l=u(n(19));function u(e){return e&&e.__esModule?e:{default:e}}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function d(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 p(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 c(this,t),d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e))}return p(t,i.Component),r(t,[{key:"render",value:function(){return a.default.createElement("div",{className:"timeLine-main-data-verticalLine",style:{left:this.props.left}})}}]),t}();var f=t.TaskRow=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.onChange=function(e){n.props.onUpdateTask&&n.props.onUpdateTask(n.props.item,{name:e})},n}return p(t,i.Component),r(t,[{key:"render",value:function(){var e=this;return a.default.createElement("div",{className:"timeLine-side-task-row",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(l.default,{value:this.props.label,index:this.props.index,onChange:this.onChange}))}}]),t}(),h=function(e){function t(e){c(this,t);var n=d(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.doScroll=function(){n.props.onScroll(n.refs.taskViewPort.scrollTop)},n}return p(t,i.Component),r(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(f,{key:n,index:n,item:o,label:o.name,top:n*this.props.itemheight,itemheight:this.props.itemheight,isSelected:this.props.selectedItem==o,onUpdateTask:this.props.onUpdateTask,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=h},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=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),a=(o=i)&&o.__esModule?o:{default:o};var s=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.onFocus=function(){n.setState({editing:!0})},n.onBlur=function(){n.finishEditing()},n.handleKey=function(e){13===(e.keyCode||e.which)&&n.finishEditing()},n.finishEditing=function(){n.isFocus=!1,n.setState({editing:!1}),n.props.onChange&&n.props.onChange(n.state.value)},n.handleChange=function(e){n.setState({value:e.target.value})},n.renderDiv=function(){return a.default.createElement("div",{tabIndex:n.props.index,onClick:n.onFocus,onFocus:n.onFocus,style:{width:"100%"}}," ",n.state.value)},n.renderEditor=function(){return a.default.createElement("input",{ref:"textInput",onBlur:n.onBlur,style:{width:"100%",outlineColor:"black",outlineStyle:"oinset"},type:"text",name:"name",value:n.state.value,onKeyUp:n.handleKey,onChange:n.handleChange})},n.isFocus=!1,n.state={editing:!1,value:n.props.value},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),r(t,[{key:"componentDidUpdate",value:function(e,t){this.refs.textInput&&!this.isFocus&&(this.refs.textInput.focus(),this.isFocus=!0)}},{key:"shouldComponentUpdate",value:function(e,t){return e.value!=this.props.value&&(this.state.value=e.value),!0}},{key:"render",value:function(){return this.state.editing?this.renderEditor():this.renderDiv()}}]),t}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o,r=n(3),i=(o=r)&&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,r){t.nowposition=o,t.daywidth=r,t.setLimits(e,n,o,r),t.loadDataHorizon()},this.setStartEnd=function(e,n,o,r){t.nowposition=o,t.daywidth=r,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=i.default.pixelToDate(t.lower_limit,t.nowposition,t.daywidth),n=i.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(22);"string"==typeof o&&(o=[[e.i,o,""]]);var r={hmr:!0,transform:void 0,insertInto:void 0};n(24)(o,r);o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(23)(!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 r=(a=o,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=o.sources.map(function(e){return"/*# sourceURL="+o.sourceRoot+e+" */"});return[n].concat(i).concat([r]).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={},r=0;r<this.length;r++){var i=this[r][0];"number"==typeof i&&(o[i]=!0)}for(r=0;r<e.length;r++){var a=e[r];"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,r,i={},a=(o=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===r&&(r=o.apply(this,arguments)),r}),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(25);function p(e,t){for(var n=0;n<e.length;n++){var o=e[n],r=i[o.id];if(r){r.refs++;for(var a=0;a<r.parts.length;a++)r.parts[a](o.parts[a]);for(;a<o.parts.length;a++)r.parts.push(g(o.parts[a],t))}else{var s=[];for(a=0;a<o.parts.length;a++)s.push(g(o.parts[a],t));i[o.id]={id:o.id,refs:1,parts:s}}}}function f(e,t){for(var n=[],o={},r=0;r<e.length;r++){var i=e[r],a=t.base?i[0]+t.base:i[0],s={css:i[1],media:i[2],sourceMap:i[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 r=s(e.insertInto+" "+e.insertAt.before);n.insertBefore(t,r)}}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"),v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function g(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=l||(l=y(t)),o=k.bind(null,n,a,!1),r=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",v(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=d(o));r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=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),r=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 r()}}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=[],r=0;r<n.length;r++){var a=n[r];(s=i[a.id]).refs--,o.push(s)}e&&p(f(e,t),t);for(r=0;r<o.length;r++){var s;if(0===(s=o[r]).refs){for(var l=0;l<s.parts.length;l++)s.parts[l]();delete i[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 r=n?"":o.css;if(e.styleSheet)e.styleSheet.cssText=w(t,r);else{var i=document.createTextNode(r),a=e.childNodes;a[t]&&e.removeChild(a[t]),a.length?e.insertBefore(i,a[t]):e.appendChild(i)}}},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 r,i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?e:(r=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:o+i.replace(/^\.\//,""),"url("+JSON.stringify(r)+")")})}}])}); |
{ | ||
"name": "react-gantt-timeline", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -92,3 +92,7 @@ import React,{Component} from 'react' | ||
startItem=Registry.getTask(item.link.start) | ||
if (!startItem) | ||
continue | ||
endItem=Registry.getTask(item.link.end) | ||
if (!endItem) | ||
continue | ||
startPosition = this.getItemPosition(startItem.index,startItem.item.end) | ||
@@ -95,0 +99,0 @@ if (this.state.changingTask.item.id==item.link.start) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171634
2498