@hpcc-js/timeline 2.54.1 → 2.56.0
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/dist/index.js +1201 -1626
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +2 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +36 -38
- package/src/MiniGantt.ts +10 -9
- package/src/ReactAxisGantt.ts +8 -1
- package/src/ReactAxisGanttSeries.ts +2 -2
- package/src/ReactGantt.ts +4 -0
- package/src/ReactTimeline.ts +23 -12
- package/src/ReactTimelineSeries.ts +21 -10
- package/src/__package__.ts +2 -2
- package/src/index.ts +7 -7
- package/types/MiniGantt.d.ts +4 -5
- package/types/ReactAxisGantt.d.ts +2 -2
- package/types/ReactAxisGanttSeries.d.ts +2 -3
- package/types/ReactGantt.d.ts +1 -1
- package/types/ReactTimeline.d.ts +2 -3
- package/types/ReactTimelineSeries.d.ts +1 -2
- package/types/__package__.d.ts +2 -3
- package/types/index.d.ts +7 -8
- package/dist/index.es6.js +0 -1625
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/types/MiniGantt.d.ts.map +0 -1
- package/types/ReactAxisGantt.d.ts.map +0 -1
- package/types/ReactAxisGanttSeries.d.ts.map +0 -1
- package/types/ReactGantt.d.ts.map +0 -1
- package/types/ReactTimeline.d.ts.map +0 -1
- package/types/ReactTimelineSeries.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types-3.4/MiniGantt.d.ts +0 -106
- package/types-3.4/ReactAxisGantt.d.ts +0 -83
- package/types-3.4/ReactAxisGanttSeries.d.ts +0 -82
- package/types-3.4/ReactGantt.d.ts +0 -135
- package/types-3.4/ReactTimeline.d.ts +0 -18
- package/types-3.4/ReactTimelineSeries.d.ts +0 -18
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/index.d.ts +0 -8
|
@@ -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,s,n,r){var a=Object.create,l=Object.defineProperty,h=Object.getOwnPropertyDescriptor,p=Object.getOwnPropertyNames,c=Object.getPrototypeOf,d=Object.prototype.hasOwnProperty,u=(t,e,i)=>(i=null!=t?a(c(t)):{},((t,e,i,o)=>{if(e&&"object"==typeof e||"function"==typeof e)for(var s,n=p(e),r=0,a=n.length;r<a;r++)s=n[r],d.call(t,s)||s===i||l(t,s,{get:(t=>e[t]).bind(null,s),enumerable:!(o=h(e,s))||o.enumerable});return t})(!e&&t&&t.__esModule?i:l(i,"default",{value:t,enumerable:!0}),t));e=u(e),i=u(i),o=u(o),s=u(s),n=u(n),r=u(r);var m=class extends o.SVGWidget{tlAxis;brAxis;verticalBands;_zoom;gUpperContent;gUpperAxis;gMiddleContent;gLowerAxis;gLowerContent;localRect=(0,o.local)();localEntityPin=(0,o.local)();tooltipFormatter;_dateCache;rootExtent;_title_idx=0;_startDate_idx=1;_endDate_idx=2;_icon_idx=-1;_color_idx=-1;_yoffset_idx=-1;constructor(){super(),e.ITooltip.call(this),o.Utility.SimpleSelectionMixin.call(this),this._drawStartPos="origin",this.tooltipHTML(t=>`<center>${t[this._title_idx]}</center><br>${this.tooltipFormatter(this.brAxis.parse(t[this._startDate_idx]))} -> ${this.tooltipFormatter(this.brAxis.parse(t[this._endDate_idx]))}`),this.tlAxis=(new i.Axis).type("time"),this.brAxis=(new i.Axis).type("time"),this.verticalBands=(0,o.scaleBand)().paddingOuter(.2).paddingInner(.2)}isHorizontal(){return"horizontal"===this.orientation()}fullExtent(){return(0,o.extent)([...this.data().map(t=>t[this._startDate_idx]),...this.data().filter(t=>!!t[this._endDate_idx]).map(t=>t[this._endDate_idx])])}extent(){const 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())){const e=(0,o.timeParse)(this.timePattern()),i=(0,o.timeFormat)(this.timePattern()),s=e(t[0]),n=e(t[1]);if(t[0]===t[1])t[0]=i(new Date(s.setFullYear(s.getFullYear()-1))),t[1]=i(new Date(s.setFullYear(s.getFullYear()+2)));else{const e=s.getTime(),o=n.getTime()-e;t[0]=i(s),t[1]=i(new Date(e+2*o))}}return t}dataStartPos(t){if(void 0!==this._dateCache[t[this._startDate_idx]])return this._dateCache[t[this._startDate_idx]];const e=this.brAxis.scalePos(t[this._startDate_idx]);return this._dateCache[t[this._startDate_idx]]=e,e}dataEndPos(t){if(void 0!==this._dateCache[t[this._endDate_idx]])return this._dateCache[t[this._endDate_idx]];const e=this.brAxis.scalePos(t[this._endDate_idx]);return this._dateCache[t[this._endDate_idx]]=e,e}dataWidth(t){return this.dataEndPos(t)-this.dataStartPos(t)}transform;resetZoom(){this._zoom.transform(this.element(),o.zoomIdentity.translate(0,this.isHorizontal()?0:this.height()))}zoomed(){this.transform=(0,o.d3Event)().transform,this.render()}background;enter(t,e){super.enter(t,e),this._zoom=(0,o.zoom)().scaleExtent([0,this.maxZoom()]).on("zoom",()=>{this.zoomed()}),this.background=e.append("rect").attr("fill","white").attr("opacity",0).on("dblclick",()=>{(0,o.d3Event)().stopPropagation(),delete this.rootExtent,this.resetZoom()}),this.gUpperContent=e.append("g").attr("class","gUpperContent"),this.gUpperAxis=e.append("g").attr("class","gUpperAxis"),this.gMiddleContent=e.append("g").attr("class","gMiddleContent"),this.gLowerAxis=e.append("g").attr("class","gLowerAxis"),this.gLowerContent=e.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),e.call(this._zoom),this._selection.widgetElement(this.gMiddleContent)}_prevIsHorizontal;update(t,e){if(super.update(t,e),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=(0,o.timeFormat)(this.tooltipTimeFormat());const i=this.width(),s=this.height();this.background.attr("x",0).attr("y",0).attr("width",i).attr("height",s);const n=this.extent();if(this.tlAxis.x(i/2).orientation(this.isHorizontal()?"top":"left").reverse(!this.isHorizontal()).timePattern(this.timePattern()).width(i-1).low(n[0]).high(n[1]).updateScale(),this.brAxis.x(i/2).y(s/2).orientation(this.isHorizontal()?"bottom":"right").reverse(!this.isHorizontal()).timePattern(this.timePattern()).width(i-1).height(s).low(n[0]).high(n[1]).updateScale(),this.transform){let t,e;this.isHorizontal()?(t=this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0))),e=this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(i-1)))):(t=this.tlAxis.parseInvert(this.tlAxis.invert(-this.transform.invertY(0))),e=this.tlAxis.parseInvert(this.tlAxis.invert(-this.transform.invertY(s-1)))),this.tlAxis.low(t).high(e).updateScale(),this.brAxis.low(t).high(e).updateScale()}const r=this.data().sort(this.isHorizontal()?(t,e)=>{const i=this.brAxis.scalePos(t[1])-this.brAxis.scalePos(e[1]);return 0===i?(""+t[0]).localeCompare(""+e[0]):i}:(t,e)=>this.brAxis.scalePos(e[1])-this.brAxis.scalePos(t[1])),a=r.filter(t=>!t[this._endDate_idx]),l=r.filter(t=>!!t[this._endDate_idx]);this.tlAxis.render(),this.brAxis.render();const h=this.brAxis.getBBox();let p=this.updateEntityPins(a);const c=h.height;let d=s-p;const u=-1!==this._yoffset_idx?Math.min.apply(void 0,this.data().filter(t=>!isNaN(t[this._yoffset_idx])).map(t=>t[this._yoffset_idx])):0;if(a.length>0&&0===l.length){this.tlAxis.visible(!1);let t=p/4;t>s/2-c&&(t=s/2-c);const e=s/2+t,i=-1*(s/2-c-t),o=0!==u?u/2:0;this.gUpperContent.attr("transform",`translate(0, ${e-o})`),this.gLowerAxis.attr("transform",`translate(0, ${i-o})`)}else 0===a.length&&l.length>0?(this.tlAxis.visible(!0),this.gUpperContent.attr("transform",`translate(0, ${p})`),this.gUpperAxis.attr("transform",`translate(0, ${p})`)):(p-=u,d+=u,this.tlAxis.visible(!0),this.gUpperContent.attr("transform",`translate(0, ${p})`),this.gUpperAxis.attr("transform",`translate(0, ${p})`),this.gMiddleContent.attr("transform",`translate(0, ${p})`));this.tlAxis.render();const m=this.tlAxis.getBBox(),_=[],x={};for(const o of l){for(let t=0;t<_.length;++t){const e=_[t];if(e.endPos+this.overlapTolerence()<=this.dataStartPos(o)){x[o]=t,e.endPos=this.dataEndPos(o);break}}void 0===x[o]&&(x[o]=_.length,_.push({endPos:this.dataEndPos(o)}))}const g=this.isHorizontal()?0+m.height:0+m.width,b=this.isHorizontal()?d-h.height:i-h.width;this.verticalBands.range([g,b]).domain(_.map((t,e)=>e)),l.length>0&&this.updateEventRanges(a,l,x,d,m,h,i)}updateEntityPins(t){let e=0;const i=this,s=this.gUpperContent.selectAll(".entity_pin").data(t,t=>t[0]+":"+t[1]),n=this.eventFontColorColumn()?this.columns().indexOf(this.eventFontColorColumn()):-1,r=this.eventBorderColorColumn()?this.columns().indexOf(this.eventBorderColorColumn()):-1,a=this.eventBackgroundColorColumn()?this.columns().indexOf(this.eventBackgroundColorColumn()):-1,l={};for(const o of t){const t=void 0!==o[i._title_idx]?o[i._title_idx]:o[0];l[t]=l[t]?l[t]+1:1}const h=Object.keys(l),p=i.eventGroupOffset(),c=s.enter().append("g").attr("class","entity_pin");c.append("line").attr("class","entity_line"),c.on("mouseover",function(t){(0,o.select)(this).raise()}).each(function(t,e){const s=(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===n?"#333":t[n]).titleColor(-1===n?"#333":t[n]).descriptionColor(-1===n?"#333":t[n]).backgroundShape("pin").backgroundColorFill(-1===n?"#f8f8f8":t[a]).backgroundColorStroke(-1===n?"#ccc":t[r]).cornerRadius(5).arrowHeight(10).arrowWidth(16);i.localEntityPin.set(this,s)}).merge(s).each(function(t,s){const a=i.localEntityPin.get(this),l=void 0!==t[i._title_idx]?t[i._title_idx]:a.title(),c=i.dataStartPos(t)-0;let d=h.indexOf(l)%i.eventGroupMod()*p-5;if(void 0!==t[i._yoffset_idx]&&(d+=t[i._yoffset_idx]?t[i._yoffset_idx]:0),t[i._title_idx]!==a.title()&&t[i._startDate_idx]!==a.description()){const e=i.brAxis.parse(t[i._startDate_idx]),o=i.tooltipFormatter(e);a.x(c).y(d).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(o).animationFrameRender()}else a.move({x:c,y:d});const u=a.calcHeight();e<u&&(e=u),(0,o.select)(this).selectAll(".entity_line").attr("x1",c).attr("x2",c).attr("y1",0).attr("y2",d).style("stroke",-1===n?"#ccc":t[r]).style("stroke-width",1)}),s.exit().each(function(t,e){i.localEntityPin.get(this).target(null)}).remove();const d=Math.abs(Math.min(t.length,i.eventGroupMod())*i.eventGroupOffset());return e+d}updateEventRanges(t,e,i,s,n,r,a){const l=this,h=this.gMiddleContent.selectAll(".line").data(t,t=>t[l._title_idx]);h.enter().append("line").attr("class","line").merge(h).attr(this.isHorizontal()?"x1":"y1",t=>this.dataStartPos(t)-0).attr(this.isHorizontal()?"x2":"y2",t=>this.dataStartPos(t)-0).attr(this.isHorizontal()?"y1":"x1",this.isHorizontal()?n.height:n.width).attr(this.isHorizontal()?"y2":"x2",this.isHorizontal()?s-r.height:a-r.width),h.exit().remove();const p=this.gMiddleContent.selectAll(".buckets").data(e,t=>t[l._title_idx]);p.enter().append("g").attr("class","buckets").call(this._selection.enter.bind(this._selection)).each(function(t){const e=(new o.EntityRect).target(this).iconDiameter(28).iconPaddingPercent(0).titleFontSize(28).titleColor(l.rangeFontColor()).descriptionColor(l.rangeFontColor()).iconColor(l.rangeFontColor()).backgroundShape("rect").backgroundColorFill(t[l._color_idx]);l.localRect.set(this,e),l.enterEntityRect(e,t)}).on("click",function(t){l.click(l.rowToObj(t),"range",l._selection.selected(this))},!1).on("dblclick",function(t){l.rootExtent=t,l.resetZoom(),l.dblclick(l.rowToObj(t),"range",l._selection.selected(this))},!0).on("mouseout.tooltip",this.tooltip.hide).on("mousemove.tooltip",this.tooltip.show).merge(p).attr("transform",t=>l.isHorizontal()?`translate(${this.dataStartPos(t)}, ${this.verticalBands(i[t])}) `:`translate(${this.verticalBands(i[t])}, ${this.dataStartPos(t)}) `).each(function(t){const e=l.localRect.get(this),i=l.dataWidth(t)/2,o=l.verticalBands.bandwidth()/2,s=Math.max(l.dataWidth(t),2),n=Math.max(l.verticalBands.bandwidth(),2),r=.191*n,a=.618*n,h=a;e.pos(l.isHorizontal()?{x:i,y:o}:{x:o,y:i}).fixedHeight(l.isHorizontal()?n:s).fixedWidth(l.isHorizontal()?s:n).icon(void 0!==t[l._icon_idx]?t[l._icon_idx]:"").title(void 0!==t[l._title_idx]?t[l._title_idx]:"").padding(r).iconDiameter(h).titleFontSize(a),1.5*h>s&&e.icon(null),l.updateEntityRect(e,t[l._icon_idx]),e.render()}),p.exit().remove()}exit(t,e){this.brAxis.target(null),this.tlAxis.target(null),super.exit(t,e)}click(t,e,i){}dblclick(t,e,i){}enterEntityRect(t,e){}updateEntityRect(t,e){}};m.prototype._class+=" timeline_MiniGantt",m.prototype.implements(e.ITooltip.prototype),m.prototype.mixin(o.Utility.SimpleSelectionMixin),m.prototype.publish("timePattern","%Y-%m-%d","string","timePattern"),m.prototype.publish("tickFormat",null,"string","tickFormat",void 0,{optional:!0}),m.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","tooltipTimeFormat"),m.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),m.prototype.publish("orientation","horizontal","set","orientation",["horizontal","vertical"]),m.prototype.publish("rangeFontColor","#ecf0f1","html-color","rangeFontColor"),m.prototype.publish("titleColumn",null,"string","titleColumn"),m.prototype.publish("startDateColumn",null,"string","startDateColumn"),m.prototype.publish("endDateColumn",null,"string","endDateColumn"),m.prototype.publish("iconColumn",null,"string","iconColumn"),m.prototype.publish("colorColumn",null,"string","colorColumn"),m.prototype.publish("yOffsetColumn",null,"string","yOffsetColumn"),m.prototype.publish("maxZoom",16,"number","maxZoom"),m.prototype.publish("eventGroupOffset",-50,"number","eventGroupOffset"),m.prototype.publish("eventGroupMod",5,"number","eventGroupMod"),m.prototype.publish("eventFontColorColumn",null,"string","eventFontColorColumn"),m.prototype.publish("eventBorderColorColumn",null,"string","eventBorderColorColumn"),m.prototype.publish("eventBackgroundColorColumn",null,"string","eventBackgroundColorColumn"),m.prototype.publish("hideIconWhenCollapsed",!1,"boolean","hideIconWhenCollapsed"),m.prototype.publish("hideTitleWhenCollapsed",!1,"boolean","hideTitleWhenCollapsed"),m.prototype.publish("hideDescriptionWhenCollapsed",!1,"boolean","hideDescriptionWhenCollapsed"),m.prototype.publish("hideAnnotationsWhenCollapsed",!0,"boolean","hideAnnotationsWhenCollapsed"),m.prototype.publish("centerOnMostRecent",!1,"boolean","If true, the timeline will be centered on the most recent data point");var _=class extends o.SVGZoomWidget{_selection=new o.Utility.Selection(this);_buckets;_interpolateX;_interpolateY;_bucketsBySeries;_dataBySeries;_origIdxMap;_seriesBackgrounds;_maxFontSize;_tooltip;_minStart;_maxEnd;_title_idx=0;_startDate_idx=1;_endDate_idx=2;_icon_idx=-1;_color_idx=-1;_series_idx=-1;_bucket_idx=-1;_yoffset_idx=-1;_maxX;_maxY;_rangeOptions={rangePadding:2,fontFamily:"Verdana",fontSize:12,fill:"white",stroke:"black",textFill:"black",cornerRadius:3,strokeWidth:0};constructor(t="origin"){super(),this._drawStartPos=t,this.showToolbar_default(!1),this._tooltip=new s.HTMLTooltip,this._tooltip.tooltipHTML(t=>`<div style="text-align:center;">${t[0]}<br/><br/>${t[1]} -> ${t[2]}</div>`),this._tooltip.followCursor(!0)}selection(t){return arguments.length?(this._selection.set(t),this):this._selection.get()}_rangeRenderer=n.LabelledRect;rangeRenderer(t){return arguments.length?(this._rangeRenderer=t,this._rangeRenderer):this._rangeRenderer}enter(t,e){super.enter(t,e);const i=this;e.on("click",function(t){i._selection.clear()}),this._tooltip.target(t)}update(t,e){super.update(t,e),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;const i=this,s=this.width(),n=s;if(this._interpolateX=(0,o.scaleLinear)().domain([this._minStart,this._maxEnd]).range([0,n]),this.data().sort((t,e)=>t[1]-e[1]),this._series_idx>-1){this._origIdxMap={},this._dataBySeries={},this._bucketsBySeries={},this.data().forEach((t,e)=>{const i=t[this._series_idx];this._dataBySeries[i]||(this._origIdxMap[i]={},this._dataBySeries[i]=[]),this._dataBySeries[i].push({dataRow:t,origIdx:e})});const t=this.gutter();let e=0;const n=Object.keys(this._dataBySeries);n.forEach(t=>{this._dataBySeries[t].sort((t,e)=>t.dataRow[1]-e.dataRow[1]),this._bucketsBySeries[t]=this.calcBuckets(this._dataBySeries[t].map(t=>t.dataRow),1,2),this._bucketsBySeries[t].bucketHeight=this.bucketHeight(),this._bucketsBySeries[t].bucketOffset=e,e+=(this._bucketsBySeries[t].bucketHeight+this.strokeWidth()+this.gutter())*(this._bucketsBySeries[t].maxBucket+1),this._dataBySeries[t].forEach((e,i)=>{this._origIdxMap[t][e.origIdx]=i})}),this._seriesBackgrounds=this._renderElement.selectAll(".series-background").data(n.map(t=>this._bucketsBySeries[t])),this._seriesBackgrounds.join(t=>t.append("rect").attr("class","series-background"),t=>t,t=>t.each(function(t){delete t.element}).remove()).attr("opacity",t=>t.props&&t.props.hidden?0:1).each(function(e,n){(0,o.select)(this).attr("x",0).attr("y",e.bucketOffset-t/2).attr("width",s).attr("height",(e.bucketHeight+t)*(e.maxBucket+1)+t).attr("fill",n%2?i.oddSeriesBackground():i.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);const r=this._interpolateX(this._minStart);this.zoomTo([r,0],1);const a=this.bucketHeight();this.setRangeOptions(),this._maxFontScale=a-2*this.rangePadding(),this.measureDataText();const l=this._renderElement.selectAll(".item").data(this.data()),h=this.strokeWidth(),p=2*h;l.join(t=>t.append("g").attr("class","item").on("click.selectionBag",function(t,e){const s=void 0===t.id?e:t.id;i._selection.isSelected({_id:s,element:t.element})?i._selection.clear():i._selection.click({_id:s,element:()=>t.element},o.d3Event),i.selectionChanged(),(0,o.d3Event)().stopPropagation()}).on("click",function(t){const e=t.element.classed("selected");t[i.columns().length]&&(t.__lparam=t[i.columns().length]),i.click(t,"",e)}).on("dblclick",function(t){const e=t.element.classed("selected");t[i.columns().length]&&(t.__lparam=t[i.columns().length]),i.click(t,"",e)}).on("mousein",function(t){i.highlightItem((0,o.select)(this),t);const e=t.element.classed("selected");i.mousein(t,"",e)}).on("mouseover",function(t){const e=(0,o.d3Event)();i._tooltip._triggerElement=t.element,i._tooltip._cursorLoc=[e.clientX,e.clientY],i._tooltip.data(t).visible(!0).fitContent(!0).render(),i.highlightItem((0,o.select)(this),t);const s=t.element.classed("selected");i.mouseover(t,"",s)}).on("mouseout",function(t){i._tooltip.visible(!1).render(),i.highlightItem(null,null);const e=t.element.classed("selected");i.mouseout(t,"",e)}).each(function(t,e){t.that=this,t.element=(0,o.select)(this),t.x=i._interpolateX(t[1]);const s=i._interpolateX(t[2]);if(i._series_idx>-1){const o=t[i._series_idx],s=i._bucketsBySeries[o].bucketMap[i._origIdxMap[o][e]];t.y=i._bucketsBySeries[o].interpolateY(s)+i._bucketsBySeries[o].bucketOffset}else{const o=-1===i._bucket_idx?e:t[i._bucket_idx];t.y=i._buckets.interpolateY(i._buckets.bucketMap[o])}t.props={...t[3],text:t[0]},t.props.width=s-t.x,t.props.height=a,t.x+=h,t.y+=h,t.props.width-=p,t.props.height-=p,t.element.attr("transform",`translate(${t.x+t.props.width/2} ${t.y+t.props.height/2})`)}),t=>t,t=>t.each(function(t){delete t.element}).remove()).attr("opacity",t=>t.props&&t.props.hidden?0:1).each(function(t,e){if(t.that=this,i._series_idx>-1){const o=t[i._series_idx];t.x=i.renderRangeElement(t,e,!1,i._rangeOptions,o)}else t.x=i.renderRangeElement(t,e,!1,i._rangeOptions)}).on("dblclick.zoom",t=>{const e=this._interpolateX(t[1]),i=s/(this._interpolateX(t[2])-e);this.zoomTo([-e*i,0],i)}),e.on("dblclick.zoom",null)}exit(t,e){this._tooltip.target(null),super.exit(t,e)}renderRangeElement(t,e,i=!1,s={},r){const a=s.strokeWidth,l=2*a,h=s.rangePadding;let p;const c=isNaN(this._transform.x)?0:this._transform.x,d=isNaN(this._transform.k)?1:this._transform.k;let u;const m=this.bucketHeight();t.that.setAttribute("data-series",r),this._color_idx>-1&&t.that.setAttribute("data-color",t[this._color_idx]),void 0!==r?(u=this._bucketsBySeries[r].bucketMap[this._origIdxMap[r][e]],t.that.setAttribute("data-b",u),t.that.setAttribute("data-bucketOffset",this._bucketsBySeries[r].bucketOffset),t.y=this._bucketsBySeries[r].interpolateY(u)+this._bucketsBySeries[r].bucketOffset,t.that.setAttribute("data-dy",t.y)):(u=this._buckets.bucketMap[e],t.y=this._buckets.interpolateY(u)),this._color_idx>-1&&(s.fill=t[this._color_idx]),i?(t.x=this._interpolateX(t[1])*d,p=this._interpolateX(t[2])*d,t.props={...t[3],text:t[0]},t.props.width=(p-t.x)/d,t.x+=c,t.props.width*=d):(t.x=this._interpolateX(t[1]),p=this._interpolateX(t[2]),t.props={...t[3],text:t[0]},t.props.width=(p-t.x)/d),t.props.height=m,void 0===r&&this._buckets.bucketScale<1&&(t.props.height=this._buckets.bucketScale*m),void 0===t.element&&t.that&&(t.element=(0,o.select)(t.that)),t.element.attr("transform",`translate(${t.x+t.props.width/2} ${t.y+t.props.height/2})`),t.x+=a,t.y+=a,t.props.width-=l,t.props.height-=l,t.props.width=t.props.width<1?1:t.props.width,t.props.height=t.props.height<1?1:t.props.height;let _=this.truncateText(t.props.text,t.props.width-h,this._maxFontScale);_!==t.props.text?_=this.truncateText(t.props.text,t.props.width-h):t.props.fontSize=this._maxFontScale*s.fontSize,void 0===r&&this._buckets.bucketScale<1&&(t.props.fontSize=Math.min(this._maxFontScale,this._buckets.bucketScale)*s.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),(0,n.render)(this._rangeRenderer,{...s,...t.props,text:_},t.that)}setRangeOptions(){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()}}_transform={k:1,x:0,y:0};zoomed(t){if(this._transform=t,"scale-all"===this.renderMode())this._zoomScale=t.k,this._zoomTranslate=[t.x,0],this._zoomG.attr("transform",`translate(${t.x} 0)scale(${t.k} 1)`);else{const t=this._rangeOptions;this.data().forEach((e,i)=>{if(this._color_idx>-1&&(t.fill=e[this._color_idx]),this._series_idx>-1){const o=e[this._series_idx];this.renderRangeElement(e,i,!0,t,o)}else this.renderRangeElement(e,i,!0,t)})}this.zoomedHook(t)}zoomedHook(t){}calcBuckets(t,e,i,s){const n={},r={},a=this.overlapTolerence(),l=[{end:-1/0}];let h=0;void 0!==s?(t.forEach((t,e)=>{n[e]=t[s],r[t[s]]=!0}),h=Object.keys(r).length):t.forEach((t,o)=>{for(let s=0;s<l.length;++s)if(0===o||l[s][i]+a<=t[e]){n[o]=s,h<s&&(h=s),l[s][i]=t[i];break}if(void 0===n[o]){n[o]=l.length;const e={};e[i]=t[i],l.push(e)}h<n[o]&&(h=n[o])});const p=(h+1)*(this.bucketHeight()+this.gutter());return{bucketMap:n,maxBucket:h,bucketScale:this.height()/p,interpolateY:(0,o.scaleLinear)().domain([0,h+1]).range([0,Math.min(this.height(),p)])}}data(t){const e=super.data.apply(this,arguments);return arguments.length>0&&(this._minStart=Math.min(...this.data().map(t=>t[1]))??0,this._maxEnd=Math.max(...this.data().map(t=>t[2]))??1,this.measureDataText(!0)),e}_textWidths;_maxFontScale;_characterWidths;_prevFontFamily;_prevFontSize;measureDataText(t=!1){const e={},i={},s=this.fontFamily(),n=this.fontSize(),r=this.bucketHeight();r&&(this._maxFontScale=(r-2*this.rangePadding())/n),(t||this._prevFontFamily!==s||this._prevFontSize!==n)&&(i["."]=o.Utility.textSize(".",s,n).width,this.data().forEach(t=>{e[t[0]]||(e[t[0]]=o.Utility.textSize(t[0],s,n).width),t[0].split("").forEach(t=>{i[t]||(i[t]=o.Utility.textSize(t,s,n).width)})}),this._textWidths=e,this._characterWidths=i),this._prevFontFamily=s,this._prevFontSize=n}truncateText(t,e,i=1){if(this._textWidths[t]*i<e)return t;let o="",s=0;const n=e-3*this._characterWidths["."];for(const r of t){if(s+=this._characterWidths[r],!(s<n))break;o+=r}return n<0?"":o+"..."}resize(t){let e;return e=this.fitWidthToContent()||this.fitHeightToContent()?super.resize.call(this,{width:t.width,height:this._maxY}):super.resize.apply(this,arguments),e}selectionChanged(){}highlightItem(t,e){}click(t,e,i){}dblclick(t,e,i){}mousein(t,e,i){}mouseover(t,e,i){}mouseout(t,e,i){}};_.prototype._class+=" timeline_ReactGantt",_.prototype.publish("fitWidthToContent",!1,"boolean","If true, resize will simply reapply the bounding box width"),_.prototype.publish("fitHeightToContent",!1,"boolean","If true, resize will simply reapply the bounding box height"),_.prototype.publish("titleColumn",null,"string","Column name to for the title"),_.prototype.publish("startDateColumn",null,"string","Column name to for the start date"),_.prototype.publish("endDateColumn",null,"string","Column name to for the end date"),_.prototype.publish("iconColumn",null,"string","Column name to for the icon"),_.prototype.publish("colorColumn",null,"string","Column name to for the color"),_.prototype.publish("seriesColumn",null,"string","Column name to for the series identifier"),_.prototype.publish("bucketColumn",null,"string","Column name to for the bucket identifier"),_.prototype.publish("renderMode","default","set","Render modes vary in features and performance",["default","scale-all"]),_.prototype.publish("rangePadding",3,"number","Padding within each range rectangle (pixels)"),_.prototype.publish("fill","#1f77b4","string","Background color of range rectangle"),_.prototype.publish("stroke",null,"string","Color of range rectangle border"),_.prototype.publish("strokeWidth",null,"number","Width of range rectangle border (pixels)"),_.prototype.publish("cornerRadius",3,"number","Space between range buckets (pixels)"),_.prototype.publish("fontFamily",null,"string","Font family within range rectangle",null,{optional:!0}),_.prototype.publish("fontSize",10,"number","Size of font within range rectangle (pixels)"),_.prototype.publish("rangeFontColor","#ecf0f1","html-color","rangeFontColor"),_.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),_.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),_.prototype.publish("bucketHeight",100,"number","Max height of range element (pixels)"),_.prototype.publish("gutter",2,"number","Space between range buckets (pixels)"),_.prototype.publish("maxZoom",16,"number","Maximum zoom"),_.prototype.publish("evenSeriesBackground","#FFFFFF","html-color","Background color of even series rows"),_.prototype.publish("oddSeriesBackground","#DDDDDD","html-color","Background color of odd series rows");var x=class extends o.SVGWidget{_topAxis=new i.Axis("center").orientation("top").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d");_gantt=new _("center").stroke("#000000");_bottomAxis=new i.Axis("center").orientation("bottom").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d");_topAxisElement;_contentElement;_bottomAxisElement;_topRect;_contentRect;_bottomRect;rangeRenderer;constructor(){super(),this._drawStartPos="origin",this.rangeRenderer=function(){const t=this._gantt.rangeRenderer.apply(this._gantt,arguments);return arguments.length?this:t}}selection(t){return arguments.length?(this._gantt.selection(t),this):this._gantt.selection()}resizeWrappers(){const t=this.width(),e=this.height(),i=this.axisHeight(),o=e-2*i,s=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 ${i+s})`),this._gantt.resize({height:o,width:t}),this._bottomRect.attr("height",i).attr("width",t).attr("fill","transparent"),this._bottomAxisElement.attr("transform",`translate(0 ${i+o+s})`),this._bottomAxis.resize({height:i,width:t})}enter(t,e){super.enter(t,e),this._gantt.click=(t,e,i)=>{this.click(t,e,i)},this._gantt.dblclick=(t,e,i)=>{this.dblclick(t,e,i)},this._topAxisElement=e.append("g").attr("class","top-axis-wrapper"),this._topRect=this._topAxisElement.append("rect").attr("class","top-axis-rect"),this._contentElement=e.append("g").attr("class","content-wrapper"),this._contentRect=this._contentElement.append("rect").attr("class","content-rect"),this._bottomAxisElement=e.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=t=>{this.onzoom(t)}}onzoom(t){const e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,s=o/e,n=Math.floor(i-s*(t.x/t.k)),r=Math.ceil(o/t.k+n);this._topAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(n).high(r).render(),this._bottomAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(n).high(r).render()}update(t,e){super.update(t,e),this._topAxis.tickFormat(this.tickFormat()).render(),this._bottomAxis.tickFormat(this.tickFormat()).render(),this._gantt.render()}exit(t,e){this._bottomAxis.target(null),this._gantt.target(null),this._topAxis.target(null),super.exit(t,e)}columns(t){const e=super.columns.apply(this,arguments);return arguments.length>0&&this._gantt.columns(t),e}data(t){const e=super.data.apply(this,arguments);if(arguments.length>0){const t=this.data().map(t=>{const e=[...t];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=Math.min(...t.map(t=>t[1]))??0,this._gantt._maxEnd=Math.max(...t.map(t=>t[2]))??1,this._gantt.data(t)}return e}resize(t){const e=super.resize.apply(this,arguments);return this._topAxisElement&&this.resizeWrappers(),e}click(t,e,i){}dblclick(t,e,i){}tooltip(){return this._gantt._tooltip}};x.prototype._class+=" timeline_ReactAxisGantt",x.prototype.publish("tickFormat",null,"string","Format rule applied to axis tick labels",void 0,{optional:!0}),x.prototype.publish("axisHeight",22,"number","Height of axes (pixels)"),x.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),x.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),x.prototype.publish("axisFontSize",null,"number","Font size of axis tick labels"),x.prototype.publish("axisFontFamily",null,"string","Font family of axis tick labels"),x.prototype.publish("axisTickLength",null,"number","Length of axis ticks"),x.prototype.publishProxy("gutter","_gantt"),x.prototype.publishProxy("renderMode","_gantt"),x.prototype.publishProxy("strokeWidth","_gantt"),x.prototype.publishProxy("fontSize","_gantt"),x.prototype.publishProxy("fontFamily","_gantt"),x.prototype.publishProxy("stroke","_gantt"),x.prototype.publishProxy("cornerRadius","_gantt"),x.prototype.publishProxy("titleColumn","_gantt"),x.prototype.publishProxy("startDateColumn","_gantt"),x.prototype.publishProxy("endDateColumn","_gantt"),x.prototype.publishProxy("iconColumn","_gantt"),x.prototype.publishProxy("colorColumn","_gantt"),x.prototype.publishProxy("bucketColumn","_gantt"),x.prototype.publishProxy("maxZoom","_gantt"),x.prototype.publishProxy("bucketHeight","_gantt");var g=class extends r.Border2{_topAxis=new i.Axis("origin").orientation("top").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d");_gantt=new _("origin").stroke("#000000").fitHeightToContent(!0);_bottomAxis=new i.Axis("origin").orientation("bottom").type("linear").shrinkToFit("none").overlapMode("hide").extend(0).tickFormat("d");_topAxisElement;_contentElement;_bottomAxisElement;_topRect;_contentRect;_bottomRect;constructor(){super(),this.centerOverflowX_default("hidden"),this.centerOverflowY_default("auto")}selection(t){return arguments.length?(this._gantt.selection(t),this):this._gantt.selection()}rangeRenderer(t){const e=this._gantt.rangeRenderer.apply(this._gantt,arguments);return arguments.length?this:e}resizeWrappers(){const 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()}enter(t,e){super.enter(t,e),this._gantt.click=(t,e,i)=>{this.click(t,e,i)},this._gantt.dblclick=(t,e,i)=>{this.dblclick(t,e,i)},this.top(this._topAxis),this.center(this._gantt),this.bottom(this._bottomAxis),this.resizeWrappers(),this._gantt.zoomedHook=t=>{this.onzoom(t)}}onzoom(t){const e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,s=o/e,n=Math.floor(i-s*(t.x/t.k)),r=Math.ceil(o/t.k+n);this._topAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(n).high(r).lazyRender(),this._bottomAxis.fontFamily(this.axisFontFamily()).fontSize(this.axisFontSize()).tickLength(this.axisTickLength()).low(n).high(r).lazyRender()}update(t,e){super.update(t,e),this._topAxis.tickFormat(this.tickFormat()).render(),this._bottomAxis.tickFormat(this.tickFormat()).render(),this._gantt.render()}columns(t){const e=super.columns.apply(this,arguments);return arguments.length>0&&this._gantt.columns(t),e}data(t){const e=super.data.apply(this,arguments);if(arguments.length>0){const t=this.data().map(t=>{const e=[...t];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=(0,o.min)(t,t=>t[1]),this._gantt._maxEnd=(0,o.max)(t,t=>t[2]),this._gantt.data(t)}return e}resize(t){const e=super.resize.apply(this,arguments);return this._topAxisElement&&this.resizeWrappers(),e}click(t,e,i){}dblclick(t,e,i){}tooltip(){return this._gantt._tooltip}};g.prototype._class+=" timeline_ReactAxisGanttSeries",g.prototype.publish("tickFormat",null,"string","Format rule applied to axis tick labels",void 0,{optional:!0}),g.prototype.publish("axisHeight",22,"number","Height of axes (pixels)"),g.prototype.publish("overlapTolerence",2,"number","overlapTolerence"),g.prototype.publish("smallestRangeWidth",10,"number","Width of the shortest range (pixels)"),g.prototype.publish("axisFontSize",null,"number","Font size of axis tick labels"),g.prototype.publish("axisFontFamily",null,"string","Font family of axis tick labels"),g.prototype.publish("axisTickLength",null,"number","Length of axis ticks"),g.prototype.publishProxy("gutter","_gantt"),g.prototype.publishProxy("renderMode","_gantt"),g.prototype.publishProxy("strokeWidth","_gantt"),g.prototype.publishProxy("fontSize","_gantt"),g.prototype.publishProxy("fontFamily","_gantt"),g.prototype.publishProxy("stroke","_gantt"),g.prototype.publishProxy("cornerRadius","_gantt"),g.prototype.publishProxy("titleColumn","_gantt"),g.prototype.publishProxy("startDateColumn","_gantt"),g.prototype.publishProxy("endDateColumn","_gantt"),g.prototype.publishProxy("iconColumn","_gantt"),g.prototype.publishProxy("colorColumn","_gantt"),g.prototype.publishProxy("seriesColumn","_gantt"),g.prototype.publishProxy("bucketColumn","_gantt"),g.prototype.publishProxy("maxZoom","_gantt"),g.prototype.publishProxy("evenSeriesBackground","_gantt"),g.prototype.publishProxy("oddSeriesBackground","_gantt"),g.prototype.publishProxy("bucketHeight","_gantt");var b=class extends x{_axisLabelFormatter;constructor(){super(),this._drawStartPos="origin",this._topAxis.type("time"),this._bottomAxis.type("time"),this.tooltipHTML(t=>{const e=(0,o.timeParse)("%Q"),i=e(t[1]),s=e(t[2]),n=(0,o.timeFormat)(this.tooltipTimeFormat());return`<div style="text-align:center;">${t[0]}<br/><br/>${n(i)} -> ${n(s)}</div>`})}update(t,e){if(super.update(t,e),this.timePattern_exists()){let t=1/0,e=-1/0,i="",o="";this.data().map(s=>{const n=new Date(s[1]).getTime(),r=new Date(s[2]).getTime();t>n&&(t=n,i=""+s[1]),e<r&&(e=r,o=""+s[2])});const s=this._axisLabelFormatter?this._axisLabelFormatter:this.tickFormat_exists&&this.tickFormat_exists()?this.tickFormat():void 0;this._topAxis.type("time").timePattern(this.timePattern()).overlapMode("none").low(i).high(o),this._bottomAxis.type("time").timePattern(this.timePattern()).overlapMode("none").low(i).high(o),s?(this._topAxis.tickFormat(s),this._bottomAxis.tickFormat(s)):(this._topAxis.tickFormat_reset(),this._bottomAxis.tickFormat_reset()),this._gantt._minStart=t,this._gantt._maxEnd=e}}tooltipHTML(t){return this._tooltipHTML=t,this.tooltip().tooltipHTML(this._tooltipHTML),this}parseAxisValue(t){const e=(0,o.timeParse)("%Q")(t);return(0,o.timeFormat)(this.timePattern())(e)}onzoom(t){const e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,s=o/e,n=Math.floor(i-s*(t.x/t.k)),r=Math.ceil(o/t.k+n);this._topAxis.low(this.parseAxisValue(n)).high(this.parseAxisValue(r)).render(),this._bottomAxis.low(this.parseAxisValue(n)).high(this.parseAxisValue(r)).render()}};b.prototype._class+=" timeline_ReactTimeline",b.prototype.publish("timePattern","%Y-%m-%d","string","Time pattern used for parsing datetime strings on each data row",null,{optional:!0}),b.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","Time format used in the default html tooltip");var y=(0,o.timeParse)("%Q"),f=class extends g{_axisLabelFormatter;constructor(){super(),this._topAxis.type("time"),this._bottomAxis.type("time"),this.tooltipHTML(t=>{const e=y(t[1]),i=y(t[2]),s=(0,o.timeFormat)(this.tooltipTimeFormat());return`<div style="text-align:center;">${t[0]}<br/><br/>${s(e)} -> ${s(i)}</div>`})}update(t,e){if(super.update(t,e),this.timePattern_exists()){let t=1/0,e=-1/0,i="",o="";this.data().forEach(s=>{const n=new Date(s[1]).getTime(),r=new Date(s[2]).getTime();t>n&&(t=n,i=""+s[1]),e<r&&(e=r,o=""+s[2])});const s=this._axisLabelFormatter?this._axisLabelFormatter:this.tickFormat_exists&&this.tickFormat_exists()?this.tickFormat():void 0;this._topAxis.type("time").timePattern(this.timePattern()).overlapMode("none").low(i).high(o),this._bottomAxis.type("time").timePattern(this.timePattern()).overlapMode("none").low(i).high(o),s?(this._topAxis.tickFormat(s),this._bottomAxis.tickFormat(s)):(this._topAxis.tickFormat_reset(),this._bottomAxis.tickFormat_reset()),this._gantt._minStart=t,this._gantt._maxEnd=e}}tooltipHTML(t){return this._tooltipHTML=t,this.tooltip().tooltipHTML(this._tooltipHTML),this}parseAxisValue(t){const e=y(t);return(0,o.timeFormat)(this.timePattern())(e)}onzoom(t){const e=this.width(),i=this._gantt._minStart,o=this._gantt._maxEnd-i,s=o/e,n=Math.floor(i-s*(t.x/t.k)),r=Math.ceil(o/t.k+n);this._topAxis.low(this.parseAxisValue(n)).high(this.parseAxisValue(r)).render(),this._bottomAxis.low(this.parseAxisValue(n)).high(this.parseAxisValue(r)).render()}_tooltipHTML};f.prototype._class+=" timeline_ReactTimelineSeries",f.prototype.publish("timePattern","%Y-%m-%d","string","Time pattern used for parsing datetime strings on each data row",null,{optional:!0}),f.prototype.publish("tooltipTimeFormat","%Y-%m-%d","string","Time format used in the default html tooltip"),t.BUILD_VERSION="3.2.1",t.MiniGantt=m,t.PKG_NAME="@hpcc-js/timeline",t.PKG_VERSION="3.0.0",t.ReactAxisGantt=x,t.ReactAxisGanttSeries=g,t.ReactGantt=_,t.ReactTimeline=b,t.ReactTimelineSeries=f});
|
|
2
|
+
//# sourceMappingURL=index.umd.cjs.map!function(){try{if("undefined"!=typeof document){var e=document.createElement("style");e.appendChild(document.createTextNode(".timeline_MiniGantt .line{fill:none;stroke:#d3d3d3;opacity:.7}.timeline_MiniGantt .common_TextBox .rect{fill:#87cefa;stroke:#00f;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:#0000;opacity:.8}.timeline_MiniGantt rect{shape-rendering:crispEdges}\n/*$vite$:1*/")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}}();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","names":["bucketData: BucketInfo[]","ganttData: any[]","ganttData: any[]"],"sources":["../src/__package__.ts","../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\";\nexport const PKG_VERSION = \"3.0.0\";\nexport const BUILD_VERSION = \"3.2.1\";\n","import { ITooltip } from \"@hpcc-js/api\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { d3Event, EntityPin, EntityRect, local as d3Local, select as d3Select, SVGWidget, Utility } from \"@hpcc-js/common\";\nimport { extent as d3Extent } from \"d3-array\";\nimport { scaleBand as d3ScaleBand } from \"d3-scale\";\nimport { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { zoom as d3Zoom, zoomIdentity as d3ZoomIdentity } from \"d3-zoom\";\n\nimport \"../src/MiniGantt.css\";\n\nexport class MiniGantt extends SVGWidget {\n protected tlAxis: Axis;\n protected brAxis: Axis;\n protected verticalBands;\n protected _zoom;\n protected gUpperContent;\n protected gUpperAxis;\n protected gMiddleContent;\n protected gLowerAxis;\n protected gLowerContent;\n private localRect = d3Local<EntityRect>();\n private localEntityPin = d3Local<EntityPin>();\n private tooltipFormatter: (date: Date) => string;\n private _dateCache;\n\n protected rootExtent;\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _yoffset_idx = -1;\n\n constructor() {\n super();\n ITooltip.call(this);\n Utility.SimpleSelectionMixin.call(this);\n\n this._drawStartPos = \"origin\";\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]))}`);\n\n this.tlAxis = new Axis()\n .type(\"time\")\n ;\n this.brAxis = new Axis()\n .type(\"time\")\n ;\n this.verticalBands = d3ScaleBand()\n .paddingOuter(0.2)\n .paddingInner(0.2)\n ;\n }\n\n isHorizontal(): boolean {\n return this.orientation() === \"horizontal\";\n }\n\n fullExtent() {\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])];\n return d3Extent(data);\n }\n\n extent() {\n const extent = this.rootExtent ? [this.rootExtent[1], this.rootExtent[2]] : this.fullExtent();\n if (extent[0] !== undefined && extent[1] !== undefined) {\n if (extent[0] === extent[1] || this.centerOnMostRecent()) {\n const parser = d3TimeParse(this.timePattern());\n const formatter = d3TimeFormat(this.timePattern());\n const date1 = parser(extent[0]);\n const date2 = parser(extent[1]);\n if (extent[0] === extent[1]) {\n extent[0] = formatter(new Date(date1.setFullYear(date1.getFullYear() - 1)));\n extent[1] = formatter(new Date(date1.setFullYear(date1.getFullYear() + 2)));\n } else {\n const time1 = date1.getTime();\n const timeDiff = date2.getTime() - time1;\n extent[0] = formatter(date1);\n extent[1] = formatter(new Date(time1 + (timeDiff * 2)));\n }\n }\n }\n return extent;\n }\n\n dataStartPos(d) {\n if (typeof this._dateCache[d[this._startDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._startDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._startDate_idx]);\n this._dateCache[d[this._startDate_idx]] = pos;\n return pos;\n }\n\n dataEndPos(d) {\n if (typeof this._dateCache[d[this._endDate_idx]] !== \"undefined\") {\n return this._dateCache[d[this._endDate_idx]];\n }\n const pos = this.brAxis.scalePos(d[this._endDate_idx]);\n this._dateCache[d[this._endDate_idx]] = pos;\n return pos;\n }\n\n dataWidth(d) {\n return this.dataEndPos(d) - this.dataStartPos(d);\n }\n\n private transform;\n resetZoom() {\n // Triggers a \"zoomed\" event ---\n this._zoom.transform(this.element(), d3ZoomIdentity.translate(0, this.isHorizontal() ? 0 : this.height()));\n }\n\n zoomed() {\n this.transform = d3Event().transform;\n this.render();\n }\n\n private background;\n enter(domNode, element) {\n super.enter(domNode, element);\n this._zoom = d3Zoom()\n .scaleExtent([0, this.maxZoom()])\n .on(\"zoom\", () => {\n this.zoomed();\n })\n ;\n\n this.background = element.append(\"rect\")\n .attr(\"fill\", \"white\")\n .attr(\"opacity\", 0)\n .on(\"dblclick\", () => {\n d3Event().stopPropagation();\n delete this.rootExtent;\n this.resetZoom();\n })\n ;\n this.gUpperContent = element.append(\"g\").attr(\"class\", \"gUpperContent\");\n this.gUpperAxis = element.append(\"g\").attr(\"class\", \"gUpperAxis\");\n this.gMiddleContent = element.append(\"g\").attr(\"class\", \"gMiddleContent\");\n this.gLowerAxis = element.append(\"g\").attr(\"class\", \"gLowerAxis\");\n this.gLowerContent = element.append(\"g\").attr(\"class\", \"gLowerContent\");\n this.tlAxis\n .target(this.gUpperAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gUpperAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n this.brAxis\n .target(this.gLowerAxis.node())\n .tickFormat(this.tickFormat())\n .guideTarget(this.gLowerAxis.append(\"g\").node())\n .shrinkToFit(\"none\")\n .overlapMode(this.tickFormat_exists() ? \"stagger\" : \"none\")\n .extend(0.1)\n ;\n\n element.call(this._zoom);\n this._selection.widgetElement(this.gMiddleContent);\n }\n\n private _prevIsHorizontal;\n update(domNode, element) {\n super.update(domNode, element);\n\n this._dateCache = {};\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._yoffset_idx = this.yOffsetColumn() !== null ? this.columns().indexOf(this.yOffsetColumn()) : this._yoffset_idx;\n\n if (this._prevIsHorizontal !== this.isHorizontal()) {\n this._prevIsHorizontal = this.isHorizontal();\n this.resetZoom();\n return;\n }\n\n this.tooltipFormatter = d3TimeFormat(this.tooltipTimeFormat());\n\n const width = this.width();\n const height = this.height();\n\n this.background\n .attr(\"x\", 0)\n .attr(\"y\", 0)\n .attr(\"width\", width)\n .attr(\"height\", height)\n ;\n\n const extent = this.extent();\n this.tlAxis\n .x(width / 2)\n .orientation(this.isHorizontal() ? \"top\" : \"left\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n this.brAxis\n .x(width / 2)\n .y(height / 2)\n .orientation(this.isHorizontal() ? \"bottom\" : \"right\")\n .reverse(!this.isHorizontal())\n .timePattern(this.timePattern()) // \"%Y-%m-%dT%H:%M:%S.%LZ\"\n .width(width - 1)\n .height(height)\n .low(extent[0])\n .high(extent[1])\n .updateScale()\n ;\n\n if (this.transform) {\n let low;\n let hi;\n if (this.isHorizontal()) {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(this.transform.invertX(width - 1)));\n } else {\n low = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(0)));\n hi = this.tlAxis.parseInvert(this.tlAxis.invert(- this.transform.invertY(height - 1)));\n }\n this.tlAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n this.brAxis\n .low(low)\n .high(hi)\n .updateScale()\n ;\n }\n\n const data = this.data().sort(this.isHorizontal() ? (l, r) => {\n const retVal = this.brAxis.scalePos(l[1]) - this.brAxis.scalePos(r[1]);\n if (retVal === 0) {\n return (\"\" + l[0]).localeCompare(\"\" + r[0]);\n }\n return retVal;\n } : (l, r) => {\n return this.brAxis.scalePos(r[1]) - this.brAxis.scalePos(l[1]);\n });\n const events = data.filter(d => !d[this._endDate_idx]);\n const ranges = data.filter(d => !!d[this._endDate_idx]);\n\n this.tlAxis\n .render()\n ;\n this.brAxis\n .render()\n ;\n const brAxisBBox = this.brAxis.getBBox();\n\n let upperContentHeight = this.updateEntityPins(events);\n const lowerAxisHeight = brAxisBBox.height;\n let lowerHeight = height - upperContentHeight;\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;\n if (events.length > 0 && ranges.length === 0) {\n // ONLY EVENTS\n this.tlAxis.visible(false);\n let y_offset = upperContentHeight / 4;\n if (y_offset > (height / 2) - lowerAxisHeight) {\n y_offset = (height / 2) - lowerAxisHeight;\n }\n const upperContentYOffset = (height / 2) + y_offset;\n const lowerAxisYOffset = ((height / 2) - lowerAxisHeight - y_offset) * -1;\n const halfMinYOffset = minYOffset !== 0 ? minYOffset / 2 : 0;\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentYOffset - halfMinYOffset})`);\n this.gLowerAxis.attr(\"transform\", `translate(0, ${lowerAxisYOffset - halfMinYOffset})`);\n } else if (events.length === 0 && ranges.length > 0) {\n // ONLY RANGES\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n } else {\n upperContentHeight -= minYOffset;\n lowerHeight += minYOffset;\n // BOTH\n this.tlAxis.visible(true);\n this.gUpperContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gUpperAxis.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n this.gMiddleContent.attr(\"transform\", `translate(0, ${upperContentHeight})`);\n }\n this.tlAxis\n .render()\n ;\n const tlAxisBBox = this.tlAxis.getBBox();\n interface BucketInfo {\n endPos: number;\n }\n const bucketData: BucketInfo[] = [];\n const bucketIndex = {};\n for (const range of ranges) {\n for (let i = 0; i < bucketData.length; ++i) {\n const bucket = bucketData[i];\n if (bucket.endPos + this.overlapTolerence() <= this.dataStartPos(range)) {\n bucketIndex[range] = i;\n bucket.endPos = this.dataEndPos(range);\n break;\n }\n }\n\n if (bucketIndex[range] === undefined) {\n bucketIndex[range] = bucketData.length;\n bucketData.push({\n endPos: this.dataEndPos(range)\n });\n }\n }\n\n const vbLower = this.isHorizontal() ? 0 + tlAxisBBox.height : 0 + tlAxisBBox.width;\n const vbHigher = this.isHorizontal() ? lowerHeight - brAxisBBox.height : width - brAxisBBox.width;\n this.verticalBands\n .range([vbLower, vbHigher])\n .domain(bucketData.map((_d, i) => i))\n ;\n\n if (ranges.length > 0) {\n this.updateEventRanges(events, ranges, bucketIndex, lowerHeight, tlAxisBBox, brAxisBBox, width);\n }\n }\n\n updateEntityPins(events) {\n let event_height = 0;\n const context = this;\n const entityPins = this.gUpperContent.selectAll(\".entity_pin\").data(events, d => d[0] + \":\" + d[1]);\n const eventFontColor_idx = this.eventFontColorColumn() ? this.columns().indexOf(this.eventFontColorColumn()) : -1;\n const eventBorderColor_idx = this.eventBorderColorColumn() ? this.columns().indexOf(this.eventBorderColorColumn()) : -1;\n const eventBackgroundColor_idx = this.eventBackgroundColorColumn() ? this.columns().indexOf(this.eventBackgroundColorColumn()) : -1;\n const title_counts = {};\n for (const d of events) {\n const type = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : d[0];\n title_counts[type] = title_counts[type] ? title_counts[type] + 1 : 1;\n }\n const title_types = Object.keys(title_counts);\n const title_group_offset = context.eventGroupOffset();\n const entityPinsEnter = entityPins.enter().append(\"g\")\n .attr(\"class\", \"entity_pin\");\n entityPinsEnter.append(\"line\")\n .attr(\"class\", \"entity_line\");\n\n entityPinsEnter\n .on(\"mouseover\", function (d) {\n d3Select(this).raise();\n })\n .each(function (d, i) {\n const entityPin = new EntityPin()\n .target(this)\n .icon(\"\")\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .iconDiameter(18)\n .iconPaddingPercent(1)\n .titleFontSize(14)\n .descriptionColor(\"#333\")\n .descriptionFontSize(15)\n .iconColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .titleColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .descriptionColor(eventFontColor_idx === -1 ? \"#333\" : d[eventFontColor_idx])\n .backgroundShape(\"pin\")\n .backgroundColorFill(eventFontColor_idx === -1 ? \"#f8f8f8\" : d[eventBackgroundColor_idx])\n .backgroundColorStroke(eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .cornerRadius(5)\n .arrowHeight(10)\n .arrowWidth(16)\n ;\n context.localEntityPin.set(this, entityPin);\n })\n .merge(entityPins)\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n const _title = typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : entityPin.title();\n const x_offset = context.dataStartPos(d) - 0;\n let y_offset = ((title_types.indexOf(_title) % context.eventGroupMod()) * title_group_offset) - 5;\n if (typeof d[context._yoffset_idx] !== \"undefined\") y_offset += d[context._yoffset_idx] ? d[context._yoffset_idx] : 0;\n if (d[context._title_idx] !== entityPin.title() && d[context._startDate_idx] !== entityPin.description()) {\n const parsed_start_time = context.brAxis.parse(d[context._startDate_idx]);\n const formatted_start_time = context.tooltipFormatter(parsed_start_time);\n entityPin\n .x(x_offset)\n .y(y_offset)\n .iconOnlyShowOnHover(context.hideIconWhenCollapsed())\n .titleOnlyShowOnHover(context.hideTitleWhenCollapsed())\n .descriptionOnlyShowOnHover(context.hideDescriptionWhenCollapsed())\n .annotationOnlyShowOnHover(context.hideAnnotationsWhenCollapsed())\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : entityPin.icon())\n .title(_title)\n .description(formatted_start_time)\n .animationFrameRender()\n ;\n } else {\n entityPin.move({ x: x_offset, y: y_offset });\n }\n const calc_height = entityPin.calcHeight();\n if (event_height < calc_height) event_height = calc_height;\n\n d3Select(this).selectAll(\".entity_line\")\n .attr(\"x1\", x_offset)\n .attr(\"x2\", x_offset)\n .attr(\"y1\", 0)\n .attr(\"y2\", y_offset)\n .style(\"stroke\", eventFontColor_idx === -1 ? \"#ccc\" : d[eventBorderColor_idx])\n .style(\"stroke-width\", 1)\n ;\n })\n ;\n entityPins.exit()\n .each(function (d, i) {\n const entityPin = context.localEntityPin.get(this);\n entityPin.target(null);\n\n })\n .remove();\n const event_offset = Math.abs(Math.min(events.length, context.eventGroupMod()) * context.eventGroupOffset());\n return event_height + event_offset;\n }\n\n updateEventRanges(events, ranges, bucketIndex, eventRangeHeight, tlAxisBBox, brAxisBBox, width) {\n const context = this;\n\n const lines = this.gMiddleContent.selectAll(\".line\").data(events, d => {\n return d[context._title_idx];\n });\n lines.enter().append(\"line\")\n .attr(\"class\", \"line\")\n .merge(lines)\n .attr(this.isHorizontal() ? \"x1\" : \"y1\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"x2\" : \"y2\", d => this.dataStartPos(d) - 0)\n .attr(this.isHorizontal() ? \"y1\" : \"x1\", this.isHorizontal() ? tlAxisBBox.height : tlAxisBBox.width)\n .attr(this.isHorizontal() ? \"y2\" : \"x2\", this.isHorizontal() ? eventRangeHeight - brAxisBBox.height : width - brAxisBBox.width)\n ;\n lines.exit().remove();\n const buckets = this.gMiddleContent.selectAll(\".buckets\").data(ranges, d => d[context._title_idx]);\n buckets.enter().append(\"g\")\n .attr(\"class\", \"buckets\")\n .call(this._selection.enter.bind(this._selection))\n .each(function (d) {\n const entityRect = new EntityRect()\n .target(this)\n .iconDiameter(28)\n .iconPaddingPercent(0)\n .titleFontSize(28)\n .titleColor(context.rangeFontColor())\n .descriptionColor(context.rangeFontColor())\n .iconColor(context.rangeFontColor())\n .backgroundShape(\"rect\")\n .backgroundColorFill(d[context._color_idx])\n ;\n context.localRect.set(this, entityRect);\n context.enterEntityRect(entityRect, d);\n })\n .on(\"click\", function (d) {\n context.click(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, false)\n .on(\"dblclick\", function (d) {\n context.rootExtent = d;\n context.resetZoom();\n context.dblclick(context.rowToObj(d), \"range\", context._selection.selected(this));\n }, true)\n .on(\"mouseout.tooltip\", this.tooltip.hide)\n .on(\"mousemove.tooltip\", this.tooltip.show)\n .merge(buckets)\n .attr(\"transform\", d => context.isHorizontal() ?\n `translate(${this.dataStartPos(d)}, ${this.verticalBands(bucketIndex[d])}) ` :\n `translate(${this.verticalBands(bucketIndex[d])}, ${this.dataStartPos(d)}) `)\n .each(function (d) {\n const textBox = context.localRect.get(this);\n const x = context.dataWidth(d) / 2;\n const y = context.verticalBands.bandwidth() / 2;\n const rectWidth = Math.max(context.dataWidth(d), 2);\n const rectHeight = Math.max(context.verticalBands.bandwidth(), 2);\n const fontHeightRatio = 0.618;\n const paddingRatio = ((1 - fontHeightRatio) / 2);\n const paddingSize = paddingRatio * rectHeight;\n const fontSize = rectHeight * fontHeightRatio;\n const iconSize = fontSize;\n textBox\n .pos(context.isHorizontal() ? { x, y } : { x: y, y: x })\n .fixedHeight(context.isHorizontal() ? rectHeight : rectWidth)\n .fixedWidth(context.isHorizontal() ? rectWidth : rectHeight)\n .icon(typeof d[context._icon_idx] !== \"undefined\" ? d[context._icon_idx] : \"\")\n .title(typeof d[context._title_idx] !== \"undefined\" ? d[context._title_idx] : \"\")\n .padding(paddingSize)\n .iconDiameter(iconSize)\n .titleFontSize(fontSize)\n ;\n if (iconSize * 1.5 > rectWidth) {\n textBox.icon(null);\n }\n context.updateEntityRect(textBox, d[context._icon_idx]);\n textBox\n .render()\n ;\n });\n buckets.exit().remove();\n }\n\n exit(domNode, element) {\n this.brAxis.target(null);\n this.tlAxis.target(null);\n super.exit(domNode, element);\n }\n\n // Events ---\n click(row, col, sel) {\n }\n\n dblclick(row, col, sel) {\n }\n\n enterEntityRect(textbox: EntityRect, d) {\n }\n\n updateEntityRect(textbox: EntityRect, d) {\n }\n}\nMiniGantt.prototype._class += \" timeline_MiniGantt\";\nMiniGantt.prototype.implements(ITooltip.prototype);\nMiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);\n\nexport interface MiniGantt {\n // ITooltip ---\n tooltip;\n tooltipHTML(_): string;\n tooltipFormat(_): string;\n\n // SimpleSelectionMixin\n _selection;\n\n // Properties ---\n timePattern(): string;\n timePattern(_: string): this;\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n orientation(): string;\n orientation(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n yOffsetColumn(): string;\n yOffsetColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n eventGroupMod(): number;\n eventGroupMod(_: number): this;\n eventGroupOffset(): number;\n eventGroupOffset(_: number): this;\n eventFontColorColumn(): string;\n eventFontColorColumn(_: string): this;\n eventBorderColorColumn(): string;\n eventBorderColorColumn(_: string): this;\n eventBackgroundColorColumn(): string;\n eventBackgroundColorColumn(_: string): this;\n hideIconWhenCollapsed(): boolean;\n hideIconWhenCollapsed(_: boolean): this;\n hideTitleWhenCollapsed(): boolean;\n hideTitleWhenCollapsed(_: boolean): this;\n hideDescriptionWhenCollapsed(): boolean;\n hideDescriptionWhenCollapsed(_: boolean): this;\n hideAnnotationsWhenCollapsed(): boolean;\n hideAnnotationsWhenCollapsed(_: boolean): this;\n centerOnMostRecent(): boolean;\n centerOnMostRecent(_: boolean): this;\n\n}\n\nMiniGantt.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"timePattern\");\nMiniGantt.prototype.publish(\"tickFormat\", null, \"string\", \"tickFormat\", undefined, { optional: true });\nMiniGantt.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"tooltipTimeFormat\");\nMiniGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nMiniGantt.prototype.publish(\"orientation\", \"horizontal\", \"set\", \"orientation\", [\"horizontal\", \"vertical\"]);\nMiniGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nMiniGantt.prototype.publish(\"titleColumn\", null, \"string\", \"titleColumn\");\nMiniGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"startDateColumn\");\nMiniGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"endDateColumn\");\nMiniGantt.prototype.publish(\"iconColumn\", null, \"string\", \"iconColumn\");\nMiniGantt.prototype.publish(\"colorColumn\", null, \"string\", \"colorColumn\");\nMiniGantt.prototype.publish(\"yOffsetColumn\", null, \"string\", \"yOffsetColumn\");\nMiniGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"maxZoom\");\nMiniGantt.prototype.publish(\"eventGroupOffset\", -50, \"number\", \"eventGroupOffset\");\nMiniGantt.prototype.publish(\"eventGroupMod\", 5, \"number\", \"eventGroupMod\");\nMiniGantt.prototype.publish(\"eventFontColorColumn\", null, \"string\", \"eventFontColorColumn\");\nMiniGantt.prototype.publish(\"eventBorderColorColumn\", null, \"string\", \"eventBorderColorColumn\");\nMiniGantt.prototype.publish(\"eventBackgroundColorColumn\", null, \"string\", \"eventBackgroundColorColumn\");\nMiniGantt.prototype.publish(\"hideIconWhenCollapsed\", false, \"boolean\", \"hideIconWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideTitleWhenCollapsed\", false, \"boolean\", \"hideTitleWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideDescriptionWhenCollapsed\", false, \"boolean\", \"hideDescriptionWhenCollapsed\");\nMiniGantt.prototype.publish(\"hideAnnotationsWhenCollapsed\", true, \"boolean\", \"hideAnnotationsWhenCollapsed\");\nMiniGantt.prototype.publish(\"centerOnMostRecent\", false, \"boolean\", \"If true, the timeline will be centered on the most recent data point\");\n","import { d3Event, select as d3Select, SVGZoomWidget, Utility } from \"@hpcc-js/common\";\nimport { HTMLTooltip } from \"@hpcc-js/html\";\nimport { scaleLinear as d3ScaleLinear } from \"d3-scale\";\nimport { React, render, LabelledRect } from \"@hpcc-js/react\";\n\nexport type IGanttData = [string, number, number, any?];\n\nexport interface IRangeOptions {\n rangePadding: number;\n fontFamily: string;\n fontSize: number;\n strokeWidth?: number;\n fill: string;\n stroke: string;\n textFill: string;\n cornerRadius: number;\n}\n\nexport class ReactGantt extends SVGZoomWidget {\n\n protected _selection = new Utility.Selection(this);\n\n protected _buckets;\n protected _interpolateX;\n protected _interpolateY;\n\n protected _bucketsBySeries;\n protected _dataBySeries;\n protected _origIdxMap;\n private _seriesBackgrounds;\n\n protected _maxFontSize;\n\n public _tooltip;\n\n public _minStart: number;\n public _maxEnd: number;\n\n protected _title_idx = 0;\n protected _startDate_idx = 1;\n protected _endDate_idx = 2;\n protected _icon_idx = -1;\n protected _color_idx = -1;\n protected _series_idx = -1;\n protected _bucket_idx = -1;\n protected _yoffset_idx = -1;\n\n protected _maxX: number;\n protected _maxY: number;\n\n private _rangeOptions: IRangeOptions = {\n rangePadding: 2,\n fontFamily: \"Verdana\",\n fontSize: 12,\n fill: \"white\",\n stroke: \"black\",\n textFill: \"black\",\n cornerRadius: 3,\n strokeWidth: 0\n };\n\n constructor(drawStartPosition: \"origin\" | \"center\" = \"origin\") {\n super();\n this._drawStartPos = drawStartPosition;\n\n this.showToolbar_default(false);\n\n this._tooltip = new HTMLTooltip();\n this._tooltip\n .tooltipHTML(d => {\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${d[1]} -> ${d[2]}</div>`;\n });\n this._tooltip\n .followCursor(true)\n ;\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._selection.get();\n this._selection.set(_);\n return this;\n }\n\n private _rangeRenderer: React.FunctionComponent = LabelledRect;\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n if (!arguments.length) return this._rangeRenderer;\n this._rangeRenderer = _;\n return this._rangeRenderer;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n const context = this;\n element\n .on(\"click\", function (this: SVGElement, d) {\n context._selection.clear();\n });\n\n this._tooltip.target(domNode);\n }\n update(domNode, element) {\n super.update(domNode, element);\n\n this.zoomExtent([0.05, this.maxZoom()]);\n\n this._title_idx = this.titleColumn() !== null ? this.columns().indexOf(this.titleColumn()) : this._title_idx;\n this._startDate_idx = this.startDateColumn() !== null ? this.columns().indexOf(this.startDateColumn()) : this._startDate_idx;\n this._endDate_idx = this.endDateColumn() !== null ? this.columns().indexOf(this.endDateColumn()) : this._endDate_idx;\n this._icon_idx = this.iconColumn() !== null ? this.columns().indexOf(this.iconColumn()) : this._icon_idx;\n this._color_idx = this.colorColumn() !== null ? this.columns().indexOf(this.colorColumn()) : this._color_idx;\n this._series_idx = this.seriesColumn() !== null ? this.columns().indexOf(this.seriesColumn()) : this._series_idx;\n this._bucket_idx = this.bucketColumn() !== null ? this.columns().indexOf(this.bucketColumn()) : -1;\n\n const context = this;\n const w = this.width();\n\n const x0 = 0;\n const x1 = w;\n\n this._interpolateX = d3ScaleLinear()\n .domain([this._minStart, this._maxEnd])\n .range([x0, x1])\n ;\n\n this.data().sort((a, b) => a[1] - b[1]);\n\n if (this._series_idx > -1) {\n this._origIdxMap = {};\n this._dataBySeries = {};\n this._bucketsBySeries = {};\n this.data().forEach((dataRow, origIdx) => {\n const seriesKey = dataRow[this._series_idx];\n if (!this._dataBySeries[seriesKey]) {\n this._origIdxMap[seriesKey] = {};\n this._dataBySeries[seriesKey] = [];\n }\n this._dataBySeries[seriesKey].push({\n dataRow,\n origIdx\n });\n });\n const gutter = this.gutter();\n let bucketOffset = 0;\n const seriesKeys = Object.keys(this._dataBySeries);\n seriesKeys.forEach(seriesKey => {\n this._dataBySeries[seriesKey].sort((a, b) => a.dataRow[1] - b.dataRow[1]);\n this._bucketsBySeries[seriesKey] = this.calcBuckets(this._dataBySeries[seriesKey].map(n => n.dataRow), 1, 2);\n this._bucketsBySeries[seriesKey].bucketHeight = this.bucketHeight();\n this._bucketsBySeries[seriesKey].bucketOffset = bucketOffset;\n bucketOffset += (this._bucketsBySeries[seriesKey].bucketHeight + this.strokeWidth() + this.gutter()) * (this._bucketsBySeries[seriesKey].maxBucket + 1);\n this._dataBySeries[seriesKey].forEach((n, i) => {\n this._origIdxMap[seriesKey][n.origIdx] = i;\n });\n });\n this._seriesBackgrounds = this._renderElement.selectAll(\".series-background\")\n .data(seriesKeys.map(key => {\n return this._bucketsBySeries[key];\n }))\n ;\n this._seriesBackgrounds\n .join(\n enter => enter.append(\"rect\")\n .attr(\"class\", \"series-background\"),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d3Select(this)\n .attr(\"x\", 0)\n .attr(\"y\", d.bucketOffset - (gutter / 2))\n .attr(\"width\", w)\n .attr(\"height\", ((d.bucketHeight + gutter) * (d.maxBucket + 1)) + gutter)\n .attr(\"fill\", i % 2 ? context.oddSeriesBackground() : context.evenSeriesBackground())\n ;\n });\n } else {\n if (this._bucket_idx !== -1) {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx, this._bucket_idx);\n } else {\n this._buckets = this.calcBuckets(this.data(), this._startDate_idx, this._endDate_idx);\n }\n }\n const interpedStart = this._interpolateX(this._minStart);\n\n this.zoomTo(\n [interpedStart, 0],\n 1\n );\n\n const bucketHeight = this.bucketHeight();\n\n this.setRangeOptions();\n\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2));\n this.measureDataText();\n\n const itemSelection = this._renderElement.selectAll(\".item\")\n .data(this.data())\n ;\n const borderOffset1 = this.strokeWidth();\n const borderOffset2 = borderOffset1 * 2;\n itemSelection\n .join(\n enter => enter.append(\"g\")\n .attr(\"class\", \"item\")\n .on(\"click.selectionBag\", function (d, i) {\n const _id = d.id === undefined ? i : d.id;\n if (context._selection.isSelected({ _id, element: d.element })) {\n context._selection.clear();\n } else {\n context._selection.click(\n {\n _id,\n element: () => d.element\n },\n d3Event\n );\n }\n context.selectionChanged();\n d3Event().stopPropagation();\n })\n .on(\"click\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"dblclick\", function (this: SVGElement, d) {\n const selected = d.element.classed(\"selected\");\n if (d[context.columns().length]) {\n d.__lparam = d[context.columns().length];\n }\n context.click(d, \"\", selected);\n })\n .on(\"mousein\", function (d) {\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mousein(d, \"\", selected);\n })\n .on(\"mouseover\", function (d) {\n const d3evt = d3Event();\n context._tooltip._triggerElement = d.element;\n context._tooltip._cursorLoc = [\n d3evt.clientX,\n d3evt.clientY\n ];\n context._tooltip\n .data(d)\n .visible(true)\n .fitContent(true)\n .render()\n ;\n context.highlightItem(d3Select(this), d);\n const selected = d.element.classed(\"selected\");\n context.mouseover(d, \"\", selected);\n })\n .on(\"mouseout\", function (d) {\n context._tooltip\n .visible(false)\n .render()\n ;\n context.highlightItem(null, null);\n const selected = d.element.classed(\"selected\");\n context.mouseout(d, \"\", selected);\n })\n .each(function (d, i) {\n d.that = this;\n d.element = d3Select(this);\n d.x = context._interpolateX(d[1]);\n const endX = context._interpolateX(d[2]);\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n const bucket = context._bucketsBySeries[seriesKey].bucketMap[context._origIdxMap[seriesKey][i]];\n d.y = context._bucketsBySeries[seriesKey].interpolateY(bucket) + context._bucketsBySeries[seriesKey].bucketOffset;\n } else {\n const _i = context._bucket_idx === -1 ? i : d[context._bucket_idx];\n d.y = context._buckets.interpolateY(context._buckets.bucketMap[_i]);\n }\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = endX - d.x;\n d.props.height = bucketHeight;\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n }),\n update => update,\n exit => exit\n .each(function (d) {\n delete d.element;\n })\n .remove()\n )\n .attr(\"opacity\", d => d.props && d.props.hidden ? 0 : 1)\n .each(function (this: SVGGElement, d, i) {\n d.that = this;\n if (context._series_idx > -1) {\n const seriesKey = d[context._series_idx];\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions, seriesKey);\n } else {\n d.x = context.renderRangeElement(d, i, false, context._rangeOptions);\n }\n })\n .on(\"dblclick.zoom\", d => {\n const x1 = this._interpolateX(d[1]);\n const x2 = this._interpolateX(d[2]);\n const xRange = x2 - x1;\n const xScale = w / xRange;\n this.zoomTo(\n [\n -x1 * xScale,\n 0\n ],\n xScale\n );\n })\n ;\n element.on(\"dblclick.zoom\", null);\n }\n exit(domNode, element) {\n this._tooltip.target(null);\n super.exit(domNode, element);\n }\n renderRangeElement(d, i, transformEach = false, options: any = {}, seriesKey?: string) {\n const borderOffset1 = options.strokeWidth;\n const borderOffset2 = borderOffset1 * 2;\n const padding = options.rangePadding;\n let endX;\n const x = isNaN(this._transform.x) ? 0 : this._transform.x;\n const k = isNaN(this._transform.k) ? 1 : this._transform.k;\n let b;\n const bucketHeight = this.bucketHeight();\n d.that.setAttribute(\"data-series\", seriesKey);\n\n if (this._color_idx > -1) {\n d.that.setAttribute(\"data-color\", d[this._color_idx]);\n }\n\n if (seriesKey !== undefined) {\n b = this._bucketsBySeries[seriesKey].bucketMap[this._origIdxMap[seriesKey][i]];\n d.that.setAttribute(\"data-b\", b);\n d.that.setAttribute(\"data-bucketOffset\", this._bucketsBySeries[seriesKey].bucketOffset);\n d.y = this._bucketsBySeries[seriesKey].interpolateY(b) + this._bucketsBySeries[seriesKey].bucketOffset;\n d.that.setAttribute(\"data-dy\", d.y);\n } else {\n b = this._buckets.bucketMap[i];\n d.y = this._buckets.interpolateY(b);\n }\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (!transformEach) {\n d.x = this._interpolateX(d[1]);\n endX = this._interpolateX(d[2]);\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n } else {\n d.x = this._interpolateX(d[1]) * k;\n endX = this._interpolateX(d[2]) * k;\n d.props = {\n ...d[3],\n text: d[0]\n };\n d.props.width = (endX - d.x) / k;\n d.x += x;\n d.props.width *= k;\n }\n d.props.height = bucketHeight;\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.height = this._buckets.bucketScale * bucketHeight;\n }\n if (d.element === undefined && d.that) {\n d.element = d3Select(d.that);\n }\n d.element.attr(\"transform\", `translate(${d.x + (d.props.width / 2)} ${d.y + (d.props.height / 2)})`);\n\n d.x += borderOffset1;\n d.y += borderOffset1;\n d.props.width -= borderOffset2;\n d.props.height -= borderOffset2;\n d.props.width = d.props.width < 1 ? 1 : d.props.width;\n d.props.height = d.props.height < 1 ? 1 : d.props.height;\n\n let text = this.truncateText(d.props.text, d.props.width - padding, this._maxFontScale);\n\n if (text !== d.props.text) {\n text = this.truncateText(d.props.text, d.props.width - padding);\n } else {\n d.props.fontSize = this._maxFontScale * options.fontSize;\n }\n if (seriesKey === undefined && this._buckets.bucketScale < 1) {\n d.props.fontSize = Math.min(this._maxFontScale, this._buckets.bucketScale) * options.fontSize;\n }\n if (!this._maxY || this._maxY < d.y + d.props.height) {\n this._maxY = d.y + d.props.height;\n }\n if (!this._maxX || this._maxX < d.x + d.props.width) {\n this._maxX = d.x + d.props.width;\n }\n render(\n this._rangeRenderer,\n {\n ...options,\n ...d.props,\n text,\n },\n d.that\n );\n }\n\n setRangeOptions() {\n this._rangeOptions = {\n rangePadding: this.rangePadding(),\n fontFamily: this.fontFamily(),\n fontSize: this.fontSize(),\n strokeWidth: this.strokeWidth(),\n fill: this.fill(),\n stroke: this.stroke(),\n textFill: this.rangeFontColor(),\n cornerRadius: this.cornerRadius(),\n };\n }\n\n public _transform = { k: 1, x: 0, y: 0 };\n zoomed(transform) {\n this._transform = transform;\n switch (this.renderMode()) {\n case \"scale-all\":\n this._zoomScale = transform.k;\n this._zoomTranslate = [transform.x, 0];\n this._zoomG.attr(\"transform\", `translate(${transform.x} ${0})scale(${transform.k} 1)`);\n break;\n default:\n const options = this._rangeOptions;\n this.data().forEach((d, i) => {\n if (this._color_idx > -1) {\n options.fill = d[this._color_idx];\n }\n if (this._series_idx > -1) {\n const seriesKey = d[this._series_idx];\n this.renderRangeElement(d, i, true, options, seriesKey);\n } else {\n this.renderRangeElement(d, i, true, options);\n }\n });\n }\n\n this.zoomedHook(transform);\n }\n\n zoomedHook(transform) {\n\n }\n\n private calcBuckets(data, startKey: string | number, endKey: string | number, bucketKey?: string | number) {\n const bucketMap = {};\n const bucketKeyMap = {};\n const tol = this.overlapTolerence();\n const buckets = [{ end: -Infinity }];\n let maxBucket = 0;\n if (bucketKey !== undefined) {\n data.forEach((d, i) => {\n bucketMap[i] = d[bucketKey];\n bucketKeyMap[d[bucketKey]] = true;\n });\n maxBucket = Object.keys(bucketKeyMap).length;\n } else {\n data.forEach((d, i) => {\n for (let i2 = 0; i2 < buckets.length; ++i2) {\n if (i === 0 || buckets[i2][endKey] + tol <= d[startKey]) {\n bucketMap[i] = i2;\n if (maxBucket < i2) maxBucket = i2;\n buckets[i2][endKey] = d[endKey];\n break;\n }\n }\n if (bucketMap[i] === undefined) {\n bucketMap[i] = buckets.length;\n const b = {};\n b[endKey] = d[endKey];\n buckets.push(b as any);\n }\n\n if (maxBucket < bucketMap[i]) maxBucket = bucketMap[i];\n });\n }\n const height = (maxBucket + 1) * (this.bucketHeight() + this.gutter());\n return {\n bucketMap,\n maxBucket,\n bucketScale: this.height() / height,\n interpolateY: d3ScaleLinear()\n .domain([0, maxBucket + 1])\n .range([0, Math.min(this.height(), height)])\n };\n }\n\n data(): IGanttData[];\n data(_: IGanttData[]): this;\n data(_?: IGanttData[]): this | IGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n this._minStart = Math.min(...this.data().map(n => n[1])) ?? 0;\n this._maxEnd = Math.max(...this.data().map(n => n[2])) ?? 1;\n this.measureDataText(true);\n }\n return retVal;\n }\n\n protected _textWidths;\n protected _maxFontScale;\n protected _characterWidths;\n protected _prevFontFamily;\n protected _prevFontSize;\n measureDataText(forceMeasure = false) {\n const textWidths = {};\n const characterWidths = {};\n const fontFamily = this.fontFamily();\n const fontSize = this.fontSize();\n const bucketHeight = this.bucketHeight();\n\n if (bucketHeight) {\n this._maxFontScale = (bucketHeight - (this.rangePadding() * 2)) / fontSize;\n }\n\n if (forceMeasure || this._prevFontFamily !== fontFamily || this._prevFontSize !== fontSize) {\n characterWidths[\".\"] = Utility.textSize(\".\", fontFamily, fontSize).width;\n this.data().forEach(d => {\n if (!textWidths[d[0]]) {\n textWidths[d[0]] = Utility.textSize(d[0], fontFamily, fontSize).width;\n }\n d[0].split(\"\").forEach(char => {\n if (!characterWidths[char]) {\n characterWidths[char] = Utility.textSize(char, fontFamily, fontSize).width;\n }\n });\n });\n this._textWidths = textWidths;\n this._characterWidths = characterWidths;\n }\n this._prevFontFamily = fontFamily;\n this._prevFontSize = fontSize;\n }\n\n truncateText(text, width, scale = 1) {\n const textFits = this._textWidths[text] * scale < width;\n if (textFits) {\n return text;\n }\n let ret = \"\";\n let sum = 0;\n const _width = width - (this._characterWidths[\".\"] * 3);\n for (const char of text) {\n sum += this._characterWidths[char];\n if (sum < _width) {\n ret += char;\n } else {\n break;\n }\n }\n return _width < 0 ? \"\" : ret + \"...\";\n }\n\n resize(_size?: { width: number, height: number }) {\n let retVal;\n if (this.fitWidthToContent() || this.fitHeightToContent()) {\n retVal = super.resize.call(this, {\n width: _size.width,\n height: this._maxY\n });\n } else {\n retVal = super.resize.apply(this, arguments);\n }\n return retVal;\n }\n\n selectionChanged() {\n\n }\n\n highlightItem(_element, d) {\n\n }\n\n click(row, _col, sel) {\n\n }\n\n dblclick(row, _col, sel) {\n\n }\n\n mousein(row, _col, sel) {\n }\n\n mouseover(row, _col, sel) {\n }\n\n mouseout(row, _col, sel) {\n }\n}\nReactGantt.prototype._class += \" timeline_ReactGantt\";\n\nexport interface ReactGantt {\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n bucketHeight(): number;\n bucketHeight(_: number): this;\n gutter(): number;\n gutter(_: number): this;\n showToolbar_default(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n fill(): string;\n fill(_: string): this;\n rangeFontColor(): string;\n rangeFontColor(_: string): this;\n rangePadding(): number;\n rangePadding(_: number): this;\n renderMode(): \"default\" | \"scale-all\";\n renderMode(_: \"default\" | \"scale-all\"): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n fitWidthToContent(): boolean;\n fitWidthToContent(_: boolean): this;\n fitHeightToContent(): boolean;\n fitHeightToContent(_: boolean): this;\n evenSeriesBackground(): string;\n evenSeriesBackground(_: string): this;\n oddSeriesBackground(): string;\n oddSeriesBackground(_: string): this;\n}\n\nReactGantt.prototype.publish(\"fitWidthToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box width\");\nReactGantt.prototype.publish(\"fitHeightToContent\", false, \"boolean\", \"If true, resize will simply reapply the bounding box height\");\nReactGantt.prototype.publish(\"titleColumn\", null, \"string\", \"Column name to for the title\");\nReactGantt.prototype.publish(\"startDateColumn\", null, \"string\", \"Column name to for the start date\");\nReactGantt.prototype.publish(\"endDateColumn\", null, \"string\", \"Column name to for the end date\");\nReactGantt.prototype.publish(\"iconColumn\", null, \"string\", \"Column name to for the icon\");\nReactGantt.prototype.publish(\"colorColumn\", null, \"string\", \"Column name to for the color\");\nReactGantt.prototype.publish(\"seriesColumn\", null, \"string\", \"Column name to for the series identifier\");\nReactGantt.prototype.publish(\"bucketColumn\", null, \"string\", \"Column name to for the bucket identifier\");\nReactGantt.prototype.publish(\"renderMode\", \"default\", \"set\", \"Render modes vary in features and performance\", [\"default\", \"scale-all\"]);\nReactGantt.prototype.publish(\"rangePadding\", 3, \"number\", \"Padding within each range rectangle (pixels)\");\nReactGantt.prototype.publish(\"fill\", \"#1f77b4\", \"string\", \"Background color of range rectangle\");\nReactGantt.prototype.publish(\"stroke\", null, \"string\", \"Color of range rectangle border\");\nReactGantt.prototype.publish(\"strokeWidth\", null, \"number\", \"Width of range rectangle border (pixels)\");\nReactGantt.prototype.publish(\"cornerRadius\", 3, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"fontFamily\", null, \"string\", \"Font family within range rectangle\", null, { optional: true });\nReactGantt.prototype.publish(\"fontSize\", 10, \"number\", \"Size of font within range rectangle (pixels)\");\nReactGantt.prototype.publish(\"rangeFontColor\", \"#ecf0f1\", \"html-color\", \"rangeFontColor\");\nReactGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactGantt.prototype.publish(\"bucketHeight\", 100, \"number\", \"Max height of range element (pixels)\");\nReactGantt.prototype.publish(\"gutter\", 2, \"number\", \"Space between range buckets (pixels)\");\nReactGantt.prototype.publish(\"maxZoom\", 16, \"number\", \"Maximum zoom\");\nReactGantt.prototype.publish(\"evenSeriesBackground\", \"#FFFFFF\", \"html-color\", \"Background color of even series rows\");\nReactGantt.prototype.publish(\"oddSeriesBackground\", \"#DDDDDD\", \"html-color\", \"Background color of odd series rows\");\n","import { Axis } from \"@hpcc-js/chart\";\nimport { SVGWidget } from \"@hpcc-js/common\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\n\nexport type IAxisGanttData = [string, number | string, number | string, any?] | any[];\n\nexport class ReactAxisGantt extends SVGWidget {\n\n protected _topAxis: Axis = new Axis(\"center\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"center\")\n .stroke(\"#000000\")\n ;\n protected _bottomAxis: Axis = new Axis(\"center\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n protected rangeRenderer;\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this.rangeRenderer = function () {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n };\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n\n const contentHeight = (h - (axisHeight * 2));\n const borderOffset1 = this.strokeWidth();\n this._topRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._topAxisElement.attr(\"transform\", \"translate(0 0)\");\n this._topAxis.resize({ height: axisHeight, width: w });\n this._contentRect\n .attr(\"height\", contentHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._contentElement.attr(\"transform\", `translate(0 ${axisHeight + borderOffset1})`);\n this._gantt.resize({ height: contentHeight, width: w });\n this._bottomRect\n .attr(\"height\", axisHeight)\n .attr(\"width\", w)\n .attr(\"fill\", \"transparent\")\n ;\n this._bottomAxisElement.attr(\"transform\", `translate(0 ${axisHeight + contentHeight + borderOffset1})`);\n this._bottomAxis.resize({ height: axisHeight, width: w });\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this._topAxisElement = element.append(\"g\")\n .attr(\"class\", \"top-axis-wrapper\")\n ;\n this._topRect = this._topAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._contentElement = element.append(\"g\")\n .attr(\"class\", \"content-wrapper\")\n ;\n this._contentRect = this._contentElement.append(\"rect\")\n .attr(\"class\", \"content-rect\")\n ;\n this._bottomAxisElement = element.append(\"g\")\n .attr(\"class\", \"bottom-axis-wrapper\")\n ;\n this._bottomRect = this._bottomAxisElement.append(\"rect\")\n .attr(\"class\", \"top-axis-rect\")\n ;\n this._topAxis.target(this._topAxisElement.node());\n this._gantt.target(this._contentElement.node()).bucketHeight(30);\n this._bottomAxis.target(this._bottomAxisElement.node());\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .render()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n exit(domNode, element) {\n this._bottomAxis.target(null);\n this._gantt.target(null);\n this._topAxis.target(null);\n super.exit(domNode, element);\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n this._gantt._minStart = Math.min(...ganttData.map(n => n[1])) ?? 0;\n this._gantt._maxEnd = Math.max(...ganttData.map(n => n[2])) ?? 1;\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGantt.prototype._class += \" timeline_ReactAxisGantt\";\n\nexport interface ReactAxisGantt {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGantt.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGantt.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGantt.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGantt.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGantt.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGantt.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGantt.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGantt.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { min as d3Min, max as d3Max } from \"d3-array\";\nimport { Axis } from \"@hpcc-js/chart\";\nimport { Border2 } from \"@hpcc-js/layout\";\nimport { React } from \"@hpcc-js/react\";\nimport { ReactGantt } from \"./ReactGantt.ts\";\nimport { IAxisGanttData } from \"./ReactAxisGantt.ts\";\n\nexport class ReactAxisGanttSeries extends Border2 {\n\n protected _topAxis: Axis = new Axis(\"origin\")\n .orientation(\"top\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n protected _gantt: ReactGantt = new ReactGantt(\"origin\")\n .stroke(\"#000000\")\n .fitHeightToContent(true)\n ;\n protected _bottomAxis: Axis = new Axis(\"origin\")\n .orientation(\"bottom\")\n .type(\"linear\")\n .shrinkToFit(\"none\")\n .overlapMode(\"hide\")\n .extend(0)\n .tickFormat(\"d\")\n ;\n\n protected _topAxisElement;\n protected _contentElement;\n protected _bottomAxisElement;\n protected _topRect;\n protected _contentRect;\n protected _bottomRect;\n\n constructor() {\n super();\n this.centerOverflowX_default(\"hidden\");\n this.centerOverflowY_default(\"auto\");\n }\n\n selection(_: any[]): this;\n selection(): any[];\n selection(_?: any[]): any[] | this {\n if (!arguments.length) return this._gantt.selection();\n this._gantt.selection(_);\n return this;\n }\n\n rangeRenderer(): React.FunctionComponent;\n rangeRenderer(_: React.FunctionComponent): this;\n rangeRenderer(_?: React.FunctionComponent): this | React.FunctionComponent {\n const ret = this._gantt.rangeRenderer.apply(this._gantt, arguments);\n if (!arguments.length) return ret;\n return this;\n }\n\n resizeWrappers() {\n\n const w = this.width();\n const h = this.height();\n\n const axisHeight = this.axisHeight(); //TODO: Dynamic scaling to allow for small resolutions?\n const contentHeight = (h - (axisHeight * 2));\n\n this.bottomHeight(axisHeight);\n\n this._topWA.resize({\n width: w,\n height: axisHeight\n });\n this._centerWA.resize({\n width: w,\n height: contentHeight\n });\n this._bottomWA.resize({\n width: w,\n height: axisHeight\n });\n this.top().render();\n this.bottom().render();\n this.center().render();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._gantt.click = (row, col, sel) => {\n this.click(row, col, sel);\n };\n\n this._gantt.dblclick = (row, col, sel) => {\n this.dblclick(row, col, sel);\n };\n\n this.top(this._topAxis);\n this.center(this._gantt);\n this.bottom(this._bottomAxis);\n\n this.resizeWrappers();\n\n this._gantt.zoomedHook = (transform) => {\n this.onzoom(transform);\n };\n }\n\n onzoom(transform) {\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n this._bottomAxis\n .fontFamily(this.axisFontFamily())\n .fontSize(this.axisFontSize())\n .tickLength(this.axisTickLength())\n .low(nextLow)\n .high(nextHigh)\n .lazyRender()\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._topAxis.tickFormat(this.tickFormat()).render();\n this._bottomAxis.tickFormat(this.tickFormat()).render();\n this._gantt.render();\n }\n\n columns(): string[];\n columns(_: string[]): this;\n columns(_?: string[]): this | string[] {\n const retVal = super.columns.apply(this, arguments);\n if (arguments.length > 0) {\n this._gantt.columns(_);\n }\n return retVal;\n }\n\n data(): IAxisGanttData[];\n data(_: IAxisGanttData[]): this;\n data(_?: IAxisGanttData[]): this | IAxisGanttData[] {\n const retVal = super.data.apply(this, arguments);\n if (arguments.length > 0) {\n const ganttData: any[] = this.data().map(n => {\n const ret = [...n];\n ret[1] = isNaN(n[1] as any) ? new Date(n[1]).getTime() : Number(n[1]);\n ret[2] = isNaN(n[2] as any) ? new Date(n[2]).getTime() : Number(n[2]);\n return ret;\n });\n\n this._gantt._minStart = d3Min(ganttData, n => n[1]);\n this._gantt._maxEnd = d3Max(ganttData, n => n[2]);\n this._gantt.data(ganttData);\n }\n return retVal;\n }\n\n resize(_size?: { width: number, height: number }) {\n const retVal = super.resize.apply(this, arguments);\n\n if (this._topAxisElement) {\n this.resizeWrappers();\n }\n\n return retVal;\n }\n\n click(row, col, sel) {\n\n }\n\n dblclick(row, col, sel) {\n\n }\n\n tooltip() {\n return this._gantt._tooltip;\n }\n}\nReactAxisGanttSeries.prototype._class += \" timeline_ReactAxisGanttSeries\";\n\nexport interface ReactAxisGanttSeries {\n tickFormat(): string;\n tickFormat(_: string): this;\n tickFormat_exists(): boolean;\n overlapTolerence(): number;\n overlapTolerence(_: number): this;\n smallestRangeWidth(): number;\n smallestRangeWidth(_: number): this;\n scaleMode(): boolean;\n scaleMode(_: boolean): this;\n fontSize(): number;\n fontSize(_: number): this;\n fontFamily(): string;\n fontFamily(_: string): this;\n strokeWidth(): number;\n strokeWidth(_: number): this;\n stroke(): string;\n stroke(_: string): this;\n cornerRadius(): number;\n cornerRadius(_: number): this;\n axisFontSize(): number;\n axisFontSize(_: number): this;\n axisFontFamily(): string;\n axisFontFamily(_: string): this;\n axisTickLength(): number;\n axisTickLength(_: number): this;\n axisHeight(): number;\n axisHeight(_: number): this;\n titleColumn(): string;\n titleColumn(_: string): this;\n startDateColumn(): string;\n startDateColumn(_: string): this;\n endDateColumn(): string;\n endDateColumn(_: string): this;\n iconColumn(): string;\n iconColumn(_: string): this;\n colorColumn(): string;\n colorColumn(_: string): this;\n seriesColumn(): string;\n seriesColumn(_: string): this;\n bucketColumn(): string;\n bucketColumn(_: string): this;\n maxZoom(): number;\n maxZoom(_: number): this;\n}\nReactAxisGanttSeries.prototype.publish(\"tickFormat\", null, \"string\", \"Format rule applied to axis tick labels\", undefined, { optional: true });\nReactAxisGanttSeries.prototype.publish(\"axisHeight\", 22, \"number\", \"Height of axes (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"overlapTolerence\", 2, \"number\", \"overlapTolerence\");\nReactAxisGanttSeries.prototype.publish(\"smallestRangeWidth\", 10, \"number\", \"Width of the shortest range (pixels)\");\nReactAxisGanttSeries.prototype.publish(\"axisFontSize\", null, \"number\", \"Font size of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisFontFamily\", null, \"string\", \"Font family of axis tick labels\");\nReactAxisGanttSeries.prototype.publish(\"axisTickLength\", null, \"number\", \"Length of axis ticks\");\nReactAxisGanttSeries.prototype.publishProxy(\"gutter\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"renderMode\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"strokeWidth\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontSize\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"fontFamily\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"stroke\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"cornerRadius\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"titleColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"startDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"endDateColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"iconColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"colorColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"seriesColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketColumn\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"maxZoom\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"evenSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"oddSeriesBackground\", \"_gantt\");\nReactAxisGanttSeries.prototype.publishProxy(\"bucketHeight\", \"_gantt\");\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGantt } from \"./ReactAxisGantt.ts\";\n\nexport class ReactTimeline extends ReactAxisGantt {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._drawStartPos = \"origin\";\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const parser = d3TimeParse(\"%Q\");\n const startTime = parser(d[1]);\n const endTime = parser(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().map(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parseTime = d3TimeParse(\"%Q\");\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n}\nReactTimeline.prototype._class += \" timeline_ReactTimeline\";\n\nexport interface ReactTimeline {\n _tooltipHTML(_): string;\n\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n}\nReactTimeline.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimeline.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n","import { timeFormat as d3TimeFormat, timeParse as d3TimeParse } from \"d3-time-format\";\nimport { ReactAxisGanttSeries } from \"./ReactAxisGanttSeries.ts\";\n\nconst parseTime = d3TimeParse(\"%Q\");\nexport class ReactTimelineSeries extends ReactAxisGanttSeries {\n\n protected _axisLabelFormatter;//TODO: add a type to this? d3 time formatting function type?\n\n constructor() {\n super();\n this._topAxis.type(\"time\");\n this._bottomAxis.type(\"time\");\n\n this.tooltipHTML((d: any) => {\n const startTime = parseTime(d[1]);\n const endTime = parseTime(d[2]);\n\n const formatter = d3TimeFormat(this.tooltipTimeFormat());\n return `<div style=\"text-align:center;\">${d[0]}<br/><br/>${formatter(startTime)} -> ${formatter(endTime)}</div>`;\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this.timePattern_exists()) {\n\n let minTimestamp = Infinity;\n let maxTimestamp = -Infinity;\n let lowDateStr = \"\";\n let highDateStr = \"\";\n this.data().forEach(n => {\n const start = new Date(n[1]).getTime();\n const end = new Date(n[2]).getTime();\n if (minTimestamp > start) {\n minTimestamp = start;\n lowDateStr = \"\" + n[1];\n }\n if (maxTimestamp < end) {\n maxTimestamp = end;\n highDateStr = \"\" + n[2];\n }\n });\n\n const axisTickFormat = this._axisLabelFormatter\n ? this._axisLabelFormatter\n : (this.tickFormat_exists && this.tickFormat_exists() ? this.tickFormat() : undefined);\n\n this._topAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n this._bottomAxis\n .type(\"time\")\n .timePattern(this.timePattern())\n .overlapMode(\"none\")\n .low(lowDateStr)\n .high(highDateStr)\n ;\n\n if (axisTickFormat) {\n this._topAxis.tickFormat(axisTickFormat);\n this._bottomAxis.tickFormat(axisTickFormat);\n } else {\n this._topAxis.tickFormat_reset();\n this._bottomAxis.tickFormat_reset();\n }\n this._gantt._minStart = minTimestamp;\n this._gantt._maxEnd = maxTimestamp;\n }\n }\n\n tooltipHTML(callback) {\n this._tooltipHTML = callback;\n this.tooltip().tooltipHTML(this._tooltipHTML);\n return this;\n }\n\n parseAxisValue(v) {\n const parsedTime = parseTime(v);\n\n const formatTime = d3TimeFormat(this.timePattern());\n return formatTime(parsedTime);\n }\n\n onzoom(transform) {\n\n const w = this.width();\n const low = this._gantt._minStart;\n const high = this._gantt._maxEnd;\n const range = high - low;\n const wpp = range / w;\n const nextLow = Math.floor(low - (wpp * (transform.x / transform.k)));\n const nextHigh = Math.ceil((range / transform.k) + nextLow);\n\n this._topAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n this._bottomAxis\n .low(this.parseAxisValue(nextLow))\n .high(this.parseAxisValue(nextHigh))\n .render()\n ;\n }\n\n _tooltipHTML: (_) => string;\n}\nReactTimelineSeries.prototype._class += \" timeline_ReactTimelineSeries\";\n\nexport interface ReactTimelineSeries {\n timePattern(): string;\n timePattern(_: string): this;\n timePattern_exists(): boolean;\n tooltipTimeFormat(): string;\n tooltipTimeFormat(_: string): this;\n}\nReactTimelineSeries.prototype.publish(\"timePattern\", \"%Y-%m-%d\", \"string\", \"Time pattern used for parsing datetime strings on each data row\", null, { optional: true });\nReactTimelineSeries.prototype.publish(\"tooltipTimeFormat\", \"%Y-%m-%d\", \"string\", \"Time format used in the default html tooltip\");\n\n"],"mappings":"qnCCUA,IAAa,EAAb,cAA+B,EAAA,UAC3B,OACA,OACA,cACA,MACA,cACA,WACA,eACA,WACA,cACA,WAAA,EAAA,EAAA,SACA,gBAAA,EAAA,EAAA,SACA,iBACA,WAEA,WACA,WAAuB,EACvB,eAA2B,EAC3B,aAAyB,EACzB,WAAsB,EACtB,YAAuB,EACvB,cAAyB,EAEzB,WAAA,GACI,QACA,EAAA,SAAS,KAAK,MACd,EAAA,QAAQ,qBAAqB,KAAK,MAElC,KAAK,cAAgB,SACrB,KAAK,YAAa,GAAW,WAAW,EAAE,KAAK,2BAA2B,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,wBAAwB,KAAK,iBAAiB,KAAK,OAAO,MAAM,EAAE,KAAK,mBAEhM,KAAK,QAAS,IAAI,EAAA,MACb,KAAK,QAEV,KAAK,QAAS,IAAI,EAAA,MACb,KAAK,QAEV,KAAK,eAAA,EAAA,EAAA,aACA,aAAa,IACb,aAAa,IAItB,YAAA,GACI,MAA8B,eAAvB,KAAK,cAGhB,UAAA,GAEI,OAAA,EAAA,EAAA,QADa,IAAI,KAAK,OAAO,IAAI,GAAK,EAAE,KAAK,oBAAqB,KAAK,OAAO,OAAO,KAAO,EAAE,KAAK,eAAe,IAAI,GAAK,EAAE,KAAK,iBAItI,MAAA,GACI,MAAM,EAAS,KAAK,WAAa,CAAC,KAAK,WAAW,GAAI,KAAK,WAAW,IAAM,KAAK,aACjF,QAAkB,IAAd,EAAO,SAAkC,IAAd,EAAO,KAC9B,EAAO,KAAO,EAAO,IAAM,KAAK,sBAAsB,CACtD,MAAM,GAAA,EAAA,EAAA,WAAqB,KAAK,eAC1B,GAAA,EAAA,EAAA,YAAyB,KAAK,eAC9B,EAAQ,EAAO,EAAO,IACtB,EAAQ,EAAO,EAAO,IAC5B,GAAI,EAAO,KAAO,EAAO,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,EAAO,GAAO,EAAU,EAAI,EAAU,IAC3D,EAAW,KAAK,KAAM,EAAQ,EAAU,EAAK,GAEnD,KAAK,SACA,IAAI,KAAK,eAAe,IACxB,KAAK,KAAK,eAAe,IACzB,SAEL,KAAK,YACA,IAAI,KAAK,eAAe,IACxB,KAAK,KAAK,eAAe,IACzB,SAIT,cAEJ,EAAoB,UAAU,QAAU,gCASxC,EAAoB,UAAU,QAAQ,cAAe,WAAY,SAAU,kEAAmE,KAAM,CAAE,UAAU,IAChK,EAAoB,UAAU,QAAQ,oBAAqB,WAAY,SAAU,gENxHpD,iCAFL,kCACG"}
|
package/package.json
CHANGED
|
@@ -1,58 +1,56 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/timeline",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.56.0",
|
|
4
4
|
"description": "hpcc-js - Viz Timeline",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./types/index.d.ts",
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.umd.cjs"
|
|
13
|
+
},
|
|
14
|
+
"./dist/*": "./dist/*"
|
|
16
15
|
},
|
|
16
|
+
"browser": "./dist/index.umd.cjs",
|
|
17
|
+
"types": "./types/index.d.ts",
|
|
17
18
|
"files": [
|
|
18
19
|
"dist/*",
|
|
19
|
-
"
|
|
20
|
-
"types
|
|
21
|
-
"src/*"
|
|
20
|
+
"src/*",
|
|
21
|
+
"types/*"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"clean": "rimraf --glob lib* types dist *.tsbuildinfo",
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
"bundle-watch": "npm run bundle -- -w",
|
|
31
|
-
"minimize": "terser dist/index.js -c -m --source-map \"content='dist/index.js.map',url='index.min.js.map'\" -o dist/index.min.js",
|
|
32
|
-
"gen-legacy-types": "downlevel-dts ./types ./types-3.4",
|
|
33
|
-
"build": "npm run compile-es6 && npm run bundle",
|
|
34
|
-
"watch": "npm-run-all compile-es6 -p compile-es6-watch bundle-watch",
|
|
35
|
-
"stamp": "node ../../node_modules/@hpcc-js/bundle/src/stamp.js",
|
|
24
|
+
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
25
|
+
"bundle": "vite build",
|
|
26
|
+
"bundle-watch": "vite --port 5518",
|
|
27
|
+
"gen-types": "tsc --project tsconfig.json",
|
|
28
|
+
"gen-types-watch": "npm run gen-types -- --watch",
|
|
29
|
+
"build": "run-p gen-types bundle",
|
|
36
30
|
"lint": "eslint ./src",
|
|
31
|
+
"lint-fix": "eslint --fix src/**/*.ts",
|
|
37
32
|
"docs": "typedoc --options tdoptions.json .",
|
|
38
|
-
"
|
|
33
|
+
"test-browser": "vitest run --project browser",
|
|
34
|
+
"test": "vitest run",
|
|
35
|
+
"coverage": "vitest run --coverage",
|
|
36
|
+
"update": "npx --yes npm-check-updates -u -t minor",
|
|
37
|
+
"update-major": "npx --yes npm-check-updates -u"
|
|
39
38
|
},
|
|
40
39
|
"dependencies": {
|
|
41
|
-
"@hpcc-js/api": "^
|
|
42
|
-
"@hpcc-js/chart": "^
|
|
43
|
-
"@hpcc-js/common": "^
|
|
44
|
-
"@hpcc-js/html": "^2.
|
|
45
|
-
"@hpcc-js/layout": "^
|
|
46
|
-
"@hpcc-js/react": "^
|
|
40
|
+
"@hpcc-js/api": "^3.3.12",
|
|
41
|
+
"@hpcc-js/chart": "^3.4.2",
|
|
42
|
+
"@hpcc-js/common": "^3.4.2",
|
|
43
|
+
"@hpcc-js/html": "^3.2.13",
|
|
44
|
+
"@hpcc-js/layout": "^3.3.0",
|
|
45
|
+
"@hpcc-js/react": "^3.3.2"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
|
-
"@hpcc-js/
|
|
48
|
+
"@hpcc-js/esbuild-plugins": "^1.5.2",
|
|
50
49
|
"d3-array": "^1",
|
|
51
50
|
"d3-scale": "^1",
|
|
52
51
|
"d3-selection": "^1",
|
|
53
52
|
"d3-time-format": "^2",
|
|
54
|
-
"d3-zoom": "^1"
|
|
55
|
-
"tslib": "2.8.1"
|
|
53
|
+
"d3-zoom": "^1"
|
|
56
54
|
},
|
|
57
55
|
"repository": {
|
|
58
56
|
"type": "git",
|
|
@@ -65,5 +63,5 @@
|
|
|
65
63
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
66
64
|
},
|
|
67
65
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
68
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "a35882216a554b24a2586f30ce829d511941aecd"
|
|
69
67
|
}
|
package/src/MiniGantt.ts
CHANGED
|
@@ -83,7 +83,7 @@ export class MiniGantt extends SVGWidget {
|
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
dataStartPos(d) {
|
|
86
|
-
if(typeof this._dateCache[d[this._startDate_idx]] !== "undefined"){
|
|
86
|
+
if (typeof this._dateCache[d[this._startDate_idx]] !== "undefined") {
|
|
87
87
|
return this._dateCache[d[this._startDate_idx]];
|
|
88
88
|
}
|
|
89
89
|
const pos = this.brAxis.scalePos(d[this._startDate_idx]);
|
|
@@ -92,7 +92,7 @@ export class MiniGantt extends SVGWidget {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
dataEndPos(d) {
|
|
95
|
-
if(typeof this._dateCache[d[this._endDate_idx]] !== "undefined"){
|
|
95
|
+
if (typeof this._dateCache[d[this._endDate_idx]] !== "undefined") {
|
|
96
96
|
return this._dateCache[d[this._endDate_idx]];
|
|
97
97
|
}
|
|
98
98
|
const pos = this.brAxis.scalePos(d[this._endDate_idx]);
|
|
@@ -522,20 +522,21 @@ export class MiniGantt extends SVGWidget {
|
|
|
522
522
|
|
|
523
523
|
updateEntityRect(textbox: EntityRect, d) {
|
|
524
524
|
}
|
|
525
|
+
}
|
|
526
|
+
MiniGantt.prototype._class += " timeline_MiniGantt";
|
|
527
|
+
MiniGantt.prototype.implements(ITooltip.prototype);
|
|
528
|
+
MiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);
|
|
525
529
|
|
|
530
|
+
export interface MiniGantt {
|
|
526
531
|
// ITooltip ---
|
|
527
532
|
tooltip;
|
|
528
|
-
tooltipHTML
|
|
529
|
-
tooltipFormat
|
|
533
|
+
tooltipHTML(_): string;
|
|
534
|
+
tooltipFormat(_): string;
|
|
530
535
|
|
|
531
536
|
// SimpleSelectionMixin
|
|
532
537
|
_selection;
|
|
533
|
-
}
|
|
534
|
-
MiniGantt.prototype._class += " timeline_MiniGantt";
|
|
535
|
-
MiniGantt.prototype.implements(ITooltip.prototype);
|
|
536
|
-
MiniGantt.prototype.mixin(Utility.SimpleSelectionMixin);
|
|
537
538
|
|
|
538
|
-
|
|
539
|
+
// Properties ---
|
|
539
540
|
timePattern(): string;
|
|
540
541
|
timePattern(_: string): this;
|
|
541
542
|
tickFormat(): string;
|
package/src/ReactAxisGantt.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Axis } from "@hpcc-js/chart";
|
|
2
2
|
import { SVGWidget } from "@hpcc-js/common";
|
|
3
|
-
import { ReactGantt } from "./ReactGantt";
|
|
3
|
+
import { ReactGantt } from "./ReactGantt.ts";
|
|
4
4
|
|
|
5
5
|
export type IAxisGanttData = [string, number | string, number | string, any?] | any[];
|
|
6
6
|
|
|
@@ -160,6 +160,13 @@ export class ReactAxisGantt extends SVGWidget {
|
|
|
160
160
|
this._gantt.render();
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
exit(domNode, element) {
|
|
164
|
+
this._bottomAxis.target(null);
|
|
165
|
+
this._gantt.target(null);
|
|
166
|
+
this._topAxis.target(null);
|
|
167
|
+
super.exit(domNode, element);
|
|
168
|
+
}
|
|
169
|
+
|
|
163
170
|
columns(): string[];
|
|
164
171
|
columns(_: string[]): this;
|
|
165
172
|
columns(_?: string[]): this | string[] {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { min as d3Min, max as d3Max } from "d3-array";
|
|
2
2
|
import { Axis } from "@hpcc-js/chart";
|
|
3
3
|
import { Border2 } from "@hpcc-js/layout";
|
|
4
|
-
import { ReactGantt } from "./ReactGantt";
|
|
5
|
-
import { IAxisGanttData } from "./ReactAxisGantt";
|
|
6
4
|
import { React } from "@hpcc-js/react";
|
|
5
|
+
import { ReactGantt } from "./ReactGantt.ts";
|
|
6
|
+
import { IAxisGanttData } from "./ReactAxisGantt.ts";
|
|
7
7
|
|
|
8
8
|
export class ReactAxisGanttSeries extends Border2 {
|
|
9
9
|
|
package/src/ReactGantt.ts
CHANGED
|
@@ -332,6 +332,10 @@ export class ReactGantt extends SVGZoomWidget {
|
|
|
332
332
|
;
|
|
333
333
|
element.on("dblclick.zoom", null);
|
|
334
334
|
}
|
|
335
|
+
exit(domNode, element) {
|
|
336
|
+
this._tooltip.target(null);
|
|
337
|
+
super.exit(domNode, element);
|
|
338
|
+
}
|
|
335
339
|
renderRangeElement(d, i, transformEach = false, options: any = {}, seriesKey?: string) {
|
|
336
340
|
const borderOffset1 = options.strokeWidth;
|
|
337
341
|
const borderOffset2 = borderOffset1 * 2;
|