From 053057bd0fd919ca1777c4cdabefa5c9618a01a2 Mon Sep 17 00:00:00 2001 From: Chris Shinn Date: Thu, 15 Dec 2016 12:39:31 -0500 Subject: [PATCH 1/2] Added slider positioning fix to zoom buttons --- src/zoom.js | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/zoom.js b/src/zoom.js index eadde77..81977a2 100755 --- a/src/zoom.js +++ b/src/zoom.js @@ -34,22 +34,25 @@ export default class zoom { .attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in') .attr('id', 'timeline-pf-zoom-in') .style('top', `${configuration.padding.top}px`) - .style('right', `${configuration.padding.right}px`) .on('click', () => {this.zoomClick()}); - zoomIn.append('i') - .attr('class', 'fa fa-plus') - .attr('id', 'timeline-pf-zoom-in-icon'); + zoomIn + .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomIn.node().offsetWidth)}px`) + .append('i') + .attr('class', 'fa fa-plus') + .attr('id', 'timeline-pf-zoom-in-icon'); const zoomOut = container.append('button') .attr('type', 'button') .attr('class', 'btn btn-default timeline-pf-zoom') .attr('id', 'timeline-pf-zoom-out') .style('top', `${configuration.padding.top + dimensions.height - 26}px`) - .style('right', `${configuration.padding.right}px`) .on('click', () => {this.zoomClick()}); - zoomOut.append('i') - .attr('class', 'fa fa-minus') - .attr('id', 'timeline-pf-zoom-out-icon'); + console.log(zoomIn.node().offsetWidth); + zoomOut + .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomOut.node().offsetWidth)}px`) + .append('i') + .attr('class', 'fa fa-minus') + .attr('id', 'timeline-pf-zoom-out-icon'); const zoomSlider = container.append('input') .attr('type', 'range') @@ -63,7 +66,8 @@ export default class zoom { .on('input', () => {this.zoomClick()}); zoomSlider .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - (zoomSlider.node().offsetHeight / 2)}px`) - .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - (zoomIn.node().offsetWidth / 2)) - (zoomSlider.node().offsetWidth / 2)}px`); + .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + + configuration.sliderWidth - ((zoomIn.node().offsetWidth - zoomSlider.node().offsetHeight) / 2) - (zoomSlider.node().offsetWidth / 2)}px`); } if(configuration.context) { From de83e95da3f0c1b365f457868a5df8fe468d9e0c Mon Sep 17 00:00:00 2001 From: Admin Date: Thu, 15 Dec 2016 20:16:19 +0000 Subject: [PATCH 2/2] Added files generated by Travis build --- dist/timeline.css | 2 ++ dist/timeline.css.map | 1 + dist/timeline.js | 2 ++ dist/timeline.js.map | 1 + 4 files changed, 6 insertions(+) create mode 100644 dist/timeline.css create mode 100644 dist/timeline.css.map create mode 100644 dist/timeline.js create mode 100644 dist/timeline.js.map diff --git a/dist/timeline.css b/dist/timeline.css new file mode 100644 index 0000000..5d9b098 --- /dev/null +++ b/dist/timeline.css @@ -0,0 +1,2 @@ +.timeline-pf-zoom-area{fill:transparent;cursor:pointer}.timeline-pf-y-tick{stroke:#000;fill:none;stroke-width:1px}.timeline-pf-axes{fill:#fafafa}.timeline-pf-x-axis{position:absolute;z-index:50;stroke:#d1d1d1;fill:none;stroke-width:1px;shape-rendering:crispEdges}.timeline-pf-x-axis text{stroke:none;fill:#000;font-family:Open Sans;font-size:12px}.timeline-pf-label{font-weight:400}text.timeline-pf-drop{text-rendering:auto;font-size:10px;font-family:FontAwesome;opacity:.7;stroke:none;cursor:pointer}text.timeline-pf-drop:hover{font-size:21px;font-weight:700;paint-order:stroke}text.timeline-pf-event-group{font-size:18px}.timeline-pf-grid{stroke:#d1d1d1;cursor:all-scroll;shape-rendering:crispEdges}.timeline-pf-timestamp text{fill:#fff}.timeline-pf-timestamp rect{fill:#000;opacity:.7}.timeline-pf-marker{pointer-events:none}.timeline-pf-brush .extent{stroke:none;fill:#0088ce;fill-opacity:.25;shape-rendering:crispEdges}.timeline-pf-graph-body .timeline-pf-line{height:20px;padding:10px}.timeline-pf-zoom{position:absolute}.timeline-pf-context .timeline-pf-bar{fill:#bbb;shape-rendering:crispEdges}.timeline-pf-slider{-webkit-transform:rotate(-90deg);transform:rotate(-90deg)}.timeline-pf-grid-stripes rect{fill:#fafafa;shape-rendering:crispEdges}.timeline-pf-grid-stripes line{stroke:#d1d1d1;stroke-width:1px;shape-rendering:crispEdges} +/*# sourceMappingURL=timeline.css.map*/ \ No newline at end of file diff --git a/dist/timeline.css.map b/dist/timeline.css.map new file mode 100644 index 0000000..0d79f35 --- /dev/null +++ b/dist/timeline.css.map @@ -0,0 +1 @@ +{"version":3,"sources":[],"names":[],"mappings":"","file":"timeline.css","sourceRoot":""} \ No newline at end of file diff --git a/dist/timeline.js b/dist/timeline.js new file mode 100644 index 0000000..417aef7 --- /dev/null +++ b/dist/timeline.js @@ -0,0 +1,2 @@ +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("d3")):"function"==typeof define&&define.amd?define(["d3"],e):"object"==typeof exports?exports.timeline=e(require("d3")):t.timeline=e(t.d3)}(this,function(t){return function(t){function e(i){if(n[i])return n[i].exports;var a=n[i]={exports:{},id:i,loaded:!1};return t[i].call(a.exports,a,a.exports,e),a.loaded=!0,a.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){n(9),t.exports=n(13)},function(e,n){e.exports=t},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}var a=n(1),r=i(a),o={start:new Date(0),end:new Date,contextStart:null,contextEnd:null,minScale:0,maxScale:1/0,width:null,padding:{top:30,left:40,bottom:40,right:40},lineHeight:40,labelWidth:140,sliderWidth:30,contextHeight:50,locale:null,axisFormat:null,tickFormat:[[".%L",function(t){return t.getMilliseconds()}],[":%S",function(t){return t.getSeconds()}],["%I:%M",function(t){return t.getMinutes()}],["%I %p",function(t){return t.getHours()}],["%b %d",function(t){return t.getMonth()&&t.getDate()}],["%b",function(t){return t.getMonth()}],["%Y",function(){return!0}]],eventHover:null,eventZoom:null,eventClick:null,eventLineColor:function(t,e){switch(e%5){case 0:return"#00659c";case 1:return"#0088ce";case 2:return"#3f9c35";case 3:return"#ec7a08";case 4:return"#cc0000"}},eventColor:null,eventShape:function(t){return t.hasOwnProperty("events")?"":""},eventPopover:function(t){var e="";if(t.hasOwnProperty("events"))e="Group of "+t.events.length+" events";else{for(var n in t.details)e=e+n.charAt(0).toUpperCase()+n.slice(1)+": "+t.details[n]+"
";e=e+"Date: "+t.date}return e},marker:!0,context:!0,slider:!0,eventGrouping:6e4};o.dateFormat=o.locale?o.locale.timeFormat("%a %x %I:%M %p"):r["default"].time.format("%a %x %I:%M %p"),t.exports=o},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(10),r=i(a);e["default"]=function(t,e,n,i){return function(a){var o=function(e,a){var o=t.selectAll(".timeline-pf-x-axis."+e).data([{}]);o.enter().append("g").classed("timeline-pf-x-axis",!0).classed(e,!0).call(r["default"](a,n)).attr("transform","translate(0,"+("focus"===e?i.height:i.height+i.ctxHeight+40)+")"),o.call(r["default"](a,n,i.width)),o.exit().remove()};o("focus",e.x),n.context&&o("context",e.ctx)}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(t,e,n){var i={};for(var a in t)for(var r in t[a].data){var o=Math.floor(t[a].data[r].date/e)*e;i[o]=i[o]+1||1}for(var l in i){var s=new Date;s.setTime(+l),n.push({date:s,count:i[l]})}}Object.defineProperty(e,"__esModule",{value:!0});var r=n(1),o=i(r);e["default"]=function(t,e,n,i,r){var l=t.append("g").classed("timeline-pf-context",!0).attr("width",n.width).attr("height",n.ctxHeight).attr("clip-path","url(#timeline-pf-context-brush-clipper)").attr("transform","translate("+(i.padding.left+i.labelWidth)+","+(i.padding.top+n.height+40)+")"),s=[],d=36e5,u=Math.ceil(d/(e.ctx.domain()[1]-e.ctx.domain()[0])*n.width);a(r,d,s),s.sort(function(t,e){return t.datee.date?1:0}),e.cty.domain([0,o["default"].max(s,function(t){return t.count})]),l.selectAll(".timeline-pf-bar").data(s).enter().append("rect").attr("class","timeline-pf-bar").attr("x",function(t){return e.ctx(t.date)}).attr("y",function(t){return e.cty(t.count)}).attr("width",u).attr("height",function(t){return n.ctxHeight-e.cty(t.count)}),l.append("g").attr("class","timeline-pf-brush")}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(i){var a=t.selectAll(".timeline-pf-drop-line").data(i);a.enter().append("g").classed("timeline-pf-drop-line",!0).attr("transform",function(t,i){return"translate(0, "+(e.y(i)+n.lineHeight/2)+")"}).attr("fill",n.eventLineColor),a.each(function(t){var i=d3.select(this).selectAll(".timeline-pf-drop").data(t.data);i.attr("transform",function(t){return"translate("+e.x(t.date)+")"});var a=i.enter().append("text").classed("timeline-pf-drop",!0).classed("timeline-pf-event-group",function(t){return t.hasOwnProperty("events")?!0:!1}).attr("transform",function(t){return"translate("+e.x(t.date)+")"}).attr("fill",n.eventColor).attr("text-anchor","middle").attr("data-toggle","popover").attr("data-html","true").attr("data-content",n.eventPopover).attr("dominant-baseline","central").text(n.eventShape);n.eventClick&&a.on("click",n.eventClick),n.eventHover&&a.on("mouseover",n.eventHover),i.exit().on("click",null).on("mouseover",null),i.exit().remove()}),a.exit().remove()}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),r=(i(a),n(3)),o=i(r),l=n(5),s=i(l),d=n(7),u=i(d),c=n(8),f=i(c);e["default"]=function(t,e,n,i){var a=t.append("defs");a.append("clipPath").attr("id","timeline-pf-drops-container-clipper").append("rect").attr("id","timeline-pf-drops-container-rect").attr("x",0).attr("y",0).attr("width",e.width).attr("height",e.height),i.context&&a.append("clipPath").attr("id","timeline-pf-context-brush-clipper").append("polygon").attr("points","0,0 "+e.width+",0 "+(e.width+i.sliderWidth)+","+e.ctxHeight/2+" "+e.width+","+e.ctxHeight+" 0,"+e.ctxHeight+" "+-i.sliderWidth+","+e.ctxHeight/2);var r=a.append("pattern").attr("class","timeline-pf-grid-stripes").attr("id","timeline-pf-grid-stripes").attr("width",e.width).attr("height",2*i.lineHeight).attr("patternUnits","userSpaceOnUse");r.append("rect").attr("width",e.width).attr("height",i.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1",i.lineHeight).attr("y2",i.lineHeight),r.append("line").attr("x1",0).attr("x2",e.width).attr("y1","1px").attr("y2","1px");var l=t.append("g").classed("timeline-pf-grid",!0).attr("fill","url(#timeline-pf-grid-stripes)").attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")"),d=t.append("g").classed("timeline-pf-labels",!0).attr("transform","translate("+i.padding.left+", "+i.padding.top+")"),c=t.append("g").classed("timeline-pf-axes",!0).attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")"),p=t.append("g").classed("timeline-pf-drops-container",!0).attr("clip-path","url(#timeline-pf-drops-container-clipper)").attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")");if(i.marker){var h=t.append("g").classed("timeline-pf-timestamp",!0).attr("height",30).attr("transform","translate("+(i.padding.left+i.labelWidth)+", "+i.padding.top+")");f["default"](l,h,n,e,i.dateFormat)}var m=o["default"](c,n,i,e),g=u["default"](d,n,i),v=s["default"](p,n,i);return function(t){v(t),g(t),m(t)}}},function(t,e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e["default"]=function(t,e,n){return function(i){var a=t.selectAll(".timeline-pf-label").data(i),r=function(t){for(var e=0,n=0;n=0?" ("+e+")":"")};a.text(o),a.enter().append("text").classed("timeline-pf-label",!0).attr("transform",function(t,i){return"translate("+(n.labelWidth-20)+" "+(e.y(i)+n.lineHeight/2)+")"}).attr("dominant-baseline","central").attr("text-anchor","end").text(o),a.exit().remove()}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}Object.defineProperty(e,"__esModule",{value:!0});var a=n(1),r=i(a);e["default"]=function(t,e,n,i,a){function o(){var e=r["default"].mouse(t[0][0])[0];l.attr("transform","translate("+e+")"),d.attr("transform","translate("+(e-75)+", -25)"),u.attr("transform","translate("+e+", -9)").text(a(n.x.invert(e)))}t.append("rect").attr("width",i.width).attr("height",i.height).on("mouseover",function(){l.style("display",null),u.style("display",null),d.style("display",null)}).on("mouseout",function(){l.style("display","none"),u.style("display","none"),d.style("display","none")}).on("mousemove",o);var l=t.append("line").classed("timeline-pf-marker",!0).attr("y1",0).attr("y2",i.height),s=n.x.domain(),d=e.append("rect").attr("height","24").attr("width","150").style("display","none"),u=e.append("text").text(a(s[1])).attr("transform","translate("+n.x.range()[1]+")").attr("text-anchor","middle")}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{"default":t}}function a(){function t(t){t.each(function(e){var l=e;e=o(e,n.eventGrouping),n.lineHeight=e.length<=3?80:40,n.contextStart=n.contextStart||d["default"].min(r(e)),n.contextEnd=n.contextEnd||n.end,d["default"].select(this).select(".timeline-pf-chart").remove(),d["default"].select(this).selectAll(".timeline-pf-zoom").remove();var u=40,c=n.width||t.node().clientWidth,f=e.length*n.lineHeight,p={width:c-n.padding.right-n.padding.left-n.labelWidth-(n.slider?n.sliderWidth:0),height:f,ctxHeight:n.contextHeight,outer_height:f+n.padding.top+n.padding.bottom+(n.context?n.contextHeight+u:0)},h={x:s(p.width,[n.start,n.end]),y:a(e),ctx:s(p.width,[n.contextStart,n.contextEnd]),cty:d["default"].scale.linear().range([p.ctxHeight,0])},g=d["default"].select(this).append("svg").classed("timeline-pf-chart",!0).attr({width:c,height:p.outer_height}),x=m["default"](g,p,h,n).bind(t);x(e),n.context&&v["default"](g,h,p,n,l),i.updateZoom(d["default"].select(this),p,h,n,e,x)})}var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=l({},p["default"],e),i=new y["default"],a=function(t){return d["default"].scale.ordinal().domain(t.map(function(t){return t.name})).range(t.map(function(t,e){return e*n.lineHeight}))},s=function(t,e){return d["default"].time.scale().range([0,t]).domain(e)};return c["default"](t,n),t.Zoom=i,t}function r(t){for(var e=[],n=0;na[1]&&(e=a[1]),r=(i-l.x)/l.k,l.k=e,o=r*l.k+l.x,l.x+=i-o,this.interpolateZoom([l.x,0],l.k,n)}},{key:"interpolateZoom",value:function(t,e,n){var i=this;return s["default"].transition().duration(n).tween("zoom",function(){if(i.zoom){var n=function(){var n=s["default"].interpolate(i.zoom.translate(),t),a=s["default"].interpolate(i.zoom.scale(),e);return{v:function(t){i.zoom.scale(a(t)).translate(n(t)),i.zoom.event(i.grid)}}}();if("object"===("undefined"==typeof n?"undefined":r(n)))return n.v}})}},{key:"getRange",value:function(t){return t[1].getTime()-t[0].getTime()}},{key:"getScale",value:function(t,e){return t/e}},{key:"zoomFilter",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:100,i=e-t,a=this.dimensions.width,r=this.zoom.scaleExtent(),o=this.zoom.translate()[0],l=this.zoom.scale(),s=this.zoom.scale(),d=this.getRange(this.scales.x.domain()),u=void 0;s*=this.getScale(this.getRange(this.scales.x.domain()),i),sr[1]&&(s=r[1]),u=(this.scales.x.domain()[0]-t)*(a/d),o+=u,o*=s/l,this.interpolateZoom([o,0],s,n)}}]),t}();e["default"]=d},function(t,e,n){"use strict";function i(t,e){function n(n){return function(i){return arguments.length?(e[n]=i,t):e[n]}}for(var i in e)t[i]=n(i)}t.exports=i},function(t,e){}])}); +//# sourceMappingURL=timeline.js.map \ No newline at end of file diff --git a/dist/timeline.js.map b/dist/timeline.js.map new file mode 100644 index 0000000..436afb7 --- /dev/null +++ b/dist/timeline.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///timeline.js","webpack:///webpack/bootstrap bf5979521f0b0340eeb9","webpack:///external \"d3\"","webpack:///./src/config.js","webpack:///./src/drawer/axes.js","webpack:///./src/drawer/context.js","webpack:///./src/drawer/drops.js","webpack:///./src/drawer/index.js","webpack:///./src/drawer/labels.js","webpack:///./src/drawer/marker.js","webpack:///./src/timeline.js","webpack:///./src/xAxis.js","webpack:///./src/zoom.js","webpack:///./~/configurable.js/configurable.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","_interopRequireDefault","obj","__esModule","default","_d","_d2","config","start","Date","end","contextStart","contextEnd","minScale","maxScale","Infinity","width","padding","top","left","bottom","right","lineHeight","labelWidth","sliderWidth","contextHeight","locale","axisFormat","tickFormat","d","getMilliseconds","getSeconds","getMinutes","getHours","getMonth","getDate","eventHover","eventZoom","eventClick","eventLineColor","i","eventColor","eventShape","hasOwnProperty","eventPopover","popover","events","length","details","charAt","toUpperCase","slice","date","marker","context","slider","eventGrouping","dateFormat","timeFormat","time","format","Object","defineProperty","value","_xAxis","_xAxis2","axesContainer","scales","configuration","dimensions","data","axis","scope","scale","selection","selectAll","enter","append","classed","attr","height","ctxHeight","exit","remove","x","ctx","countEvents","toRoundTo","counts","temp","j","rounded","Math","floor","k","tempDate","setTime","push","count","svg","contextContainer","roundTo","barWidth","ceil","domain","sort","a","b","cty","max","dropLines","idx","y","each","drop","drops","d3","select","shape","text","on","_axes","_axes2","_drops","_drops2","_labels","_labels2","_marker","_marker2","defs","pattern","gridContainer","labelsContainer","dropsContainer","stampContainer","axes","labels","container","undefined","name","moveMarker","pos","mouse","timeBox","timeStamp","invert","style","range","timeline","timelineGraph","ungroupedData","groupEvents","finalConfiguration","min","getDates","SCALEHEIGHT","outer_width","node","clientWidth","outer_height","xScale","yScale","linear","draw","_drawer2","bind","_context2","zoomInstance","updateZoom","arguments","_zoom2","ordinal","map","timeBounds","_configurable2","Zoom","toReturn","round","_extends","assign","target","source","key","prototype","_configurable","_config","_config2","_drawer","_context","_zoom","chart","tickFormatData","t","multi","numTicks","orient","ticks","_classCallCheck","instance","Constructor","TypeError","_typeof","Symbol","iterator","constructor","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","protoProps","staticProps","zoom","callback","_this","ONE_MINUTE","ONE_HOUR","ONE_DAY","ONE_WEEK","ONE_MONTH","grid","sliderScale","log","base","behavior","size","scaleExtent","brush","zoomIn","zoomClick","offsetWidth","zoomOut","console","zoomSlider","offsetHeight","extent","brushed","requestAnimationFrame","property","empty","zoomFilter","factor","target_zoom","duration","center","translate0","l","view","translate","event","interpolateZoom","_this2","transition","tween","_ret","iTranslate","interpolate","iScale","v","Extent","getTime","oldRange","newRange","fromTime","toTime","curZoom","cur_width","getRange","startDiff","getScale","targetFunction","configure","item"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,OACA,kBAAAC,gBAAAC,IACAD,QAAA,MAAAJ,GACA,gBAAAC,SACAA,QAAA,SAAAD,EAAAG,QAAA,OAEAJ,EAAA,SAAAC,EAAAD,EAAA,KACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,GAE/BA,EAAoB,GACpBP,EAAOD,QAAUQ,EAAoB,KAKhC,SAASP,EAAQD,GE9DvBC,EAAAD,QAAAM,GFoEM,SAASL,EAAQD,EAASQ,GAE/B,YAMA,SAASS,GAAuBC,GAAO,MAAOA,IAAOA,EAAIC,WAAaD,GAAQE,UAASF,GG5ExF,GAAAG,GAAAb,EAAA,GH0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ZO,EAAcP,EAAO,KAC9BO,EAAcP,EAAO,IAGvBiC,GAAazR,KAAK8E,OAAOiB,EAAEoB,SAAS,GAAKiK,IAAazP,EAAQ4P,GAE9DlB,GAAaoB,EAEbpB,GAA0BN,EAAcuB,EAExCtR,KAAKuQ,iBAAiBF,EAAW,GAAIN,EAAaC,OZ4oB5C/B,IAGTtO,cYt1BoBsO,GZ01Bf,SAASrO,EAAQD,EAASQ,Ga51BhC,YAEA,SAAA0N,GAAA8D,EAAAzQ,GAEA,QAAA0Q,GAAAC,GACA,gBAAAnN,GACA,MAAA0G,WAAA1H,QACAxC,EAAA2Q,GAAAnN,EAEAiN,GAHAzQ,EAAA2Q,IAOA,OAAAA,KAAA3Q,GACAyQ,EAAAE,GAAAD,EAAAC,GAKAjS,EAAAD,QAAAkO,Gbw2BM,SAASjO,EAAQD","file":"timeline.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"d3\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"d3\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"timeline\"] = factory(require(\"d3\"));\n\telse\n\t\troot[\"timeline\"] = factory(root[\"d3\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t__webpack_require__(9);\n\tmodule.exports = __webpack_require__(13);\n\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tvar config = {\n\t start: new Date(0),\n\t end: new Date(),\n\t contextStart: null,\n\t contextEnd: null,\n\t minScale: 0,\n\t maxScale: Infinity,\n\t width: null,\n\t padding: {\n\t top: 30, //must be at least 24 for marker to display properly\n\t left: 40,\n\t bottom: 40,\n\t right: 40\n\t },\n\t lineHeight: 40,\n\t labelWidth: 140,\n\t sliderWidth: 30,\n\t contextHeight: 50,\n\t locale: null,\n\t axisFormat: null,\n\t tickFormat: [['.%L', function (d) {\n\t return d.getMilliseconds();\n\t }], [':%S', function (d) {\n\t return d.getSeconds();\n\t }], ['%I:%M', function (d) {\n\t return d.getMinutes();\n\t }], ['%I %p', function (d) {\n\t return d.getHours();\n\t }], ['%b %d', function (d) {\n\t return d.getMonth() && d.getDate();\n\t }], ['%b', function (d) {\n\t return d.getMonth();\n\t }], ['%Y', function () {\n\t return true;\n\t }]],\n\t eventHover: null,\n\t eventZoom: null,\n\t eventClick: null,\n\t eventLineColor: function eventLineColor(d, i) {\n\t switch (i % 5) {\n\t case 0:\n\t return \"#00659c\";\n\t case 1:\n\t return \"#0088ce\";\n\t case 2:\n\t return \"#3f9c35\";\n\t case 3:\n\t return \"#ec7a08\";\n\t case 4:\n\t return \"#cc0000\";\n\t }\n\t },\n\t eventColor: null,\n\t eventShape: function eventShape(d) {\n\t if (d.hasOwnProperty(\"events\")) {\n\t return '\\uF140';\n\t } else {\n\t return '\\uF111';\n\t }\n\t },\n\t eventPopover: function eventPopover(d) {\n\t var popover = '';\n\t if (d.hasOwnProperty(\"events\")) {\n\t popover = 'Group of ' + d.events.length + ' events';\n\t } else {\n\t for (var i in d.details) {\n\t popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n\t }\n\t popover = popover + 'Date: ' + d.date;\n\t }\n\t return popover;\n\t },\n\t marker: true,\n\t context: true,\n\t slider: true,\n\t eventGrouping: 60000 };\n\t\n\tconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : _d2.default.time.format('%a %x %I:%M %p');\n\t\n\tmodule.exports = config;\n\n/***/ },\n/* 3 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _xAxis = __webpack_require__(10);\n\t\n\tvar _xAxis2 = _interopRequireDefault(_xAxis);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (axesContainer, scales, configuration, dimensions) {\n\t return function (data) {\n\t var axis = function axis(scope, scale) {\n\t var selection = axesContainer.selectAll('.timeline-pf-x-axis.' + scope).data([{}]);\n\t\n\t selection.enter().append('g').classed('timeline-pf-x-axis', true).classed(scope, true).call((0, _xAxis2.default)(scale, configuration)).attr('transform', 'translate(0,' + (scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40) + ')');\n\t\n\t selection.call((0, _xAxis2.default)(scale, configuration, dimensions.width));\n\t\n\t selection.exit().remove();\n\t };\n\t\n\t axis('focus', scales.x);\n\t\n\t if (configuration.context) {\n\t axis('context', scales.ctx);\n\t }\n\t };\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, scales, dimensions, configuration, data) {\n\t\n\t var contextContainer = svg.append(\"g\").classed('timeline-pf-context', true).attr('width', dimensions.width).attr('height', dimensions.ctxHeight).attr('clip-path', 'url(#timeline-pf-context-brush-clipper)').attr(\"transform\", 'translate(' + (configuration.padding.left + configuration.labelWidth) + ',' + (configuration.padding.top + dimensions.height + 40) + ')');\n\t\n\t var counts = [];\n\t var roundTo = 3600000; //one hour\n\t var barWidth = Math.ceil(roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0]) * dimensions.width);\n\t\n\t countEvents(data, roundTo, counts);\n\t counts.sort(function (a, b) {\n\t if (a.date < b.date) {\n\t return -1;\n\t }\n\t if (a.date > b.date) {\n\t return 1;\n\t }\n\t return 0;\n\t });\n\t scales.cty.domain([0, _d2.default.max(counts, function (d) {\n\t return d.count;\n\t })]);\n\t\n\t contextContainer.selectAll(\".timeline-pf-bar\").data(counts).enter().append(\"rect\").attr(\"class\", \"timeline-pf-bar\").attr(\"x\", function (d) {\n\t return scales.ctx(d.date);\n\t }).attr(\"y\", function (d) {\n\t return scales.cty(d.count);\n\t }).attr(\"width\", barWidth).attr(\"height\", function (d) {\n\t return dimensions.ctxHeight - scales.cty(d.count);\n\t });\n\t\n\t contextContainer.append(\"g\").attr(\"class\", \"timeline-pf-brush\");\n\t};\n\t\n\tfunction countEvents(data, toRoundTo, counts) {\n\t var temp = {};\n\t for (var i in data) {\n\t for (var j in data[i].data) {\n\t var rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t temp[rounded] = temp[rounded] + 1 || 1;\n\t }\n\t }\n\t for (var k in temp) {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t counts.push({ 'date': tempDate, 'count': temp[k] });\n\t }\n\t};\n\n/***/ },\n/* 5 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (svg, scales, configuration) {\n\t return function dropsSelector(data) {\n\t var dropLines = svg.selectAll('.timeline-pf-drop-line').data(data);\n\t\n\t dropLines.enter().append('g').classed('timeline-pf-drop-line', true).attr('transform', function (d, idx) {\n\t return 'translate(0, ' + (scales.y(idx) + configuration.lineHeight / 2) + ')';\n\t }).attr('fill', configuration.eventLineColor);\n\t\n\t dropLines.each(function dropLineDraw(drop) {\n\t\n\t var drops = d3.select(this).selectAll('.timeline-pf-drop').data(drop.data);\n\t\n\t drops.attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t });\n\t\n\t var shape = drops.enter().append('text').classed('timeline-pf-drop', true).classed('timeline-pf-event-group', function (d) {\n\t return d.hasOwnProperty(\"events\") ? true : false;\n\t }).attr('transform', function (d) {\n\t return 'translate(' + scales.x(d.date) + ')';\n\t }).attr('fill', configuration.eventColor).attr('text-anchor', 'middle').attr('data-toggle', 'popover').attr('data-html', 'true').attr('data-content', configuration.eventPopover).attr('dominant-baseline', 'central').text(configuration.eventShape);\n\t\n\t if (configuration.eventClick) {\n\t shape.on('click', configuration.eventClick);\n\t }\n\t\n\t if (configuration.eventHover) {\n\t shape.on('mouseover', configuration.eventHover);\n\t }\n\t\n\t // unregister previous event handlers to prevent from memory leaks\n\t drops.exit().on('click', null).on('mouseover', null);\n\t\n\t drops.exit().remove();\n\t });\n\t\n\t dropLines.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 6 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _axes = __webpack_require__(3);\n\t\n\tvar _axes2 = _interopRequireDefault(_axes);\n\t\n\tvar _drops = __webpack_require__(5);\n\t\n\tvar _drops2 = _interopRequireDefault(_drops);\n\t\n\tvar _labels = __webpack_require__(7);\n\t\n\tvar _labels2 = _interopRequireDefault(_labels);\n\t\n\tvar _marker = __webpack_require__(8);\n\t\n\tvar _marker2 = _interopRequireDefault(_marker);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (svg, dimensions, scales, configuration) {\n\t var defs = svg.append('defs');\n\t defs.append('clipPath').attr('id', 'timeline-pf-drops-container-clipper').append('rect').attr('id', 'timeline-pf-drops-container-rect').attr('x', 0).attr('y', 0).attr('width', dimensions.width).attr('height', dimensions.height);\n\t\n\t if (configuration.context) {\n\t defs.append('clipPath').attr('id', 'timeline-pf-context-brush-clipper').append('polygon').attr('points', '0,0 ' + dimensions.width + ',0 ' + (dimensions.width + configuration.sliderWidth) + ',' + dimensions.ctxHeight / 2 + ' ' + dimensions.width + ',' + dimensions.ctxHeight + ' 0,' + dimensions.ctxHeight + ' ' + -configuration.sliderWidth + ',' + dimensions.ctxHeight / 2);\n\t }\n\t\n\t var pattern = defs.append('pattern').attr('class', 'timeline-pf-grid-stripes').attr('id', 'timeline-pf-grid-stripes').attr('width', dimensions.width).attr('height', configuration.lineHeight * 2).attr('patternUnits', 'userSpaceOnUse');\n\t pattern.append('rect').attr('width', dimensions.width).attr('height', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', configuration.lineHeight).attr('y2', configuration.lineHeight);\n\t pattern.append('line').attr('x1', 0).attr('x2', dimensions.width).attr('y1', '1px').attr('y2', '1px');\n\t\n\t var gridContainer = svg.append('g').classed('timeline-pf-grid', true).attr('fill', 'url(#timeline-pf-grid-stripes)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var labelsContainer = svg.append('g').classed('timeline-pf-labels', true).attr('transform', 'translate(' + configuration.padding.left + ', ' + configuration.padding.top + ')');\n\t\n\t var axesContainer = svg.append('g').classed('timeline-pf-axes', true).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t var dropsContainer = svg.append('g').classed('timeline-pf-drops-container', true).attr('clip-path', 'url(#timeline-pf-drops-container-clipper)').attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t if (configuration.marker) {\n\t var stampContainer = svg.append('g').classed('timeline-pf-timestamp', true).attr('height', 30).attr('transform', 'translate(' + (configuration.padding.left + configuration.labelWidth) + ', ' + configuration.padding.top + ')');\n\t\n\t (0, _marker2.default)(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n\t }\n\t\n\t var axes = (0, _axes2.default)(axesContainer, scales, configuration, dimensions);\n\t var labels = (0, _labels2.default)(labelsContainer, scales, configuration);\n\t var drops = (0, _drops2.default)(dropsContainer, scales, configuration);\n\t\n\t return function (data) {\n\t drops(data);\n\t labels(data);\n\t axes(data);\n\t };\n\t};\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (container, scales, config) {\n\t return function (data) {\n\t var labels = container.selectAll('.timeline-pf-label').data(data);\n\t\n\t var countEvents = function countEvents(data) {\n\t var count = 0;\n\t for (var i = 0; i < data.length; i++) {\n\t if (data[i].hasOwnProperty(\"events\")) {\n\t count += data[i].events.length;\n\t } else {\n\t count++;\n\t }\n\t }\n\t return count;\n\t };\n\t var text = function text(d) {\n\t var count = countEvents(d.data);\n\t if (d.name === undefined || d.name === '') {\n\t return count + ' Events';\n\t }\n\t return d.name + (count >= 0 ? ' (' + count + ')' : '');\n\t };\n\t\n\t labels.text(text);\n\t\n\t labels.enter().append('text').classed('timeline-pf-label', true).attr('transform', function (d, idx) {\n\t return 'translate(' + (config.labelWidth - 20) + ' ' + (scales.y(idx) + config.lineHeight / 2) + ')';\n\t }).attr('dominant-baseline', 'central').attr('text-anchor', 'end').text(text);\n\t\n\t labels.exit().remove();\n\t };\n\t};\n\n/***/ },\n/* 8 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\texports.default = function (gridContainer, stampContainer, scales, dimensions, dateFormat) {\n\t gridContainer.append('rect').attr('width', dimensions.width).attr('height', dimensions.height).on(\"mouseover\", function () {\n\t marker.style(\"display\", null);\n\t timeStamp.style(\"display\", null);\n\t timeBox.style(\"display\", null);\n\t }).on(\"mouseout\", function () {\n\t marker.style(\"display\", \"none\");\n\t timeStamp.style(\"display\", \"none\");\n\t timeBox.style(\"display\", \"none\");\n\t }).on('mousemove', moveMarker);\n\t\n\t var marker = gridContainer.append('line').classed('timeline-pf-marker', true).attr('y1', 0).attr('y2', dimensions.height);\n\t\n\t var domain = scales.x.domain();\n\t\n\t var timeBox = stampContainer.append('rect').attr('height', '24').attr('width', '150').style('display', 'none');\n\t\n\t var timeStamp = stampContainer.append('text').text(dateFormat(domain[1])).attr('transform', 'translate(' + scales.x.range()[1] + ')').attr('text-anchor', 'middle');\n\t\n\t function moveMarker() {\n\t var pos = _d2.default.mouse(gridContainer[0][0])[0];\n\t marker.attr('transform', 'translate(' + pos + ')');\n\t timeBox.attr('transform', 'translate(' + (pos - 75) + ', -25)');\n\t timeStamp.attr('transform', 'translate(' + pos + ', -9)').text(dateFormat(scales.x.invert(pos)));\n\t }\n\t};\n\n/***/ },\n/* 9 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tvar _configurable = __webpack_require__(12);\n\t\n\tvar _configurable2 = _interopRequireDefault(_configurable);\n\t\n\tvar _config = __webpack_require__(2);\n\t\n\tvar _config2 = _interopRequireDefault(_config);\n\t\n\tvar _drawer = __webpack_require__(6);\n\t\n\tvar _drawer2 = _interopRequireDefault(_drawer);\n\t\n\tvar _context = __webpack_require__(4);\n\t\n\tvar _context2 = _interopRequireDefault(_context);\n\t\n\tvar _zoom = __webpack_require__(11);\n\t\n\tvar _zoom2 = _interopRequireDefault(_zoom);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction timeline() {\n\t var config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\t\n\t var finalConfiguration = _extends({}, _config2.default, config);\n\t var zoomInstance = new _zoom2.default();\n\t\n\t var yScale = function yScale(data) {\n\t return _d2.default.scale.ordinal().domain(data.map(function (d) {\n\t return d.name;\n\t })).range(data.map(function (d, i) {\n\t return i * finalConfiguration.lineHeight;\n\t }));\n\t };\n\t\n\t var xScale = function xScale(width, timeBounds) {\n\t return _d2.default.time.scale().range([0, width]).domain(timeBounds);\n\t };\n\t\n\t function timelineGraph(selection) {\n\t selection.each(function selector(data) {\n\t\n\t var ungroupedData = data;\n\t data = groupEvents(data, finalConfiguration.eventGrouping);\n\t\n\t finalConfiguration.lineHeight = data.length <= 3 ? 80 : 40;\n\t finalConfiguration.contextStart = finalConfiguration.contextStart || _d2.default.min(getDates(data));\n\t finalConfiguration.contextEnd = finalConfiguration.contextEnd || finalConfiguration.end;\n\t\n\t _d2.default.select(this).select('.timeline-pf-chart').remove();\n\t _d2.default.select(this).selectAll('.timeline-pf-zoom').remove();\n\t\n\t var SCALEHEIGHT = 40;\n\t var outer_width = finalConfiguration.width || selection.node().clientWidth;\n\t var height = data.length * finalConfiguration.lineHeight;\n\t\n\t var dimensions = {\n\t width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - (finalConfiguration.slider ? finalConfiguration.sliderWidth : 0),\n\t height: height,\n\t ctxHeight: finalConfiguration.contextHeight,\n\t outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + (finalConfiguration.context ? finalConfiguration.contextHeight + SCALEHEIGHT : 0)\n\t };\n\t var scales = {\n\t x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n\t y: yScale(data),\n\t ctx: xScale(dimensions.width, [finalConfiguration.contextStart, finalConfiguration.contextEnd]),\n\t cty: _d2.default.scale.linear().range([dimensions.ctxHeight, 0])\n\t };\n\t\n\t var svg = _d2.default.select(this).append('svg').classed('timeline-pf-chart', true).attr({\n\t width: outer_width,\n\t height: dimensions.outer_height\n\t });\n\t var draw = (0, _drawer2.default)(svg, dimensions, scales, finalConfiguration).bind(selection);\n\t\n\t draw(data);\n\t\n\t if (finalConfiguration.context) {\n\t (0, _context2.default)(svg, scales, dimensions, finalConfiguration, ungroupedData);\n\t }\n\t\n\t zoomInstance.updateZoom(_d2.default.select(this), dimensions, scales, finalConfiguration, data, draw);\n\t });\n\t }\n\t\n\t (0, _configurable2.default)(timelineGraph, finalConfiguration);\n\t timelineGraph.Zoom = zoomInstance;\n\t return timelineGraph;\n\t}\n\t\n\t_d2.default.chart = _d2.default.chart || {};\n\t_d2.default.chart.timeline = timeline;\n\t\n\tmodule.exports = timeline;\n\t\n\tfunction getDates(data) {\n\t var toReturn = [];\n\t for (var i = 0; i < data.length; i++) {\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t toReturn.push(data[i].data[j].date);\n\t }\n\t }\n\t return toReturn;\n\t}\n\t\n\tfunction groupEvents(data, toRoundTo) {\n\t var rounded = void 0,\n\t temp = {},\n\t toReturn = [];\n\t\n\t for (var i = 0; i < data.length; i++) {\n\t toReturn[i] = {};\n\t toReturn[i].name = data[i].name;\n\t toReturn[i].data = [];\n\t for (var j = 0; j < data[i].data.length; j++) {\n\t rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n\t if (temp[rounded] === undefined) {\n\t temp[rounded] = [];\n\t }\n\t temp[rounded].push(data[i].data[j]);\n\t }\n\t for (var k in temp) {\n\t if (temp[k].length === 1) {\n\t toReturn[i].data.push(temp[k][0]);\n\t } else {\n\t var tempDate = new Date();\n\t tempDate.setTime(+k);\n\t toReturn[i].data.push({ 'date': tempDate, 'events': temp[k] });\n\t }\n\t }\n\t temp = {};\n\t }\n\t return toReturn;\n\t}\n\n/***/ },\n/* 10 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\texports.default = function (xScale, configuration, width) {\n\t var tickFormatData = configuration.tickFormat.map(function (t) {\n\t return t.slice(0);\n\t });\n\t var tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : _d2.default.time.format.multi(tickFormatData);\n\t var numTicks = Math.round(width / 70);\n\t var axis = _d2.default.svg.axis().scale(xScale).orient('bottom').ticks(numTicks).tickFormat(tickFormat);\n\t\n\t if (typeof configuration.axisFormat === 'function') {\n\t configuration.axisFormat(axis);\n\t }\n\t\n\t return axis;\n\t};\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\n/***/ },\n/* 11 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tObject.defineProperty(exports, \"__esModule\", {\n\t value: true\n\t});\n\t\n\tvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\t\n\tvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\t\n\tvar _d = __webpack_require__(1);\n\t\n\tvar _d2 = _interopRequireDefault(_d);\n\t\n\tfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\t\n\tfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\t\n\tvar zoom = function () {\n\t function zoom() {\n\t _classCallCheck(this, zoom);\n\t }\n\t\n\t _createClass(zoom, [{\n\t key: 'updateZoom',\n\t value: function updateZoom(container, dimensions, scales, configuration, data, callback) {\n\t var _this = this;\n\t\n\t this.ONE_MINUTE = 60 * 1000;\n\t this.ONE_HOUR = this.ONE_MINUTE * 60;\n\t this.ONE_DAY = this.ONE_HOUR * 24;\n\t this.ONE_WEEK = this.ONE_DAY * 7;\n\t this.ONE_MONTH = this.ONE_DAY * 30;\n\t\n\t this.grid = _d2.default.select('.timeline-pf-grid');\n\t this.dimensions = dimensions;\n\t this.scales = scales;\n\t this.configuration = configuration;\n\t this.data = data;\n\t this.callback = callback;\n\t this.sliderScale = _d2.default.scale.log().domain([configuration.minScale, configuration.maxScale]).range([configuration.minScale, configuration.maxScale]).base(2);\n\t this.zoom = _d2.default.behavior.zoom().size([dimensions.width, dimensions.height]).scaleExtent([configuration.minScale, configuration.maxScale]).x(scales.x);\n\t this.brush = null;\n\t\n\t if (configuration.slider) {\n\t var zoomIn = container.append('button').attr('type', 'button').attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in').attr('id', 'timeline-pf-zoom-in').style('top', configuration.padding.top + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t zoomIn.style('left', configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomIn.node().offsetWidth) + 'px').append('i').attr('class', 'fa fa-plus').attr('id', 'timeline-pf-zoom-in-icon');\n\t\n\t var zoomOut = container.append('button').attr('type', 'button').attr('class', 'btn btn-default timeline-pf-zoom').attr('id', 'timeline-pf-zoom-out').style('top', configuration.padding.top + dimensions.height - 26 + 'px').on('click', function () {\n\t _this.zoomClick();\n\t });\n\t console.log(zoomIn.node().offsetWidth);\n\t zoomOut.style('left', configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomOut.node().offsetWidth) + 'px').append('i').attr('class', 'fa fa-minus').attr('id', 'timeline-pf-zoom-out-icon');\n\t\n\t var zoomSlider = container.append('input').attr('type', 'range').attr('class', 'timeline-pf-zoom timeline-pf-slider').attr('id', 'timeline-pf-slider').style('width', dimensions.height - zoomIn.node().offsetHeight * 2 + 'px').attr('value', this.sliderScale(this.zoom.scale())).attr('min', configuration.minScale).attr('max', configuration.maxScale).attr('step', 0.1).on('input', function () {\n\t _this.zoomClick();\n\t });\n\t zoomSlider.style('top', configuration.padding.top + (dimensions.height - zoomIn.node().offsetHeight * 2) / 2 + zoomIn.node().offsetHeight - zoomSlider.node().offsetHeight / 2 + 'px').style('left', configuration.padding.left + configuration.labelWidth + dimensions.width + configuration.sliderWidth - (zoomIn.node().offsetWidth - zoomSlider.node().offsetHeight) / 2 - zoomSlider.node().offsetWidth / 2 + 'px');\n\t }\n\t\n\t if (configuration.context) {\n\t this.brush = _d2.default.svg.brush().x(scales.ctx).extent(scales.x.domain()).on(\"brush\", function () {\n\t _this.brushed();\n\t });\n\t\n\t container.select('.timeline-pf-brush').call(this.brush).selectAll(\"rect\").attr(\"height\", dimensions.ctxHeight);\n\t }\n\t\n\t if (configuration.eventZoom) {\n\t this.zoom.on('zoomend', configuration.eventZoom);\n\t }\n\t\n\t this.zoom.on('zoom', function () {\n\t requestAnimationFrame(function () {\n\t return callback(data);\n\t });\n\t if (configuration.slider) {\n\t container.select('#timeline-pf-slider').property('value', _this.sliderScale(_this.zoom.scale()));\n\t }\n\t if (configuration.context) {\n\t _this.brush.extent(_this.scales.x.domain());\n\t container.select('.timeline-pf-brush').call(_this.brush);\n\t }\n\t });\n\t return this.grid.call(this.zoom).on(\"dblclick.zoom\", null);\n\t }\n\t }, {\n\t key: 'brushed',\n\t value: function brushed() {\n\t if (this.brush.empty() !== true) {\n\t var extent = this.brush.extent();\n\t this.zoomFilter(extent[0], extent[1], 0);\n\t }\n\t }\n\t }, {\n\t key: 'zoomClick',\n\t value: function zoomClick() {\n\t var factor = 0.5,\n\t target_zoom = 1,\n\t duration = 0,\n\t center = this.dimensions.width / 2,\n\t extent = this.zoom.scaleExtent(),\n\t translate0 = void 0,\n\t l = void 0,\n\t view = {\n\t x: this.zoom.translate()[0],\n\t k: this.zoom.scale()\n\t };\n\t switch (_d2.default.event.target.id) {\n\t case 'timeline-pf-zoom-in-icon':\n\t case 'timeline-pf-zoom-in':\n\t target_zoom = this.zoom.scale() * (1 + factor);\n\t duration = 100;\n\t break;\n\t case 'timeline-pf-zoom-out-icon':\n\t case 'timeline-pf-zoom-out':\n\t target_zoom = this.zoom.scale() * (1 + factor * -1);\n\t duration = 100;\n\t break;\n\t case 'timeline-pf-slider':\n\t target_zoom = this.sliderScale.invert(_d2.default.event.target.value);\n\t break;\n\t default:\n\t target_zoom = this.zoom.scale();\n\t }\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t translate0 = (center - view.x) / view.k;\n\t view.k = target_zoom;\n\t l = translate0 * view.k + view.x;\n\t\n\t view.x += center - l;\n\t this.interpolateZoom([view.x, 0], view.k, duration);\n\t }\n\t }, {\n\t key: 'interpolateZoom',\n\t value: function interpolateZoom(translate, scale, duration) {\n\t var _this2 = this;\n\t\n\t return _d2.default.transition().duration(duration).tween(\"zoom\", function () {\n\t if (_this2.zoom) {\n\t var _ret = function () {\n\t var iTranslate = _d2.default.interpolate(_this2.zoom.translate(), translate),\n\t iScale = _d2.default.interpolate(_this2.zoom.scale(), scale);\n\t return {\n\t v: function v(t) {\n\t _this2.zoom.scale(iScale(t)).translate(iTranslate(t));\n\t _this2.zoom.event(_this2.grid);\n\t }\n\t };\n\t }();\n\t\n\t if ((typeof _ret === 'undefined' ? 'undefined' : _typeof(_ret)) === \"object\") return _ret.v;\n\t }\n\t });\n\t }\n\t }, {\n\t key: 'getRange',\n\t value: function getRange(Extent) {\n\t return Extent[1].getTime() - Extent[0].getTime();\n\t }\n\t }, {\n\t key: 'getScale',\n\t value: function getScale(oldRange, newRange) {\n\t return oldRange / newRange;\n\t }\n\t }, {\n\t key: 'zoomFilter',\n\t value: function zoomFilter(fromTime, toTime) {\n\t var duration = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;\n\t\n\t var range = toTime - fromTime,\n\t width = this.dimensions.width,\n\t extent = this.zoom.scaleExtent(),\n\t translate = this.zoom.translate()[0],\n\t curZoom = this.zoom.scale(),\n\t target_zoom = this.zoom.scale(),\n\t cur_width = this.getRange(this.scales.x.domain()),\n\t startDiff = void 0;\n\t\n\t target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\t\n\t if (target_zoom < extent[0]) {\n\t target_zoom = extent[0];\n\t } else if (target_zoom > extent[1]) {\n\t target_zoom = extent[1];\n\t }\n\t\n\t startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\t\n\t translate += startDiff;\n\t\n\t translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\t\n\t this.interpolateZoom([translate, 0], target_zoom, duration);\n\t }\n\t }]);\n\t\n\t return zoom;\n\t}();\n\t\n\texports.default = zoom;\n\n/***/ },\n/* 12 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t'use strict';\n\t\n\tfunction configurable(targetFunction, config) {\n\t\n\t function configure(item) {\n\t return function(value) {\n\t if (!arguments.length) return config[item];\n\t config[item] = value;\n\t\n\t return targetFunction;\n\t };\n\t }\n\t\n\t for (var item in config) {\n\t targetFunction[item] = configure(item);\n\t }\n\t}\n\t\n\tif(true) {\n\t module.exports = configurable;\n\t} else if ('function' == typeof define && define.amd) {\n\t define([], configurable);\n\t} else {\n\t window.configurable = configurable;\n\t}\n\n\n/***/ },\n/* 13 */\n/***/ function(module, exports) {\n\n\t// removed by extract-text-webpack-plugin\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** timeline.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap bf5979521f0b0340eeb9\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"d3\"\n ** module id = 1\n ** module chunks = 0\n **/","import d3 from 'd3';\n\nconst config = {\n start: new Date(0),\n end: new Date(),\n contextStart: null,\n contextEnd: null,\n minScale: 0,\n maxScale: Infinity,\n width: null,\n padding: {\n top: 30, //must be at least 24 for marker to display properly\n left: 40,\n bottom: 40,\n right: 40\n },\n lineHeight: 40,\n labelWidth: 140,\n sliderWidth: 30,\n contextHeight: 50,\n locale: null,\n axisFormat: null,\n tickFormat: [\n ['.%L', (d) => d.getMilliseconds()],\n [':%S', (d) => d.getSeconds()],\n ['%I:%M', (d) => d.getMinutes()],\n ['%I %p', (d) => d.getHours()],\n ['%b %d', (d) => d.getMonth() && d.getDate()],\n ['%b', (d) => d.getMonth()],\n ['%Y', () => true]\n ],\n eventHover: null,\n eventZoom: null,\n eventClick: null,\n eventLineColor: (d, i) => {\n switch (i % 5) {\n case 0:\n return \"#00659c\";\n case 1:\n return \"#0088ce\";\n case 2:\n return \"#3f9c35\";\n case 3:\n return \"#ec7a08\";\n case 4:\n return \"#cc0000\";\n }\n },\n eventColor: null,\n eventShape: (d) => {\n if(d.hasOwnProperty(\"events\")) {\n return '\\uf140';\n } else {\n return '\\uf111';\n }\n },\n eventPopover: (d) => {\n var popover = '';\n if(d.hasOwnProperty(\"events\")) {\n popover = `Group of ${d.events.length} events`\n } else {\n for (var i in d.details) {\n popover = popover + i.charAt(0).toUpperCase() + i.slice(1) + ': ' + d.details[i] + '
';\n }\n popover = popover + 'Date: ' + d.date;\n }\n return popover;\n },\n marker: true,\n context: true,\n slider: true,\n eventGrouping: 60000, //one minute\n};\n\nconfig.dateFormat = config.locale ? config.locale.timeFormat('%a %x %I:%M %p') : d3.time.format('%a %x %I:%M %p');\n\nmodule.exports = config;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/config.js\n **/","import xAxis from '../xAxis';\n\nexport default (axesContainer, scales, configuration, dimensions) => data => {\n const axis = (scope, scale) => {\n const selection = axesContainer.selectAll(`.timeline-pf-x-axis.${scope}`).data([{}]);\n\n selection.enter()\n .append('g')\n .classed('timeline-pf-x-axis', true)\n .classed(scope, true)\n .call(xAxis(scale, configuration))\n .attr('transform', `translate(0,${scope === 'focus' ? dimensions.height : dimensions.height + dimensions.ctxHeight + 40})`);\n\n selection.call(xAxis(scale, configuration, dimensions.width));\n\n selection.exit().remove();\n };\n\n axis('focus', scales.x);\n\n if (configuration.context) {\n axis('context', scales.ctx);\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/axes.js\n **/","import d3 from 'd3';\n\nexport default (svg, scales, dimensions, configuration, data) => {\n\n const contextContainer = svg.append(\"g\")\n .classed('timeline-pf-context', true)\n .attr('width', dimensions.width)\n .attr('height', dimensions.ctxHeight)\n .attr('clip-path', 'url(#timeline-pf-context-brush-clipper)')\n .attr(\"transform\", `translate(${configuration.padding.left + configuration.labelWidth},${configuration.padding.top + dimensions.height + 40})`);\n\n let counts = [];\n let roundTo = 3600000;//one hour\n let barWidth = Math.ceil((roundTo / (scales.ctx.domain()[1] - scales.ctx.domain()[0])) * dimensions.width);\n\n countEvents(data, roundTo, counts);\n counts.sort((a,b) => {\n if(a.date < b.date) {\n return -1;\n }\n if(a.date > b.date) {\n return 1;\n }\n return 0;\n });\n scales.cty.domain([0, d3.max(counts, (d) => {return d.count;})]);\n\n contextContainer.selectAll(\".timeline-pf-bar\")\n .data(counts)\n .enter().append(\"rect\")\n .attr(\"class\", \"timeline-pf-bar\")\n .attr(\"x\", d => {return scales.ctx(d.date); })\n .attr(\"y\", d => {return scales.cty(d.count); })\n .attr(\"width\", barWidth)\n .attr(\"height\", d => { return dimensions.ctxHeight - scales.cty(d.count); });\n\n contextContainer.append(\"g\")\n .attr(\"class\", \"timeline-pf-brush\");\n\n};\n\nfunction countEvents(data, toRoundTo, counts) {\n let temp = {};\n for(let i in data) {\n for (let j in data[i].data) {\n let rounded = Math.floor(data[i].data[j].date / toRoundTo) * toRoundTo;\n temp[rounded] = temp[rounded] + 1 || 1;\n }\n }\n for(let k in temp) {\n let tempDate = new Date();\n tempDate.setTime(+k);\n counts.push({'date': tempDate, 'count': temp[k]});\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/context.js\n **/","export default (svg, scales, configuration) => function dropsSelector(data) {\n const dropLines = svg.selectAll('.timeline-pf-drop-line').data(data);\n\n dropLines.enter()\n .append('g')\n .classed('timeline-pf-drop-line', true)\n .attr('transform', (d, idx) => `translate(0, ${scales.y(idx) + (configuration.lineHeight/2)})`)\n .attr('fill', configuration.eventLineColor);\n\n dropLines.each(function dropLineDraw(drop) {\n\n const drops = d3.select(this).selectAll('.timeline-pf-drop').data(drop.data);\n\n drops.attr('transform', (d) => `translate(${scales.x(d.date)})`);\n\n const shape = drops.enter()\n .append('text')\n .classed('timeline-pf-drop', true)\n .classed('timeline-pf-event-group', (d) => {return d.hasOwnProperty(\"events\") ? true : false})\n .attr('transform', (d) => `translate(${scales.x(d.date)})`)\n .attr('fill', configuration.eventColor)\n .attr('text-anchor', 'middle')\n .attr('data-toggle', 'popover')\n .attr('data-html', 'true')\n .attr('data-content', configuration.eventPopover)\n .attr('dominant-baseline', 'central')\n .text(configuration.eventShape);\n\n if (configuration.eventClick) {\n shape.on('click', configuration.eventClick);\n }\n\n if (configuration.eventHover) {\n shape.on('mouseover', configuration.eventHover);\n }\n\n // unregister previous event handlers to prevent from memory leaks\n drops.exit()\n .on('click', null)\n .on('mouseover', null);\n\n drops.exit().remove();\n });\n\n dropLines.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/drops.js\n **/","import d3 from 'd3';\nimport axesFactory from './axes';\nimport dropsFactory from './drops';\nimport labelsFactory from './labels';\nimport markerFactory from './marker';\n\nexport default (svg, dimensions, scales, configuration) => {\n const defs = svg.append('defs');\n defs.append('clipPath')\n .attr('id', 'timeline-pf-drops-container-clipper')\n .append('rect')\n .attr('id', 'timeline-pf-drops-container-rect')\n .attr('x', 0)\n .attr('y', 0)\n .attr('width', dimensions.width)\n .attr('height', dimensions.height);\n\n if(configuration.context) {\n defs.append('clipPath')\n .attr('id', 'timeline-pf-context-brush-clipper')\n .append('polygon')\n .attr('points', `0,0 ${dimensions.width},0 ${dimensions.width + configuration.sliderWidth},${dimensions.ctxHeight/2} ${dimensions.width},${dimensions.ctxHeight} 0,${dimensions.ctxHeight} ${-configuration.sliderWidth},${dimensions.ctxHeight/2}`);\n }\n\n const pattern = defs.append('pattern')\n .attr('class', 'timeline-pf-grid-stripes')\n .attr('id', 'timeline-pf-grid-stripes')\n .attr('width', dimensions.width)\n .attr('height', (configuration.lineHeight) * 2)\n .attr('patternUnits', 'userSpaceOnUse');\n pattern.append('rect')\n .attr('width', dimensions.width)\n .attr('height', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', configuration.lineHeight)\n .attr('y2', configuration.lineHeight);\n pattern.append('line')\n .attr('x1', 0)\n .attr('x2', dimensions.width)\n .attr('y1', '1px')\n .attr('y2', '1px');\n\n const gridContainer = svg.append('g')\n .classed('timeline-pf-grid', true)\n .attr('fill', 'url(#timeline-pf-grid-stripes)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const labelsContainer = svg.append('g')\n .classed('timeline-pf-labels', true)\n .attr('transform', `translate(${configuration.padding.left}, ${configuration.padding.top})`);\n\n const axesContainer = svg.append('g')\n .classed('timeline-pf-axes', true)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n const dropsContainer = svg.append('g')\n .classed('timeline-pf-drops-container', true)\n .attr('clip-path', 'url(#timeline-pf-drops-container-clipper)')\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n if (configuration.marker) {\n const stampContainer = svg.append('g')\n .classed('timeline-pf-timestamp', true)\n .attr('height', 30)\n .attr('transform', `translate(${configuration.padding.left + configuration.labelWidth}, ${configuration.padding.top})`);\n\n markerFactory(gridContainer, stampContainer, scales, dimensions, configuration.dateFormat);\n }\n\n const axes = axesFactory(axesContainer, scales, configuration, dimensions);\n const labels = labelsFactory(labelsContainer, scales, configuration);\n const drops = dropsFactory(dropsContainer, scales, configuration);\n\n\n return data => {\n drops(data);\n labels(data);\n axes(data);\n };\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/index.js\n **/","export default (container, scales, config) => data => {\n const labels = container.selectAll('.timeline-pf-label').data(data);\n\n const countEvents = data => {\n let count = 0;\n for (let i = 0; i < data.length; i++) {\n if (data[i].hasOwnProperty(\"events\")) {\n count += data[i].events.length;\n } else {\n count++;\n }\n }\n return count\n }\n const text = d => {\n const count = countEvents(d.data);\n if (d.name === undefined || d.name ===''){\n return `${count} Events`;\n }\n return d.name + (count >= 0 ? ` (${count})` : '');\n };\n\n labels.text(text);\n\n labels.enter()\n .append('text')\n .classed('timeline-pf-label', true)\n .attr('transform', (d, idx) => `translate(${config.labelWidth - 20} ${scales.y(idx) + (config.lineHeight/2)})`)\n .attr('dominant-baseline', 'central')\n .attr('text-anchor', 'end')\n .text(text);\n\n labels.exit().remove();\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/labels.js\n **/","import d3 from 'd3';\n\nexport default (gridContainer, stampContainer, scales, dimensions, dateFormat) => {\n gridContainer.append('rect')\n .attr('width', dimensions.width)\n .attr('height', dimensions.height)\n .on(\"mouseover\", function() {\n marker.style(\"display\", null);\n timeStamp.style(\"display\", null);\n timeBox.style(\"display\", null);\n })\n .on(\"mouseout\", function() {\n marker.style(\"display\", \"none\");\n timeStamp.style(\"display\", \"none\");\n timeBox.style(\"display\", \"none\");\n })\n .on('mousemove', moveMarker);\n\n\n var marker = gridContainer.append('line')\n .classed('timeline-pf-marker', true)\n .attr('y1', 0)\n .attr('y2', dimensions.height);\n\n const domain = scales.x.domain();\n\n var timeBox = stampContainer.append('rect')\n .attr('height', '24')\n .attr('width', '150')\n .style('display', 'none');\n\n var timeStamp = stampContainer.append('text')\n .text(dateFormat(domain[1]))\n .attr('transform', `translate(${scales.x.range()[1]})`)\n .attr('text-anchor', 'middle');\n\n function moveMarker() {\n var pos = d3.mouse(gridContainer[0][0])[0]\n marker.attr('transform', `translate(${pos})`);\n timeBox.attr('transform', `translate(${pos - 75}, -25)`);\n timeStamp.attr('transform', `translate(${pos}, -9)`)\n .text(dateFormat(scales.x.invert(pos)));\n\n }\n\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/drawer/marker.js\n **/","import d3 from 'd3';\n\nimport configurable from 'configurable.js';\nimport defaultConfig from './config';\nimport drawer from './drawer';\nimport context from './drawer/context';\nimport Zoom from './zoom';\n\n\nfunction timeline(config = {}) {\n const finalConfiguration = {...defaultConfig, ...config};\n let zoomInstance = new Zoom();\n\n const yScale = (data) => {\n return d3.scale.ordinal()\n .domain(data.map((d) => d.name))\n .range(data.map((d, i) => i * finalConfiguration.lineHeight));\n };\n\n const xScale = (width, timeBounds) => {\n return d3.time.scale()\n .range([0, width])\n .domain(timeBounds);\n };\n\n function timelineGraph(selection) {\n selection.each(function selector(data) {\n\n let ungroupedData = data;\n data = groupEvents(data, finalConfiguration.eventGrouping);\n\n finalConfiguration.lineHeight = (data.length <= 3) ? 80 : 40;\n finalConfiguration.contextStart = finalConfiguration.contextStart || d3.min(getDates(data));\n finalConfiguration.contextEnd = finalConfiguration.contextEnd || finalConfiguration.end;\n\n d3.select(this).select('.timeline-pf-chart').remove();\n d3.select(this).selectAll('.timeline-pf-zoom').remove();\n\n const SCALEHEIGHT = 40;\n let outer_width = finalConfiguration.width || selection.node().clientWidth;\n const height = data.length * finalConfiguration.lineHeight;\n\n const dimensions = {\n width: outer_width - finalConfiguration.padding.right - finalConfiguration.padding.left - finalConfiguration.labelWidth - ((finalConfiguration.slider) ? finalConfiguration.sliderWidth : 0),\n height,\n ctxHeight: finalConfiguration.contextHeight,\n outer_height: height + finalConfiguration.padding.top + finalConfiguration.padding.bottom + ((finalConfiguration.context) ? finalConfiguration.contextHeight + SCALEHEIGHT: 0)\n };\n const scales = {\n x: xScale(dimensions.width, [finalConfiguration.start, finalConfiguration.end]),\n y: yScale(data),\n ctx: xScale(dimensions.width, [finalConfiguration.contextStart, finalConfiguration.contextEnd]),\n cty: d3.scale.linear().range([dimensions.ctxHeight, 0])\n };\n\n const svg = d3.select(this).append('svg')\n .classed('timeline-pf-chart', true)\n .attr({\n width: outer_width,\n height: dimensions.outer_height,\n });\n const draw = drawer(svg, dimensions, scales, finalConfiguration).bind(selection);\n\n draw(data);\n\n if (finalConfiguration.context) {\n context(svg, scales, dimensions, finalConfiguration, ungroupedData);\n }\n\n zoomInstance.updateZoom(d3.select(this), dimensions, scales, finalConfiguration, data, draw);\n\n });\n }\n\n configurable(timelineGraph, finalConfiguration);\n timelineGraph.Zoom = zoomInstance;\n return timelineGraph;\n}\n\nd3.chart = d3.chart || {};\nd3.chart.timeline = timeline;\n\nmodule.exports = timeline;\n\nfunction getDates(data) {\n let toReturn = [];\n for (let i = 0; i < data.length; i++){\n for (let j = 0; j < data[i].data.length; j++){\n toReturn.push(data[i].data[j].date);\n }\n }\n return toReturn;\n}\n\nfunction groupEvents(data, toRoundTo) {\n let rounded,\n temp = {},\n toReturn = [];\n\n for (let i = 0; i < data.length; i++) {\n toReturn[i] = {};\n toReturn[i].name = data[i].name;\n toReturn[i].data = [];\n for (let j = 0; j < data[i].data.length; j++) {\n rounded = Math.round(data[i].data[j].date / toRoundTo) * toRoundTo;\n if (temp[rounded] === undefined) {\n temp[rounded] = [];\n }\n temp[rounded].push(data[i].data[j]);\n }\n for (let k in temp) {\n if (temp[k].length === 1) {\n toReturn[i].data.push(temp[k][0]);\n } else {\n let tempDate = new Date();\n tempDate.setTime(+k);\n toReturn[i].data.push({'date': tempDate,'events': temp[k]});\n }\n }\n temp = {};\n }\n return toReturn;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/timeline.js\n **/","import d3 from 'd3';\n\nexport default function(xScale, configuration, width) {\n const tickFormatData = configuration.tickFormat.map(t => t.slice(0));\n const tickFormat = configuration.locale ? configuration.locale.timeFormat.multi(tickFormatData) : d3.time.format.multi(tickFormatData);\n let numTicks = Math.round(width / 70);\n const axis = d3.svg.axis()\n .scale(xScale)\n .orient('bottom')\n .ticks(numTicks)\n .tickFormat(tickFormat);\n\n if (typeof configuration.axisFormat === 'function') {\n configuration.axisFormat(axis);\n }\n\n return axis;\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/xAxis.js\n **/","import d3 from 'd3';\n\nexport default class zoom {\n\n constructor() {\n }\n\n updateZoom(container, dimensions, scales, configuration, data, callback) {\n this.ONE_MINUTE = 60 * 1000;\n this.ONE_HOUR = this.ONE_MINUTE * 60;\n this.ONE_DAY = this.ONE_HOUR * 24;\n this.ONE_WEEK = this.ONE_DAY * 7;\n this.ONE_MONTH = this.ONE_DAY * 30;\n\n this.grid = d3.select('.timeline-pf-grid');\n this.dimensions = dimensions;\n this.scales = scales;\n this.configuration = configuration;\n this.data = data;\n this.callback = callback;\n this.sliderScale = d3.scale.log()\n .domain([configuration.minScale, configuration.maxScale])\n .range([configuration.minScale, configuration.maxScale])\n .base(2);\n this.zoom = d3.behavior.zoom()\n .size([dimensions.width, dimensions.height])\n .scaleExtent([configuration.minScale, configuration.maxScale])\n .x(scales.x);\n this.brush = null;\n\n if (configuration.slider) {\n const zoomIn = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default timeline-pf-zoom timeline-pf-zoom-in')\n .attr('id', 'timeline-pf-zoom-in')\n .style('top', `${configuration.padding.top}px`)\n .on('click', () => {this.zoomClick()});\n zoomIn\n .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomIn.node().offsetWidth)}px`)\n .append('i')\n .attr('class', 'fa fa-plus')\n .attr('id', 'timeline-pf-zoom-in-icon');\n\n const zoomOut = container.append('button')\n .attr('type', 'button')\n .attr('class', 'btn btn-default timeline-pf-zoom')\n .attr('id', 'timeline-pf-zoom-out')\n .style('top', `${configuration.padding.top + dimensions.height - 26}px`)\n .on('click', () => {this.zoomClick()});\n console.log(zoomIn.node().offsetWidth);\n zoomOut\n .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width + (configuration.sliderWidth - zoomOut.node().offsetWidth)}px`)\n .append('i')\n .attr('class', 'fa fa-minus')\n .attr('id', 'timeline-pf-zoom-out-icon');\n\n const zoomSlider = container.append('input')\n .attr('type', 'range')\n .attr('class', 'timeline-pf-zoom timeline-pf-slider')\n .attr('id', 'timeline-pf-slider')\n .style('width', `${dimensions.height - (zoomIn.node().offsetHeight * 2)}px`)\n .attr('value', this.sliderScale(this.zoom.scale()))\n .attr('min', configuration.minScale)\n .attr('max', configuration.maxScale)\n .attr('step', 0.1)\n .on('input', () => {this.zoomClick()});\n zoomSlider\n .style('top', `${configuration.padding.top + ((dimensions.height - (zoomIn.node().offsetHeight) * 2) / 2) + zoomIn.node().offsetHeight - (zoomSlider.node().offsetHeight / 2)}px`)\n .style('left', `${configuration.padding.left + configuration.labelWidth + dimensions.width +\n configuration.sliderWidth - ((zoomIn.node().offsetWidth - zoomSlider.node().offsetHeight) / 2) - (zoomSlider.node().offsetWidth / 2)}px`);\n }\n\n if(configuration.context) {\n this.brush = d3.svg.brush()\n .x(scales.ctx)\n .extent(scales.x.domain())\n .on(\"brush\", () => {this.brushed()});\n\n container.select('.timeline-pf-brush')\n .call(this.brush)\n .selectAll(\"rect\")\n .attr(\"height\", dimensions.ctxHeight);\n }\n\n\n if (configuration.eventZoom) {\n this.zoom.on('zoomend', configuration.eventZoom);\n }\n\n this.zoom.on('zoom', () => {\n requestAnimationFrame(() => callback(data));\n if(configuration.slider) {\n container.select('#timeline-pf-slider').property('value', this.sliderScale(this.zoom.scale()));\n }\n if(configuration.context) {\n this.brush.extent(this.scales.x.domain());\n container.select('.timeline-pf-brush').call(this.brush);\n }\n });\n return this.grid.call(this.zoom)\n .on(\"dblclick.zoom\", null);\n }\n\n brushed() {\n if(this.brush.empty() !== true) {\n let extent = this.brush.extent();\n this.zoomFilter(extent[0], extent[1], 0);\n }\n }\n\n zoomClick() {\n let factor = 0.5,\n target_zoom = 1,\n duration = 0,\n center = this.dimensions.width / 2,\n extent = this.zoom.scaleExtent(),\n translate0,\n l,\n view = {\n x: this.zoom.translate()[0],\n k: this.zoom.scale()\n };\n switch (d3.event.target.id) {\n case 'timeline-pf-zoom-in-icon':\n case 'timeline-pf-zoom-in':\n target_zoom = this.zoom.scale() * (1 + factor);\n duration = 100;\n break;\n case 'timeline-pf-zoom-out-icon':\n case 'timeline-pf-zoom-out':\n target_zoom = this.zoom.scale() * (1 + factor * -1);\n duration = 100;\n break;\n case 'timeline-pf-slider':\n target_zoom = this.sliderScale.invert(d3.event.target.value);\n break;\n default:\n target_zoom = this.zoom.scale();\n }\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n translate0 = (center - view.x) / view.k;\n view.k = target_zoom;\n l = translate0 * view.k + view.x;\n\n view.x += center - l;\n this.interpolateZoom([view.x, 0], view.k, duration);\n }\n\n interpolateZoom(translate, scale, duration) {\n return d3.transition().duration(duration).tween(\"zoom\", () => {\n if(this.zoom) {\n let iTranslate = d3.interpolate(this.zoom.translate(), translate),\n iScale = d3.interpolate(this.zoom.scale(), scale);\n return (t) => {\n this.zoom\n .scale(iScale(t))\n .translate(iTranslate(t));\n this.zoom.event(this.grid);\n };\n }\n });\n }\n\n getRange(Extent) {\n return Extent[1].getTime() - Extent[0].getTime();\n }\n\n getScale(oldRange, newRange) {\n return oldRange / newRange;\n }\n\n zoomFilter(fromTime, toTime, duration = 100) {\n let range = toTime - fromTime,\n width = this.dimensions.width,\n extent = this.zoom.scaleExtent(),\n translate = this.zoom.translate()[0],\n curZoom = this.zoom.scale(),\n target_zoom = this.zoom.scale(),\n cur_width = this.getRange(this.scales.x.domain()),\n startDiff;\n\n target_zoom = target_zoom * this.getScale(this.getRange(this.scales.x.domain()), range); // new scale is ratio between old and new date ranges\n\n if (target_zoom < extent[0]) {\n target_zoom = extent[0];\n } else if (target_zoom > extent[1]) {\n target_zoom = extent[1];\n }\n\n startDiff = (this.scales.x.domain()[0] - fromTime) * (width / cur_width); // difference between leftmost dates in px\n\n translate += startDiff;\n\n translate = translate * (target_zoom / curZoom); // scale translate value (in px) to new zoom scale\n\n this.interpolateZoom([translate, 0], target_zoom, duration)\n }\n}\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/zoom.js\n **/","'use strict';\n\nfunction configurable(targetFunction, config) {\n\n function configure(item) {\n return function(value) {\n if (!arguments.length) return config[item];\n config[item] = value;\n\n return targetFunction;\n };\n }\n\n for (var item in config) {\n targetFunction[item] = configure(item);\n }\n}\n\nif('object' == typeof exports && 'undefined' != typeof module) {\n module.exports = configurable;\n} else if ('function' == typeof define && define.amd) {\n define([], configurable);\n} else {\n window.configurable = configurable;\n}\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/configurable.js/configurable.js\n ** module id = 12\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file