@hpcc-js/timeline 2.56.0 → 2.57.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +43 -43
- package/README.md +91 -91
- package/dist/index.es6.js +1625 -0
- package/dist/index.es6.js.map +1 -0
- package/dist/index.js +1626 -1201
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -0
- package/dist/index.min.js.map +1 -0
- package/package.json +38 -36
- package/src/MiniGantt.css +30 -30
- package/src/MiniGantt.ts +611 -612
- package/src/ReactAxisGantt.ts +279 -286
- package/src/ReactAxisGanttSeries.ts +265 -265
- package/src/ReactGantt.ts +696 -700
- package/src/ReactTimeline.ts +115 -126
- package/src/ReactTimelineSeries.ts +113 -124
- package/src/__package__.ts +3 -3
- package/src/index.ts +7 -7
- package/types/MiniGantt.d.ts +5 -4
- package/types/MiniGantt.d.ts.map +1 -0
- package/types/ReactAxisGantt.d.ts +2 -2
- package/types/ReactAxisGantt.d.ts.map +1 -0
- package/types/ReactAxisGanttSeries.d.ts +3 -2
- package/types/ReactAxisGanttSeries.d.ts.map +1 -0
- package/types/ReactGantt.d.ts +1 -1
- package/types/ReactGantt.d.ts.map +1 -0
- package/types/ReactTimeline.d.ts +3 -2
- package/types/ReactTimeline.d.ts.map +1 -0
- package/types/ReactTimelineSeries.d.ts +2 -1
- package/types/ReactTimelineSeries.d.ts.map +1 -0
- package/types/__package__.d.ts +3 -2
- package/types/__package__.d.ts.map +1 -0
- package/types/index.d.ts +8 -7
- package/types/index.d.ts.map +1 -0
- package/types-3.4/MiniGantt.d.ts +106 -0
- package/types-3.4/ReactAxisGantt.d.ts +83 -0
- package/types-3.4/ReactAxisGanttSeries.d.ts +82 -0
- package/types-3.4/ReactGantt.d.ts +135 -0
- package/types-3.4/ReactTimeline.d.ts +18 -0
- package/types-3.4/ReactTimelineSeries.d.ts +18 -0
- package/types-3.4/__package__.d.ts +4 -0
- package/types-3.4/index.d.ts +8 -0
- package/dist/index.umd.cjs +0 -2
- package/dist/index.umd.cjs.map +0 -1
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/api"),require("@hpcc-js/chart"),require("@hpcc-js/common"),require("@hpcc-js/html"),require("@hpcc-js/react"),require("@hpcc-js/layout")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/api","@hpcc-js/chart","@hpcc-js/common","@hpcc-js/html","@hpcc-js/react","@hpcc-js/layout"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/timeline"]={},t["@hpcc-js/api"],t["@hpcc-js/chart"],t["@hpcc-js/common"],t["@hpcc-js/html"],t["@hpcc-js/react"],t["@hpcc-js/layout"])}(this,function(t,e,i,o,n,r,s){"use strict";var a=function(t,e){return a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])},a(t,e)};function l(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function i(){this.constructor=t}a(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)}var h=function(){return h=Object.assign||function(t){for(var e,i=1,o=arguments.length;i<o;i++)for(var n in e=arguments[i])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t},h.apply(this,arguments)};function p(t,e,i){if(i||2===arguments.length)for(var o,n=0,r=e.length;n<r;n++)!o&&n in e||(o||(o=Array.prototype.slice.call(e,0,n)),o[n]=e[n]);return t.concat(o||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;!function(t,e){void 0===e&&(e={});var i=e.insertAt;if("undefined"!=typeof document){var o=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===i&&o.firstChild?o.insertBefore(n,o.firstChild):o.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}(".timeline_MiniGantt .line{fill:none;stroke:#d3d3d3;opacity:.7}.timeline_MiniGantt .common_TextBox .rect{fill:#87cefa;stroke:blue;opacity:.5}.timeline_MiniGantt .buckets .entity_shape rect{stroke:#333}.timeline_MiniGantt .buckets.selected .common_EntityRect .common_Shape>rect{stroke:red}.timeline_MiniGantt .common_TextBox .rect text{fill:#000;stroke:none}.timeline_MiniGantt .over{stroke:transparent;opacity:.8}.timeline_MiniGantt rect{shape-rendering:crispEdges}");var c=function(t){function n(){var n=t.call(this)||this;return n.localRect=o.local(),n.localEntityPin=o.local(),n._title_idx=0,n._startDate_idx=1,n._endDate_idx=2,n._icon_idx=-1,n._color_idx=-1,n._yoffset_idx=-1,e.ITooltip.call(n),o.Utility.SimpleSelectionMixin.call(n),n._drawStartPos="origin",n.tooltipHTML(function(t){return"<center>".concat(t[n._title_idx],"</center><br>").concat(n.tooltipFormatter(n.brAxis.parse(t[n._startDate_idx]))," -> ").concat(n.tooltipFormatter(n.brAxis.parse(t[n._endDate_idx])))}),n.tlAxis=(new i.Axis).type("time"),n.brAxis=(new i.Axis).type("time"),n.verticalBands=o.scaleBand().paddingOuter(.2).paddingInner(.2),n}return l(n,t),n.prototype.isHorizontal=function(){return"horizontal"===this.orientation()},n.prototype.fullExtent=function(){var t=this,e=p(p([],this.data().map(function(e){return e[t._startDate_idx]}),!0),this.data().filter(function(e){return!!e[t._endDate_idx]}).map(function(e){return e[t._endDate_idx]}),!0);return o.extent(e)},n.prototype.extent=function(){var t=this.rootExtent?[this.rootExtent[1],this.rootExtent[2]]:this.fullExtent();if(void 0!==t[0]&&void 0!==t[1]&&(t[0]===t[1]||this.centerOnMostRecent())){var e=o.timeParse(this.timePattern()),i=o.timeFormat(this.timePattern()),n=e(t[0]),r=e(t[1]);if(t[0]===t[1])t[0]=i(new Date(n.setFullYear(n.getFullYear()-1))),t[1]=i(new Date(n.setFullYear(n.getFullYear()+2)));else{var s=n.getTime(),a=r.getTime()-s;t[0]=i(n),t[1]=i(new Date(s+2*a))}}return t},n.prototype.dataStartPos=function(t){if(void 0!==this._dateCache[t[this._startDate_idx]])return this._dateCache[t[this._startDate_idx]];var e=this.brAxis.scalePos(t[this._startDate_idx]);return this._dateCache[t[this._startDate_idx]]=e,e},n.prototype.dataEndPos=function(t){if(void 0!==this._dateCache[t[this._endDate_idx]])return this._dateCache[t[this._endDate_idx]];var e=this.brAxis.scalePos(t[this._endDate_idx]);return this._dateCache[t[this._endDate_idx]]=e,e},n.prototype.dataWidth=function(t){return this.dataEndPos(t)-this.dataStartPos(t)},n.prototype.resetZoom=function(){this._zoom.transform(this.element(),o.zoomIdentity.translate(0,this.isHorizontal()?0:this.height()))},n.prototype.zoomed=function(){this.transform=o.d3Event().transform,this.render()},n.prototype.enter=function(e,i){var n=this;t.prototype.enter.call(this,e,i),this._zoom=o.zoom().scaleExtent([0,this.maxZoom()]).on("zoom",function(){n.zoomed()}),this.background=i.append("rect").attr("fill","white").attr("opacity",0).on("dblclick",function(){o.d3Event().stopPropagation(),delete n.rootExtent,n.resetZoom()}),this.gUpperContent=i.append("g").attr("class","gUpperContent"),this.gUpperAxis=i.append("g").attr("class","gUpperAxis"),this.gMiddleContent=i.append("g").attr("class","gMiddleContent"),this.gLowerAxis=i.append("g").attr("class","gLowerAxis"),this.gLowerContent=i.append("g").attr("class","gLowerContent"),this.tlAxis.target(this.gUpperAxis.node()).tickFormat(this.tickFormat()).guideTarget(this.gUpperAxis.append("g").node()).shrinkToFit("none").overlapMode(this.tickFormat_exists()?"stagger":"none").extend(.1),this.brAxis.target(this.gLowerAxis.node()).tickFormat(this.tickFormat()).guideTarget(this.gLowerAxis.append("g").node()).shrinkToFit("none").overlapMode(this.tickFormat_exists()?"stagger":"none").extend(.1),i.call(this._zoom),this._selection.widgetElement(this.gMiddleContent)},n.prototype.update=function(e,i){var n=this;if(t.prototype.update.call(this,e,i),this._dateCache={},this._title_idx=null!==this.titleColumn()?this.columns().indexOf(this.titleColumn()):this._title_idx,this._startDate_idx=null!==this.startDateColumn()?this.columns().indexOf(this.startDateColumn()):this._startDate_idx,this._endDate_idx=null!==this.endDateColumn()?this.columns().indexOf(this.endDateColumn()):this._endDate_idx,this._icon_idx=null!==this.iconColumn()?this.columns().indexOf(this.iconColumn()):this._icon_idx,this._color_idx=null!==this.colorColumn()?this.columns().indexOf(this.colorColumn()):this._color_idx,this._yoffset_idx=null!==this.yOffsetColumn()?this.columns().indexOf(this.yOffsetColumn()):this._yoffset_idx,this._prevIsHorizontal!==this.isHorizontal())return this._prevIsHorizontal=this.isHorizontal(),void this.resetZoom();this.tooltipFormatter=o.timeFormat(this.tooltipTimeFormat());var r=this.width(),s=this.height();this.background.attr("x",0).attr("y",0).attr("width",r).attr("height",s);var a=this.extent();if(this.tlAxis.x(r/2).orientation(this.isHorizontal()?"top":"left").reverse(!this.isHorizontal()).timePattern(this.timePattern()).width(r-1).low(a[0]).high(a[1]).updateScale(),this.brAxis.x(r/2).y(s/2).orientation(this.isHorizontal()?"bottom":"right").reverse(!this.isHorizontal()).timePattern(this.timePattern()).width(r-1).height(s).low(a[0]).high(a[1]).updateScale(),this.transform){var l=void 0,h=void 0;this.isHorizontal()?(l=this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0))),h=this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(r-1)))):(l=this.tlAxis.parseInvert(this.tlAxis.invert(-this.transform.invertY(0))),h=this.tlAxis.parseInvert(this.tlAxis.invert(-this.transform.invertY(s-1)))),this.tlAxis.low(l).high(h).updateScale(),this.brAxis.low(l).high(h).updateScale()}var p=this.data().sort(this.isHorizontal()?function(t,e){var i=n.brAxis.scalePos(t[1])-n.brAxis.scalePos(e[1]);return 0===i?(""+t[0]).localeCompare(""+e[0]):i}:function(t,e){return n.brAxis.scalePos(e[1])-n.brAxis.scalePos(t[1])}),c=p.filter(function(t){return!t[n._endDate_idx]}),u=p.filter(function(t){return!!t[n._endDate_idx]});this.tlAxis.render(),this.brAxis.render();var d=this.brAxis.getBBox(),m=this.updateEntityPins(c),_=d.height,g=s-m,x=-1!==this._yoffset_idx?Math.min.apply(void 0,this.data().filter(function(t){return!isNaN(t[n._yoffset_idx])}).map(function(t){return t[n._yoffset_idx]})):0;if(c.length>0&&0===u.length){this.tlAxis.visible(!1);var f=m/4;f>s/2-_&&(f=s/2-_);var y=s/2+f,b=-1*(s/2-_-f),v=0!==x?x/2:0;this.gUpperContent.attr("transform","translate(0, ".concat(y-v,")")),this.gLowerAxis.attr("transform","translate(0, ".concat(b-v,")"))}else 0===c.length&&u.length>0?(this.tlAxis.visible(!0),this.gUpperContent.attr("transform","translate(0, ".concat(m,")")),this.gUpperAxis.attr("transform","translate(0, ".concat(m,")"))):(m-=x,g+=x,this.tlAxis.visible(!0),this.gUpperContent.attr("transform","translate(0, ".concat(m,")")),this.gUpperAxis.attr("transform","translate(0, ".concat(m,")")),this.gMiddleContent.attr("transform","translate(0, ".concat(m,")")));this.tlAxis.render();for(var k=this.tlAxis.getBBox(),C=[],w={},F=0,S=u;F<S.length;F++){for(var A=S[F],z=0;z<C.length;++z){var P=C[z];if(P.endPos+this.overlapTolerence()<=this.dataStartPos(A)){w[A]=z,P.endPos=this.dataEndPos(A);break}}void 0===w[A]&&(w[A]=C.length,C.push({endPos:this.dataEndPos(A)}))}var T=this.isHorizontal()?0+k.height:0+k.width,M=this.isHorizontal()?g-d.height:r-d.width;this.verticalBands.range([T,M]).domain(C.map(function(t,e){return e})),u.length>0&&this.updateEventRanges(c,u,w,g,k,d,r)},n.prototype.updateEntityPins=function(t){for(var e=0,i=this,n=this.gUpperContent.selectAll(".entity_pin").data(t,function(t){return t[0]+":"+t[1]}),r=this.eventFontColorColumn()?this.columns().indexOf(this.eventFontColorColumn()):-1,s=this.eventBorderColorColumn()?this.columns().indexOf(this.eventBorderColorColumn()):-1,a=this.eventBackgroundColorColumn()?this.columns().indexOf(this.eventBackgroundColorColumn()):-1,l={},h=0,p=t;h<p.length;h++){var c=p[h],u=void 0!==c[i._title_idx]?c[i._title_idx]:c[0];l[u]=l[u]?l[u]+1:1}var d=Object.keys(l),m=i.eventGroupOffset(),_=n.enter().append("g").attr("class","entity_pin");_.append("line").attr("class","entity_line"),_.on("mouseover",function(t){o.select(this).raise()}).each(function(t,e){var n=(new o.EntityPin).target(this).icon("").iconOnlyShowOnHover(i.hideIconWhenCollapsed()).titleOnlyShowOnHover(i.hideTitleWhenCollapsed()).descriptionOnlyShowOnHover(i.hideDescriptionWhenCollapsed()).annotationOnlyShowOnHover(i.hideAnnotationsWhenCollapsed()).iconDiameter(18).iconPaddingPercent(1).titleFontSize(14).descriptionColor("#333").descriptionFontSize(15).iconColor(-1===r?"#333":t[r]).titleColor(-1===r?"#333":t[r]).descriptionColor(-1===r?"#333":t[r]).backgroundShape("pin").backgroundColorFill(-1===r?"#f8f8f8":t[a]).backgroundColorStroke(-1===r?"#ccc":t[s]).cornerRadius(5).arrowHeight(10).arrowWidth(16);i.localEntityPin.set(this,n)}).merge(n).each(function(t,n){var a=i.localEntityPin.get(this),l=void 0!==t[i._title_idx]?t[i._title_idx]:a.title(),h=i.dataStartPos(t)-0,p=d.indexOf(l)%i.eventGroupMod()*m-5;if(void 0!==t[i._yoffset_idx]&&(p+=t[i._yoffset_idx]?t[i._yoffset_idx]:0),t[i._title_idx]!==a.title()&&t[i._startDate_idx]!==a.description()){var c=i.brAxis.parse(t[i._startDate_idx]),u=i.tooltipFormatter(c);a.x(h).y(p).iconOnlyShowOnHover(i.hideIconWhenCollapsed()).titleOnlyShowOnHover(i.hideTitleWhenCollapsed()).descriptionOnlyShowOnHover(i.hideDescriptionWhenCollapsed()).annotationOnlyShowOnHover(i.hideAnnotationsWhenCollapsed()).icon(void 0!==t[i._icon_idx]?t[i._icon_idx]:a.icon()).title(l).description(u).animationFrameRender()}else a.move({x:h,y:p});var _=a.calcHeight();e<_&&(e=_),o.select(this).selectAll(".entity_line").attr("x1",h).attr("x2",h).attr("y1",0).attr("y2",p).style("stroke",-1===r?"#ccc":t[s]).style("stroke-width",1)}),n.exit().each(function(t,e){i.localEntityPin.get(this).target(null)}).remove();var g=Math.abs(Math.min(t.length,i.eventGroupMod())*i.eventGroupOffset());return e+g},n.prototype.updateEventRanges=function(t,e,i,n,r,s,a){var l=this,h=this,p=this.gMiddleContent.selectAll(".line").data(t,function(t){return t[h._title_idx]});p.enter().append("line").attr("class","line").merge(p).attr(this.isHorizontal()?"x1":"y1",function(t){return l.dataStartPos(t)-0}).attr(this.isHorizontal()?"x2":"y2",function(t){return l.dataStartPos(t)-0}).attr(this.isHorizontal()?"y1":"x1",this.isHorizontal()?r.height:r.width).attr(this.isHorizontal()?"y2":"x2",this.isHorizontal()?n-s.height:a-s.width),p.exit().remove();var c=this.gMiddleContent.selectAll(".buckets").data(e,function(t){return t[h._title_idx]});c.enter().append("g").attr("class","buckets").call(this._selection.enter.bind(this._selection)).each(function(t){var e=(new o.EntityRect).target(this).iconDiameter(28).iconPaddingPercent(0).titleFontSize(28).titleColor(h.rangeFontColor()).descriptionColor(h.rangeFontColor()).iconColor(h.rangeFontColor()).backgroundShape("rect").backgroundColorFill(t[h._color_idx]);h.localRect.set(this,e),h.enterEntityRect(e,t)}).on("click",function(t){h.click(h.rowToObj(t),"range",h._selection.selected(this))},!1).on("dblclick",function(t){h.rootExtent=t,h.resetZoom(),h.dblclick(h.rowToObj(t),"range",h._selection.selected(this))},!0).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(c).attr("transform",function(t){return h.isHorizontal()?"translate(".concat(l.dataStartPos(t),", ").concat(l.verticalBands(i[t]),") "):"translate(".concat(l.verticalBands(i[t]),", ").concat(l.dataStartPos(t),") ")}).each(function(t){var e=h.localRect.get(this),i=h.dataWidth(t)/2,o=h.verticalBands.bandwidth()/2,n=Math.max(h.dataWidth(t),2),r=Math.max(h.verticalBands.bandwidth(),2),s=.191*r,a=.618*r,l=a;e.pos(h.isHorizontal()?{x:i,y:o}:{x:o,y:i}).fixedHeight(h.isHorizontal()?r:n).fixedWidth(h.isHorizontal()?n:r).icon(void 0!==t[h._icon_idx]?t[h._icon_idx]:"").title(void 0!==t[h._title_idx]?t[h._title_idx]:"").padding(s).iconDiameter(l).titleFontSize(a),1.5*l>n&&e.icon(null),h.updateEntityRect(e,t[h._icon_idx]),e.render()}),c.exit().remove()},n.prototype.exit=function(e,i){this.brAxis.target(null),this.tlAxis.target(null),t.prototype.exit.call(this,e,i)},n.prototype.click=function(t,e,i){},n.prototype.dblclick=function(t,e,i){},n.prototype.enterEntityRect=function(t,e){},n.prototype.updateEntityRect=function(t,e){},n}(o.SVGWidget);c.prototype._class+=" timeline_MiniGantt",c.prototype.implements(e.ITooltip.prototype),c.prototype.mixin(o.Utility.SimpleSelectionMixin),c.prototype.publish("timePattern","%Y-%m-%d","string","timePattern"),c.prototype.publish("tickFormat",null,"string","tickFormat",void 0,{optional:!0}),c.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","tooltipTimeFormat"),c.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),c.prototype.publish("orientation","horizontal","set","orientation",["horizontal","vertical"]),c.prototype.publish("rangeFontColor","#ecf0f1","html-color","rangeFontColor"),c.prototype.publish("titleColumn",null,"string","titleColumn"),c.prototype.publish("startDateColumn",null,"string","startDateColumn"),c.prototype.publish("endDateColumn",null,"string","endDateColumn"),c.prototype.publish("iconColumn",null,"string","iconColumn"),c.prototype.publish("colorColumn",null,"string","colorColumn"),c.prototype.publish("yOffsetColumn",null,"string","yOffsetColumn"),c.prototype.publish("maxZoom",16,"number","maxZoom"),c.prototype.publish("eventGroupOffset",-50,"number","eventGroupOffset"),c.prototype.publish("eventGroupMod",5,"number","eventGroupMod"),c.prototype.publish("eventFontColorColumn",null,"string","eventFontColorColumn"),c.prototype.publish("eventBorderColorColumn",null,"string","eventBorderColorColumn"),c.prototype.publish("eventBackgroundColorColumn",null,"string","eventBackgroundColorColumn"),c.prototype.publish("hideIconWhenCollapsed",!1,"boolean","hideIconWhenCollapsed"),c.prototype.publish("hideTitleWhenCollapsed",!1,"boolean","hideTitleWhenCollapsed"),c.prototype.publish("hideDescriptionWhenCollapsed",!1,"boolean","hideDescriptionWhenCollapsed"),c.prototype.publish("hideAnnotationsWhenCollapsed",!0,"boolean","hideAnnotationsWhenCollapsed"),c.prototype.publish("centerOnMostRecent",!1,"boolean","If true, the timeline will be centered on the most recent data point");var u=function(t){function e(e){void 0===e&&(e="origin");var i=t.call(this)||this;return i._selection=new o.Utility.Selection(i),i._title_idx=0,i._startDate_idx=1,i._endDate_idx=2,i._icon_idx=-1,i._color_idx=-1,i._series_idx=-1,i._bucket_idx=-1,i._yoffset_idx=-1,i._rangeOptions={rangePadding:2,fontFamily:"Verdana",fontSize:12,fill:"white",stroke:"black",textFill:"black",cornerRadius:3,strokeWidth:0},i._rangeRenderer=r.LabelledRect,i._transform={k:1,x:0,y:0},i._drawStartPos=e,i.showToolbar_default(!1),i._tooltip=new n.HTMLTooltip,i._tooltip.tooltipHTML(function(t){return'<div style="text-align:center;">'.concat(t[0],"<br/><br/>").concat(t[1]," -> ").concat(t[2],"</div>")}),i._tooltip.followCursor(!0),i}return l(e,t),e.prototype.selection=function(t){return arguments.length?(this._selection.set(t),this):this._selection.get()},e.prototype.rangeRenderer=function(t){return arguments.length?(this._rangeRenderer=t,this._rangeRenderer):this._rangeRenderer},e.prototype.enter=function(e,i){t.prototype.enter.call(this,e,i);var o=this;i.on("click",function(t){o._selection.clear()}),this._tooltip.target(e)},e.prototype.update=function(e,i){var n=this;t.prototype.update.call(this,e,i),this.zoomExtent([.05,this.maxZoom()]),this._title_idx=null!==this.titleColumn()?this.columns().indexOf(this.titleColumn()):this._title_idx,this._startDate_idx=null!==this.startDateColumn()?this.columns().indexOf(this.startDateColumn()):this._startDate_idx,this._endDate_idx=null!==this.endDateColumn()?this.columns().indexOf(this.endDateColumn()):this._endDate_idx,this._icon_idx=null!==this.iconColumn()?this.columns().indexOf(this.iconColumn()):this._icon_idx,this._color_idx=null!==this.colorColumn()?this.columns().indexOf(this.colorColumn()):this._color_idx,this._series_idx=null!==this.seriesColumn()?this.columns().indexOf(this.seriesColumn()):this._series_idx,this._bucket_idx=null!==this.bucketColumn()?this.columns().indexOf(this.bucketColumn()):-1;var r=this,s=this.width(),a=s;if(this._interpolateX=o.scaleLinear().domain([this._minStart,this._maxEnd]).range([0,a]),this.data().sort(function(t,e){return t[1]-e[1]}),this._series_idx>-1){this._origIdxMap={},this._dataBySeries={},this._bucketsBySeries={},this.data().forEach(function(t,e){var i=t[n._series_idx];n._dataBySeries[i]||(n._origIdxMap[i]={},n._dataBySeries[i]=[]),n._dataBySeries[i].push({dataRow:t,origIdx:e})});var l=this.gutter(),p=0,c=Object.keys(this._dataBySeries);c.forEach(function(t){n._dataBySeries[t].sort(function(t,e){return t.dataRow[1]-e.dataRow[1]}),n._bucketsBySeries[t]=n.calcBuckets(n._dataBySeries[t].map(function(t){return t.dataRow}),1,2),n._bucketsBySeries[t].bucketHeight=n.bucketHeight(),n._bucketsBySeries[t].bucketOffset=p,p+=(n._bucketsBySeries[t].bucketHeight+n.strokeWidth()+n.gutter())*(n._bucketsBySeries[t].maxBucket+1),n._dataBySeries[t].forEach(function(e,i){n._origIdxMap[t][e.origIdx]=i})}),this._seriesBackgrounds=this._renderElement.selectAll(".series-background").data(c.map(function(t){return n._bucketsBySeries[t]})),this._seriesBackgrounds.join(function(t){return t.append("rect").attr("class","series-background")},function(t){return t},function(t){return t.each(function(t){delete t.element}).remove()}).attr("opacity",function(t){return t.props&&t.props.hidden?0:1}).each(function(t,e){o.select(this).attr("x",0).attr("y",t.bucketOffset-l/2).attr("width",s).attr("height",(t.bucketHeight+l)*(t.maxBucket+1)+l).attr("fill",e%2?r.oddSeriesBackground():r.evenSeriesBackground())})}else-1!==this._bucket_idx?this._buckets=this.calcBuckets(this.data(),this._startDate_idx,this._endDate_idx,this._bucket_idx):this._buckets=this.calcBuckets(this.data(),this._startDate_idx,this._endDate_idx);var u=this._interpolateX(this._minStart);this.zoomTo([u,0],1);var d=this.bucketHeight();this.setRangeOptions(),this._maxFontScale=d-2*this.rangePadding(),this.measureDataText();var m=this._renderElement.selectAll(".item").data(this.data()),_=this.strokeWidth(),g=2*_;m.join(function(t){return t.append("g").attr("class","item").on("click.selectionBag",function(t,e){var i=void 0===t.id?e:t.id;r._selection.isSelected({_id:i,element:t.element})?r._selection.clear():r._selection.click({_id:i,element:function(){return t.element}},o.d3Event),r.selectionChanged(),o.d3Event().stopPropagation()}).on("click",function(t){var e=t.element.classed("selected");t[r.columns().length]&&(t.__lparam=t[r.columns().length]),r.click(t,"",e)}).on("dblclick",function(t){var e=t.element.classed("selected");t[r.columns().length]&&(t.__lparam=t[r.columns().length]),r.click(t,"",e)}).on("mousein",function(t){r.highlightItem(o.select(this),t);var e=t.element.classed("selected");r.mousein(t,"",e)}).on("mouseover",function(t){var e=o.d3Event();r._tooltip._triggerElement=t.element,r._tooltip._cursorLoc=[e.clientX,e.clientY],r._tooltip.data(t).visible(!0).fitContent(!0).render(),r.highlightItem(o.select(this),t);var i=t.element.classed("selected");r.mouseover(t,"",i)}).on("mouseout",function(t){r._tooltip.visible(!1).render(),r.highlightItem(null,null);var e=t.element.classed("selected");r.mouseout(t,"",e)}).each(function(t,e){t.that=this,t.element=o.select(this),t.x=r._interpolateX(t[1]);var i=r._interpolateX(t[2]);if(r._series_idx>-1){var n=t[r._series_idx],s=r._bucketsBySeries[n].bucketMap[r._origIdxMap[n][e]];t.y=r._bucketsBySeries[n].interpolateY(s)+r._bucketsBySeries[n].bucketOffset}else{var a=-1===r._bucket_idx?e:t[r._bucket_idx];t.y=r._buckets.interpolateY(r._buckets.bucketMap[a])}t.props=h(h({},t[3]),{text:t[0]}),t.props.width=i-t.x,t.props.height=d,t.x+=_,t.y+=_,t.props.width-=g,t.props.height-=g,t.element.attr("transform","translate(".concat(t.x+t.props.width/2," ").concat(t.y+t.props.height/2,")"))})},function(t){return t},function(t){return t.each(function(t){delete t.element}).remove()}).attr("opacity",function(t){return t.props&&t.props.hidden?0:1}).each(function(t,e){if(t.that=this,r._series_idx>-1){var i=t[r._series_idx];t.x=r.renderRangeElement(t,e,!1,r._rangeOptions,i)}else t.x=r.renderRangeElement(t,e,!1,r._rangeOptions)}).on("dblclick.zoom",function(t){var e=n._interpolateX(t[1]),i=n._interpolateX(t[2]),o=s/(i-e);n.zoomTo([-e*o,0],o)}),i.on("dblclick.zoom",null)},e.prototype.renderRangeElement=function(t,e,i,n,s){void 0===i&&(i=!1),void 0===n&&(n={});var a,l,p=n.strokeWidth,c=2*p,u=n.rangePadding,d=isNaN(this._transform.x)?0:this._transform.x,m=isNaN(this._transform.k)?1:this._transform.k,_=this.bucketHeight();t.that.setAttribute("data-series",s),this._color_idx>-1&&t.that.setAttribute("data-color",t[this._color_idx]),void 0!==s?(l=this._bucketsBySeries[s].bucketMap[this._origIdxMap[s][e]],t.that.setAttribute("data-b",l),t.that.setAttribute("data-bucketOffset",this._bucketsBySeries[s].bucketOffset),t.y=this._bucketsBySeries[s].interpolateY(l)+this._bucketsBySeries[s].bucketOffset,t.that.setAttribute("data-dy",t.y)):(l=this._buckets.bucketMap[e],t.y=this._buckets.interpolateY(l)),this._color_idx>-1&&(n.fill=t[this._color_idx]),i?(t.x=this._interpolateX(t[1])*m,a=this._interpolateX(t[2])*m,t.props=h(h({},t[3]),{text:t[0]}),t.props.width=(a-t.x)/m,t.x+=d,t.props.width*=m):(t.x=this._interpolateX(t[1]),a=this._interpolateX(t[2]),t.props=h(h({},t[3]),{text:t[0]}),t.props.width=(a-t.x)/m),t.props.height=_,void 0===s&&this._buckets.bucketScale<1&&(t.props.height=this._buckets.bucketScale*_),void 0===t.element&&t.that&&(t.element=o.select(t.that)),t.element.attr("transform","translate(".concat(t.x+t.props.width/2," ").concat(t.y+t.props.height/2,")")),t.x+=p,t.y+=p,t.props.width-=c,t.props.height-=c,t.props.width=t.props.width<1?1:t.props.width,t.props.height=t.props.height<1?1:t.props.height;var g=this.truncateText(t.props.text,t.props.width-u,this._maxFontScale);g!==t.props.text?g=this.truncateText(t.props.text,t.props.width-u):t.props.fontSize=this._maxFontScale*n.fontSize,void 0===s&&this._buckets.bucketScale<1&&(t.props.fontSize=Math.min(this._maxFontScale,this._buckets.bucketScale)*n.fontSize),(!this._maxY||this._maxY<t.y+t.props.height)&&(this._maxY=t.y+t.props.height),(!this._maxX||this._maxX<t.x+t.props.width)&&(this._maxX=t.x+t.props.width),r.render(this._rangeRenderer,h(h(h({},n),t.props),{text:g}),t.that)},e.prototype.setRangeOptions=function(){this._rangeOptions={rangePadding:this.rangePadding(),fontFamily:this.fontFamily(),fontSize:this.fontSize(),strokeWidth:this.strokeWidth(),fill:this.fill(),stroke:this.stroke(),textFill:this.rangeFontColor(),cornerRadius:this.cornerRadius()}},e.prototype.zoomed=function(t){var e=this;if(this._transform=t,"scale-all"===this.renderMode())this._zoomScale=t.k,this._zoomTranslate=[t.x,0],this._zoomG.attr("transform","translate(".concat(t.x," ").concat(0,")scale(").concat(t.k," 1)"));else{var i=this._rangeOptions;this.data().forEach(function(t,o){if(e._color_idx>-1&&(i.fill=t[e._color_idx]),e._series_idx>-1){var n=t[e._series_idx];e.renderRangeElement(t,o,!0,i,n)}else e.renderRangeElement(t,o,!0,i)})}this.zoomedHook(t)},e.prototype.zoomedHook=function(t){},e.prototype.calcBuckets=function(t,e,i,n){var r={},s={},a=this.overlapTolerence(),l=[{end:-1/0}],h=0;void 0!==n?(t.forEach(function(t,e){r[e]=t[n],s[t[n]]=!0}),h=Object.keys(s).length):t.forEach(function(t,o){for(var n=0;n<l.length;++n)if(0===o||l[n][i]+a<=t[e]){r[o]=n,h<n&&(h=n),l[n][i]=t[i];break}if(void 0===r[o]){r[o]=l.length;var s={};s[i]=t[i],l.push(s)}h<r[o]&&(h=r[o])});var p=(h+1)*(this.bucketHeight()+this.gutter());return{bucketMap:r,maxBucket:h,bucketScale:this.height()/p,interpolateY:o.scaleLinear().domain([0,h+1]).range([0,Math.min(this.height(),p)])}},e.prototype.data=function(e){var i,o,n=t.prototype.data.apply(this,arguments);return arguments.length>0&&(this._minStart=null!==(i=Math.min.apply(Math,this.data().map(function(t){return t[1]})))&&void 0!==i?i:0,this._maxEnd=null!==(o=Math.max.apply(Math,this.data().map(function(t){return t[2]})))&&void 0!==o?o:1,this.measureDataText(!0)),n},e.prototype.measureDataText=function(t){void 0===t&&(t=!1);var e={},i={},n=this.fontFamily(),r=this.fontSize(),s=this.bucketHeight();s&&(this._maxFontScale=(s-2*this.rangePadding())/r),(t||this._prevFontFamily!==n||this._prevFontSize!==r)&&(i["."]=o.Utility.textSize(".",n,r).width,this.data().forEach(function(t){e[t[0]]||(e[t[0]]=o.Utility.textSize(t[0],n,r).width),t[0].split("").forEach(function(t){i[t]||(i[t]=o.Utility.textSize(t,n,r).width)})}),this._textWidths=e,this._characterWidths=i),this._prevFontFamily=n,this._prevFontSize=r},e.prototype.truncateText=function(t,e,i){if(void 0===i&&(i=1),this._textWidths[t]*i<e)return t;for(var o="",n=0,r=e-3*this._characterWidths["."],s=0,a=t;s<a.length;s++){var l=a[s];if(!((n+=this._characterWidths[l])<r))break;o+=l}return r<0?"":o+"..."},e.prototype.resize=function(e){return this.fitWidthToContent()||this.fitHeightToContent()?t.prototype.resize.call(this,{width:e.width,height:this._maxY}):t.prototype.resize.apply(this,arguments)},e.prototype.selectionChanged=function(){},e.prototype.highlightItem=function(t,e){},e.prototype.click=function(t,e,i){},e.prototype.dblclick=function(t,e,i){},e.prototype.mousein=function(t,e,i){},e.prototype.mouseover=function(t,e,i){},e.prototype.mouseout=function(t,e,i){},e}(o.SVGZoomWidget);u.prototype._class+=" timeline_ReactGantt",u.prototype.publish("fitWidthToContent",!1,"boolean","If true, resize will simply reapply the bounding box width"),u.prototype.publish("fitHeightToContent",!1,"boolean","If true, resize will simply reapply the bounding box height"),u.prototype.publish("titleColumn",null,"string","Column name to for the title"),u.prototype.publish("startDateColumn",null,"string","Column name to for the start date"),u.prototype.publish("endDateColumn",null,"string","Column name to for the end date"),u.prototype.publish("iconColumn",null,"string","Column name to for the icon"),u.prototype.publish("colorColumn",null,"string","Column name to for the color"),u.prototype.publish("seriesColumn",null,"string","Column name to for the series identifier"),u.prototype.publish("bucketColumn",null,"string","Column name to for the bucket identifier"),u.prototype.publish("renderMode","default","set","Render modes vary in features and performance",["default","scale-all"]),u.prototype.publish("rangePadding",3,"number","Padding within each range rectangle (pixels)"),u.prototype.publish("fill","#1f77b4","string","Background color of range rectangle"),u.prototype.publish("stroke",null,"string","Color of range rectangle border"),u.prototype.publish("strokeWidth",null,"number","Width of range rectangle border (pixels)"),u.prototype.publish("cornerRadius",3,"number","Space between range buckets (pixels)"),u.prototype.publish("fontFamily",null,"string","Font family within range rectangle",null,{optional:!0}),u.prototype.publish("fontSize",10,"number","Size of font within range rectangle (pixels)"),u.prototype.publish("rangeFontColor","#ecf0f1","html-color","rangeFontColor"),u.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),u.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),u.prototype.publish("bucketHeight",100,"number","Max height of range element (pixels)"),u.prototype.publish("gutter",2,"number","Space between range buckets (pixels)"),u.prototype.publish("maxZoom",16,"number","Maximum zoom"),u.prototype.publish("evenSeriesBackground","#FFFFFF","html-color","Background color of even series rows"),u.prototype.publish("oddSeriesBackground","#DDDDDD","html-color","Background color of odd series rows");var d=function(t){function e(){var e=t.call(this)||this;return e._topAxis=new i.Axis("center").orientation("top").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d"),e._gantt=new u("center").stroke("#000000"),e._bottomAxis=new i.Axis("center").orientation("bottom").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d"),e._drawStartPos="origin",e.rangeRenderer=function(){var t=this._gantt.rangeRenderer.apply(this._gantt,arguments);return arguments.length?this:t},e}return l(e,t),e.prototype.selection=function(t){return arguments.length?(this._gantt.selection(t),this):this._gantt.selection()},e.prototype.resizeWrappers=function(){var t=this.width(),e=this.height(),i=this.axisHeight(),o=e-2*i,n=this.strokeWidth();this._topRect.attr("height",i).attr("width",t).attr("fill","transparent"),this._topAxisElement.attr("transform","translate(0 0)"),this._topAxis.resize({height:i,width:t}),this._contentRect.attr("height",o).attr("width",t).attr("fill","transparent"),this._contentElement.attr("transform","translate(0 ".concat(i+n,")")),this._gantt.resize({height:o,width:t}),this._bottomRect.attr("height",i).attr("width",t).attr("fill","transparent"),this._bottomAxisElement.attr("transform","translate(0 ".concat(i+o+n,")")),this._bottomAxis.resize({height:i,width:t})},e.prototype.enter=function(e,i){var o=this;t.prototype.enter.call(this,e,i),this._gantt.click=function(t,e,i){o.click(t,e,i)},this._gantt.dblclick=function(t,e,i){o.dblclick(t,e,i)},this._topAxisElement=i.append("g").attr("class","top-axis-wrapper"),this._topRect=this._topAxisElement.append("rect").attr("class","top-axis-rect"),this._contentElement=i.append("g").attr("class","content-wrapper"),this._contentRect=this._contentElement.append("rect").attr("class","content-rect"),this._bottomAxisElement=i.append("g").attr("class","bottom-axis-wrapper"),this._bottomRect=this._bottomAxisElement.append("rect").attr("class","top-axis-rect"),this._topAxis.target(this._topAxisElement.node()),this._gantt.target(this._contentElement.node()).bucketHeight(30),this._bottomAxis.target(this._bottomAxisElement.node()),this.resizeWrappers(),this._gantt.zoomedHook=function(t){o.onzoom(t)}},e.prototype.onzoom=function(t){var e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,n=o/e,r=Math.floor(i-n*(t.x/t.k)),s=Math.ceil(o/t.k+r);this._topAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(r).high(s).render(),this._bottomAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(r).high(s).render()},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._topAxis.tickFormat(this.tickFormat()).render(),this._bottomAxis.tickFormat(this.tickFormat()).render(),this._gantt.render()},e.prototype.columns=function(e){var i=t.prototype.columns.apply(this,arguments);return arguments.length>0&&this._gantt.columns(e),i},e.prototype.data=function(e){var i,o,n=t.prototype.data.apply(this,arguments);if(arguments.length>0){var r=this.data().map(function(t){var e=p([],t,!0);return e[1]=isNaN(t[1])?new Date(t[1]).getTime():Number(t[1]),e[2]=isNaN(t[2])?new Date(t[2]).getTime():Number(t[2]),e});this._gantt._minStart=null!==(i=Math.min.apply(Math,r.map(function(t){return t[1]})))&&void 0!==i?i:0,this._gantt._maxEnd=null!==(o=Math.max.apply(Math,r.map(function(t){return t[2]})))&&void 0!==o?o:1,this._gantt.data(r)}return n},e.prototype.resize=function(e){var i=t.prototype.resize.apply(this,arguments);return this._topAxisElement&&this.resizeWrappers(),i},e.prototype.click=function(t,e,i){},e.prototype.dblclick=function(t,e,i){},e.prototype.tooltip=function(){return this._gantt._tooltip},e}(o.SVGWidget);d.prototype._class+=" timeline_ReactAxisGantt",d.prototype.publish("tickFormat",null,"string","Format rule applied to axis tick labels",void 0,{optional:!0}),d.prototype.publish("axisHeight",22,"number","Height of axes (pixels)"),d.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),d.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),d.prototype.publish("axisFontSize",null,"number","Font size of axis tick labels"),d.prototype.publish("axisFontFamily",null,"string","Font family of axis tick labels"),d.prototype.publish("axisTickLength",null,"number","Length of axis ticks"),d.prototype.publishProxy("gutter","_gantt"),d.prototype.publishProxy("renderMode","_gantt"),d.prototype.publishProxy("strokeWidth","_gantt"),d.prototype.publishProxy("fontSize","_gantt"),d.prototype.publishProxy("fontFamily","_gantt"),d.prototype.publishProxy("stroke","_gantt"),d.prototype.publishProxy("cornerRadius","_gantt"),d.prototype.publishProxy("titleColumn","_gantt"),d.prototype.publishProxy("startDateColumn","_gantt"),d.prototype.publishProxy("endDateColumn","_gantt"),d.prototype.publishProxy("iconColumn","_gantt"),d.prototype.publishProxy("colorColumn","_gantt"),d.prototype.publishProxy("bucketColumn","_gantt"),d.prototype.publishProxy("maxZoom","_gantt"),d.prototype.publishProxy("bucketHeight","_gantt");var m=function(t){function e(){var e=t.call(this)||this;return e._topAxis=new i.Axis("origin").orientation("top").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d"),e._gantt=new u("origin").stroke("#000000").fitHeightToContent(!0),e._bottomAxis=new i.Axis("origin").orientation("bottom").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d"),e.centerOverflowX_default("hidden"),e.centerOverflowY_default("auto"),e}return l(e,t),e.prototype.selection=function(t){return arguments.length?(this._gantt.selection(t),this):this._gantt.selection()},e.prototype.rangeRenderer=function(t){var e=this._gantt.rangeRenderer.apply(this._gantt,arguments);return arguments.length?this:e},e.prototype.resizeWrappers=function(){var t=this.width(),e=this.height(),i=this.axisHeight(),o=e-2*i;this.bottomHeight(i),this._topWA.resize({width:t,height:i}),this._centerWA.resize({width:t,height:o}),this._bottomWA.resize({width:t,height:i}),this.top().render(),this.bottom().render(),this.center().render()},e.prototype.enter=function(e,i){var o=this;t.prototype.enter.call(this,e,i),this._gantt.click=function(t,e,i){o.click(t,e,i)},this._gantt.dblclick=function(t,e,i){o.dblclick(t,e,i)},this.top(this._topAxis),this.center(this._gantt),this.bottom(this._bottomAxis),this.resizeWrappers(),this._gantt.zoomedHook=function(t){o.onzoom(t)}},e.prototype.onzoom=function(t){var e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,n=o/e,r=Math.floor(i-n*(t.x/t.k)),s=Math.ceil(o/t.k+r);this._topAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(r).high(s).lazyRender(),this._bottomAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(r).high(s).lazyRender()},e.prototype.update=function(e,i){t.prototype.update.call(this,e,i),this._topAxis.tickFormat(this.tickFormat()).render(),this._bottomAxis.tickFormat(this.tickFormat()).render(),this._gantt.render()},e.prototype.columns=function(e){var i=t.prototype.columns.apply(this,arguments);return arguments.length>0&&this._gantt.columns(e),i},e.prototype.data=function(e){var i=t.prototype.data.apply(this,arguments);if(arguments.length>0){var n=this.data().map(function(t){var e=p([],t,!0);return e[1]=isNaN(t[1])?new Date(t[1]).getTime():Number(t[1]),e[2]=isNaN(t[2])?new Date(t[2]).getTime():Number(t[2]),e});this._gantt._minStart=o.min(n,function(t){return t[1]}),this._gantt._maxEnd=o.max(n,function(t){return t[2]}),this._gantt.data(n)}return i},e.prototype.resize=function(e){var i=t.prototype.resize.apply(this,arguments);return this._topAxisElement&&this.resizeWrappers(),i},e.prototype.click=function(t,e,i){},e.prototype.dblclick=function(t,e,i){},e.prototype.tooltip=function(){return this._gantt._tooltip},e}(s.Border2);m.prototype._class+=" timeline_ReactAxisGanttSeries",m.prototype.publish("tickFormat",null,"string","Format rule applied to axis tick labels",void 0,{optional:!0}),m.prototype.publish("axisHeight",22,"number","Height of axes (pixels)"),m.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),m.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),m.prototype.publish("axisFontSize",null,"number","Font size of axis tick labels"),m.prototype.publish("axisFontFamily",null,"string","Font family of axis tick labels"),m.prototype.publish("axisTickLength",null,"number","Length of axis ticks"),m.prototype.publishProxy("gutter","_gantt"),m.prototype.publishProxy("renderMode","_gantt"),m.prototype.publishProxy("strokeWidth","_gantt"),m.prototype.publishProxy("fontSize","_gantt"),m.prototype.publishProxy("fontFamily","_gantt"),m.prototype.publishProxy("stroke","_gantt"),m.prototype.publishProxy("cornerRadius","_gantt"),m.prototype.publishProxy("titleColumn","_gantt"),m.prototype.publishProxy("startDateColumn","_gantt"),m.prototype.publishProxy("endDateColumn","_gantt"),m.prototype.publishProxy("iconColumn","_gantt"),m.prototype.publishProxy("colorColumn","_gantt"),m.prototype.publishProxy("seriesColumn","_gantt"),m.prototype.publishProxy("bucketColumn","_gantt"),m.prototype.publishProxy("maxZoom","_gantt"),m.prototype.publishProxy("evenSeriesBackground","_gantt"),m.prototype.publishProxy("oddSeriesBackground","_gantt"),m.prototype.publishProxy("bucketHeight","_gantt");var _=function(t){function e(){var e=t.call(this)||this;return e._drawStartPos="origin",e._topAxis.type("time"),e._bottomAxis.type("time"),e.tooltipHTML(function(t){var i=o.timeParse("%Q"),n=i(t[1]),r=i(t[2]),s=o.timeFormat(e.tooltipTimeFormat());return'<div style="text-align:center;">'.concat(t[0],"<br/><br/>").concat(s(n)," -> ").concat(s(r),"</div>")}),e}return l(e,t),e.prototype.update=function(e,i){if(t.prototype.update.call(this,e,i),this.timePattern_exists()){var o=1/0,n=-1/0,r="",s="";this.data().map(function(t){var e=new Date(t[1]).getTime(),i=new Date(t[2]).getTime();o>e&&(o=e,r=""+t[1]),n<i&&(n=i,s=""+t[2])}),this._topAxis.type("time").timePattern(this.timePattern()).overlapMode("none").tickFormat(this._axisLabelFormatter).low(r).high(s),this._bottomAxis.type("time").timePattern(this.timePattern()).overlapMode("none").tickFormat(this._axisLabelFormatter).low(r).high(s),this._gantt._minStart=o,this._gantt._maxEnd=n}},e.prototype.tooltipHTML=function(t){return this._tooltipHTML=t,this.tooltip().tooltipHTML(this._tooltipHTML),this},e.prototype.parseAxisValue=function(t){var e=o.timeParse("%Q")(t);return o.timeFormat(this.timePattern())(e)},e.prototype.onzoom=function(t){var e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,n=o/e,r=Math.floor(i-n*(t.x/t.k)),s=Math.ceil(o/t.k+r);this._topAxis.low(this.parseAxisValue(r)).high(this.parseAxisValue(s)).render(),this._bottomAxis.low(this.parseAxisValue(r)).high(this.parseAxisValue(s)).render()},e}(d);_.prototype._class+=" timeline_ReactTimeline",_.prototype.publish("timePattern","%Y-%m-%d","string","Time pattern used for parsing datetime strings on each data row",null,{optional:!0}),_.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","Time format used in the default html tooltip");var g=o.timeParse("%Q"),x=function(t){function e(){var e=t.call(this)||this;return e._topAxis.type("time"),e._bottomAxis.type("time"),e.tooltipHTML(function(t){var i=g(t[1]),n=g(t[2]),r=o.timeFormat(e.tooltipTimeFormat());return'<div style="text-align:center;">'.concat(t[0],"<br/><br/>").concat(r(i)," -> ").concat(r(n),"</div>")}),e}return l(e,t),e.prototype.update=function(e,i){if(t.prototype.update.call(this,e,i),this.timePattern_exists()){var o=1/0,n=-1/0,r="",s="";this.data().forEach(function(t){var e=new Date(t[1]).getTime(),i=new Date(t[2]).getTime();o>e&&(o=e,r=""+t[1]),n<i&&(n=i,s=""+t[2])}),this._topAxis.type("time").timePattern(this.timePattern()).overlapMode("none").tickFormat(this._axisLabelFormatter).low(r).high(s),this._bottomAxis.type("time").timePattern(this.timePattern()).overlapMode("none").tickFormat(this._axisLabelFormatter).low(r).high(s),this._gantt._minStart=o,this._gantt._maxEnd=n}},e.prototype.tooltipHTML=function(t){return this._tooltipHTML=t,this.tooltip().tooltipHTML(this._tooltipHTML),this},e.prototype.parseAxisValue=function(t){var e=g(t);return o.timeFormat(this.timePattern())(e)},e.prototype.onzoom=function(t){var e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,n=o/e,r=Math.floor(i-n*(t.x/t.k)),s=Math.ceil(o/t.k+r);this._topAxis.low(this.parseAxisValue(r)).high(this.parseAxisValue(s)).render(),this._bottomAxis.low(this.parseAxisValue(r)).high(this.parseAxisValue(s)).render()},e}(m);x.prototype._class+=" timeline_ReactTimelineSeries",x.prototype.publish("timePattern","%Y-%m-%d","string","Time pattern used for parsing datetime strings on each data row",null,{optional:!0}),x.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","Time format used in the default html tooltip"),t.BUILD_VERSION="2.108.6",t.MiniGantt=c,t.PKG_NAME="@hpcc-js/timeline",t.PKG_VERSION="2.57.0",t.ReactAxisGantt=d,t.ReactAxisGanttSeries=m,t.ReactGantt=u,t.ReactTimeline=_,t.ReactTimelineSeries=x});
|
|
2
|
+
//# sourceMappingURL=index.min.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__extends","TypeError","String","__","this","constructor","create","__assign","assign","t","s","i","n","arguments","length","apply","__spreadArray","to","from","pack","ar","l","slice","concat","SuppressedError","css","ref","insertAt","document","head","getElementsByTagName","style","createElement","type","firstChild","insertBefore","appendChild","styleSheet","cssText","createTextNode","MiniGantt","_super","_this","localRect","d3Local","localEntityPin","_title_idx","_startDate_idx","_endDate_idx","_icon_idx","_color_idx","_yoffset_idx","ITooltip","Utility","SimpleSelectionMixin","_drawStartPos","tooltipHTML","tooltipFormatter","brAxis","parse","tlAxis","Axis","verticalBands","d3ScaleBand","paddingOuter","paddingInner","isHorizontal","orientation","fullExtent","data","map","filter","d3Extent","extent","rootExtent","undefined","centerOnMostRecent","parser","d3TimeParse","timePattern","formatter","d3TimeFormat","date1","date2","Date","setFullYear","getFullYear","time1","getTime","timeDiff","dataStartPos","_dateCache","pos","scalePos","dataEndPos","dataWidth","resetZoom","_zoom","transform","element","d3ZoomIdentity","translate","height","zoomed","d3Event","render","enter","domNode","d3Zoom","scaleExtent","maxZoom","on","background","append","attr","stopPropagation","gUpperContent","gUpperAxis","gMiddleContent","gLowerAxis","gLowerContent","target","node","tickFormat","guideTarget","shrinkToFit","overlapMode","tickFormat_exists","extend","_selection","widgetElement","update","titleColumn","columns","indexOf","startDateColumn","endDateColumn","iconColumn","colorColumn","yOffsetColumn","_prevIsHorizontal","tooltipTimeFormat","width","x","reverse","low","high","updateScale","y","hi","parseInvert","invert","invertX","invertY","sort","r","retVal","localeCompare","events","ranges","brAxisBBox","getBBox","upperContentHeight","updateEntityPins","lowerAxisHeight","lowerHeight","minYOffset","Math","min","row","isNaN","visible","y_offset","upperContentYOffset","lowerAxisYOffset","halfMinYOffset","tlAxisBBox","bucketData","bucketIndex","_i","ranges_1","range","bucket","endPos","overlapTolerence","push","vbLower","vbHigher","domain","_d","updateEventRanges","event_height","context","entityPins","selectAll","eventFontColor_idx","eventFontColorColumn","eventBorderColor_idx","eventBorderColorColumn","eventBackgroundColor_idx","eventBackgroundColorColumn","title_counts","events_1","title_types","keys","title_group_offset","eventGroupOffset","entityPinsEnter","d3Select","raise","each","entityPin","EntityPin","icon","iconOnlyShowOnHover","hideIconWhenCollapsed","titleOnlyShowOnHover","hideTitleWhenCollapsed","descriptionOnlyShowOnHover","hideDescriptionWhenCollapsed","annotationOnlyShowOnHover","hideAnnotationsWhenCollapsed","iconDiameter","iconPaddingPercent","titleFontSize","descriptionColor","descriptionFontSize","iconColor","titleColor","backgroundShape","backgroundColorFill","backgroundColorStroke","cornerRadius","arrowHeight","arrowWidth","set","merge","get","_title","title","x_offset","eventGroupMod","description","parsed_start_time","formatted_start_time","animationFrameRender","move","calc_height","calcHeight","exit","remove","event_offset","abs","eventRangeHeight","lines","buckets","bind","entityRect","EntityRect","rangeFontColor","enterEntityRect","click","rowToObj","selected","dblclick","tooltip","hide","show","textBox","bandwidth","rectWidth","max","rectHeight","paddingSize","fontSize","iconSize","fixedHeight","fixedWidth","padding","updateEntityRect","col","sel","textbox","SVGWidget","_class","implements","mixin","publish","optional","ReactGantt","drawStartPosition","Selection","_series_idx","_bucket_idx","_rangeOptions","rangePadding","fontFamily","fill","stroke","textFill","strokeWidth","_rangeRenderer","LabelledRect","_transform","k","showToolbar_default","_tooltip","HTMLTooltip","followCursor","selection","_","rangeRenderer","clear","zoomExtent","seriesColumn","bucketColumn","w","x1","_interpolateX","d3ScaleLinear","_minStart","_maxEnd","a","_origIdxMap","_dataBySeries","_bucketsBySeries","forEach","dataRow","origIdx","seriesKey","gutter_1","gutter","bucketOffset_1","seriesKeys","calcBuckets","bucketHeight","bucketOffset","maxBucket","_seriesBackgrounds","_renderElement","key","join","props","hidden","oddSeriesBackground","evenSeriesBackground","_buckets","interpedStart","zoomTo","setRangeOptions","_maxFontScale","measureDataText","itemSelection","borderOffset1","borderOffset2","_id","id","isSelected","selectionChanged","classed","__lparam","highlightItem","mousein","d3evt","_triggerElement","_cursorLoc","clientX","clientY","fitContent","mouseover","mouseout","that","endX","bucketMap","interpolateY","text","renderRangeElement","x2","xScale","transformEach","options","setAttribute","bucketScale","truncateText","_maxY","_maxX","renderMode","_zoomScale","_zoomTranslate","_zoomG","options_1","zoomedHook","startKey","endKey","bucketKey","bucketKeyMap","tol","end","Infinity","i2","_a","_b","forceMeasure","textWidths","characterWidths","_prevFontFamily","_prevFontSize","textSize","split","char","_textWidths","_characterWidths","scale","ret","sum","_width","text_1","resize","_size","fitWidthToContent","fitHeightToContent","_element","_col","SVGZoomWidget","ReactAxisGantt","_topAxis","_gantt","_bottomAxis","resizeWrappers","h","axisHeight","contentHeight","_topRect","_topAxisElement","_contentRect","_contentElement","_bottomRect","_bottomAxisElement","onzoom","wpp","nextLow","floor","nextHigh","ceil","axisFontFamily","axisFontSize","tickLength","axisTickLength","ganttData","Number","publishProxy","ReactAxisGanttSeries","centerOverflowX_default","centerOverflowY_default","bottomHeight","_topWA","_centerWA","_bottomWA","top","bottom","center","lazyRender","d3Min","d3Max","Border2","ReactTimeline","startTime","endTime","timePattern_exists","minTimestamp_1","maxTimestamp_1","lowDateStr_1","highDateStr_1","start","_axisLabelFormatter","callback","_tooltipHTML","parseAxisValue","v","parsedTime","parseTime","formatTime","ReactTimelineSeries"],"sources":["../src/__package__.ts","../../../node_modules/tslib/tslib.es6.mjs","../../../node_modules/style-inject/dist/style-inject.es.js","../src/MiniGantt.ts","../src/ReactGantt.ts","../src/ReactAxisGantt.ts","../src/ReactAxisGanttSeries.ts","../src/ReactTimeline.ts","../src/ReactTimelineSeries.ts"],"sourcesContent":["export const PKG_NAME = \"@hpcc-js/timeline\";\r\nexport const PKG_VERSION = \"2.57.0\";\r\nexport const BUILD_VERSION = \"2.108.6\";\r\n","/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import { ITooltip } from \"@hpcc-js/api\";\r\nimport { Axis } from \"@hpcc-js/chart\";\r\nimport { d3Event, EntityPin, EntityRect, local as d3Local, select as d3Select, SVGWidget, Utility } from \"@hpcc-js/common\";\r\nimport { extent as d3Extent } from \"d3-array\";\r\nimport { scaleBand as d3ScaleBand } from \"d3-scale\";\r\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\r\nimport { zoom as d3Zoom, zoomIdentity as d3ZoomIdentity } from \"d3-zoom\";\r\n\r\nimport \"../src/MiniGantt.css\";\r\n\r\nexport class MiniGantt extends SVGWidget {\r\n protected tlAxis: Axis;\r\n protected brAxis: Axis;\r\n protected verticalBands;\r\n protected _zoom;\r\n protected gUpperContent;\r\n protected gUpperAxis;\r\n protected gMiddleContent;\r\n protected gLowerAxis;\r\n protected gLowerContent;\r\n private localRect = d3Local<EntityRect>();\r\n private localEntityPin = d3Local<EntityPin>();\r\n private tooltipFormatter: (date: Date) => string;\r\n private _dateCache;\r\n\r\n protected rootExtent;\r\n protected _title_idx = 0;\r\n protected _startDate_idx = 1;\r\n protected _endDate_idx = 2;\r\n protected _icon_idx = -1;\r\n protected _color_idx = -1;\r\n protected _yoffset_idx = -1;\r\n\r\n constructor() {\r\n super();\r\n ITooltip.call(this);\r\n Utility.SimpleSelectionMixin.call(this);\r\n\r\n this._drawStartPos = \"origin\";\r\n this.tooltipHTML((d: any) => `<center>${d[this._title_idx]}</center><br>${this.tooltipFormatter(this.brAxis.parse(d[this._startDate_idx]))} -> ${this.tooltipFormatter(this.brAxis.parse(d[this._endDate_idx]))}`);\r\n\r\n this.tlAxis = new Axis()\r\n .type(\"time\")\r\n ;\r\n this.brAxis = new Axis()\r\n .type(\"time\")\r\n ;\r\n this.verticalBands = d3ScaleBand()\r\n .paddingOuter(0.2)\r\n .paddingInner(0.2)\r\n ;\r\n }\r\n\r\n isHorizontal(): boolean {\r\n return this.orientation() === \"horizontal\";\r\n }\r\n\r\n fullExtent() {\r\n const data = [...this.data().map(d => d[this._startDate_idx]), ...this.data().filter(d => !!d[this._endDate_idx]).map(d => d[this._endDate_idx])];\r\n return d3Extent(data);\r\n }\r\n\r\n extent() {\r\n const extent = this.rootExtent ? [this.rootExtent[1], this.rootExtent[2]] : this.fullExtent();\r\n if (extent[0] !== undefined && extent[1] !== undefined) {\r\n if (extent[0] === extent[1] || this.centerOnMostRecent()) {\r\n const parser = d3TimeParse(this.timePattern());\r\n const formatter = d3TimeFormat(this.timePattern());\r\n const date1 = parser(extent[0]);\r\n const date2 = parser(extent[1]);\r\n if (extent[0] === extent[1]) {\r\n extent[0] = formatter(new Date(date1.setFullYear(date1.getFullYear() - 1)));\r\n extent[1] = formatter(new Date(date1.setFullYear(date1.getFullYear() + 2)));\r\n } else {\r\n const time1 = date1.getTime();\r\n const timeDiff = date2.getTime() - time1;\r\n extent[0] = formatter(date1);\r\n extent[1] = formatter(new Date(time1 + (timeDiff * 2)));\r\n }\r\n }\r\n }\r\n return extent;\r\n }\r\n\r\n dataStartPos(d) {\r\n if(typeof this._dateCache[d[this._startDate_idx]] !== \"undefined\"){\r\n return this._dateCache[d[this._startDate_idx]];\r\n }\r\n const pos = this.brAxis.scalePos(d[this._startDate_idx]);\r\n this._dateCache[d[this._startDate_idx]] = pos;\r\n return pos;\r\n }\r\n\r\n dataEndPos(d) {\r\n if(typeof this._dateCache[d[this._endDate_idx]] !== \"undefined\"){\r\n return this._dateCache[d[this._endDate_idx]];\r\n }\r\n const pos = this.brAxis.scalePos(d[this._endDate_idx]);\r\n this._dateCache[d[this._endDate_idx]] = pos;\r\n return pos;\r\n }\r\n\r\n dataWidth(d) {\r\n return this.dataEndPos(d) - this.dataStartPos(d);\r\n }\r\n\r\n private transform;\r\n resetZoom() {\r\n // Triggers a \"zoomed\" event ---\r\n this._zoom.transform(this.element(), d3ZoomIdentity.translate(0, this.isHorizontal() ? 0 : this.height()));\r\n }\r\n\r\n zoomed() {\r\n this.transform = d3Event().transform;\r\n this.render();\r\n }\r\n\r\n private background;\r\n enter(domNode, element) {\r\n super.enter(domNode, element);\r\n this._zoom = d3Zoom()\r\n .scaleExtent([0, this.maxZoom()])\r\n .on(\"zoom\", () => {\r\n this.zoomed();\r\n })\r\n ;\r\n\r\n this.background = element.append(\"rect\")\r\n .attr(\"fill\", \"white\")\r\n .attr(\"opacity\", 0)\r\n .on(\"dblclick\", () => {\r\n d3Event().stopPropagation();\r\n delete this.rootExtent;\r\n this.resetZoom();\r\n })\r\n ;\r\n this.gUpperContent = element.append(\"g\").attr(\"class\", \"gUpperContent\");\r\n this.gUpperAxis = element.append(\"g\").attr(\"class\", \"gUpperAxis\");\r\n this.gMiddleContent = element.append(\"g\").attr(\"class\", \"gMiddleContent\");\r\n this.gLowerAxis = element.append(\"g\").attr(\"class\", \"gLowerAxis\");\r\n this.gLowerContent = element.append(\"g\").attr(\"class\", \"gLowerContent\");\r\n this.tlAxis\r\n .target(this.gUpperAxis.node())\r\n .tickFormat(this.tickFormat())\r\n .guideTarget(this.gUpperAxis.append(\"g\").node())\r\n .shrinkToFit(\"none\")\r\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\r\n .extend(0.1)\r\n ;\r\n this.brAxis\r\n .target(this.gLowerAxis.node())\r\n .tickFormat(this.tickFormat())\r\n .guideTarget(this.gLowerAxis.append(\"g\").node())\r\n .shrinkToFit(\"none\")\r\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\r\n .extend(0.1)\r\n ;\r\n\r\n element.call(this._zoom);\r\n this._selection.widgetElement(this.gMiddleContent);\r\n }\r\n\r\n private _prevIsHorizontal;\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n\r\n this._dateCache = {};\r\n\r\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\r\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\r\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\r\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\r\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\r\n this._yoffset_idx = this.yOffsetColumn() !== null ? this.columns().indexOf(this.yOffsetColumn()) : this._yoffset_idx;\r\n\r\n if (this._prevIsHorizontal !== this.isHorizontal()) {\r\n this._prevIsHorizontal = this.isHorizontal();\r\n this.resetZoom();\r\n return;\r\n }\r\n\r\n this.tooltipFormatter = d3TimeFormat(this.tooltipTimeFormat());\r\n\r\n const width = this.width();\r\n const height = this.height();\r\n\r\n this.background\r\n .attr(\"x\", 0)\r\n .attr(\"y\", 0)\r\n .attr(\"width\", width)\r\n .attr(\"height\", height)\r\n ;\r\n\r\n const extent = this.extent();\r\n this.tlAxis\r\n .x(width / 2)\r\n .orientation(this.isHorizontal() ? \"top\" : \"left\")\r\n .reverse(!this.isHorizontal())\r\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\r\n .width(width - 1)\r\n .low(extent[0])\r\n .high(extent[1])\r\n .updateScale()\r\n ;\r\n\r\n this.brAxis\r\n .x(width / 2)\r\n .y(height / 2)\r\n .orientation(this.isHorizontal() ? \"bottom\" : \"right\")\r\n .reverse(!this.isHorizontal())\r\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\r\n .width(width - 1)\r\n .height(height)\r\n .low(extent[0])\r\n .high(extent[1])\r\n .updateScale()\r\n ;\r\n\r\n if (this.transform) {\r\n let low;\r\n let hi;\r\n if (this.isHorizontal()) {\r\n low = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0)));\r\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(width - 1)));\r\n } else {\r\n low = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(0)));\r\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(height - 1)));\r\n }\r\n this.tlAxis\r\n .low(low)\r\n .high(hi)\r\n .updateScale()\r\n ;\r\n this.brAxis\r\n .low(low)\r\n .high(hi)\r\n .updateScale()\r\n ;\r\n }\r\n\r\n const data = this.data().sort(this.isHorizontal() ? (l, r) => {\r\n const retVal = this.brAxis.scalePos(l[1]) - this.brAxis.scalePos(r[1]);\r\n if (retVal === 0) {\r\n return (\"\" + l[0]).localeCompare(\"\" + r[0]);\r\n }\r\n return retVal;\r\n } : (l, r) => {\r\n return this.brAxis.scalePos(r[1]) - this.brAxis.scalePos(l[1]);\r\n });\r\n const events = data.filter(d => !d[this._endDate_idx]);\r\n const ranges = data.filter(d => !!d[this._endDate_idx]);\r\n\r\n this.tlAxis\r\n .render()\r\n ;\r\n this.brAxis\r\n .render()\r\n ;\r\n const brAxisBBox = this.brAxis.getBBox();\r\n\r\n let upperContentHeight = this.updateEntityPins(events);\r\n const lowerAxisHeight = brAxisBBox.height;\r\n let lowerHeight = height - upperContentHeight;\r\n const minYOffset = this._yoffset_idx !== -1 ? Math.min.apply(undefined, this.data().filter(row => !isNaN(row[this._yoffset_idx])).map(row => row[this._yoffset_idx])) : 0;\r\n if (events.length > 0 && ranges.length === 0) {\r\n // ONLY EVENTS\r\n this.tlAxis.visible(false);\r\n let y_offset = upperContentHeight / 4;\r\n if (y_offset > (height / 2) - lowerAxisHeight) {\r\n y_offset = (height / 2) - lowerAxisHeight;\r\n }\r\n const upperContentYOffset = (height / 2) + y_offset;\r\n const lowerAxisYOffset = ((height / 2) - lowerAxisHeight - y_offset) * -1;\r\n const halfMinYOffset = minYOffset !== 0 ? minYOffset / 2 : 0;\r\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentYOffset - halfMinYOffset})`);\r\n this.gLowerAxis.attr(\"transform\", `translate(0, ${lowerAxisYOffset - halfMinYOffset})`);\r\n } else if (events.length === 0 && ranges.length > 0) {\r\n // ONLY RANGES\r\n this.tlAxis.visible(true);\r\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\r\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\r\n } else {\r\n upperContentHeight -= minYOffset;\r\n lowerHeight += minYOffset;\r\n // BOTH\r\n this.tlAxis.visible(true);\r\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\r\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\r\n this.gMiddleContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\r\n }\r\n this.tlAxis\r\n .render()\r\n ;\r\n const tlAxisBBox = this.tlAxis.getBBox();\r\n interface BucketInfo {\r\n endPos: number;\r\n }\r\n const bucketData: BucketInfo[] = [];\r\n const bucketIndex = {};\r\n for (const range of ranges) {\r\n for (let i = 0; i < bucketData.length; ++i) {\r\n const bucket = bucketData[i];\r\n if (bucket.endPos + this.overlapTolerence() <= this.dataStartPos(range)) {\r\n bucketIndex[range] = i;\r\n bucket.endPos = this.dataEndPos(range);\r\n break;\r\n }\r\n }\r\n\r\n if (bucketIndex[range] === undefined) {\r\n bucketIndex[range] = bucketData.length;\r\n bucketData.push({\r\n endPos: this.dataEndPos(range)\r\n });\r\n }\r\n }\r\n\r\n const vbLower = this.isHorizontal() ? 0 + tlAxisBBox.height : 0 + tlAxisBBox.width;\r\n const vbHigher = this.isHorizontal() ? lowerHeight - brAxisBBox.height : width - brAxisBBox.width;\r\n this.verticalBands\r\n .range([vbLower, vbHigher])\r\n .domain(bucketData.map((_d, i) => i))\r\n ;\r\n\r\n if (ranges.length > 0) {\r\n this.updateEventRanges(events, ranges, bucketIndex, lowerHeight, tlAxisBBox, brAxisBBox, width);\r\n }\r\n }\r\n\r\n updateEntityPins(events) {\r\n let event_height = 0;\r\n const context = this;\r\n const entityPins = this.gUpperContent.selectAll(\".entity_pin\").data(events, d => d[0] + \":\" + d[1]);\r\n const eventFontColor_idx = this.eventFontColorColumn() ? this.columns().indexOf(this.eventFontColorColumn()) : -1;\r\n const eventBorderColor_idx = this.eventBorderColorColumn() ? this.columns().indexOf(this.eventBorderColorColumn()) : -1;\r\n const eventBackgroundColor_idx = this.eventBackgroundColorColumn() ? this.columns().indexOf(this.eventBackgroundColorColumn()) : -1;\r\n const title_counts = {};\r\n for (const d of events) {\r\n const type = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : d[0];\r\n title_counts[type] = title_counts[type] ? title_counts[type] + 1 : 1;\r\n }\r\n const title_types = Object.keys(title_counts);\r\n const title_group_offset = context.eventGroupOffset();\r\n const entityPinsEnter = entityPins.enter().append(\"g\")\r\n .attr(\"class\", \"entity_pin\");\r\n entityPinsEnter.append(\"line\")\r\n .attr(\"class\", \"entity_line\");\r\n\r\n entityPinsEnter\r\n .on(\"mouseover\", function (d) {\r\n d3Select(this).raise();\r\n })\r\n .each(function (d, i) {\r\n const entityPin = new EntityPin()\r\n .target(this)\r\n .icon(\"\")\r\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\r\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\r\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\r\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\r\n .iconDiameter(18)\r\n .iconPaddingPercent(1)\r\n .titleFontSize(14)\r\n .descriptionColor(\"#333\")\r\n .descriptionFontSize(15)\r\n .iconColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\r\n .titleColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\r\n .descriptionColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\r\n .backgroundShape(\"pin\")\r\n .backgroundColorFill(eventFontColor_idx === -1 ? \"#f8f8f8\" : d[eventBackgroundColor_idx])\r\n .backgroundColorStroke(eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\r\n .cornerRadius(5)\r\n .arrowHeight(10)\r\n .arrowWidth(16)\r\n ;\r\n context.localEntityPin.set(this, entityPin);\r\n })\r\n .merge(entityPins)\r\n .each(function (d, i) {\r\n const entityPin = context.localEntityPin.get(this);\r\n const _title = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : entityPin.title();\r\n const x_offset = context.dataStartPos(d) - 0;\r\n let y_offset = ((title_types.indexOf(_title) % context.eventGroupMod()) * title_group_offset) - 5;\r\n if (typeof d[context._yoffset_idx] !== \"undefined\") y_offset += d[context._yoffset_idx] ? d[context._yoffset_idx] : 0;\r\n if (d[context._title_idx] !== entityPin.title() && d[context._startDate_idx] !== entityPin.description()) {\r\n const parsed_start_time = context.brAxis.parse(d[context._startDate_idx]);\r\n const formatted_start_time = context.tooltipFormatter(parsed_start_time);\r\n entityPin\r\n .x(x_offset)\r\n .y(y_offset)\r\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\r\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\r\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\r\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\r\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : entityPin.icon())\r\n .title(_title)\r\n .description(formatted_start_time)\r\n .animationFrameRender()\r\n ;\r\n } else {\r\n entityPin.move({ x: x_offset, y: y_offset });\r\n }\r\n const calc_height = entityPin.calcHeight();\r\n if (event_height < calc_height) event_height = calc_height;\r\n\r\n d3Select(this).selectAll(\".entity_line\")\r\n .attr(\"x1\", x_offset)\r\n .attr(\"x2\", x_offset)\r\n .attr(\"y1\", 0)\r\n .attr(\"y2\", y_offset)\r\n .style(\"stroke\", eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\r\n .style(\"stroke-width\", 1)\r\n ;\r\n })\r\n ;\r\n entityPins.exit()\r\n .each(function (d, i) {\r\n const entityPin = context.localEntityPin.get(this);\r\n entityPin.target(null);\r\n\r\n })\r\n .remove();\r\n const event_offset = Math.abs(Math.min(events.length, context.eventGroupMod()) * context.eventGroupOffset());\r\n return event_height + event_offset;\r\n }\r\n\r\n updateEventRanges(events, ranges, bucketIndex, eventRangeHeight, tlAxisBBox, brAxisBBox, width) {\r\n const context = this;\r\n\r\n const lines = this.gMiddleContent.selectAll(\".line\").data(events, d => {\r\n return d[context._title_idx];\r\n });\r\n lines.enter().append(\"line\")\r\n .attr(\"class\", \"line\")\r\n .merge(lines)\r\n .attr(this.isHorizontal() ? \"x1\" : \"y1\", d => this.dataStartPos(d) - 0)\r\n .attr(this.isHorizontal() ? \"x2\" : \"y2\", d => this.dataStartPos(d) - 0)\r\n .attr(this.isHorizontal() ? \"y1\" : \"x1\", this.isHorizontal() ? tlAxisBBox.height : tlAxisBBox.width)\r\n .attr(this.isHorizontal() ? \"y2\" : \"x2\", this.isHorizontal() ? eventRangeHeight - brAxisBBox.height : width - brAxisBBox.width)\r\n ;\r\n lines.exit().remove();\r\n const buckets = this.gMiddleContent.selectAll(\".buckets\").data(ranges, d => d[context._title_idx]);\r\n buckets.enter().append(\"g\")\r\n .attr(\"class\", \"buckets\")\r\n .call(this._selection.enter.bind(this._selection))\r\n .each(function (d) {\r\n const entityRect = new EntityRect()\r\n .target(this)\r\n .iconDiameter(28)\r\n .iconPaddingPercent(0)\r\n .titleFontSize(28)\r\n .titleColor(context.rangeFontColor())\r\n .descriptionColor(context.rangeFontColor())\r\n .iconColor(context.rangeFontColor())\r\n .backgroundShape(\"rect\")\r\n .backgroundColorFill(d[context._color_idx])\r\n ;\r\n context.localRect.set(this, entityRect);\r\n context.enterEntityRect(entityRect, d);\r\n })\r\n .on(\"click\", function (d) {\r\n context.click(context.rowToObj(d), \"range\", context._selection.selected(this));\r\n }, false)\r\n .on(\"dblclick\", function (d) {\r\n context.rootExtent = d;\r\n context.resetZoom();\r\n context.dblclick(context.rowToObj(d), \"range\", context._selection.selected(this));\r\n }, true)\r\n .on(\"mouseout.tooltip\", this.tooltip.hide)\r\n .on(\"mousemove.tooltip\", this.tooltip.show)\r\n .merge(buckets)\r\n .attr(\"transform\", d => context.isHorizontal() ?\r\n `translate(${this.dataStartPos(d)}, ${this.verticalBands(bucketIndex[d])}) ` :\r\n `translate(${this.verticalBands(bucketIndex[d])}, ${this.dataStartPos(d)}) `)\r\n .each(function (d) {\r\n const textBox = context.localRect.get(this);\r\n const x = context.dataWidth(d) / 2;\r\n const y = context.verticalBands.bandwidth() / 2;\r\n const rectWidth = Math.max(context.dataWidth(d), 2);\r\n const rectHeight = Math.max(context.verticalBands.bandwidth(), 2);\r\n const fontHeightRatio = 0.618;\r\n const paddingRatio = ((1 - fontHeightRatio) / 2);\r\n const paddingSize = paddingRatio * rectHeight;\r\n const fontSize = rectHeight * fontHeightRatio;\r\n const iconSize = fontSize;\r\n textBox\r\n .pos(context.isHorizontal() ? { x, y } : { x: y, y: x })\r\n .fixedHeight(context.isHorizontal() ? rectHeight : rectWidth)\r\n .fixedWidth(context.isHorizontal() ? rectWidth : rectHeight)\r\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : \"\")\r\n .title(typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : \"\")\r\n .padding(paddingSize)\r\n .iconDiameter(iconSize)\r\n .titleFontSize(fontSize)\r\n ;\r\n if (iconSize * 1.5 > rectWidth) {\r\n textBox.icon(null);\r\n }\r\n context.updateEntityRect(textBox, d[context._icon_idx]);\r\n textBox\r\n .render()\r\n ;\r\n });\r\n buckets.exit().remove();\r\n }\r\n\r\n exit(domNode, element) {\r\n this.brAxis.target(null);\r\n this.tlAxis.target(null);\r\n super.exit(domNode, element);\r\n }\r\n\r\n // Events ---\r\n click(row, col, sel) {\r\n }\r\n\r\n dblclick(row, col, sel) {\r\n }\r\n\r\n enterEntityRect(textbox: EntityRect, d) {\r\n }\r\n\r\n updateEntityRect(textbox: EntityRect, d) {\r\n }\r\n\r\n // ITooltip ---\r\n tooltip;\r\n tooltipHTML: (_) => string;\r\n tooltipFormat: (_) => string;\r\n\r\n // SimpleSelectionMixin\r\n _selection;\r\n}\r\nMiniGantt.prototype._class += \" timeline_MiniGantt\";\r\nMiniGantt.prototype.implements(ITooltip.prototype);\r\nMiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);\r\n\r\nexport interface MiniGantt {\r\n timePattern(): string;\r\n timePattern(_: string): this;\r\n tickFormat(): string;\r\n tickFormat(_: string): this;\r\n tickFormat_exists(): boolean;\r\n tooltipTimeFormat(): string;\r\n tooltipTimeFormat(_: string): this;\r\n overlapTolerence(): number;\r\n overlapTolerence(_: number): this;\r\n orientation(): string;\r\n orientation(_: string): this;\r\n rangeFontColor(): string;\r\n rangeFontColor(_: string): this;\r\n titleColumn(): string;\r\n titleColumn(_: string): this;\r\n startDateColumn(): string;\r\n startDateColumn(_: string): this;\r\n endDateColumn(): string;\r\n endDateColumn(_: string): this;\r\n iconColumn(): string;\r\n iconColumn(_: string): this;\r\n colorColumn(): string;\r\n colorColumn(_: string): this;\r\n yOffsetColumn(): string;\r\n yOffsetColumn(_: string): this;\r\n maxZoom(): number;\r\n maxZoom(_: number): this;\r\n eventGroupMod(): number;\r\n eventGroupMod(_: number): this;\r\n eventGroupOffset(): number;\r\n eventGroupOffset(_: number): this;\r\n eventFontColorColumn(): string;\r\n eventFontColorColumn(_: string): this;\r\n eventBorderColorColumn(): string;\r\n eventBorderColorColumn(_: string): this;\r\n eventBackgroundColorColumn(): string;\r\n eventBackgroundColorColumn(_: string): this;\r\n hideIconWhenCollapsed(): boolean;\r\n hideIconWhenCollapsed(_: boolean): this;\r\n hideTitleWhenCollapsed(): boolean;\r\n hideTitleWhenCollapsed(_: boolean): this;\r\n hideDescriptionWhenCollapsed(): boolean;\r\n hideDescriptionWhenCollapsed(_: boolean): this;\r\n hideAnnotationsWhenCollapsed(): boolean;\r\n hideAnnotationsWhenCollapsed(_: boolean): this;\r\n centerOnMostRecent(): boolean;\r\n centerOnMostRecent(_: boolean): this;\r\n\r\n}\r\n\r\nMiniGantt.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"timePattern\");\r\nMiniGantt.prototype.publish(\"tickFormat\", null, \"string\", \"tickFormat\", undefined, { optional: true });\r\nMiniGantt.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"tooltipTimeFormat\");\r\nMiniGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\r\nMiniGantt.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"orientation\", [\"horizontal\", \"vertical\"]);\r\nMiniGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\r\nMiniGantt.prototype.publish(\"titleColumn\", null, \"string\", \"titleColumn\");\r\nMiniGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"startDateColumn\");\r\nMiniGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"endDateColumn\");\r\nMiniGantt.prototype.publish(\"iconColumn\", null, \"string\", \"iconColumn\");\r\nMiniGantt.prototype.publish(\"colorColumn\", null, \"string\", \"colorColumn\");\r\nMiniGantt.prototype.publish(\"yOffsetColumn\", null, \"string\", \"yOffsetColumn\");\r\nMiniGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"maxZoom\");\r\nMiniGantt.prototype.publish(\"eventGroupOffset\", -50, \"number\", \"eventGroupOffset\");\r\nMiniGantt.prototype.publish(\"eventGroupMod\", 5, \"number\", \"eventGroupMod\");\r\nMiniGantt.prototype.publish(\"eventFontColorColumn\", null, \"string\", \"eventFontColorColumn\");\r\nMiniGantt.prototype.publish(\"eventBorderColorColumn\", null, \"string\", \"eventBorderColorColumn\");\r\nMiniGantt.prototype.publish(\"eventBackgroundColorColumn\", null, \"string\", \"eventBackgroundColorColumn\");\r\nMiniGantt.prototype.publish(\"hideIconWhenCollapsed\", false, \"boolean\", \"hideIconWhenCollapsed\");\r\nMiniGantt.prototype.publish(\"hideTitleWhenCollapsed\", false, \"boolean\", \"hideTitleWhenCollapsed\");\r\nMiniGantt.prototype.publish(\"hideDescriptionWhenCollapsed\", false, \"boolean\", \"hideDescriptionWhenCollapsed\");\r\nMiniGantt.prototype.publish(\"hideAnnotationsWhenCollapsed\", true, \"boolean\", \"hideAnnotationsWhenCollapsed\");\r\nMiniGantt.prototype.publish(\"centerOnMostRecent\", false, \"boolean\", \"If true, the timeline will be centered on the most recent data point\");\r\n","import { d3Event, select as d3Select, SVGZoomWidget, Utility } from \"@hpcc-js/common\";\r\nimport { HTMLTooltip } from \"@hpcc-js/html\";\r\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\r\nimport { React, render, LabelledRect } from \"@hpcc-js/react\";\r\n\r\nexport type IGanttData = [string, number, number, any?];\r\n\r\nexport interface IRangeOptions {\r\n rangePadding: number;\r\n fontFamily: string;\r\n fontSize: number;\r\n strokeWidth?: number;\r\n fill: string;\r\n stroke: string;\r\n textFill: string;\r\n cornerRadius: number;\r\n}\r\n\r\nexport class ReactGantt extends SVGZoomWidget {\r\n\r\n protected _selection = new Utility.Selection(this);\r\n\r\n protected _buckets;\r\n protected _interpolateX;\r\n protected _interpolateY;\r\n\r\n protected _bucketsBySeries;\r\n protected _dataBySeries;\r\n protected _origIdxMap;\r\n private _seriesBackgrounds;\r\n\r\n protected _maxFontSize;\r\n\r\n public _tooltip;\r\n\r\n public _minStart: number;\r\n public _maxEnd: number;\r\n\r\n protected _title_idx = 0;\r\n protected _startDate_idx = 1;\r\n protected _endDate_idx = 2;\r\n protected _icon_idx = -1;\r\n protected _color_idx = -1;\r\n protected _series_idx = -1;\r\n protected _bucket_idx = -1;\r\n protected _yoffset_idx = -1;\r\n\r\n protected _maxX: number;\r\n protected _maxY: number;\r\n\r\n private _rangeOptions: IRangeOptions = {\r\n rangePadding: 2,\r\n fontFamily: \"Verdana\",\r\n fontSize: 12,\r\n fill: \"white\",\r\n stroke: \"black\",\r\n textFill: \"black\",\r\n cornerRadius: 3,\r\n strokeWidth: 0\r\n };\r\n\r\n constructor(drawStartPosition: \"origin\" | \"center\" = \"origin\") {\r\n super();\r\n this._drawStartPos = drawStartPosition;\r\n\r\n this.showToolbar_default(false);\r\n\r\n this._tooltip = new HTMLTooltip();\r\n this._tooltip\r\n .tooltipHTML(d => {\r\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${d[1]} -> ${d[2]}</div>`;\r\n });\r\n this._tooltip\r\n .followCursor(true)\r\n ;\r\n }\r\n\r\n selection(_: any[]): this;\r\n selection(): any[];\r\n selection(_?: any[]): any[] | this {\r\n if (!arguments.length) return this._selection.get();\r\n this._selection.set(_);\r\n return this;\r\n }\r\n\r\n private _rangeRenderer: React.FunctionComponent = LabelledRect;\r\n rangeRenderer(): React.FunctionComponent;\r\n rangeRenderer(_: React.FunctionComponent): this;\r\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\r\n if (!arguments.length) return this._rangeRenderer;\r\n this._rangeRenderer = _;\r\n return this._rangeRenderer;\r\n }\r\n\r\n enter(domNode, element) {\r\n super.enter(domNode, element);\r\n\r\n const context = this;\r\n element\r\n .on(\"click\", function (this: SVGElement, d) {\r\n context._selection.clear();\r\n });\r\n\r\n this._tooltip.target(domNode);\r\n }\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n\r\n this.zoomExtent([0.05, this.maxZoom()]);\r\n\r\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\r\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\r\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\r\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\r\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\r\n this._series_idx = this.seriesColumn() !== null ? this.columns().indexOf(this.seriesColumn()) : this._series_idx;\r\n this._bucket_idx = this.bucketColumn() !== null ? this.columns().indexOf(this.bucketColumn()) : -1;\r\n\r\n const context = this;\r\n const w = this.width();\r\n\r\n const x0 = 0;\r\n const x1 = w;\r\n\r\n this._interpolateX = d3ScaleLinear()\r\n .domain([this._minStart, this._maxEnd])\r\n .range([x0, x1])\r\n ;\r\n\r\n this.data().sort((a, b) => a[1] - b[1]);\r\n\r\n if (this._series_idx > -1) {\r\n this._origIdxMap = {};\r\n this._dataBySeries = {};\r\n this._bucketsBySeries = {};\r\n this.data().forEach((dataRow, origIdx) => {\r\n const seriesKey = dataRow[this._series_idx];\r\n if (!this._dataBySeries[seriesKey]) {\r\n this._origIdxMap[seriesKey] = {};\r\n this._dataBySeries[seriesKey] = [];\r\n }\r\n this._dataBySeries[seriesKey].push({\r\n dataRow,\r\n origIdx\r\n });\r\n });\r\n const gutter = this.gutter();\r\n let bucketOffset = 0;\r\n const seriesKeys = Object.keys(this._dataBySeries);\r\n seriesKeys.forEach(seriesKey => {\r\n this._dataBySeries[seriesKey].sort((a, b) => a.dataRow[1] - b.dataRow[1]);\r\n this._bucketsBySeries[seriesKey] = this.calcBuckets(this._dataBySeries[seriesKey].map(n => n.dataRow), 1, 2);\r\n this._bucketsBySeries[seriesKey].bucketHeight = this.bucketHeight();\r\n this._bucketsBySeries[seriesKey].bucketOffset = bucketOffset;\r\n bucketOffset += (this._bucketsBySeries[seriesKey].bucketHeight + this.strokeWidth() + this.gutter()) * (this._bucketsBySeries[seriesKey].maxBucket + 1);\r\n this._dataBySeries[seriesKey].forEach((n, i) => {\r\n this._origIdxMap[seriesKey][n.origIdx] = i;\r\n });\r\n });\r\n this._seriesBackgrounds = this._renderElement.selectAll(\".series-background\")\r\n .data(seriesKeys.map(key => {\r\n return this._bucketsBySeries[key];\r\n }))\r\n ;\r\n this._seriesBackgrounds\r\n .join(\r\n enter => enter.append(\"rect\")\r\n .attr(\"class\", \"series-background\"),\r\n update => update,\r\n exit => exit\r\n .each(function (d) {\r\n delete d.element;\r\n })\r\n .remove()\r\n )\r\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\r\n .each(function (this: SVGGElement, d, i) {\r\n d3Select(this)\r\n .attr(\"x\", 0)\r\n .attr(\"y\", d.bucketOffset - (gutter / 2))\r\n .attr(\"width\", w)\r\n .attr(\"height\", ((d.bucketHeight + gutter) * (d.maxBucket + 1)) + gutter)\r\n .attr(\"fill\", i % 2 ? context.oddSeriesBackground() : context.evenSeriesBackground())\r\n ;\r\n });\r\n } else {\r\n if (this._bucket_idx !== -1) {\r\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx, this._bucket_idx);\r\n } else {\r\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx);\r\n }\r\n }\r\n const interpedStart = this._interpolateX(this._minStart);\r\n\r\n this.zoomTo(\r\n [interpedStart, 0],\r\n 1\r\n );\r\n\r\n const bucketHeight = this.bucketHeight();\r\n\r\n this.setRangeOptions();\r\n\r\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2));\r\n this.measureDataText();\r\n\r\n const itemSelection = this._renderElement.selectAll(\".item\")\r\n .data(this.data())\r\n ;\r\n const borderOffset1 = this.strokeWidth();\r\n const borderOffset2 = borderOffset1 * 2;\r\n itemSelection\r\n .join(\r\n enter => enter.append(\"g\")\r\n .attr(\"class\", \"item\")\r\n .on(\"click.selectionBag\", function (d, i) {\r\n const _id = d.id === undefined ? i : d.id;\r\n if (context._selection.isSelected({ _id, element: d.element })) {\r\n context._selection.clear();\r\n } else {\r\n context._selection.click(\r\n {\r\n _id,\r\n element: () => d.element\r\n },\r\n d3Event\r\n );\r\n }\r\n context.selectionChanged();\r\n d3Event().stopPropagation();\r\n })\r\n .on(\"click\", function (this: SVGElement, d) {\r\n const selected = d.element.classed(\"selected\");\r\n if (d[context.columns().length]) {\r\n d.__lparam = d[context.columns().length];\r\n }\r\n context.click(d, \"\", selected);\r\n })\r\n .on(\"dblclick\", function (this: SVGElement, d) {\r\n const selected = d.element.classed(\"selected\");\r\n if (d[context.columns().length]) {\r\n d.__lparam = d[context.columns().length];\r\n }\r\n context.click(d, \"\", selected);\r\n })\r\n .on(\"mousein\", function (d) {\r\n context.highlightItem(d3Select(this), d);\r\n const selected = d.element.classed(\"selected\");\r\n context.mousein(d, \"\", selected);\r\n })\r\n .on(\"mouseover\", function (d) {\r\n const d3evt = d3Event();\r\n context._tooltip._triggerElement = d.element;\r\n context._tooltip._cursorLoc = [\r\n d3evt.clientX,\r\n d3evt.clientY\r\n ];\r\n context._tooltip\r\n .data(d)\r\n .visible(true)\r\n .fitContent(true)\r\n .render()\r\n ;\r\n context.highlightItem(d3Select(this), d);\r\n const selected = d.element.classed(\"selected\");\r\n context.mouseover(d, \"\", selected);\r\n })\r\n .on(\"mouseout\", function (d) {\r\n context._tooltip\r\n .visible(false)\r\n .render()\r\n ;\r\n context.highlightItem(null, null);\r\n const selected = d.element.classed(\"selected\");\r\n context.mouseout(d, \"\", selected);\r\n })\r\n .each(function (d, i) {\r\n d.that = this;\r\n d.element = d3Select(this);\r\n d.x = context._interpolateX(d[1]);\r\n const endX = context._interpolateX(d[2]);\r\n if (context._series_idx > -1) {\r\n const seriesKey = d[context._series_idx];\r\n const bucket = context._bucketsBySeries[seriesKey].bucketMap[context._origIdxMap[seriesKey][i]];\r\n d.y = context._bucketsBySeries[seriesKey].interpolateY(bucket) + context._bucketsBySeries[seriesKey].bucketOffset;\r\n } else {\r\n const _i = context._bucket_idx === -1 ? i : d[context._bucket_idx];\r\n d.y = context._buckets.interpolateY(context._buckets.bucketMap[_i]);\r\n }\r\n d.props = {\r\n ...d[3],\r\n text: d[0]\r\n };\r\n d.props.width = endX - d.x;\r\n d.props.height = bucketHeight;\r\n d.x += borderOffset1;\r\n d.y += borderOffset1;\r\n d.props.width -= borderOffset2;\r\n d.props.height -= borderOffset2;\r\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\r\n }),\r\n update => update,\r\n exit => exit\r\n .each(function (d) {\r\n delete d.element;\r\n })\r\n .remove()\r\n )\r\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\r\n .each(function (this: SVGGElement, d, i) {\r\n d.that = this;\r\n if (context._series_idx > -1) {\r\n const seriesKey = d[context._series_idx];\r\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions, seriesKey);\r\n } else {\r\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions);\r\n }\r\n })\r\n .on(\"dblclick.zoom\", d => {\r\n const x1 = this._interpolateX(d[1]);\r\n const x2 = this._interpolateX(d[2]);\r\n const xRange = x2 - x1;\r\n const xScale = w / xRange;\r\n this.zoomTo(\r\n [\r\n -x1 * xScale,\r\n 0\r\n ],\r\n xScale\r\n );\r\n })\r\n ;\r\n element.on(\"dblclick.zoom\", null);\r\n }\r\n renderRangeElement(d, i, transformEach = false, options: any = {}, seriesKey?: string) {\r\n const borderOffset1 = options.strokeWidth;\r\n const borderOffset2 = borderOffset1 * 2;\r\n const padding = options.rangePadding;\r\n let endX;\r\n const x = isNaN(this._transform.x) ? 0 : this._transform.x;\r\n const k = isNaN(this._transform.k) ? 1 : this._transform.k;\r\n let b;\r\n const bucketHeight = this.bucketHeight();\r\n d.that.setAttribute(\"data-series\", seriesKey);\r\n\r\n if (this._color_idx > -1) {\r\n d.that.setAttribute(\"data-color\", d[this._color_idx]);\r\n }\r\n\r\n if (seriesKey !== undefined) {\r\n b = this._bucketsBySeries[seriesKey].bucketMap[this._origIdxMap[seriesKey][i]];\r\n d.that.setAttribute(\"data-b\", b);\r\n d.that.setAttribute(\"data-bucketOffset\", this._bucketsBySeries[seriesKey].bucketOffset);\r\n d.y = this._bucketsBySeries[seriesKey].interpolateY(b) + this._bucketsBySeries[seriesKey].bucketOffset;\r\n d.that.setAttribute(\"data-dy\", d.y);\r\n } else {\r\n b = this._buckets.bucketMap[i];\r\n d.y = this._buckets.interpolateY(b);\r\n }\r\n if (this._color_idx > -1) {\r\n options.fill = d[this._color_idx];\r\n }\r\n if (!transformEach) {\r\n d.x = this._interpolateX(d[1]);\r\n endX = this._interpolateX(d[2]);\r\n d.props = {\r\n ...d[3],\r\n text: d[0]\r\n };\r\n d.props.width = (endX - d.x) / k;\r\n } else {\r\n d.x = this._interpolateX(d[1]) * k;\r\n endX = this._interpolateX(d[2]) * k;\r\n d.props = {\r\n ...d[3],\r\n text: d[0]\r\n };\r\n d.props.width = (endX - d.x) / k;\r\n d.x += x;\r\n d.props.width *= k;\r\n }\r\n d.props.height = bucketHeight;\r\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\r\n d.props.height = this._buckets.bucketScale * bucketHeight;\r\n }\r\n if (d.element === undefined && d.that) {\r\n d.element = d3Select(d.that);\r\n }\r\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\r\n\r\n d.x += borderOffset1;\r\n d.y += borderOffset1;\r\n d.props.width -= borderOffset2;\r\n d.props.height -= borderOffset2;\r\n d.props.width = d.props.width < 1 ? 1 : d.props.width;\r\n d.props.height = d.props.height < 1 ? 1 : d.props.height;\r\n\r\n let text = this.truncateText(d.props.text, d.props.width - padding, this._maxFontScale);\r\n\r\n if (text !== d.props.text) {\r\n text = this.truncateText(d.props.text, d.props.width - padding);\r\n } else {\r\n d.props.fontSize = this._maxFontScale * options.fontSize;\r\n }\r\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\r\n d.props.fontSize = Math.min(this._maxFontScale, this._buckets.bucketScale) * options.fontSize;\r\n }\r\n if (!this._maxY || this._maxY < d.y + d.props.height) {\r\n this._maxY = d.y + d.props.height;\r\n }\r\n if (!this._maxX || this._maxX < d.x + d.props.width) {\r\n this._maxX = d.x + d.props.width;\r\n }\r\n render(\r\n this._rangeRenderer,\r\n {\r\n ...options,\r\n ...d.props,\r\n text,\r\n },\r\n d.that\r\n );\r\n }\r\n\r\n setRangeOptions() {\r\n this._rangeOptions = {\r\n rangePadding: this.rangePadding(),\r\n fontFamily: this.fontFamily(),\r\n fontSize: this.fontSize(),\r\n strokeWidth: this.strokeWidth(),\r\n fill: this.fill(),\r\n stroke: this.stroke(),\r\n textFill: this.rangeFontColor(),\r\n cornerRadius: this.cornerRadius(),\r\n };\r\n }\r\n\r\n public _transform = { k: 1, x: 0, y: 0 };\r\n zoomed(transform) {\r\n this._transform = transform;\r\n switch (this.renderMode()) {\r\n case \"scale-all\":\r\n this._zoomScale = transform.k;\r\n this._zoomTranslate = [transform.x, 0];\r\n this._zoomG.attr(\"transform\", `translate(${transform.x} ${0})scale(${transform.k} 1)`);\r\n break;\r\n default:\r\n const options = this._rangeOptions;\r\n this.data().forEach((d, i) => {\r\n if (this._color_idx > -1) {\r\n options.fill = d[this._color_idx];\r\n }\r\n if (this._series_idx > -1) {\r\n const seriesKey = d[this._series_idx];\r\n this.renderRangeElement(d, i, true, options, seriesKey);\r\n } else {\r\n this.renderRangeElement(d, i, true, options);\r\n }\r\n });\r\n }\r\n\r\n this.zoomedHook(transform);\r\n }\r\n\r\n zoomedHook(transform) {\r\n\r\n }\r\n\r\n private calcBuckets(data, startKey: string | number, endKey: string | number, bucketKey?: string | number) {\r\n const bucketMap = {};\r\n const bucketKeyMap = {};\r\n const tol = this.overlapTolerence();\r\n const buckets = [{ end: -Infinity }];\r\n let maxBucket = 0;\r\n if (bucketKey !== undefined) {\r\n data.forEach((d, i) => {\r\n bucketMap[i] = d[bucketKey];\r\n bucketKeyMap[d[bucketKey]] = true;\r\n });\r\n maxBucket = Object.keys(bucketKeyMap).length;\r\n } else {\r\n data.forEach((d, i) => {\r\n for (let i2 = 0; i2 < buckets.length; ++i2) {\r\n if (i === 0 || buckets[i2][endKey] + tol <= d[startKey]) {\r\n bucketMap[i] = i2;\r\n if (maxBucket < i2) maxBucket = i2;\r\n buckets[i2][endKey] = d[endKey];\r\n break;\r\n }\r\n }\r\n if (bucketMap[i] === undefined) {\r\n bucketMap[i] = buckets.length;\r\n const b = {};\r\n b[endKey] = d[endKey];\r\n buckets.push(b as any);\r\n }\r\n\r\n if (maxBucket < bucketMap[i]) maxBucket = bucketMap[i];\r\n });\r\n }\r\n const height = (maxBucket + 1) * (this.bucketHeight() + this.gutter());\r\n return {\r\n bucketMap,\r\n maxBucket,\r\n bucketScale: this.height() / height,\r\n interpolateY: d3ScaleLinear()\r\n .domain([0, maxBucket + 1])\r\n .range([0, Math.min(this.height(), height)])\r\n };\r\n }\r\n\r\n data(): IGanttData[];\r\n data(_: IGanttData[]): this;\r\n data(_?: IGanttData[]): this | IGanttData[] {\r\n const retVal = super.data.apply(this, arguments);\r\n if (arguments.length > 0) {\r\n this._minStart = Math.min(...this.data().map(n => n[1])) ?? 0;\r\n this._maxEnd = Math.max(...this.data().map(n => n[2])) ?? 1;\r\n this.measureDataText(true);\r\n }\r\n return retVal;\r\n }\r\n\r\n protected _textWidths;\r\n protected _maxFontScale;\r\n protected _characterWidths;\r\n protected _prevFontFamily;\r\n protected _prevFontSize;\r\n measureDataText(forceMeasure = false) {\r\n const textWidths = {};\r\n const characterWidths = {};\r\n const fontFamily = this.fontFamily();\r\n const fontSize = this.fontSize();\r\n const bucketHeight = this.bucketHeight();\r\n\r\n if (bucketHeight) {\r\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2)) / fontSize;\r\n }\r\n\r\n if (forceMeasure || this._prevFontFamily !== fontFamily || this._prevFontSize !== fontSize) {\r\n characterWidths[\".\"] = Utility.textSize(\".\", fontFamily, fontSize).width;\r\n this.data().forEach(d => {\r\n if (!textWidths[d[0]]) {\r\n textWidths[d[0]] = Utility.textSize(d[0], fontFamily, fontSize).width;\r\n }\r\n d[0].split(\"\").forEach(char => {\r\n if (!characterWidths[char]) {\r\n characterWidths[char] = Utility.textSize(char, fontFamily, fontSize).width;\r\n }\r\n });\r\n });\r\n this._textWidths = textWidths;\r\n this._characterWidths = characterWidths;\r\n }\r\n this._prevFontFamily = fontFamily;\r\n this._prevFontSize = fontSize;\r\n }\r\n\r\n truncateText(text, width, scale = 1) {\r\n const textFits = this._textWidths[text] * scale < width;\r\n if (textFits) {\r\n return text;\r\n }\r\n let ret = \"\";\r\n let sum = 0;\r\n const _width = width - (this._characterWidths[\".\"] * 3);\r\n for (const char of text) {\r\n sum += this._characterWidths[char];\r\n if (sum < _width) {\r\n ret += char;\r\n } else {\r\n break;\r\n }\r\n }\r\n return _width < 0 ? \"\" : ret + \"...\";\r\n }\r\n\r\n resize(_size?: { width: number, height: number }) {\r\n let retVal;\r\n if (this.fitWidthToContent() || this.fitHeightToContent()) {\r\n retVal = super.resize.call(this, {\r\n width: _size.width,\r\n height: this._maxY\r\n });\r\n } else {\r\n retVal = super.resize.apply(this, arguments);\r\n }\r\n return retVal;\r\n }\r\n\r\n selectionChanged() {\r\n\r\n }\r\n\r\n highlightItem(_element, d) {\r\n\r\n }\r\n\r\n click(row, _col, sel) {\r\n\r\n }\r\n\r\n dblclick(row, _col, sel) {\r\n\r\n }\r\n\r\n mousein(row, _col, sel) {\r\n }\r\n\r\n mouseover(row, _col, sel) {\r\n }\r\n\r\n mouseout(row, _col, sel) {\r\n }\r\n}\r\nReactGantt.prototype._class += \" timeline_ReactGantt\";\r\n\r\nexport interface ReactGantt {\r\n titleColumn(): string;\r\n titleColumn(_: string): this;\r\n startDateColumn(): string;\r\n startDateColumn(_: string): this;\r\n endDateColumn(): string;\r\n endDateColumn(_: string): this;\r\n iconColumn(): string;\r\n iconColumn(_: string): this;\r\n colorColumn(): string;\r\n colorColumn(_: string): this;\r\n seriesColumn(): string;\r\n seriesColumn(_: string): this;\r\n bucketColumn(): string;\r\n bucketColumn(_: string): this;\r\n overlapTolerence(): number;\r\n overlapTolerence(_: number): this;\r\n smallestRangeWidth(): number;\r\n smallestRangeWidth(_: number): this;\r\n bucketHeight(): number;\r\n bucketHeight(_: number): this;\r\n gutter(): number;\r\n gutter(_: number): this;\r\n showToolbar_default(_: boolean): this;\r\n fontSize(): number;\r\n fontSize(_: number): this;\r\n fontFamily(): string;\r\n fontFamily(_: string): this;\r\n strokeWidth(): number;\r\n strokeWidth(_: number): this;\r\n stroke(): string;\r\n stroke(_: string): this;\r\n cornerRadius(): number;\r\n cornerRadius(_: number): this;\r\n fill(): string;\r\n fill(_: string): this;\r\n rangeFontColor(): string;\r\n rangeFontColor(_: string): this;\r\n rangePadding(): number;\r\n rangePadding(_: number): this;\r\n renderMode(): \"default\" | \"scale-all\";\r\n renderMode(_: \"default\" | \"scale-all\"): this;\r\n maxZoom(): number;\r\n maxZoom(_: number): this;\r\n fitWidthToContent(): boolean;\r\n fitWidthToContent(_: boolean): this;\r\n fitHeightToContent(): boolean;\r\n fitHeightToContent(_: boolean): this;\r\n evenSeriesBackground(): string;\r\n evenSeriesBackground(_: string): this;\r\n oddSeriesBackground(): string;\r\n oddSeriesBackground(_: string): this;\r\n}\r\n\r\nReactGantt.prototype.publish(\"fitWidthToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box width\");\r\nReactGantt.prototype.publish(\"fitHeightToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box height\");\r\nReactGantt.prototype.publish(\"titleColumn\", null, \"string\", \"Column name to for the title\");\r\nReactGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"Column name to for the start date\");\r\nReactGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"Column name to for the end date\");\r\nReactGantt.prototype.publish(\"iconColumn\", null, \"string\", \"Column name to for the icon\");\r\nReactGantt.prototype.publish(\"colorColumn\", null, \"string\", \"Column name to for the color\");\r\nReactGantt.prototype.publish(\"seriesColumn\", null, \"string\", \"Column name to for the series identifier\");\r\nReactGantt.prototype.publish(\"bucketColumn\", null, \"string\", \"Column name to for the bucket identifier\");\r\nReactGantt.prototype.publish(\"renderMode\", \"default\", \"set\", \"Render modes vary in features and performance\", [\"default\", \"scale-all\"]);\r\nReactGantt.prototype.publish(\"rangePadding\", 3, \"number\", \"Padding within each range rectangle (pixels)\");\r\nReactGantt.prototype.publish(\"fill\", \"#1f77b4\", \"string\", \"Background color of range rectangle\");\r\nReactGantt.prototype.publish(\"stroke\", null, \"string\", \"Color of range rectangle border\");\r\nReactGantt.prototype.publish(\"strokeWidth\", null, \"number\", \"Width of range rectangle border (pixels)\");\r\nReactGantt.prototype.publish(\"cornerRadius\", 3, \"number\", \"Space between range buckets (pixels)\");\r\nReactGantt.prototype.publish(\"fontFamily\", null, \"string\", \"Font family within range rectangle\", null, { optional: true });\r\nReactGantt.prototype.publish(\"fontSize\", 10, \"number\", \"Size of font within range rectangle (pixels)\");\r\nReactGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\r\nReactGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\r\nReactGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\r\nReactGantt.prototype.publish(\"bucketHeight\", 100, \"number\", \"Max height of range element (pixels)\");\r\nReactGantt.prototype.publish(\"gutter\", 2, \"number\", \"Space between range buckets (pixels)\");\r\nReactGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"Maximum zoom\");\r\nReactGantt.prototype.publish(\"evenSeriesBackground\", \"#FFFFFF\", \"html-color\", \"Background color of even series rows\");\r\nReactGantt.prototype.publish(\"oddSeriesBackground\", \"#DDDDDD\", \"html-color\", \"Background color of odd series rows\");\r\n","import { Axis } from \"@hpcc-js/chart\";\r\nimport { SVGWidget } from \"@hpcc-js/common\";\r\nimport { ReactGantt } from \"./ReactGantt\";\r\n\r\nexport type IAxisGanttData = [string, number | string, number | string, any?] | any[];\r\n\r\nexport class ReactAxisGantt extends SVGWidget {\r\n\r\n protected _topAxis: Axis = new Axis(\"center\")\r\n .orientation(\"top\")\r\n .type(\"linear\")\r\n .shrinkToFit(\"none\")\r\n .overlapMode(\"hide\")\r\n .extend(0)\r\n .tickFormat(\"d\")\r\n ;\r\n protected _gantt: ReactGantt = new ReactGantt(\"center\")\r\n .stroke(\"#000000\")\r\n ;\r\n protected _bottomAxis: Axis = new Axis(\"center\")\r\n .orientation(\"bottom\")\r\n .type(\"linear\")\r\n .shrinkToFit(\"none\")\r\n .overlapMode(\"hide\")\r\n .extend(0)\r\n .tickFormat(\"d\")\r\n ;\r\n\r\n protected _topAxisElement;\r\n protected _contentElement;\r\n protected _bottomAxisElement;\r\n protected _topRect;\r\n protected _contentRect;\r\n protected _bottomRect;\r\n\r\n protected rangeRenderer;\r\n\r\n constructor() {\r\n super();\r\n this._drawStartPos = \"origin\";\r\n this.rangeRenderer = function () {\r\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\r\n if (!arguments.length) return ret;\r\n return this;\r\n };\r\n }\r\n\r\n selection(_: any[]): this;\r\n selection(): any[];\r\n selection(_?: any[]): any[] | this {\r\n if (!arguments.length) return this._gantt.selection();\r\n this._gantt.selection(_);\r\n return this;\r\n }\r\n\r\n resizeWrappers() {\r\n\r\n const w = this.width();\r\n const h = this.height();\r\n\r\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\r\n\r\n const contentHeight = (h - (axisHeight * 2));\r\n const borderOffset1 = this.strokeWidth();\r\n this._topRect\r\n .attr(\"height\", axisHeight)\r\n .attr(\"width\", w)\r\n .attr(\"fill\", \"transparent\")\r\n ;\r\n this._topAxisElement.attr(\"transform\", \"translate(0 0)\");\r\n this._topAxis.resize({ height: axisHeight, width: w });\r\n this._contentRect\r\n .attr(\"height\", contentHeight)\r\n .attr(\"width\", w)\r\n .attr(\"fill\", \"transparent\")\r\n ;\r\n this._contentElement.attr(\"transform\", `translate(0 ${axisHeight + borderOffset1})`);\r\n this._gantt.resize({ height: contentHeight, width: w });\r\n this._bottomRect\r\n .attr(\"height\", axisHeight)\r\n .attr(\"width\", w)\r\n .attr(\"fill\", \"transparent\")\r\n ;\r\n this._bottomAxisElement.attr(\"transform\", `translate(0 ${axisHeight + contentHeight + borderOffset1})`);\r\n this._bottomAxis.resize({ height: axisHeight, width: w });\r\n }\r\n\r\n enter(domNode, element) {\r\n super.enter(domNode, element);\r\n\r\n this._gantt.click = (row, col, sel) => {\r\n this.click(row, col, sel);\r\n };\r\n\r\n this._gantt.dblclick = (row, col, sel) => {\r\n this.dblclick(row, col, sel);\r\n };\r\n\r\n this._topAxisElement = element.append(\"g\")\r\n .attr(\"class\", \"top-axis-wrapper\")\r\n ;\r\n this._topRect = this._topAxisElement.append(\"rect\")\r\n .attr(\"class\", \"top-axis-rect\")\r\n ;\r\n this._contentElement = element.append(\"g\")\r\n .attr(\"class\", \"content-wrapper\")\r\n ;\r\n this._contentRect = this._contentElement.append(\"rect\")\r\n .attr(\"class\", \"content-rect\")\r\n ;\r\n this._bottomAxisElement = element.append(\"g\")\r\n .attr(\"class\", \"bottom-axis-wrapper\")\r\n ;\r\n this._bottomRect = this._bottomAxisElement.append(\"rect\")\r\n .attr(\"class\", \"top-axis-rect\")\r\n ;\r\n this._topAxis.target(this._topAxisElement.node());\r\n this._gantt.target(this._contentElement.node()).bucketHeight(30);\r\n this._bottomAxis.target(this._bottomAxisElement.node());\r\n\r\n this.resizeWrappers();\r\n\r\n this._gantt.zoomedHook = (transform) => {\r\n this.onzoom(transform);\r\n };\r\n }\r\n\r\n onzoom(transform) {\r\n\r\n const w = this.width();\r\n const low = this._gantt._minStart;\r\n const high = this._gantt._maxEnd;\r\n const range = high - low;\r\n const wpp = range / w;\r\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\r\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\r\n\r\n this._topAxis\r\n .fontFamily(this.axisFontFamily())\r\n .fontSize(this.axisFontSize())\r\n .tickLength(this.axisTickLength())\r\n .low(nextLow)\r\n .high(nextHigh)\r\n .render()\r\n ;\r\n this._bottomAxis\r\n .fontFamily(this.axisFontFamily())\r\n .fontSize(this.axisFontSize())\r\n .tickLength(this.axisTickLength())\r\n .low(nextLow)\r\n .high(nextHigh)\r\n .render()\r\n ;\r\n }\r\n\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n this._topAxis.tickFormat(this.tickFormat()).render();\r\n this._bottomAxis.tickFormat(this.tickFormat()).render();\r\n this._gantt.render();\r\n }\r\n\r\n columns(): string[];\r\n columns(_: string[]): this;\r\n columns(_?: string[]): this | string[] {\r\n const retVal = super.columns.apply(this, arguments);\r\n if (arguments.length > 0) {\r\n this._gantt.columns(_);\r\n }\r\n return retVal;\r\n }\r\n\r\n data(): IAxisGanttData[];\r\n data(_: IAxisGanttData[]): this;\r\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\r\n const retVal = super.data.apply(this, arguments);\r\n if (arguments.length > 0) {\r\n const ganttData: any[] = this.data().map(n => {\r\n const ret = [...n];\r\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\r\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\r\n return ret;\r\n });\r\n this._gantt._minStart = Math.min(...ganttData.map(n => n[1])) ?? 0;\r\n this._gantt._maxEnd = Math.max(...ganttData.map(n => n[2])) ?? 1;\r\n this._gantt.data(ganttData);\r\n }\r\n return retVal;\r\n }\r\n\r\n resize(_size?: { width: number, height: number }) {\r\n const retVal = super.resize.apply(this, arguments);\r\n\r\n if (this._topAxisElement) {\r\n this.resizeWrappers();\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n click(row, col, sel) {\r\n\r\n }\r\n\r\n dblclick(row, col, sel) {\r\n\r\n }\r\n\r\n tooltip() {\r\n return this._gantt._tooltip;\r\n }\r\n}\r\nReactAxisGantt.prototype._class += \" timeline_ReactAxisGantt\";\r\n\r\nexport interface ReactAxisGantt {\r\n tickFormat(): string;\r\n tickFormat(_: string): this;\r\n tickFormat_exists(): boolean;\r\n overlapTolerence(): number;\r\n overlapTolerence(_: number): this;\r\n smallestRangeWidth(): number;\r\n smallestRangeWidth(_: number): this;\r\n scaleMode(): boolean;\r\n scaleMode(_: boolean): this;\r\n fontSize(): number;\r\n fontSize(_: number): this;\r\n fontFamily(): string;\r\n fontFamily(_: string): this;\r\n strokeWidth(): number;\r\n strokeWidth(_: number): this;\r\n stroke(): string;\r\n stroke(_: string): this;\r\n cornerRadius(): number;\r\n cornerRadius(_: number): this;\r\n axisFontSize(): number;\r\n axisFontSize(_: number): this;\r\n axisFontFamily(): string;\r\n axisFontFamily(_: string): this;\r\n axisTickLength(): number;\r\n axisTickLength(_: number): this;\r\n axisHeight(): number;\r\n axisHeight(_: number): this;\r\n titleColumn(): string;\r\n titleColumn(_: string): this;\r\n startDateColumn(): string;\r\n startDateColumn(_: string): this;\r\n endDateColumn(): string;\r\n endDateColumn(_: string): this;\r\n iconColumn(): string;\r\n iconColumn(_: string): this;\r\n colorColumn(): string;\r\n colorColumn(_: string): this;\r\n bucketColumn(): string;\r\n bucketColumn(_: string): this;\r\n maxZoom(): number;\r\n maxZoom(_: number): this;\r\n}\r\nReactAxisGantt.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\r\nReactAxisGantt.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\r\nReactAxisGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\r\nReactAxisGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\r\nReactAxisGantt.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\r\nReactAxisGantt.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\r\nReactAxisGantt.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\r\nReactAxisGantt.prototype.publishProxy(\"gutter\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"renderMode\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"fontSize\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"fontFamily\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"stroke\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"titleColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"iconColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"colorColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"maxZoom\", \"_gantt\");\r\nReactAxisGantt.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\r\n","import { min as d3Min, max as d3Max } from \"d3-array\";\r\nimport { Axis } from \"@hpcc-js/chart\";\r\nimport { Border2 } from \"@hpcc-js/layout\";\r\nimport { ReactGantt } from \"./ReactGantt\";\r\nimport { IAxisGanttData } from \"./ReactAxisGantt\";\r\nimport { React } from \"@hpcc-js/react\";\r\n\r\nexport class ReactAxisGanttSeries extends Border2 {\r\n\r\n protected _topAxis: Axis = new Axis(\"origin\")\r\n .orientation(\"top\")\r\n .type(\"linear\")\r\n .shrinkToFit(\"none\")\r\n .overlapMode(\"hide\")\r\n .extend(0)\r\n .tickFormat(\"d\")\r\n ;\r\n protected _gantt: ReactGantt = new ReactGantt(\"origin\")\r\n .stroke(\"#000000\")\r\n .fitHeightToContent(true)\r\n ;\r\n protected _bottomAxis: Axis = new Axis(\"origin\")\r\n .orientation(\"bottom\")\r\n .type(\"linear\")\r\n .shrinkToFit(\"none\")\r\n .overlapMode(\"hide\")\r\n .extend(0)\r\n .tickFormat(\"d\")\r\n ;\r\n\r\n protected _topAxisElement;\r\n protected _contentElement;\r\n protected _bottomAxisElement;\r\n protected _topRect;\r\n protected _contentRect;\r\n protected _bottomRect;\r\n\r\n constructor() {\r\n super();\r\n this.centerOverflowX_default(\"hidden\");\r\n this.centerOverflowY_default(\"auto\");\r\n }\r\n\r\n selection(_: any[]): this;\r\n selection(): any[];\r\n selection(_?: any[]): any[] | this {\r\n if (!arguments.length) return this._gantt.selection();\r\n this._gantt.selection(_);\r\n return this;\r\n }\r\n\r\n rangeRenderer(): React.FunctionComponent;\r\n rangeRenderer(_: React.FunctionComponent): this;\r\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\r\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\r\n if (!arguments.length) return ret;\r\n return this;\r\n }\r\n\r\n resizeWrappers() {\r\n\r\n const w = this.width();\r\n const h = this.height();\r\n\r\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\r\n const contentHeight = (h - (axisHeight * 2));\r\n\r\n this.bottomHeight(axisHeight);\r\n\r\n this._topWA.resize({\r\n width: w,\r\n height: axisHeight\r\n });\r\n this._centerWA.resize({\r\n width: w,\r\n height: contentHeight\r\n });\r\n this._bottomWA.resize({\r\n width: w,\r\n height: axisHeight\r\n });\r\n this.top().render();\r\n this.bottom().render();\r\n this.center().render();\r\n }\r\n\r\n enter(domNode, element) {\r\n super.enter(domNode, element);\r\n\r\n this._gantt.click = (row, col, sel) => {\r\n this.click(row, col, sel);\r\n };\r\n\r\n this._gantt.dblclick = (row, col, sel) => {\r\n this.dblclick(row, col, sel);\r\n };\r\n\r\n this.top(this._topAxis);\r\n this.center(this._gantt);\r\n this.bottom(this._bottomAxis);\r\n\r\n this.resizeWrappers();\r\n\r\n this._gantt.zoomedHook = (transform) => {\r\n this.onzoom(transform);\r\n };\r\n }\r\n\r\n onzoom(transform) {\r\n const w = this.width();\r\n const low = this._gantt._minStart;\r\n const high = this._gantt._maxEnd;\r\n const range = high - low;\r\n const wpp = range / w;\r\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\r\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\r\n\r\n this._topAxis\r\n .fontFamily(this.axisFontFamily())\r\n .fontSize(this.axisFontSize())\r\n .tickLength(this.axisTickLength())\r\n .low(nextLow)\r\n .high(nextHigh)\r\n .lazyRender()\r\n ;\r\n this._bottomAxis\r\n .fontFamily(this.axisFontFamily())\r\n .fontSize(this.axisFontSize())\r\n .tickLength(this.axisTickLength())\r\n .low(nextLow)\r\n .high(nextHigh)\r\n .lazyRender()\r\n ;\r\n }\r\n\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n this._topAxis.tickFormat(this.tickFormat()).render();\r\n this._bottomAxis.tickFormat(this.tickFormat()).render();\r\n this._gantt.render();\r\n }\r\n\r\n columns(): string[];\r\n columns(_: string[]): this;\r\n columns(_?: string[]): this | string[] {\r\n const retVal = super.columns.apply(this, arguments);\r\n if (arguments.length > 0) {\r\n this._gantt.columns(_);\r\n }\r\n return retVal;\r\n }\r\n\r\n data(): IAxisGanttData[];\r\n data(_: IAxisGanttData[]): this;\r\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\r\n const retVal = super.data.apply(this, arguments);\r\n if (arguments.length > 0) {\r\n const ganttData: any[] = this.data().map(n => {\r\n const ret = [...n];\r\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\r\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\r\n return ret;\r\n });\r\n\r\n this._gantt._minStart = d3Min(ganttData, n => n[1]);\r\n this._gantt._maxEnd = d3Max(ganttData, n => n[2]);\r\n this._gantt.data(ganttData);\r\n }\r\n return retVal;\r\n }\r\n\r\n resize(_size?: { width: number, height: number }) {\r\n const retVal = super.resize.apply(this, arguments);\r\n\r\n if (this._topAxisElement) {\r\n this.resizeWrappers();\r\n }\r\n\r\n return retVal;\r\n }\r\n\r\n click(row, col, sel) {\r\n\r\n }\r\n\r\n dblclick(row, col, sel) {\r\n\r\n }\r\n\r\n tooltip() {\r\n return this._gantt._tooltip;\r\n }\r\n}\r\nReactAxisGanttSeries.prototype._class += \" timeline_ReactAxisGanttSeries\";\r\n\r\nexport interface ReactAxisGanttSeries {\r\n tickFormat(): string;\r\n tickFormat(_: string): this;\r\n tickFormat_exists(): boolean;\r\n overlapTolerence(): number;\r\n overlapTolerence(_: number): this;\r\n smallestRangeWidth(): number;\r\n smallestRangeWidth(_: number): this;\r\n scaleMode(): boolean;\r\n scaleMode(_: boolean): this;\r\n fontSize(): number;\r\n fontSize(_: number): this;\r\n fontFamily(): string;\r\n fontFamily(_: string): this;\r\n strokeWidth(): number;\r\n strokeWidth(_: number): this;\r\n stroke(): string;\r\n stroke(_: string): this;\r\n cornerRadius(): number;\r\n cornerRadius(_: number): this;\r\n axisFontSize(): number;\r\n axisFontSize(_: number): this;\r\n axisFontFamily(): string;\r\n axisFontFamily(_: string): this;\r\n axisTickLength(): number;\r\n axisTickLength(_: number): this;\r\n axisHeight(): number;\r\n axisHeight(_: number): this;\r\n titleColumn(): string;\r\n titleColumn(_: string): this;\r\n startDateColumn(): string;\r\n startDateColumn(_: string): this;\r\n endDateColumn(): string;\r\n endDateColumn(_: string): this;\r\n iconColumn(): string;\r\n iconColumn(_: string): this;\r\n colorColumn(): string;\r\n colorColumn(_: string): this;\r\n seriesColumn(): string;\r\n seriesColumn(_: string): this;\r\n bucketColumn(): string;\r\n bucketColumn(_: string): this;\r\n maxZoom(): number;\r\n maxZoom(_: number): this;\r\n}\r\nReactAxisGanttSeries.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\r\nReactAxisGanttSeries.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\r\nReactAxisGanttSeries.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\r\nReactAxisGanttSeries.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\r\nReactAxisGanttSeries.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\r\nReactAxisGanttSeries.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\r\nReactAxisGanttSeries.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"gutter\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"renderMode\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"fontSize\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"fontFamily\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"stroke\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"titleColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"iconColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"colorColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"seriesColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"maxZoom\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"evenSeriesBackground\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"oddSeriesBackground\", \"_gantt\");\r\nReactAxisGanttSeries.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\r\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\r\nimport { ReactAxisGantt } from \"./ReactAxisGantt\";\r\n\r\nexport class ReactTimeline extends ReactAxisGantt {\r\n\r\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\r\n\r\n constructor(){\r\n super();\r\n this._drawStartPos = \"origin\";\r\n this._topAxis.type(\"time\");\r\n this._bottomAxis.type(\"time\");\r\n\r\n this.tooltipHTML((d: any) => {\r\n const parser = d3TimeParse(\"%Q\");\r\n const startTime = parser(d[1]);\r\n const endTime = parser(d[2]);\r\n\r\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\r\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\r\n });\r\n }\r\n\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n\r\n if(this.timePattern_exists()) {\r\n\r\n let minTimestamp = Infinity;\r\n let maxTimestamp = -Infinity;\r\n let lowDateStr = \"\";\r\n let highDateStr = \"\";\r\n this.data().map(n=>{\r\n const start = new Date(n[1]).getTime();\r\n const end = new Date(n[2]).getTime();\r\n if(minTimestamp > start){\r\n minTimestamp = start;\r\n lowDateStr = \"\" + n[1];\r\n }\r\n if(maxTimestamp < end){\r\n maxTimestamp = end;\r\n highDateStr = \"\" + n[2];\r\n }\r\n });\r\n this._topAxis\r\n .type(\"time\")\r\n .timePattern(this.timePattern())\r\n .overlapMode(\"none\")\r\n .tickFormat(this._axisLabelFormatter)\r\n .low(lowDateStr)\r\n .high(highDateStr)\r\n ;\r\n this._bottomAxis\r\n .type(\"time\")\r\n .timePattern(this.timePattern())\r\n .overlapMode(\"none\")\r\n .tickFormat(this._axisLabelFormatter)\r\n .low(lowDateStr)\r\n .high(highDateStr)\r\n ;\r\n this._gantt._minStart = minTimestamp;\r\n this._gantt._maxEnd = maxTimestamp;\r\n }\r\n }\r\n\r\n tooltipHTML(callback) {\r\n this._tooltipHTML = callback;\r\n this.tooltip().tooltipHTML(this._tooltipHTML);\r\n return this;\r\n }\r\n\r\n parseAxisValue(v) {\r\n const parseTime = d3TimeParse(\"%Q\");\r\n const parsedTime = parseTime(v);\r\n\r\n const formatTime = d3TimeFormat(this.timePattern());\r\n return formatTime(parsedTime);\r\n }\r\n\r\n onzoom(transform) {\r\n \r\n const w = this.width();\r\n const low = this._gantt._minStart;\r\n const high = this._gantt._maxEnd;\r\n const range = high - low;\r\n const wpp = range / w;\r\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\r\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\r\n\r\n this._topAxis\r\n .low(this.parseAxisValue(nextLow))\r\n .high(this.parseAxisValue(nextHigh))\r\n .render()\r\n ;\r\n this._bottomAxis\r\n .low(this.parseAxisValue(nextLow))\r\n .high(this.parseAxisValue(nextHigh))\r\n .render()\r\n ;\r\n }\r\n\r\n _tooltipHTML: (_) => string;\r\n}\r\nReactTimeline.prototype._class += \" timeline_ReactTimeline\";\r\n\r\nexport interface ReactTimeline {\r\n timePattern(): string;\r\n timePattern(_: string): this;\r\n timePattern_exists(): boolean;\r\n tooltipTimeFormat(): string;\r\n tooltipTimeFormat(_: string): this;\r\n}\r\nReactTimeline.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, {optional:true});\r\nReactTimeline.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\r\n\r\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\r\nimport { ReactAxisGanttSeries } from \"./ReactAxisGanttSeries\";\r\n\r\nconst parseTime = d3TimeParse(\"%Q\");\r\nexport class ReactTimelineSeries extends ReactAxisGanttSeries {\r\n\r\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\r\n\r\n constructor(){\r\n super();\r\n this._topAxis.type(\"time\");\r\n this._bottomAxis.type(\"time\");\r\n\r\n this.tooltipHTML((d: any) => {\r\n const startTime = parseTime(d[1]);\r\n const endTime = parseTime(d[2]);\r\n\r\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\r\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\r\n });\r\n }\r\n\r\n update(domNode, element) {\r\n super.update(domNode, element);\r\n\r\n if(this.timePattern_exists()) {\r\n\r\n let minTimestamp = Infinity;\r\n let maxTimestamp = -Infinity;\r\n let lowDateStr = \"\";\r\n let highDateStr = \"\";\r\n this.data().forEach(n=>{\r\n const start = new Date(n[1]).getTime();\r\n const end = new Date(n[2]).getTime();\r\n if(minTimestamp > start){\r\n minTimestamp = start;\r\n lowDateStr = \"\" + n[1];\r\n }\r\n if(maxTimestamp < end){\r\n maxTimestamp = end;\r\n highDateStr = \"\" + n[2];\r\n }\r\n });\r\n this._topAxis\r\n .type(\"time\")\r\n .timePattern(this.timePattern())\r\n .overlapMode(\"none\")\r\n .tickFormat(this._axisLabelFormatter)\r\n .low(lowDateStr)\r\n .high(highDateStr)\r\n ;\r\n this._bottomAxis\r\n .type(\"time\")\r\n .timePattern(this.timePattern())\r\n .overlapMode(\"none\")\r\n .tickFormat(this._axisLabelFormatter)\r\n .low(lowDateStr)\r\n .high(highDateStr)\r\n ;\r\n this._gantt._minStart = minTimestamp;\r\n this._gantt._maxEnd = maxTimestamp;\r\n }\r\n }\r\n\r\n tooltipHTML(callback) {\r\n this._tooltipHTML = callback;\r\n this.tooltip().tooltipHTML(this._tooltipHTML);\r\n return this;\r\n }\r\n\r\n parseAxisValue(v) {\r\n const parsedTime = parseTime(v);\r\n\r\n const formatTime = d3TimeFormat(this.timePattern());\r\n return formatTime(parsedTime);\r\n }\r\n\r\n onzoom(transform) {\r\n \r\n const w = this.width();\r\n const low = this._gantt._minStart;\r\n const high = this._gantt._maxEnd;\r\n const range = high - low;\r\n const wpp = range / w;\r\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\r\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\r\n\r\n this._topAxis\r\n .low(this.parseAxisValue(nextLow))\r\n .high(this.parseAxisValue(nextHigh))\r\n .render()\r\n ;\r\n this._bottomAxis\r\n .low(this.parseAxisValue(nextLow))\r\n .high(this.parseAxisValue(nextHigh))\r\n .render()\r\n ;\r\n }\r\n\r\n _tooltipHTML: (_) => string;\r\n}\r\nReactTimelineSeries.prototype._class += \" timeline_ReactTimelineSeries\";\r\n\r\nexport interface ReactTimelineSeries {\r\n timePattern(): string;\r\n timePattern(_: string): this;\r\n timePattern_exists(): boolean;\r\n tooltipTimeFormat(): string;\r\n tooltipTimeFormat(_: string): this;\r\n}\r\nReactTimelineSeries.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, {optional:true});\r\nReactTimelineSeries.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\r\n\r\n"],"mappings":"8nBAAO,ICgBHA,EAAgB,SAASC,EAAGC,GAI9B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,CAAG,GAC1E,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOK,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,GAAI,EAC7FP,EAAcC,EAAGC,EAC1B,EAEO,SAASS,EAAUV,EAAGC,GAC3B,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIU,UAAU,uBAAyBC,OAAOX,GAAK,iCAE7D,SAASY,IAAOC,KAAKC,YAAcf,CAAG,CADtCD,EAAcC,EAAGC,GAEjBD,EAAEO,UAAkB,OAANN,EAAaC,OAAOc,OAAOf,IAAMY,EAAGN,UAAYN,EAAEM,UAAW,IAAIM,EACjF,CAEO,IAAII,EAAW,WAQpB,OAPAA,EAAWf,OAAOgB,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAIf,KADTc,EAAIG,UAAUF,GACOnB,OAAOK,UAAUC,eAAeC,KAAKW,EAAGd,KAAIa,EAAEb,GAAKc,EAAEd,IAE9E,OAAOa,CACX,EACOF,EAASQ,MAAMX,KAAMS,UAC9B,EA6KO,SAASG,EA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