@hpcc-js/html 3.3.18 → 3.3.19
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 +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var t=Object.defineProperty,e=(e,o)=>t(e,"name",{value:o,configurable:!0}),o=(e,o,i)=>((e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i)(e,"symbol"!=typeof o?o+"":o,i);import{HTMLWidget as i,select as r,format as s}from"@hpcc-js/common";import{scopedLogger as l}from"@hpcc-js/util";import{React as n}from"@hpcc-js/react";const h="@hpcc-js/html",a="3.3.18",p="3.23.0",d=class _HTMLTooltip extends i{_triggerElement;_contentNode;_prevContentNode;_tooltipElement;_arrowElement;_tooltipHTMLCallback=/* @__PURE__ */e(t=>"<b>_tooltipHTMLCallback is undefined</b>","_tooltipHTMLCallback");_logger=l("html/HTMLTooltip");constructor(){super(),this.visible(!1)}tooltipHTML(t){return this._tooltipHTMLCallback=t,this}tooltipContent(t){return arguments.length?(this._contentNode=t,this):this._contentNode}triggerElement(t){return this._triggerElement=t,this}enter(t,e){super.enter(t,e);const o=r("body");this._tooltipElement=o.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=o.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(t,e){if(super.update(t,e),this._contentNode!==this._prevContentNode){const t=this._tooltipElement.node();[...t.querySelectorAll("*")].map(t=>t.__data__).filter(t=>t).forEach(t=>{"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),t.innerHTML="",t.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(()=>this._tooltipHTMLCallback(this.data())),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");const t=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(t.width),this.tooltipHeight_default(t.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()}onShowContent(t){}updateTooltipPosition(){const t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o}calcTooltipDirection(t){const e=Object.keys(t),o=this.direction();e.sort((t,e)=>t===o?-1:1);const i={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let r=0;r<e.length;r++){const o={top:t[e[r]].y,left:t[e[r]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(o,i))return e[r]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${o}'`),this._logger.debug(i),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o}rectFits(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top}setArrowPosition(t,e){let o,i,r="border-top-color";switch(this._arrowElement.style("border",`${this.arrowHeight()}px solid ${this.tooltipColor()}`).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),i=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),r="border-top-color",this._arrowElement.style("border-top-width",`${this.arrowHeight()}px`).style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),i=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,r="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",`${this.arrowHeight()}px`).style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,i=t.x-this.arrowHeight(),r="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",`${this.arrowHeight()}px`);break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),i=t.x+this.tooltipWidth()+2*this.padding(),r="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",`${this.arrowHeight()}px`).style("border-right-width","0px")}return void 0!==o&&void 0!==i?this._arrowElement.style("top",o+"px").style("left",i+"px").style(r,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}_cursorLoc;calcReferenceBBox(){const t=this.getReferenceNode();let{top:e,left:o,width:i,height:r}=t.getBoundingClientRect();const s=this.tooltipWidth(),l=this.tooltipHeight(),n=s/2,h=l/2,a=this.arrowHeight(),p=this.padding(),d=2*p;this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],i=1,r=1);return{n:{x:o+i/2-n-p,y:e-l-a-d},e:{x:o+i+a,y:e+r/2-h-p},s:{x:o+i/2-n-p,y:e+r+a},w:{x:o-s-a-d,y:e+r/2-h-p},nw:{x:o-s-d,y:e-l-d},ne:{x:o+i,y:e-l-d},se:{x:o+i,y:e+r},sw:{x:o-s-d,y:e+r}}}_closing=!1;mouseout(){this._closing=!0,this._tooltipElement.on("mouseover",()=>{this._closing=!1}),this._tooltipElement.on("mouseout",()=>{this.mouseout()}),setTimeout(()=>{this._closing&&this.visible(!1)},this.closeDelay())}visible(t){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",t?"visible":"hidden"),this._tooltipElement.style("visibility",t?"visible":"hidden")),super.visible(t),this):super.visible()}exit(t,e){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(t,e)}};e(d,"HTMLTooltip");let c=d;c.prototype._class+=" html_HTMLTooltip",c.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),c.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),c.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),c.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),c.prototype.publish("padding",8,"number","Padding (pixels)"),c.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),c.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),c.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),c.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),c.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),c.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),c.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");const u=class _SimpleTable extends i{_table;_tbody;_thead;_theadRow;constructor(){super()}transformData(){return this.data()}enter(t,e){super.enter(t,e),this._table=e.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(t,e){super.update(t,e),this._table.style("width",this.autoWidth()?"auto":"100%");const o=this._theadRow.selectAll("th").data(this.columns());o.enter().append("th").attr("class",(t,e)=>`th-${e}`).merge(o).text(t=>t.toString()),o.exit().remove();const i=this._tbody.selectAll("tr").data(this.transformData());i.enter().append("tr").merge(i).each(function(t){const e=r(this).selectAll("td").data(t);e.enter().append("td").attr("class",(t,e)=>`col-${e}`).merge(e).text(t=>t.toString()),e.exit().remove()}),i.exit().remove()}};e(u,"SimpleTable");let g=u;g.prototype._class+=" html_SimpleTable",g.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");const y=class _StyledTable extends g{constructor(){super()}applyStyleObject(t,e){Object.keys(e).forEach(o=>{t.style(o,e[o])})}update(t,e){super.update(t,e),e.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.select(`.th-${o}`),t)}),this.tbodyColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.selectAll(`.col-${o}`),t)});const o=Object.keys(this.evenRowStyles()).length>0,i=Object.keys(this.lastRowStyles()).length>0,r=e.selectAll("tbody > tr");if(o){const t=r.select(function(t,e){return e%2?this:null});this.applyStyleObject(t,this.evenRowStyles())}if(i){const t=r.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(t,this.lastRowStyles())}}};e(y,"StyledTable");let b=y;b.prototype._class+=" html_StyledTable",b.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),b.prototype.publish("fontColor","#333","string","Base font color used within the table"),b.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),b.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),b.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),b.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');const m=class _BreakdownTable extends b{_tooltip;constructor(){super()}transformData(){const t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)}breakdownData(t){const e=this.data().length,o=this.data().reduce((t,e)=>t+e[1],0),i=[];let r=0;this.data().sort((t,e)=>t[1]>e[1]?-1:1);const s=e-t>0;if(this.data().filter((e,o)=>!s||o<t-1).forEach(t=>{const e=Math.round(t[1]/o*100);r+=e,i.push([t[0],e+"%"])}),s){const o=`${this.otherLabel()} (${e-t+1})`,s="~"+(100-r)+"%";i.push([o,s])}return i}calculateRowCount(){const t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)}enter(t,e){super.enter(t,e),this._tooltip=(new c).target(t),this._tooltip.tooltipHTML(t=>{const e=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),o=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),i=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).width)),r=2*(i+30)+2*this._tooltip.padding(),s=o*Math.ceil((t.length-e)/2)+2*this._tooltip.padding();this._tooltip.tooltipWidth(r),this._tooltip.tooltipHeight(s);const l=this.breakdownData(this.data().length).slice(e-1);return`<div style="\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n ">${l.map(t=>`<div style="\n float:left;\n width:${Math.floor(49.5)}%;\n ">${t[0]}: ${t[1]}</div>`).join("")}</div>`})}update(t,e){this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),super.update(t,e);if((this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){const t=e.select("tbody > tr:last-child"),o=this;t.on("mouseout.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.visible(!1).render()}).on("mouseenter.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.direction("n").data(o.data()).visible(!0).render()})}}};e(m,"BreakdownTable");let f=m;f.prototype._class+=" html_BreakdownTable",f.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),f.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:/* @__PURE__ */e(t=>t.useCalculatedRowCount(),"disable")}),f.prototype.publish("fontSize",14,"number","Font size (pixels)"),f.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),f.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),f.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),f.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),f.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),f.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),f.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),f.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),f.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),f.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),f.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),f.prototype.publish("thFontSize",26,"number","Font size for th elements"),f.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),f.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");const _=class _JSXWidget extends i{rootNode;jsxRender(t,e){this.rootNode=n.render(t,e,this.rootNode)}};e(_,"JSXWidget"),o(_,"Component",n.Component),o(_,"createElement",n.createElement);let w=_;w.prototype._class+=" html_JSXWidget";const x=class _VNode{_attrs;_children;constructor(t,e){this._attrs=t,this._children=e}type(){return"div"}attrs(){return this._attrs}attr(t){return this._attrs[t]}children(){return this._children}update(t){for(const e in this._attrs)t.attr(e,this._attrs[e])}render(t){const e=t.selectAll(`${t.node().tagName} > *`).data([this]);return e.exit().remove(),e.enter().append(this.type()).attr("reactd3",0).merge(e).each(function(t){const e=r(this);t.update(e),t.renderChildren(e)})}renderChildren(t){const e=t.selectAll(`${t.node().tagName} > *`).data(this._children);return e.exit().remove(),e.enter().append(t=>document.createElement(t.type())).attr("reactd3",(t,e)=>e).merge(e).each(function(t){const e=r(this);t.update(e),t.renderChildren(e)})}};e(x,"VNode");let C=x;const v=class _ConstVNode extends C{_type;constructor(t,e,o){super(e,o),this._type=t}type(){return this._type}};e(v,"ConstVNode");let S=v;const E=class _TextVNode extends C{_text;constructor(t){super({},[]),this._text=t}type(){return"span"}update(t){super.update(t),t.text(this._text)}};e(E,"TextVNode");let T=E;function W(t){return"function"==typeof t}function R(t){return t.prototype&&t.prototype instanceof C}e(W,"isReactFn"),e(R,"isIVNode");const A=class _ReactD3{static createElement(t,e,...o){return R(t)?new t(e):W(t)?t(e):new S(t,e,o.map(t=>"string"==typeof t?new T(t):t))}static render(t,e){t.render(e)}};e(A,"ReactD3");let B=A;var F;F={__e:/* @__PURE__ */e(function(t,e,o,i){for(var r,s,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),l=r.__d),l)return r.__E=r}catch(n){t=n}throw t},"__e")},"function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Math.random().toString(8);var k=0;function H(t,e,o,i,r,s){e||(e={});var l,n,h=e;if("ref"in h)for(n in h={},e)"ref"==n?l=e[n]:h[n]=e[n];var a={type:t,props:h,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--k,__i:-1,__u:0,__source:r,__self:s};return F.vnode&&F.vnode(a),a}e(H,"u");const z=class _VizComponent extends w.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){/* @__PURE__ */
|
|
1
|
+
var t=Object.defineProperty,e=(e,o)=>t(e,"name",{value:o,configurable:!0}),o=(e,o,i)=>((e,o,i)=>o in e?t(e,o,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[o]=i)(e,"symbol"!=typeof o?o+"":o,i);import{HTMLWidget as i,select as r,format as s}from"@hpcc-js/common";import{scopedLogger as l}from"@hpcc-js/util";import{React as n}from"@hpcc-js/react";const h="@hpcc-js/html",a="3.3.19",p="3.24.0",d=class _HTMLTooltip extends i{_triggerElement;_contentNode;_prevContentNode;_tooltipElement;_arrowElement;_tooltipHTMLCallback=/* @__PURE__ */e(t=>"<b>_tooltipHTMLCallback is undefined</b>","_tooltipHTMLCallback");_logger=l("html/HTMLTooltip");constructor(){super(),this.visible(!1)}tooltipHTML(t){return this._tooltipHTMLCallback=t,this}tooltipContent(t){return arguments.length?(this._contentNode=t,this):this._contentNode}triggerElement(t){return this._triggerElement=t,this}enter(t,e){super.enter(t,e);const o=r("body");this._tooltipElement=o.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=o.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(t,e){if(super.update(t,e),this._contentNode!==this._prevContentNode){const t=this._tooltipElement.node();[...t.querySelectorAll("*")].map(t=>t.__data__).filter(t=>t).forEach(t=>{"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),t.innerHTML="",t.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(()=>this._tooltipHTMLCallback(this.data())),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");const t=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(t.width),this.tooltipHeight_default(t.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()}onShowContent(t){}updateTooltipPosition(){const t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o}calcTooltipDirection(t){const e=Object.keys(t),o=this.direction();e.sort((t,e)=>t===o?-1:1);const i={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let r=0;r<e.length;r++){const o={top:t[e[r]].y,left:t[e[r]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(o,i))return e[r]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${o}'`),this._logger.debug(i),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o}rectFits(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top}setArrowPosition(t,e){let o,i,r="border-top-color";switch(this._arrowElement.style("border",`${this.arrowHeight()}px solid ${this.tooltipColor()}`).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),i=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),r="border-top-color",this._arrowElement.style("border-top-width",`${this.arrowHeight()}px`).style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),i=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,r="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",`${this.arrowHeight()}px`).style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,i=t.x-this.arrowHeight(),r="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",`${this.arrowHeight()}px`);break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),i=t.x+this.tooltipWidth()+2*this.padding(),r="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",`${this.arrowHeight()}px`).style("border-right-width","0px")}return void 0!==o&&void 0!==i?this._arrowElement.style("top",o+"px").style("left",i+"px").style(r,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}_cursorLoc;calcReferenceBBox(){const t=this.getReferenceNode();let{top:e,left:o,width:i,height:r}=t.getBoundingClientRect();const s=this.tooltipWidth(),l=this.tooltipHeight(),n=s/2,h=l/2,a=this.arrowHeight(),p=this.padding(),d=2*p;this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],i=1,r=1);return{n:{x:o+i/2-n-p,y:e-l-a-d},e:{x:o+i+a,y:e+r/2-h-p},s:{x:o+i/2-n-p,y:e+r+a},w:{x:o-s-a-d,y:e+r/2-h-p},nw:{x:o-s-d,y:e-l-d},ne:{x:o+i,y:e-l-d},se:{x:o+i,y:e+r},sw:{x:o-s-d,y:e+r}}}_closing=!1;mouseout(){this._closing=!0,this._tooltipElement.on("mouseover",()=>{this._closing=!1}),this._tooltipElement.on("mouseout",()=>{this.mouseout()}),setTimeout(()=>{this._closing&&this.visible(!1)},this.closeDelay())}visible(t){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",t?"visible":"hidden"),this._tooltipElement.style("visibility",t?"visible":"hidden")),super.visible(t),this):super.visible()}exit(t,e){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(t,e)}};e(d,"HTMLTooltip");let c=d;c.prototype._class+=" html_HTMLTooltip",c.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),c.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),c.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),c.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),c.prototype.publish("padding",8,"number","Padding (pixels)"),c.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),c.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),c.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),c.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),c.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),c.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),c.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");const u=class _SimpleTable extends i{_table;_tbody;_thead;_theadRow;constructor(){super()}transformData(){return this.data()}enter(t,e){super.enter(t,e),this._table=e.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(t,e){super.update(t,e),this._table.style("width",this.autoWidth()?"auto":"100%");const o=this._theadRow.selectAll("th").data(this.columns());o.enter().append("th").attr("class",(t,e)=>`th-${e}`).merge(o).text(t=>t.toString()),o.exit().remove();const i=this._tbody.selectAll("tr").data(this.transformData());i.enter().append("tr").merge(i).each(function(t){const e=r(this).selectAll("td").data(t);e.enter().append("td").attr("class",(t,e)=>`col-${e}`).merge(e).text(t=>t.toString()),e.exit().remove()}),i.exit().remove()}};e(u,"SimpleTable");let g=u;g.prototype._class+=" html_SimpleTable",g.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");const y=class _StyledTable extends g{constructor(){super()}applyStyleObject(t,e){Object.keys(e).forEach(o=>{t.style(o,e[o])})}update(t,e){super.update(t,e),e.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.select(`.th-${o}`),t)}),this.tbodyColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.selectAll(`.col-${o}`),t)});const o=Object.keys(this.evenRowStyles()).length>0,i=Object.keys(this.lastRowStyles()).length>0,r=e.selectAll("tbody > tr");if(o){const t=r.select(function(t,e){return e%2?this:null});this.applyStyleObject(t,this.evenRowStyles())}if(i){const t=r.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(t,this.lastRowStyles())}}};e(y,"StyledTable");let b=y;b.prototype._class+=" html_StyledTable",b.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),b.prototype.publish("fontColor","#333","string","Base font color used within the table"),b.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),b.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),b.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),b.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');const m=class _BreakdownTable extends b{_tooltip;constructor(){super()}transformData(){const t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)}breakdownData(t){const e=this.data().length,o=this.data().reduce((t,e)=>t+e[1],0),i=[];let r=0;this.data().sort((t,e)=>t[1]>e[1]?-1:1);const s=e-t>0;if(this.data().filter((e,o)=>!s||o<t-1).forEach(t=>{const e=Math.round(t[1]/o*100);r+=e,i.push([t[0],e+"%"])}),s){const o=`${this.otherLabel()} (${e-t+1})`,s="~"+(100-r)+"%";i.push([o,s])}return i}calculateRowCount(){const t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)}enter(t,e){super.enter(t,e),this._tooltip=(new c).target(t),this._tooltip.tooltipHTML(t=>{const e=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),o=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),i=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).width)),r=2*(i+30)+2*this._tooltip.padding(),s=o*Math.ceil((t.length-e)/2)+2*this._tooltip.padding();this._tooltip.tooltipWidth(r),this._tooltip.tooltipHeight(s);const l=this.breakdownData(this.data().length).slice(e-1);return`<div style="\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n ">${l.map(t=>`<div style="\n float:left;\n width:${Math.floor(49.5)}%;\n ">${t[0]}: ${t[1]}</div>`).join("")}</div>`})}update(t,e){this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),super.update(t,e);if((this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){const t=e.select("tbody > tr:last-child"),o=this;t.on("mouseout.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.visible(!1).render()}).on("mouseenter.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.direction("n").data(o.data()).visible(!0).render()})}}};e(m,"BreakdownTable");let f=m;f.prototype._class+=" html_BreakdownTable",f.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),f.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:/* @__PURE__ */e(t=>t.useCalculatedRowCount(),"disable")}),f.prototype.publish("fontSize",14,"number","Font size (pixels)"),f.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),f.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),f.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),f.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),f.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),f.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),f.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),f.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),f.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),f.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),f.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),f.prototype.publish("thFontSize",26,"number","Font size for th elements"),f.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),f.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");const _=class _JSXWidget extends i{rootNode;jsxRender(t,e){this.rootNode=n.render(t,e,this.rootNode)}};e(_,"JSXWidget"),o(_,"Component",n.Component),o(_,"createElement",n.createElement);let w=_;w.prototype._class+=" html_JSXWidget";const x=class _VNode{_attrs;_children;constructor(t,e){this._attrs=t,this._children=e}type(){return"div"}attrs(){return this._attrs}attr(t){return this._attrs[t]}children(){return this._children}update(t){for(const e in this._attrs)t.attr(e,this._attrs[e])}render(t){const e=t.selectAll(`${t.node().tagName} > *`).data([this]);return e.exit().remove(),e.enter().append(this.type()).attr("reactd3",0).merge(e).each(function(t){const e=r(this);t.update(e),t.renderChildren(e)})}renderChildren(t){const e=t.selectAll(`${t.node().tagName} > *`).data(this._children);return e.exit().remove(),e.enter().append(t=>document.createElement(t.type())).attr("reactd3",(t,e)=>e).merge(e).each(function(t){const e=r(this);t.update(e),t.renderChildren(e)})}};e(x,"VNode");let C=x;const v=class _ConstVNode extends C{_type;constructor(t,e,o){super(e,o),this._type=t}type(){return this._type}};e(v,"ConstVNode");let S=v;const E=class _TextVNode extends C{_text;constructor(t){super({},[]),this._text=t}type(){return"span"}update(t){super.update(t),t.text(this._text)}};e(E,"TextVNode");let T=E;function W(t){return"function"==typeof t}function R(t){return t.prototype&&t.prototype instanceof C}e(W,"isReactFn"),e(R,"isIVNode");const A=class _ReactD3{static createElement(t,e,...o){return R(t)?new t(e):W(t)?t(e):new S(t,e,o.map(t=>"string"==typeof t?new T(t):t))}static render(t,e){t.render(e)}};e(A,"ReactD3");let B=A;var F;F={__e:/* @__PURE__ */e(function(t,e,o,i){for(var r,s,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),l=r.__d),l)return r.__E=r}catch(n){t=n}throw t},"__e")},"function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Math.random().toString(8);var k=0;function H(t,e,o,i,r,s){e||(e={});var l,n,h=e;if("ref"in h)for(n in h={},e)"ref"==n?l=e[n]:h[n]=e[n];var a={type:t,props:h,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--k,__i:-1,__u:0,__source:r,__self:s};return F.vnode&&F.vnode(a),a}e(H,"u");const z=class _VizComponent extends w.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){/* @__PURE__ */
|
|
2
2
|
return H("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};e(z,"VizComponent");let N=z;const L=class _VizInstance extends w.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){/* @__PURE__ */
|
|
3
3
|
return H("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};e(L,"VizInstance");let M=L;const D=class _StatsTable extends b{transformData(){const t=[["Total",0,0]],e=this.data();return e.forEach(e=>{t[0][1]+=e[1],t[0][2]+=e[2]}),e.concat(t).map(t=>[t[0],this.secondColumnFormat_exists()?s(this.secondColumnFormat())(t[1]):t[1],this.thirdColumnFormat_exists()?s(this.thirdColumnFormat())(t[2]):t[2]])}update(t,e){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),super.update(t,e)}};e(D,"StatsTable");let P=D;P.prototype._class+=" html_StatsTable",P.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),P.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),P.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),P.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),P.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),P.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),P.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),P.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),P.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),P.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});const j=class _Item extends i{_owner;constructor(t){super(),this._owner=t,this._tag="a"}};e(j,"Item");let $=j;$.prototype._class+=" html_Item";const I=class _Button extends ${_icon;constructor(t,e){super(t),this._icon=e}icon(){return this._icon}enter(t,e){super.enter(t,e),e.attr("href","#").on("click",(t,e,o)=>this._owner.titleBarClick(this,t,e,o)).append("i").attr("class",`fa ${this._icon} fa-lg fa-fw`)}};e(I,"Button");let V=I;V.prototype._class+=" html_Button";const O=class _ToggleButton extends V{enter(t,e){e.on("click.sel",(t,e,o)=>{this.selected(!this.selected()),this.render()}),super.enter(t,e)}update(t,e){super.update(t,e),this._element.classed("selected",this.selected())}};e(O,"ToggleButton");let U=O;U.prototype._class+=" html_ToggleButton",U.prototype.publish("selected",!1,"boolean");const J=class _Spacer extends ${enter(t,e){super.enter(t,e),e.attr("class","spacer").attr("href","#").append("i")}};e(J,"Spacer");let X=J;X.prototype._class+=" html_Spacer";const q=class _TitleBar extends w{_divMain;_divIconBar;_divTitle;constructor(){super()}enter(t,e){super.enter(t,e),this._divMain=e.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")}update(t,e){super.update(t,e),this._divTitle.text(this.title());const o=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());o.enter().append("div").attr("class","icon-bar-item").each(function(t){t.target(this)}).merge(o).each(function(t){t.render()}),o.exit().each(function(t){t.target(null)}).remove(),o.order()}};e(q,"TitleBar");let G=q;G.prototype._class+=" html_TitleBar",G.prototype.publish("title","","string"),G.prototype.publish("buttons",[],"widgetArray");export{p as BUILD_VERSION,f as BreakdownTable,V as Button,c as HTMLTooltip,$ as Item,w as JSXWidget,h as PKG_NAME,a as PKG_VERSION,B as ReactD3,g as SimpleTable,X as Spacer,P as StatsTable,b as StyledTable,G as TitleBar,U as ToggleButton,C as VNode,N as VizComponent,M as VizInstance};
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/HTMLTooltip.ts","../src/SimpleTable.ts","../src/StyledTable.ts","../src/BreakdownTable.ts","../src/JSXWidget.ts","../src/reactD3.ts","../../../node_modules/preact/dist/preact.module.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../src/VizComponent.tsx","../src/VizInstance.tsx","../src/StatsTable.ts","../src/TitleBar.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\nimport { scopedLogger, ScopedLogging } from \"@hpcc-js/util\";\n\ntype Direction = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\ntype Position = { x: number, y: number };\ntype DirectionalBBox = { [key in Direction]: Position; };\n\ntype Rectangle = { top: number, left: number, width: number, height: number };\nexport class HTMLTooltip extends HTMLWidget {\n\n public _triggerElement;\n public _contentNode;\n protected _prevContentNode;\n\n protected _tooltipElement;\n protected _arrowElement;\n protected _tooltipHTMLCallback = (data?) => \"<b>_tooltipHTMLCallback is undefined</b>\";\n protected _logger: ScopedLogging = scopedLogger(\"html/HTMLTooltip\");\n constructor() {\n super();\n this.visible(false);\n }\n\n tooltipHTML(_: (data?) => string): this {\n this._tooltipHTMLCallback = _;\n return this;\n }\n\n tooltipContent(_): this {\n if (!arguments.length) return this._contentNode;\n this._contentNode = _;\n return this;\n }\n\n triggerElement(_): this {\n this._triggerElement = _;\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const body = d3Select(\"body\");\n this._tooltipElement = body.append(\"div\")\n .attr(\"class\", \"tooltip-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n this._arrowElement = body.append(\"div\")\n .attr(\"class\", \"arrow-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this._contentNode !== this._prevContentNode) {\n const node = this._tooltipElement.node();\n [...node.querySelectorAll(\"*\")]\n .map(n => n.__data__)\n .filter(n => n)\n .forEach(w => {\n if (typeof w.target === \"function\") {\n w.target(null);\n }\n if (typeof w.exit === \"function\") {\n w.exit();\n }\n });\n node.innerHTML = \"\";\n node.appendChild(this._contentNode);\n this._prevContentNode = this._contentNode;\n }\n\n if (this._contentNode) {\n this.onShowContent(this._contentNode);\n } else {\n this._tooltipElement\n .html(() => {\n return this._tooltipHTMLCallback(this.data());\n });\n }\n if (this.fitContent()) {\n this._tooltipElement\n .style(\"width\", \"auto\")\n .style(\"height\", \"auto\")\n .style(\"padding\", \"0px\")\n .style(\"box-sizing\", \"content-box\")\n ;\n const rect = this._tooltipElement.node().getBoundingClientRect();\n this.tooltipWidth_default(rect.width);\n this.tooltipHeight_default(rect.height);\n }\n this._closing = false;\n this._tooltipElement\n .style(\"background-color\", this.tooltipColor())\n .style(\"color\", this.fontColor())\n .style(\"width\", this.tooltipWidth() + \"px\")\n .style(\"height\", this.tooltipHeight() + \"px\")\n .style(\"opacity\", 1)\n .style(\"padding\", this.padding() + \"px\")\n .style(\"pointer-events\", this.enablePointerEvents() ? \"all\" : \"none\")\n .style(\"box-sizing\", \"content-box\")\n ;\n this._arrowElement\n .style(\"opacity\", 1)\n .style(\"pointer-events\", \"none\")\n ;\n this.updateTooltipPosition();\n }\n\n onShowContent(node) {\n\n }\n\n protected updateTooltipPosition(): Position {\n const bbox = this.calcReferenceBBox();\n const direction = this.calcTooltipDirection(bbox);\n const box = bbox[direction];\n this._tooltipElement\n .style(\"top\", box.y + \"px\")\n .style(\"left\", box.x + \"px\")\n ;\n this.setArrowPosition(box, direction);\n return box;\n }\n\n protected calcTooltipDirection(bbox: DirectionalBBox): Direction {\n const directions: Direction[] = Object.keys(bbox) as Direction[];\n\n const defaultDirection = this.direction();\n directions.sort((a, b) => a === defaultDirection ? -1 : 1);\n const windowRect = {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight\n };\n for (let i = 0; i < directions.length; i++) {\n const tooltipRect = {\n top: bbox[directions[i]].y,\n left: bbox[directions[i]].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n };\n if (this.rectFits(tooltipRect, windowRect)) {\n return directions[i];\n }\n }\n this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${defaultDirection}'`);\n this._logger.debug(windowRect);\n this._logger.debug({\n top: bbox[defaultDirection].y,\n left: bbox[defaultDirection].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n });\n return defaultDirection;\n }\n\n protected rectFits(innerRect: Rectangle, outerRect: Rectangle): boolean {\n return (\n innerRect.top >= outerRect.top &&\n innerRect.left >= outerRect.left &&\n innerRect.width + innerRect.left <= outerRect.width + outerRect.left &&\n innerRect.height + innerRect.top <= outerRect.height + outerRect.top\n );\n }\n\n protected setArrowPosition(point: Position, direction: Direction) {\n let top;\n let left;\n let visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border\", `${this.arrowHeight()}px solid ${this.tooltipColor()}`)\n .style(\"border-top-color\", \"transparent\")\n .style(\"border-right-color\", \"transparent\")\n .style(\"border-bottom-color\", \"transparent\")\n .style(\"border-left-color\", \"transparent\")\n ;\n switch (direction) {\n case \"n\":\n top = point.y + this.tooltipHeight() + (this.padding() * 2);\n left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();\n visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowHeight()}px`)\n .style(\"border-bottom-width\", \"0px\")\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"s\":\n top = point.y - this.arrowHeight();\n left = point.x + this.padding() + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2);\n visibleBorderStyle = \"border-bottom-color\";\n this._arrowElement\n .style(\"border-top-width\", \"0px\")\n .style(\"border-bottom-width\", `${this.arrowHeight()}px`)\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"e\":\n top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);\n left = point.x - this.arrowHeight();\n visibleBorderStyle = \"border-right-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", \"0px\")\n .style(\"border-right-width\", `${this.arrowHeight()}px`)\n ;\n break;\n case \"w\":\n top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();\n left = point.x + this.tooltipWidth() + (this.padding() * 2);\n visibleBorderStyle = \"border-left-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", `${this.arrowHeight()}px`)\n .style(\"border-right-width\", \"0px\")\n ;\n break;\n }\n if (typeof top !== \"undefined\" && typeof left !== \"undefined\") {\n this._arrowElement\n .style(\"top\", top + \"px\")\n .style(\"left\", left + \"px\")\n .style(visibleBorderStyle, this.tooltipColor())\n .style(\"opacity\", 1)\n ;\n } else {\n this._arrowElement\n .style(\"opacity\", 0)\n ;\n }\n return point;\n }\n\n protected getReferenceNode() {\n if (!this._triggerElement) {\n return this.element().node().parentNode.parentNode;\n }\n return this._triggerElement.node();\n }\n public _cursorLoc;\n protected calcReferenceBBox() {\n const node = this.getReferenceNode();\n let { top, left, width, height } = node.getBoundingClientRect();\n const wholeW = this.tooltipWidth();\n const wholeH = this.tooltipHeight();\n const halfW = wholeW / 2;\n const halfH = wholeH / 2;\n const arrowH = this.arrowHeight();\n const p = this.padding();\n const p2 = p * 2;\n\n if (this.followCursor() && this._cursorLoc) {\n\n left = this._cursorLoc[0];\n top = this._cursorLoc[1];\n width = 1;\n height = 1;\n }\n const bbox = {\n n: {\n x: left + (width / 2) - halfW - p,\n y: top - wholeH - arrowH - p2\n },\n e: {\n x: left + width + arrowH,\n y: top + (height / 2) - halfH - p\n },\n s: {\n x: left + (width / 2) - halfW - p,\n y: top + height + arrowH\n },\n w: {\n x: left - wholeW - arrowH - p2,\n y: top + (height / 2) - halfH - p\n },\n nw: {\n x: left - wholeW - p2,\n y: top - wholeH - p2\n },\n ne: {\n x: left + width,\n y: top - wholeH - p2\n },\n se: {\n x: left + width,\n y: top + height\n },\n sw: {\n x: left - wholeW - p2,\n y: top + height\n }\n };\n return bbox;\n }\n\n private _closing = false;\n mouseout() {\n this._closing = true;\n this._tooltipElement.on(\"mouseover\", () => {\n this._closing = false;\n });\n this._tooltipElement.on(\"mouseout\", () => {\n this.mouseout();\n });\n setTimeout(() => {\n if (this._closing) {\n this.visible(false);\n }\n }, this.closeDelay());\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return super.visible();\n if (this._arrowElement) {\n this._arrowElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n this._tooltipElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n }\n super.visible(_);\n return this;\n }\n\n exit(domNode, element) {\n if (this._arrowElement) {\n this._arrowElement.remove();\n this._tooltipElement.remove();\n }\n super.exit(domNode, element);\n }\n}\nHTMLTooltip.prototype._class += \" html_HTMLTooltip\";\n\nexport interface HTMLTooltip {\n padding(): number;\n padding(_: number): this;\n direction(): Direction;\n direction(_: Direction): this;\n arrowHeight(): number;\n arrowHeight(_: number): this;\n arrowWidth(): number;\n arrowWidth(_: number): this;\n fontColor(): string;\n fontColor(_: string): this;\n tooltipColor(): string;\n tooltipColor(_: string): this;\n tooltipWidth(): number;\n tooltipWidth(_: number): this;\n tooltipWidth_default(_: number);\n tooltipHeight(): number;\n tooltipHeight(_: number): this;\n tooltipHeight_default(_: number);\n followCursor(): boolean;\n followCursor(_: boolean): this;\n enablePointerEvents(): boolean;\n enablePointerEvents(_: boolean): this;\n closeDelay(): number;\n closeDelay(_: number): this;\n fitContent(): boolean;\n fitContent(_: boolean): this;\n\n}\n\nHTMLTooltip.prototype.publish(\"fitContent\", false, \"boolean\", \"If true, tooltip will grow to fit its html content\");\nHTMLTooltip.prototype.publish(\"followCursor\", false, \"boolean\", \"If true, tooltip will display relative to cursor location\");\nHTMLTooltip.prototype.publish(\"closeDelay\", 400, \"number\", \"Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)\");\nHTMLTooltip.prototype.publish(\"direction\", \"n\", \"set\", \"Direction in which to display the tooltip\", [\"n\", \"s\", \"e\", \"w\", \"ne\", \"nw\", \"se\", \"sw\"]);\nHTMLTooltip.prototype.publish(\"padding\", 8, \"number\", \"Padding (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowWidth\", 16, \"number\", \"Width (or height depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowHeight\", 8, \"number\", \"Height (or width depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"fontColor\", \"#FFF\", \"html-color\", \"The default font color for text in the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipColor\", \"#000000EE\", \"html-color\", \"Background color of the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipWidth\", 200, \"number\", \"Width of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"tooltipHeight\", 200, \"number\", \"Height of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"enablePointerEvents\", false, \"boolean\", \"If true, the 'pointer-events: all' style will be used\");\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\n\nexport class SimpleTable extends HTMLWidget {\n protected _table;\n protected _tbody;\n protected _thead;\n protected _theadRow;\n constructor() {\n super();\n }\n\n protected transformData() {\n return this.data();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._table = element.append(\"table\");\n this._thead = this._table.append(\"thead\");\n this._theadRow = this._thead.append(\"tr\");\n this._tbody = this._table.append(\"tbody\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._table\n .style(\"width\", this.autoWidth() ? \"auto\" : \"100%\")\n ;\n const theadTrSelection = this._theadRow.selectAll(\"th\").data(this.columns());\n theadTrSelection.enter()\n .append(\"th\")\n .attr(\"class\", (n, i) => `th-${i}`)\n .merge(theadTrSelection)\n .text(_d => (_d).toString())\n ;\n theadTrSelection.exit().remove();\n const trSelection = this._tbody.selectAll(\"tr\").data(this.transformData());\n trSelection.enter()\n .append(\"tr\")\n .merge(trSelection)\n .each(function (this, d) {\n const tr = d3Select(this);\n const tdSelection = tr.selectAll(\"td\").data(d);\n tdSelection.enter()\n .append(\"td\")\n .attr(\"class\", (n, i) => `col-${i}`)\n .merge(tdSelection as any)\n .text(_d => (_d).toString())\n ;\n tdSelection.exit().remove();\n })\n ;\n trSelection.exit().remove();\n }\n}\nSimpleTable.prototype._class += \" html_SimpleTable\";\n\nexport interface SimpleTable {\n autoWidth(): boolean;\n autoWidth(_: boolean): this;\n}\nSimpleTable.prototype.publish(\"autoWidth\", false, \"boolean\", \"If true, table width will be set to 'auto'. If false, the width is set to '100%'\");\n","import { SimpleTable } from \"./SimpleTable.ts\";\n\nexport class StyledTable extends SimpleTable {\n constructor() {\n super();\n }\n\n protected applyStyleObject(selection, styleObject) {\n Object.keys(styleObject).forEach(styleName => {\n selection.style(styleName, styleObject[styleName]);\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n element.selectAll(\"tr,th,td\")\n .attr(\"style\", \"\")\n .style(\"font-family\", this.fontFamily())\n .style(\"color\", this.fontColor())\n ;\n\n this.theadColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.select(`.th-${i}`), styleObj);\n });\n this.tbodyColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.selectAll(`.col-${i}`), styleObj);\n });\n const evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;\n const lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;\n const tbodyRows = element.selectAll(\"tbody > tr\");\n if (evenRowStylesExist) {\n const tbodyEvenRows = tbodyRows.select(function (this: HTMLElement, d, i) { return i % 2 ? this : null; });\n this.applyStyleObject(tbodyEvenRows, this.evenRowStyles());\n }\n if (lastRowStylesExist) {\n const tbodyLastRow = tbodyRows.select(function (this: HTMLElement, d, i, arr) { return i === arr.length - 1 ? this : null; });\n this.applyStyleObject(tbodyLastRow, this.lastRowStyles());\n }\n }\n}\nStyledTable.prototype._class += \" html_StyledTable\";\n\nexport interface StyledTable {\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n tbodyColumnStyles(): Array<{ [styleID: string]: any }>;\n tbodyColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n tbodyColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles(): Array<{ [styleID: string]: any }>;\n theadColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n lastRowStyles(): { [styleID: string]: any };\n lastRowStyles(_: { [styleID: string]: any }): this;\n lastRowStyles_default(_: { [styleID: string]: any }): this;\n evenRowStyles(): { [styleID: string]: any };\n evenRowStyles(_: { [styleID: string]: any }): this;\n evenRowStyles_default(_: { [styleID: string]: any }): this;\n}\n\nStyledTable.prototype.publish(\"fontFamily\", \"Verdana\", \"string\", \"Base font-family used within the table\");\nStyledTable.prototype.publish(\"fontColor\", \"#333\", \"string\", \"Base font color used within the table\");\nStyledTable.prototype.publish(\"theadColumnStyles\", [], \"array\", 'Array of objects containing styles for the thead columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"tbodyColumnStyles\", [], \"array\", 'Array of objects containing styles for the tbody columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"lastRowStyles\", {}, \"object\", 'Object containing styles for the last row (ex: {\"color\":\"red\"})');\nStyledTable.prototype.publish(\"evenRowStyles\", {}, \"object\", 'Object containing styles for even rows (ex: {\"background-color\":\"#AAA\"})');\n","import { HTMLTooltip } from \"./HTMLTooltip.ts\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class BreakdownTable extends StyledTable {\n // protected _table;\n // protected _tbody;\n protected _tooltip: HTMLTooltip;\n constructor() {\n super();\n }\n\n protected transformData() {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n return this.breakdownData(rowCount);\n }\n\n protected breakdownData(limit: number): any[] {\n const len = this.data().length;\n const sum = this.data().reduce((acc, row) => acc + row[1], 0);\n const data = [];\n let percSum = 0;\n this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);\n const hiddenRowCount = len - limit;\n const showOther = hiddenRowCount > 0;\n this.data()\n .filter((_, i) => showOther ? i < limit - 1 : true)\n .forEach(row => {\n const perc = Math.round((row[1] / sum) * 100);\n percSum += perc;\n data.push([row[0], perc + \"%\"]);\n });\n if (showOther) {\n const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;\n const otherPercentage = \"~\" + (100 - percSum) + \"%\";\n data.push([otherLabel, otherPercentage]);\n }\n return data;\n }\n\n protected calculateRowCount(): number {\n const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;\n const tbodyRowHeight = this.fontSize() + 5;\n const tbodyAvailableHeight = this.height() - theadRowHeight;\n const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);\n return rowCount;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tooltip = new HTMLTooltip()\n .target(domNode)\n ;\n this._tooltip\n .tooltipHTML(data => {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();\n const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));\n const widestPerc = 30;\n const colCount = 2;\n const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);\n const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);\n this._tooltip.tooltipWidth(w);\n this._tooltip.tooltipHeight(h);\n const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);\n return `<div style=\"\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n \">${otherData.map(row =>\n `<div style=\"\n float:left;\n width:${Math.floor(99 / colCount)}%;\n \">${row[0]}: ${row[1]}</div>`\n ).join(\"\")\n }</div>`;\n })\n ;\n }\n\n update(domNode, element) {\n this.theadColumnStyles_default([\n {\n \"color\": this.thFirstColor(),\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"width\": \"1%\",\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.percentageAlignment(),\n \"padding\": \"0px\"\n }\n ]);\n this.tbodyColumnStyles_default([\n {\n \"color\": this.topLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.topPercentageColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n this.lastRowStyles_default([\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherLabelBold() ? \"bold\" : \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherPercentageBold() ? \"bold\" : \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n\n super.update(domNode, element);\n\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n if (rowCount < this.data().length) {\n const lastRow = element.select(\"tbody > tr:last-child\");\n const context = this;\n lastRow\n .on(\"mouseout.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .visible(false)\n .render()\n ;\n })\n .on(\"mouseenter.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .direction(\"n\")\n .data(context.data())\n .visible(true)\n .render()\n ;\n })\n ;\n }\n }\n\n}\nBreakdownTable.prototype._class += \" html_BreakdownTable\";\n\nexport interface BreakdownTable {\n useCalculatedRowCount(): boolean;\n useCalculatedRowCount(_: boolean): this;\n rowCount(): number;\n rowCount(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n thFirstColor(): string;\n thFirstColor(_: string): this;\n thLastColor(): string;\n thLastColor(_: string): this;\n thFontSize(): number;\n thFontSize(_: number): this;\n thFontWeight(): string;\n thFontWeight(_: string): this;\n labelAlignment(): \"left\" | \"center\" | \"right\";\n labelAlignment(_: \"left\" | \"center\" | \"right\"): this;\n percentageAlignment(): \"left\" | \"center\" | \"right\";\n percentageAlignment(_: \"left\" | \"center\" | \"right\"): this;\n topLabelColor(): string;\n topLabelColor(_: string): this;\n topPercentageColor(): string;\n topPercentageColor(_: string): this;\n topPercentageBold(): boolean;\n topPercentageBold(_: boolean): this;\n otherLabel(): string;\n otherLabel(_: string): this;\n otherLabelColor(): string;\n otherLabelColor(_: string): this;\n otherLabelBold(): boolean;\n otherLabelBold(_: boolean): this;\n otherPercentageColor(): string;\n otherPercentageColor(_: string): this;\n otherPercentageBold(): boolean;\n otherPercentageBold(_: boolean): this;\n}\n\nBreakdownTable.prototype.publish(\"useCalculatedRowCount\", true, \"boolean\", \"If true, rowCount will be calculated and its default will be overwritten\");\nBreakdownTable.prototype.publish(\"rowCount\", 5, \"number\", \"Number of total rows to display (including the 'other' row)\", undefined, { disable: w => w.useCalculatedRowCount() });\nBreakdownTable.prototype.publish(\"fontSize\", 14, \"number\", \"Font size (pixels)\");\nBreakdownTable.prototype.publish(\"labelAlignment\", \"left\", \"set\", \"Alignment of the label column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"percentageAlignment\", \"center\", \"set\", \"Alignment of the percentage column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"topLabelColor\", \"#333\", \"html-color\", \"Color of displayed 'top' labels\");\nBreakdownTable.prototype.publish(\"topPercentageColor\", \"#1A99D5\", \"html-color\", \"Color of displayed 'top' percentages\");\nBreakdownTable.prototype.publish(\"topPercentageBold\", true, \"html-color\", \"If true, the 'top' percentages will be bold\");\nBreakdownTable.prototype.publish(\"otherLabel\", \"Other\", \"string\", \"Label text for the 'other' row\");\nBreakdownTable.prototype.publish(\"otherLabelColor\", \"#AAA\", \"html-color\", \"Color of the 'other' label\");\nBreakdownTable.prototype.publish(\"otherLabelBold\", false, \"html-color\", \"If true, the 'other' label will be bold\");\nBreakdownTable.prototype.publish(\"otherPercentageColor\", \"#AAA\", \"html-color\", \"Color of the 'other' percentage\");\nBreakdownTable.prototype.publish(\"otherPercentageBold\", false, \"html-color\", \"If true, the 'other' percentage will be bold\");\nBreakdownTable.prototype.publish(\"thFontWeight\", \"bold\", \"string\", \"Font weight for th elements\");\nBreakdownTable.prototype.publish(\"thFontSize\", 26, \"number\", \"Font size for th elements\");\nBreakdownTable.prototype.publish(\"thFirstColor\", \"#333\", \"html-color\", \"Text color of the first th element\");\nBreakdownTable.prototype.publish(\"thLastColor\", \"#333\", \"html-color\", \"Text color of the last th element\");\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { React } from \"@hpcc-js/react\";\n\nexport class JSXWidget extends HTMLWidget {\n static Component = React.Component;\n static createElement = React.createElement;\n protected rootNode;\n\n jsxRender(jsx, domNode) {\n this.rootNode = React.render(jsx, domNode, this.rootNode);\n }\n}\nJSXWidget.prototype._class += \" html_JSXWidget\";\n","import { select as d3Select } from \"@hpcc-js/common\";\n\nexport type ReactFn = (attrs: { [key: string]: string }) => VNode;\n\nexport type IVNode = new (attrs: { [key: string]: string }, children: VNode[]) => VNode;\n\nexport class VNode {\n protected _attrs: { [key: string]: string };\n protected _children: VNode[];\n\n constructor(attrs: { [key: string]: string }, children: VNode[]) {\n this._attrs = attrs;\n this._children = children;\n }\n\n type(): string {\n return \"div\";\n }\n\n attrs(): { [key: string]: string } {\n return this._attrs;\n }\n\n attr(key) {\n return this._attrs[key];\n }\n\n children(): VNode[] {\n return this._children;\n }\n\n update(targetElement) {\n for (const key in this._attrs) {\n targetElement.attr(key, this._attrs[key]);\n }\n }\n\n render(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data([this]);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(this.type())\n .attr(\"reactd3\", 0)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n\n renderChildren(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data(this._children);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(d => document.createElement(d.type()))\n .attr(\"reactd3\", (_d, i) => i)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n}\n\nclass ConstVNode extends VNode {\n protected _type: string;\n\n constructor(type: string, attrs: { [key: string]: string }, children: VNode[]) {\n super(attrs, children);\n this._type = type;\n }\n\n type(): string {\n return this._type;\n }\n}\n\nclass TextVNode extends VNode {\n protected _text: string;\n\n constructor(text: string) {\n super({}, []);\n this._text = text;\n }\n\n type(): string {\n return \"span\";\n }\n\n update(targetElement) {\n super.update(targetElement);\n targetElement.text(this._text);\n }\n}\n\nfunction isReactFn(_): _ is ReactFn {\n return typeof _ === \"function\";\n}\n\nfunction isIVNode(_: any): _ is IVNode {\n return _.prototype && _.prototype instanceof VNode;\n}\n\nexport class ReactD3 {\n // static createElementXXX(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n static createElement(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n if (isIVNode(type)) {\n return new (type as any)(attrs);\n } else if (isReactFn(type)) {\n return type(attrs);\n }\n return new ConstVNode(type, attrs, children.map(child => {\n if (typeof child === \"string\") {\n return new TextVNode(child);\n }\n return child;\n }));\n }\n\n static render(vdom: VNode, targetElement) {\n vdom.render(targetElement);\n }\n}\n","var n,l,u,t,i,r,o,e,f,c,s,a,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,g,m=t&&t.__k||w,b=l.length;for(f=T(u,l,m,f,b),a=0;a<b;a++)null!=(p=u.__k[a])&&(h=-1!=p.__i&&m[p.__i]||d,p.__i=a,_=q(n,p,h,i,r,o,e,f,c,s),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),s.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),(g=!!(4&p.__u))||h.__k===p.__k?(f=j(p,f,n,g),g&&h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=j(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=$(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==e||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(a,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[s]=t[s]:(u[s]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[s])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,d,_,k,x,M,$,I,P,A,H,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof T)try{if(k=u.props,x=T.prototype&&T.prototype.render,M=(a=T.contextType)&&i[a.__c],$=a?M?M.props.value:a.__:i,t.__c?_=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(k,$):(u.__c=h=new C(k,$),h.constructor=T,h.render=Q),M&&M.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(k,h.__s))),v=h.props,y=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&k!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,$),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,$)){u.__v!=t.__v&&(h.props=k,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,$),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,d)})}if(h.context=$,h.props=k,h.__P=n,h.__e=!1,I=l.__r,P=0,x)h.state=h.__s,h.__d=!1,I&&I(u),a=h.render(h.props,h.state,h.context),w.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,I&&I(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=m(m({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(d=h.getSnapshotBeforeUpdate(v,y)),A=null!=a&&a.type===S&&null==a.key?E(a.props.children):a,f=L(n,g(A)?A:[A],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),_&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(H=o.length;H--;)b(o[H]);B(u)}else u.__e=t.__e,u.__k=t.__k,n.then||B(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):m({},n)}function G(u,t,i,r,o,e,f,c,s){var a,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((y=e[a])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),!c&&null!=e)for(m={},a=0;a<u.attributes.length;a++)m[(y=u.attributes[a]).name]=y.value;for(a in m)y=m[a],\"dangerouslySetInnerHTML\"==a?p=y:\"children\"==a||a in k||\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k||N(u,a,null,y,o);for(a in k)y=k[a],\"children\"==a?v=y:\"dangerouslySetInnerHTML\"==a?h=y:\"value\"==a?w=y:\"checked\"==a?_=y:c&&\"function\"!=typeof y||m[a]===y||N(u,a,y,m[a],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,s),null!=e)for(a=e.length;a--;)b(e[a]);c||(a=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[a]||\"progress\"==x&&!w||\"option\"==x&&w!=m[a])&&N(u,a,w,m[a],o),a=\"checked\",null!=_&&_!=u[a]&&N(u,a,_,m[a],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f)}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,s=\"__a\"+f,a=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizComponent extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = new (this as any).props.type()\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizInstance extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = (this as any).props.instance\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { format as d3Format } from \"d3-format\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class StatsTable extends StyledTable {\n\n protected transformData() {\n const totalRow = [[\"Total\", 0, 0]];\n const data = this.data();\n data.forEach(row => {\n totalRow[0][1] += row[1];\n totalRow[0][2] += row[2];\n });\n return data\n .concat(totalRow)\n .map(row => {\n return [\n row[0],\n this.secondColumnFormat_exists() ? d3Format(this.secondColumnFormat())(row[1]) : row[1],\n this.thirdColumnFormat_exists() ? d3Format(this.thirdColumnFormat())(row[2]) : row[2]\n ];\n })\n ;\n }\n\n update(domNode, element) {\n this.tbodyColumnStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\"\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\"\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\"\n }\n ]);\n this.evenRowStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n }\n ]);\n this.lastRowStyles_default({\n \"font-weight\": \"bold\"\n });\n super.update(domNode, element);\n }\n}\nStatsTable.prototype._class += \" html_StatsTable\";\n\nexport interface StatsTable {\n labelColor(): string;\n labelColor(_: string): this;\n primaryValueColor(): string;\n primaryValueColor(_: string): this;\n secondaryValueColor(): string;\n secondaryValueColor(_: string): this;\n evenRowFontColor(): string;\n evenRowFontColor(_: string): this;\n evenRowBackgroundColor(): string;\n evenRowBackgroundColor(_: string): this;\n firstColumnWidth(): string;\n firstColumnWidth(_: string): this;\n secondColumnWidth(): string;\n secondColumnWidth(_: string): this;\n thirdColumnWidth(): string;\n thirdColumnWidth(_: string): this;\n secondColumnFormat(): string;\n secondColumnFormat(_: string): this;\n secondColumnFormat_exists(): boolean;\n thirdColumnFormat(): string;\n thirdColumnFormat(_: string): this;\n thirdColumnFormat_exists(): boolean;\n}\nStatsTable.prototype.publish(\"labelColor\", \"#333\", \"html-color\", \"Color of the text in the first column\");\nStatsTable.prototype.publish(\"primaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the second column\");\nStatsTable.prototype.publish(\"secondaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the third column\");\nStatsTable.prototype.publish(\"evenRowBackgroundColor\", \"#333\", \"html-color\", \"Background color of the even rows\");\nStatsTable.prototype.publish(\"evenRowFontColor\", \"#333\", \"html-color\", \"Font color of the even rows\");\nStatsTable.prototype.publish(\"firstColumnWidth\", \"auto\", \"string\", \"CSS style applied as the 'width' for the first column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the second column (ex: 40px)\");\nStatsTable.prototype.publish(\"thirdColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the third column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnFormat\", \"$,.0f\", \"string\", \"d3-format specifier applied to the second column's values\", undefined, { optional: true });\nStatsTable.prototype.publish(\"thirdColumnFormat\", null, \"string\", \"d3-format specifier applied to the third column's values\", undefined, { optional: true });\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { JSXWidget } from \"./JSXWidget.ts\";\n\nimport \"../src/TitleBar.css\";\n\nexport interface IClickHandler {\n titleBarClick(src: Item, d, idx: number, groups): void;\n}\n\nexport class Item extends HTMLWidget {\n protected _owner: IClickHandler;\n\n constructor(owner: IClickHandler) {\n super();\n this._owner = owner;\n this._tag = \"a\";\n }\n}\nItem.prototype._class += \" html_Item\";\n\nexport class Button extends Item {\n private _icon: string;\n\n constructor(owner: IClickHandler, icon: string) {\n super(owner);\n this._icon = icon;\n }\n\n icon() {\n return this._icon;\n }\n\n enter(domNode: HTMLElement, element) {\n super.enter(domNode, element);\n element\n .attr(\"href\", \"#\")\n .on(\"click\", (d, idx, groups) => this._owner.titleBarClick(this, d, idx, groups))\n .append(\"i\")\n .attr(\"class\", `fa ${this._icon} fa-lg fa-fw`)\n ;\n }\n}\nButton.prototype._class += \" html_Button\";\n\nexport class ToggleButton extends Button {\n\n enter(domNode: HTMLElement, element) {\n element.on(\"click.sel\", (d, idx, groups) => {\n this.selected(!this.selected());\n this.render();\n });\n super.enter(domNode, element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._element.classed(\"selected\", this.selected());\n }\n}\nToggleButton.prototype._class += \" html_ToggleButton\";\nexport interface ToggleButton {\n selected(): boolean;\n selected(_: boolean): this;\n}\nToggleButton.prototype.publish(\"selected\", false, \"boolean\");\n\nexport class Spacer extends Item {\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element\n .attr(\"class\", \"spacer\")\n .attr(\"href\", \"#\")\n .append(\"i\")\n ;\n }\n}\nSpacer.prototype._class += \" html_Spacer\";\n\nexport class TitleBar extends JSXWidget {\n protected _divMain;\n protected _divIconBar;\n protected _divTitle;\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._divMain = element.append(\"div\")\n .attr(\"class\", \"main\")\n ;\n this._divIconBar = this._divMain.append(\"div\")\n .attr(\"class\", \"icon-bar\")\n ;\n this._divTitle = this._divMain.append(\"div\")\n .attr(\"class\", \"title\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._divTitle.text(this.title());\n\n const icons = this._divIconBar.selectAll(\".icon-bar-item\").data(this.buttons());\n icons.enter().append(\"div\")\n .attr(\"class\", \"icon-bar-item\")\n .each(function (this: HTMLElement, d: Item) {\n d.target(this);\n })\n .merge(icons)\n .each(function (d: Item) {\n d.render();\n })\n ;\n icons.exit()\n .each(function (d: Item) {\n d.target(null);\n })\n .remove()\n ;\n icons.order();\n }\n}\nTitleBar.prototype._class += \" html_TitleBar\";\n\nexport interface TitleBar {\n title(): string;\n title(_: string): this;\n buttons(): Item[];\n buttons(items: Item[]): this;\n}\nTitleBar.prototype.publish(\"title\", \"\", \"string\");\nTitleBar.prototype.publish(\"buttons\", [], \"widgetArray\");\n"],"names":["PKG_NAME","PKG_VERSION","BUILD_VERSION","_HTMLTooltip","HTMLWidget","_triggerElement","_contentNode","_prevContentNode","_tooltipElement","_arrowElement","_tooltipHTMLCallback","__name","data","_logger","scopedLogger","constructor","super","this","visible","tooltipHTML","_","tooltipContent","arguments","length","triggerElement","enter","domNode","element","body","d3Select","append","attr","style","update","node","querySelectorAll","map","n","__data__","filter","forEach","w","target","exit","innerHTML","appendChild","onShowContent","html","fitContent","rect","getBoundingClientRect","tooltipWidth_default","width","tooltipHeight_default","height","_closing","tooltipColor","fontColor","tooltipWidth","tooltipHeight","padding","enablePointerEvents","updateTooltipPosition","bbox","calcReferenceBBox","direction","calcTooltipDirection","box","y","x","setArrowPosition","directions","Object","keys","defaultDirection","sort","a","b","windowRect","top","left","window","innerWidth","innerHeight","i","tooltipRect","rectFits","warning","debug","innerRect","outerRect","point","visibleBorderStyle","arrowHeight","arrowWidth","getReferenceNode","parentNode","_cursorLoc","wholeW","wholeH","halfW","halfH","arrowH","p","p2","followCursor","e","s","nw","ne","se","sw","mouseout","on","setTimeout","closeDelay","remove","HTMLTooltip","prototype","_class","publish","_SimpleTable","_table","_tbody","_thead","_theadRow","transformData","autoWidth","theadTrSelection","selectAll","columns","merge","text","_d","toString","trSelection","each","d","tdSelection","SimpleTable","_StyledTable","applyStyleObject","selection","styleObject","styleName","fontFamily","theadColumnStyles","styleObj","select","tbodyColumnStyles","evenRowStylesExist","evenRowStyles","lastRowStylesExist","lastRowStyles","tbodyRows","tbodyEvenRows","tbodyLastRow","arr","StyledTable","_BreakdownTable","_tooltip","rowCount","useCalculatedRowCount","calculateRowCount","breakdownData","limit","len","sum","reduce","acc","row","percSum","showOther","perc","Math","round","push","otherLabel","otherPercentage","theadRowHeight","thFontSize","tbodyRowHeight","fontSize","tbodyAvailableHeight","floor","rowHeight","max","textSize","widestLabel","h","ceil","otherData","slice","join","theadColumnStyles_default","color","thFirstColor","thFontWeight","labelAlignment","percentageAlignment","tbodyColumnStyles_default","topLabelColor","topPercentageColor","lastRowStyles_default","otherLabelColor","otherLabelBold","otherPercentageBold","lastRow","context","render","BreakdownTable","disable","_JSXWidget","rootNode","jsxRender","jsx","React","__publicField","Component","createElement","JSXWidget","_VNode","_attrs","_children","attrs","children","type","key","targetElement","thisElement","tagName","renderChildren","document","VNode","_ConstVNode","_type","ConstVNode","_TextVNode","_text","TextVNode","isReactFn","isIVNode","_ReactD3","child","vdom","ReactD3","l","__e","u","t","r","o","__","__c","getDerivedStateFromError","setState","__d","componentDidCatch","__E","Promise","then","bind","resolve","random","f","c","props","ref","__k","__b","__v","__i","__u","__source","__self","vnode","_VizComponent","widget","refreshProps","componentDidMount","base","componentWillUnmount","componentDidUpdate","VizComponent","_VizInstance","instance","VizInstance","_StatsTable","totalRow","concat","secondColumnFormat_exists","d3Format","secondColumnFormat","thirdColumnFormat_exists","thirdColumnFormat","firstColumnWidth","secondColumnWidth","thirdColumnWidth","evenRowStyles_default","evenRowFontColor","evenRowBackgroundColor","StatsTable","optional","_Item","_owner","owner","_tag","Item","_Button","_icon","icon","idx","groups","titleBarClick","Button","_ToggleButton","selected","_element","classed","ToggleButton","_Spacer","Spacer","_TitleBar","_divMain","_divIconBar","_divTitle","title","icons","buttons","order","TitleBar"],"mappings":"kWAAO,MAAMA,EAAW,gBACXC,EAAc,SACdC,EAAgB,SCMhBC,EAAN,MAAMA,qBAAoBC,EAEtBC,gBACAC,aACGC,iBAEAC,gBACAC,cACAC,oCAAuBC,EAACC,GAAU,2CAAX,wBACvBC,QAAyBC,EAAa,oBAChD,WAAAC,GACIC,QACAC,KAAKC,SAAQ,EACjB,CAEA,WAAAC,CAA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V,WAAAtT,GACIC,OACJ,CAEA,KAAAS,CAAMC,EAASC,GACXX,MAAMS,MAAMC,EAASC,GACrBV,KAAKkT,SAAWxS,EAAQG,OAAO,OAC1BC,KAAK,QAAS,QAEnBd,KAAKmT,YAAcnT,KAAKkT,SAASrS,OAAO,OACnCC,KAAK,QAAS,YAEnBd,KAAKoT,UAAYpT,KAAKkT,SAASrS,OAAO,OACjCC,KAAK,QAAS,QAEvB,CAEA,MAAAE,CAAOP,EAASC,GACZX,MAAMiB,OAAOP,EAASC,GAEtBV,KAAKoT,UAAUjM,KAAKnH,KAAKqT,SAEzB,MAAMC,EAAQtT,KAAKmT,YAAYnM,UAAU,kBAAkBrH,KAAKK,KAAKuT,WACrED,EAAM9S,QAAQK,OAAO,OAChBC,KAAK,QAAS,iBACdyG,KAAK,SAA6BC,GAC/BA,EAAE/F,OAAOzB,KACb,GACCkH,MAAMoM,GACN/L,KAAK,SAAUC,GACZA,EAAEwE,QACN,GAEJsH,EAAM5R,OACD6F,KAAK,SAAUC,GACZA,EAAE/F,OAAO,KACb,GACC0E,SAELmN,EAAME,OACV,GA7CoC9T,EAAAuT,EAAA,YAAjC,IAAMQ,EAANR,EA+CPQ,EAASpN,UAAUC,QAAU,iBAQ7BmN,EAASpN,UAAUE,QAAQ,QAAS,GAAI,UACxCkN,EAASpN,UAAUE,QAAQ,UAAW,GAAI","x_google_ignoreList":[7,8]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/__package__.ts","../src/HTMLTooltip.ts","../src/SimpleTable.ts","../src/StyledTable.ts","../src/BreakdownTable.ts","../src/JSXWidget.ts","../src/reactD3.ts","../../../node_modules/preact/dist/preact.module.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../src/VizComponent.tsx","../src/VizInstance.tsx","../src/StatsTable.ts","../src/TitleBar.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\nimport { scopedLogger, ScopedLogging } from \"@hpcc-js/util\";\n\ntype Direction = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\ntype Position = { x: number, y: number };\ntype DirectionalBBox = { [key in Direction]: Position; };\n\ntype Rectangle = { top: number, left: number, width: number, height: number };\nexport class HTMLTooltip extends HTMLWidget {\n\n public _triggerElement;\n public _contentNode;\n protected _prevContentNode;\n\n protected _tooltipElement;\n protected _arrowElement;\n protected _tooltipHTMLCallback = (data?) => \"<b>_tooltipHTMLCallback is undefined</b>\";\n protected _logger: ScopedLogging = scopedLogger(\"html/HTMLTooltip\");\n constructor() {\n super();\n this.visible(false);\n }\n\n tooltipHTML(_: (data?) => string): this {\n this._tooltipHTMLCallback = _;\n return this;\n }\n\n tooltipContent(_): this {\n if (!arguments.length) return this._contentNode;\n this._contentNode = _;\n return this;\n }\n\n triggerElement(_): this {\n this._triggerElement = _;\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const body = d3Select(\"body\");\n this._tooltipElement = body.append(\"div\")\n .attr(\"class\", \"tooltip-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n this._arrowElement = body.append(\"div\")\n .attr(\"class\", \"arrow-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this._contentNode !== this._prevContentNode) {\n const node = this._tooltipElement.node();\n [...node.querySelectorAll(\"*\")]\n .map(n => n.__data__)\n .filter(n => n)\n .forEach(w => {\n if (typeof w.target === \"function\") {\n w.target(null);\n }\n if (typeof w.exit === \"function\") {\n w.exit();\n }\n });\n node.innerHTML = \"\";\n node.appendChild(this._contentNode);\n this._prevContentNode = this._contentNode;\n }\n\n if (this._contentNode) {\n this.onShowContent(this._contentNode);\n } else {\n this._tooltipElement\n .html(() => {\n return this._tooltipHTMLCallback(this.data());\n });\n }\n if (this.fitContent()) {\n this._tooltipElement\n .style(\"width\", \"auto\")\n .style(\"height\", \"auto\")\n .style(\"padding\", \"0px\")\n .style(\"box-sizing\", \"content-box\")\n ;\n const rect = this._tooltipElement.node().getBoundingClientRect();\n this.tooltipWidth_default(rect.width);\n this.tooltipHeight_default(rect.height);\n }\n this._closing = false;\n this._tooltipElement\n .style(\"background-color\", this.tooltipColor())\n .style(\"color\", this.fontColor())\n .style(\"width\", this.tooltipWidth() + \"px\")\n .style(\"height\", this.tooltipHeight() + \"px\")\n .style(\"opacity\", 1)\n .style(\"padding\", this.padding() + \"px\")\n .style(\"pointer-events\", this.enablePointerEvents() ? \"all\" : \"none\")\n .style(\"box-sizing\", \"content-box\")\n ;\n this._arrowElement\n .style(\"opacity\", 1)\n .style(\"pointer-events\", \"none\")\n ;\n this.updateTooltipPosition();\n }\n\n onShowContent(node) {\n\n }\n\n protected updateTooltipPosition(): Position {\n const bbox = this.calcReferenceBBox();\n const direction = this.calcTooltipDirection(bbox);\n const box = bbox[direction];\n this._tooltipElement\n .style(\"top\", box.y + \"px\")\n .style(\"left\", box.x + \"px\")\n ;\n this.setArrowPosition(box, direction);\n return box;\n }\n\n protected calcTooltipDirection(bbox: DirectionalBBox): Direction {\n const directions: Direction[] = Object.keys(bbox) as Direction[];\n\n const defaultDirection = this.direction();\n directions.sort((a, b) => a === defaultDirection ? -1 : 1);\n const windowRect = {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight\n };\n for (let i = 0; i < directions.length; i++) {\n const tooltipRect = {\n top: bbox[directions[i]].y,\n left: bbox[directions[i]].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n };\n if (this.rectFits(tooltipRect, windowRect)) {\n return directions[i];\n }\n }\n this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${defaultDirection}'`);\n this._logger.debug(windowRect);\n this._logger.debug({\n top: bbox[defaultDirection].y,\n left: bbox[defaultDirection].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n });\n return defaultDirection;\n }\n\n protected rectFits(innerRect: Rectangle, outerRect: Rectangle): boolean {\n return (\n innerRect.top >= outerRect.top &&\n innerRect.left >= outerRect.left &&\n innerRect.width + innerRect.left <= outerRect.width + outerRect.left &&\n innerRect.height + innerRect.top <= outerRect.height + outerRect.top\n );\n }\n\n protected setArrowPosition(point: Position, direction: Direction) {\n let top;\n let left;\n let visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border\", `${this.arrowHeight()}px solid ${this.tooltipColor()}`)\n .style(\"border-top-color\", \"transparent\")\n .style(\"border-right-color\", \"transparent\")\n .style(\"border-bottom-color\", \"transparent\")\n .style(\"border-left-color\", \"transparent\")\n ;\n switch (direction) {\n case \"n\":\n top = point.y + this.tooltipHeight() + (this.padding() * 2);\n left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();\n visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowHeight()}px`)\n .style(\"border-bottom-width\", \"0px\")\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"s\":\n top = point.y - this.arrowHeight();\n left = point.x + this.padding() + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2);\n visibleBorderStyle = \"border-bottom-color\";\n this._arrowElement\n .style(\"border-top-width\", \"0px\")\n .style(\"border-bottom-width\", `${this.arrowHeight()}px`)\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"e\":\n top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);\n left = point.x - this.arrowHeight();\n visibleBorderStyle = \"border-right-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", \"0px\")\n .style(\"border-right-width\", `${this.arrowHeight()}px`)\n ;\n break;\n case \"w\":\n top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();\n left = point.x + this.tooltipWidth() + (this.padding() * 2);\n visibleBorderStyle = \"border-left-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", `${this.arrowHeight()}px`)\n .style(\"border-right-width\", \"0px\")\n ;\n break;\n }\n if (typeof top !== \"undefined\" && typeof left !== \"undefined\") {\n this._arrowElement\n .style(\"top\", top + \"px\")\n .style(\"left\", left + \"px\")\n .style(visibleBorderStyle, this.tooltipColor())\n .style(\"opacity\", 1)\n ;\n } else {\n this._arrowElement\n .style(\"opacity\", 0)\n ;\n }\n return point;\n }\n\n protected getReferenceNode() {\n if (!this._triggerElement) {\n return this.element().node().parentNode.parentNode;\n }\n return this._triggerElement.node();\n }\n public _cursorLoc;\n protected calcReferenceBBox() {\n const node = this.getReferenceNode();\n let { top, left, width, height } = node.getBoundingClientRect();\n const wholeW = this.tooltipWidth();\n const wholeH = this.tooltipHeight();\n const halfW = wholeW / 2;\n const halfH = wholeH / 2;\n const arrowH = this.arrowHeight();\n const p = this.padding();\n const p2 = p * 2;\n\n if (this.followCursor() && this._cursorLoc) {\n\n left = this._cursorLoc[0];\n top = this._cursorLoc[1];\n width = 1;\n height = 1;\n }\n const bbox = {\n n: {\n x: left + (width / 2) - halfW - p,\n y: top - wholeH - arrowH - p2\n },\n e: {\n x: left + width + arrowH,\n y: top + (height / 2) - halfH - p\n },\n s: {\n x: left + (width / 2) - halfW - p,\n y: top + height + arrowH\n },\n w: {\n x: left - wholeW - arrowH - p2,\n y: top + (height / 2) - halfH - p\n },\n nw: {\n x: left - wholeW - p2,\n y: top - wholeH - p2\n },\n ne: {\n x: left + width,\n y: top - wholeH - p2\n },\n se: {\n x: left + width,\n y: top + height\n },\n sw: {\n x: left - wholeW - p2,\n y: top + height\n }\n };\n return bbox;\n }\n\n private _closing = false;\n mouseout() {\n this._closing = true;\n this._tooltipElement.on(\"mouseover\", () => {\n this._closing = false;\n });\n this._tooltipElement.on(\"mouseout\", () => {\n this.mouseout();\n });\n setTimeout(() => {\n if (this._closing) {\n this.visible(false);\n }\n }, this.closeDelay());\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return super.visible();\n if (this._arrowElement) {\n this._arrowElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n this._tooltipElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n }\n super.visible(_);\n return this;\n }\n\n exit(domNode, element) {\n if (this._arrowElement) {\n this._arrowElement.remove();\n this._tooltipElement.remove();\n }\n super.exit(domNode, element);\n }\n}\nHTMLTooltip.prototype._class += \" html_HTMLTooltip\";\n\nexport interface HTMLTooltip {\n padding(): number;\n padding(_: number): this;\n direction(): Direction;\n direction(_: Direction): this;\n arrowHeight(): number;\n arrowHeight(_: number): this;\n arrowWidth(): number;\n arrowWidth(_: number): this;\n fontColor(): string;\n fontColor(_: string): this;\n tooltipColor(): string;\n tooltipColor(_: string): this;\n tooltipWidth(): number;\n tooltipWidth(_: number): this;\n tooltipWidth_default(_: number);\n tooltipHeight(): number;\n tooltipHeight(_: number): this;\n tooltipHeight_default(_: number);\n followCursor(): boolean;\n followCursor(_: boolean): this;\n enablePointerEvents(): boolean;\n enablePointerEvents(_: boolean): this;\n closeDelay(): number;\n closeDelay(_: number): this;\n fitContent(): boolean;\n fitContent(_: boolean): this;\n\n}\n\nHTMLTooltip.prototype.publish(\"fitContent\", false, \"boolean\", \"If true, tooltip will grow to fit its html content\");\nHTMLTooltip.prototype.publish(\"followCursor\", false, \"boolean\", \"If true, tooltip will display relative to cursor location\");\nHTMLTooltip.prototype.publish(\"closeDelay\", 400, \"number\", \"Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)\");\nHTMLTooltip.prototype.publish(\"direction\", \"n\", \"set\", \"Direction in which to display the tooltip\", [\"n\", \"s\", \"e\", \"w\", \"ne\", \"nw\", \"se\", \"sw\"]);\nHTMLTooltip.prototype.publish(\"padding\", 8, \"number\", \"Padding (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowWidth\", 16, \"number\", \"Width (or height depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowHeight\", 8, \"number\", \"Height (or width depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"fontColor\", \"#FFF\", \"html-color\", \"The default font color for text in the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipColor\", \"#000000EE\", \"html-color\", \"Background color of the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipWidth\", 200, \"number\", \"Width of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"tooltipHeight\", 200, \"number\", \"Height of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"enablePointerEvents\", false, \"boolean\", \"If true, the 'pointer-events: all' style will be used\");\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\n\nexport class SimpleTable extends HTMLWidget {\n protected _table;\n protected _tbody;\n protected _thead;\n protected _theadRow;\n constructor() {\n super();\n }\n\n protected transformData() {\n return this.data();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._table = element.append(\"table\");\n this._thead = this._table.append(\"thead\");\n this._theadRow = this._thead.append(\"tr\");\n this._tbody = this._table.append(\"tbody\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._table\n .style(\"width\", this.autoWidth() ? \"auto\" : \"100%\")\n ;\n const theadTrSelection = this._theadRow.selectAll(\"th\").data(this.columns());\n theadTrSelection.enter()\n .append(\"th\")\n .attr(\"class\", (n, i) => `th-${i}`)\n .merge(theadTrSelection)\n .text(_d => (_d).toString())\n ;\n theadTrSelection.exit().remove();\n const trSelection = this._tbody.selectAll(\"tr\").data(this.transformData());\n trSelection.enter()\n .append(\"tr\")\n .merge(trSelection)\n .each(function (this, d) {\n const tr = d3Select(this);\n const tdSelection = tr.selectAll(\"td\").data(d);\n tdSelection.enter()\n .append(\"td\")\n .attr(\"class\", (n, i) => `col-${i}`)\n .merge(tdSelection as any)\n .text(_d => (_d).toString())\n ;\n tdSelection.exit().remove();\n })\n ;\n trSelection.exit().remove();\n }\n}\nSimpleTable.prototype._class += \" html_SimpleTable\";\n\nexport interface SimpleTable {\n autoWidth(): boolean;\n autoWidth(_: boolean): this;\n}\nSimpleTable.prototype.publish(\"autoWidth\", false, \"boolean\", \"If true, table width will be set to 'auto'. If false, the width is set to '100%'\");\n","import { SimpleTable } from \"./SimpleTable.ts\";\n\nexport class StyledTable extends SimpleTable {\n constructor() {\n super();\n }\n\n protected applyStyleObject(selection, styleObject) {\n Object.keys(styleObject).forEach(styleName => {\n selection.style(styleName, styleObject[styleName]);\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n element.selectAll(\"tr,th,td\")\n .attr(\"style\", \"\")\n .style(\"font-family\", this.fontFamily())\n .style(\"color\", this.fontColor())\n ;\n\n this.theadColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.select(`.th-${i}`), styleObj);\n });\n this.tbodyColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.selectAll(`.col-${i}`), styleObj);\n });\n const evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;\n const lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;\n const tbodyRows = element.selectAll(\"tbody > tr\");\n if (evenRowStylesExist) {\n const tbodyEvenRows = tbodyRows.select(function (this: HTMLElement, d, i) { return i % 2 ? this : null; });\n this.applyStyleObject(tbodyEvenRows, this.evenRowStyles());\n }\n if (lastRowStylesExist) {\n const tbodyLastRow = tbodyRows.select(function (this: HTMLElement, d, i, arr) { return i === arr.length - 1 ? this : null; });\n this.applyStyleObject(tbodyLastRow, this.lastRowStyles());\n }\n }\n}\nStyledTable.prototype._class += \" html_StyledTable\";\n\nexport interface StyledTable {\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n tbodyColumnStyles(): Array<{ [styleID: string]: any }>;\n tbodyColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n tbodyColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles(): Array<{ [styleID: string]: any }>;\n theadColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n lastRowStyles(): { [styleID: string]: any };\n lastRowStyles(_: { [styleID: string]: any }): this;\n lastRowStyles_default(_: { [styleID: string]: any }): this;\n evenRowStyles(): { [styleID: string]: any };\n evenRowStyles(_: { [styleID: string]: any }): this;\n evenRowStyles_default(_: { [styleID: string]: any }): this;\n}\n\nStyledTable.prototype.publish(\"fontFamily\", \"Verdana\", \"string\", \"Base font-family used within the table\");\nStyledTable.prototype.publish(\"fontColor\", \"#333\", \"string\", \"Base font color used within the table\");\nStyledTable.prototype.publish(\"theadColumnStyles\", [], \"array\", 'Array of objects containing styles for the thead columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"tbodyColumnStyles\", [], \"array\", 'Array of objects containing styles for the tbody columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"lastRowStyles\", {}, \"object\", 'Object containing styles for the last row (ex: {\"color\":\"red\"})');\nStyledTable.prototype.publish(\"evenRowStyles\", {}, \"object\", 'Object containing styles for even rows (ex: {\"background-color\":\"#AAA\"})');\n","import { HTMLTooltip } from \"./HTMLTooltip.ts\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class BreakdownTable extends StyledTable {\n // protected _table;\n // protected _tbody;\n protected _tooltip: HTMLTooltip;\n constructor() {\n super();\n }\n\n protected transformData() {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n return this.breakdownData(rowCount);\n }\n\n protected breakdownData(limit: number): any[] {\n const len = this.data().length;\n const sum = this.data().reduce((acc, row) => acc + row[1], 0);\n const data = [];\n let percSum = 0;\n this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);\n const hiddenRowCount = len - limit;\n const showOther = hiddenRowCount > 0;\n this.data()\n .filter((_, i) => showOther ? i < limit - 1 : true)\n .forEach(row => {\n const perc = Math.round((row[1] / sum) * 100);\n percSum += perc;\n data.push([row[0], perc + \"%\"]);\n });\n if (showOther) {\n const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;\n const otherPercentage = \"~\" + (100 - percSum) + \"%\";\n data.push([otherLabel, otherPercentage]);\n }\n return data;\n }\n\n protected calculateRowCount(): number {\n const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;\n const tbodyRowHeight = this.fontSize() + 5;\n const tbodyAvailableHeight = this.height() - theadRowHeight;\n const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);\n return rowCount;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tooltip = new HTMLTooltip()\n .target(domNode)\n ;\n this._tooltip\n .tooltipHTML(data => {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();\n const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));\n const widestPerc = 30;\n const colCount = 2;\n const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);\n const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);\n this._tooltip.tooltipWidth(w);\n this._tooltip.tooltipHeight(h);\n const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);\n return `<div style=\"\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n \">${otherData.map(row =>\n `<div style=\"\n float:left;\n width:${Math.floor(99 / colCount)}%;\n \">${row[0]}: ${row[1]}</div>`\n ).join(\"\")\n }</div>`;\n })\n ;\n }\n\n update(domNode, element) {\n this.theadColumnStyles_default([\n {\n \"color\": this.thFirstColor(),\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"width\": \"1%\",\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.percentageAlignment(),\n \"padding\": \"0px\"\n }\n ]);\n this.tbodyColumnStyles_default([\n {\n \"color\": this.topLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.topPercentageColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n this.lastRowStyles_default([\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherLabelBold() ? \"bold\" : \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherPercentageBold() ? \"bold\" : \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n\n super.update(domNode, element);\n\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n if (rowCount < this.data().length) {\n const lastRow = element.select(\"tbody > tr:last-child\");\n const context = this;\n lastRow\n .on(\"mouseout.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .visible(false)\n .render()\n ;\n })\n .on(\"mouseenter.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .direction(\"n\")\n .data(context.data())\n .visible(true)\n .render()\n ;\n })\n ;\n }\n }\n\n}\nBreakdownTable.prototype._class += \" html_BreakdownTable\";\n\nexport interface BreakdownTable {\n useCalculatedRowCount(): boolean;\n useCalculatedRowCount(_: boolean): this;\n rowCount(): number;\n rowCount(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n thFirstColor(): string;\n thFirstColor(_: string): this;\n thLastColor(): string;\n thLastColor(_: string): this;\n thFontSize(): number;\n thFontSize(_: number): this;\n thFontWeight(): string;\n thFontWeight(_: string): this;\n labelAlignment(): \"left\" | \"center\" | \"right\";\n labelAlignment(_: \"left\" | \"center\" | \"right\"): this;\n percentageAlignment(): \"left\" | \"center\" | \"right\";\n percentageAlignment(_: \"left\" | \"center\" | \"right\"): this;\n topLabelColor(): string;\n topLabelColor(_: string): this;\n topPercentageColor(): string;\n topPercentageColor(_: string): this;\n topPercentageBold(): boolean;\n topPercentageBold(_: boolean): this;\n otherLabel(): string;\n otherLabel(_: string): this;\n otherLabelColor(): string;\n otherLabelColor(_: string): this;\n otherLabelBold(): boolean;\n otherLabelBold(_: boolean): this;\n otherPercentageColor(): string;\n otherPercentageColor(_: string): this;\n otherPercentageBold(): boolean;\n otherPercentageBold(_: boolean): this;\n}\n\nBreakdownTable.prototype.publish(\"useCalculatedRowCount\", true, \"boolean\", \"If true, rowCount will be calculated and its default will be overwritten\");\nBreakdownTable.prototype.publish(\"rowCount\", 5, \"number\", \"Number of total rows to display (including the 'other' row)\", undefined, { disable: w => w.useCalculatedRowCount() });\nBreakdownTable.prototype.publish(\"fontSize\", 14, \"number\", \"Font size (pixels)\");\nBreakdownTable.prototype.publish(\"labelAlignment\", \"left\", \"set\", \"Alignment of the label column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"percentageAlignment\", \"center\", \"set\", \"Alignment of the percentage column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"topLabelColor\", \"#333\", \"html-color\", \"Color of displayed 'top' labels\");\nBreakdownTable.prototype.publish(\"topPercentageColor\", \"#1A99D5\", \"html-color\", \"Color of displayed 'top' percentages\");\nBreakdownTable.prototype.publish(\"topPercentageBold\", true, \"html-color\", \"If true, the 'top' percentages will be bold\");\nBreakdownTable.prototype.publish(\"otherLabel\", \"Other\", \"string\", \"Label text for the 'other' row\");\nBreakdownTable.prototype.publish(\"otherLabelColor\", \"#AAA\", \"html-color\", \"Color of the 'other' label\");\nBreakdownTable.prototype.publish(\"otherLabelBold\", false, \"html-color\", \"If true, the 'other' label will be bold\");\nBreakdownTable.prototype.publish(\"otherPercentageColor\", \"#AAA\", \"html-color\", \"Color of the 'other' percentage\");\nBreakdownTable.prototype.publish(\"otherPercentageBold\", false, \"html-color\", \"If true, the 'other' percentage will be bold\");\nBreakdownTable.prototype.publish(\"thFontWeight\", \"bold\", \"string\", \"Font weight for th elements\");\nBreakdownTable.prototype.publish(\"thFontSize\", 26, \"number\", \"Font size for th elements\");\nBreakdownTable.prototype.publish(\"thFirstColor\", \"#333\", \"html-color\", \"Text color of the first th element\");\nBreakdownTable.prototype.publish(\"thLastColor\", \"#333\", \"html-color\", \"Text color of the last th element\");\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { React } from \"@hpcc-js/react\";\n\nexport class JSXWidget extends HTMLWidget {\n static Component = React.Component;\n static createElement = React.createElement;\n protected rootNode;\n\n jsxRender(jsx, domNode) {\n this.rootNode = React.render(jsx, domNode, this.rootNode);\n }\n}\nJSXWidget.prototype._class += \" html_JSXWidget\";\n","import { select as d3Select } from \"@hpcc-js/common\";\n\nexport type ReactFn = (attrs: { [key: string]: string }) => VNode;\n\nexport type IVNode = new (attrs: { [key: string]: string }, children: VNode[]) => VNode;\n\nexport class VNode {\n protected _attrs: { [key: string]: string };\n protected _children: VNode[];\n\n constructor(attrs: { [key: string]: string }, children: VNode[]) {\n this._attrs = attrs;\n this._children = children;\n }\n\n type(): string {\n return \"div\";\n }\n\n attrs(): { [key: string]: string } {\n return this._attrs;\n }\n\n attr(key) {\n return this._attrs[key];\n }\n\n children(): VNode[] {\n return this._children;\n }\n\n update(targetElement) {\n for (const key in this._attrs) {\n targetElement.attr(key, this._attrs[key]);\n }\n }\n\n render(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data([this]);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(this.type())\n .attr(\"reactd3\", 0)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n\n renderChildren(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data(this._children);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(d => document.createElement(d.type()))\n .attr(\"reactd3\", (_d, i) => i)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n}\n\nclass ConstVNode extends VNode {\n protected _type: string;\n\n constructor(type: string, attrs: { [key: string]: string }, children: VNode[]) {\n super(attrs, children);\n this._type = type;\n }\n\n type(): string {\n return this._type;\n }\n}\n\nclass TextVNode extends VNode {\n protected _text: string;\n\n constructor(text: string) {\n super({}, []);\n this._text = text;\n }\n\n type(): string {\n return \"span\";\n }\n\n update(targetElement) {\n super.update(targetElement);\n targetElement.text(this._text);\n }\n}\n\nfunction isReactFn(_): _ is ReactFn {\n return typeof _ === \"function\";\n}\n\nfunction isIVNode(_: any): _ is IVNode {\n return _.prototype && _.prototype instanceof VNode;\n}\n\nexport class ReactD3 {\n // static createElementXXX(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n static createElement(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n if (isIVNode(type)) {\n return new (type as any)(attrs);\n } else if (isReactFn(type)) {\n return type(attrs);\n }\n return new ConstVNode(type, attrs, children.map(child => {\n if (typeof child === \"string\") {\n return new TextVNode(child);\n }\n return child;\n }));\n }\n\n static render(vdom: VNode, targetElement) {\n vdom.render(targetElement);\n }\n}\n","var n,l,u,t,i,r,o,e,f,c,a,s,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,_,g,m=t&&t.__k||w,b=l.length;for(f=T(u,l,m,f,b),s=0;s<b;s++)null!=(p=u.__k[s])&&(h=-1!=p.__i&&m[p.__i]||d,p.__i=s,_=q(n,p,h,i,r,o,e,f,c,a),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),a.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),(g=!!(4&p.__u))||h.__k===p.__k?(f=j(p,f,n,g),g&&h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,a=u.length,s=a,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,s))&&(s--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>a?h--:i<a&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(s)for(r=0;r<a;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=j(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=$(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],a=null!=c&&0==(2&c.__u);if(null===c&&null==e||a&&e==c.key&&f==c.type)return u;if(t>(a?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(s,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[a]=t[a]:(u[a]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[a])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,d,_,k,x,M,$,I,P,A,H,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(s=l.__b)&&s(u);n:if(\"function\"==typeof T)try{if(k=u.props,x=T.prototype&&T.prototype.render,M=(s=T.contextType)&&i[s.__c],$=s?M?M.props.value:s.__:i,t.__c?_=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(k,$):(u.__c=h=new C(k,$),h.constructor=T,h.render=Q),M&&M.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(k,h.__s))),v=h.props,y=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&k!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,$),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,$)){u.__v!=t.__v&&(h.props=k,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,$),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,d)})}if(h.context=$,h.props=k,h.__P=n,h.__e=!1,I=l.__r,P=0,x)h.state=h.__s,h.__d=!1,I&&I(u),s=h.render(h.props,h.state,h.context),w.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,I&&I(u),s=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=m(m({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(d=h.getSnapshotBeforeUpdate(v,y)),A=null!=s&&s.type===S&&null==s.key?E(s.props.children):s,f=L(n,g(A)?A:[A],u,t,i,r,o,e,f,c,a),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),_&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(H=o.length;H--;)b(o[H]);B(u)}else u.__e=t.__e,u.__k=t.__k,n.then||B(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,a);return(s=l.diffed)&&s(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):void 0!==n.constructor?null:m({},n)}function G(u,t,i,r,o,e,f,c,a){var s,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(s=0;s<e.length;s++)if((y=e[s])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[s]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=\"textarea\"==x&&null!=k.defaultValue?null:e&&n.call(u.childNodes),!c&&null!=e)for(m={},s=0;s<u.attributes.length;s++)m[(y=u.attributes[s]).name]=y.value;for(s in m)y=m[s],\"dangerouslySetInnerHTML\"==s?p=y:\"children\"==s||s in k||\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k||N(u,s,null,y,o);for(s in k)y=k[s],\"children\"==s?v=y:\"dangerouslySetInnerHTML\"==s?h=y:\"value\"==s?w=y:\"checked\"==s?_=y:c&&\"function\"!=typeof y||m[s]===y||N(u,s,y,m[s],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,a),null!=e)for(s=e.length;s--;)b(e[s]);c&&\"textarea\"!=x||(s=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[s]||\"progress\"==x&&!w||\"option\"==x&&w!=m[s])&&N(u,s,w,m[s],o),s=\"checked\",null!=_&&_!=u[s]&&N(u,s,_,m[s],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f)}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,a=\"__a\"+f,s=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizComponent extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = new (this as any).props.type()\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizInstance extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = (this as any).props.instance\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { format as d3Format } from \"d3-format\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class StatsTable extends StyledTable {\n\n protected transformData() {\n const totalRow = [[\"Total\", 0, 0]];\n const data = this.data();\n data.forEach(row => {\n totalRow[0][1] += row[1];\n totalRow[0][2] += row[2];\n });\n return data\n .concat(totalRow)\n .map(row => {\n return [\n row[0],\n this.secondColumnFormat_exists() ? d3Format(this.secondColumnFormat())(row[1]) : row[1],\n this.thirdColumnFormat_exists() ? d3Format(this.thirdColumnFormat())(row[2]) : row[2]\n ];\n })\n ;\n }\n\n update(domNode, element) {\n this.tbodyColumnStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\"\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\"\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\"\n }\n ]);\n this.evenRowStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n }\n ]);\n this.lastRowStyles_default({\n \"font-weight\": \"bold\"\n });\n super.update(domNode, element);\n }\n}\nStatsTable.prototype._class += \" html_StatsTable\";\n\nexport interface StatsTable {\n labelColor(): string;\n labelColor(_: string): this;\n primaryValueColor(): string;\n primaryValueColor(_: string): this;\n secondaryValueColor(): string;\n secondaryValueColor(_: string): this;\n evenRowFontColor(): string;\n evenRowFontColor(_: string): this;\n evenRowBackgroundColor(): string;\n evenRowBackgroundColor(_: string): this;\n firstColumnWidth(): string;\n firstColumnWidth(_: string): this;\n secondColumnWidth(): string;\n secondColumnWidth(_: string): this;\n thirdColumnWidth(): string;\n thirdColumnWidth(_: string): this;\n secondColumnFormat(): string;\n secondColumnFormat(_: string): this;\n secondColumnFormat_exists(): boolean;\n thirdColumnFormat(): string;\n thirdColumnFormat(_: string): this;\n thirdColumnFormat_exists(): boolean;\n}\nStatsTable.prototype.publish(\"labelColor\", \"#333\", \"html-color\", \"Color of the text in the first column\");\nStatsTable.prototype.publish(\"primaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the second column\");\nStatsTable.prototype.publish(\"secondaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the third column\");\nStatsTable.prototype.publish(\"evenRowBackgroundColor\", \"#333\", \"html-color\", \"Background color of the even rows\");\nStatsTable.prototype.publish(\"evenRowFontColor\", \"#333\", \"html-color\", \"Font color of the even rows\");\nStatsTable.prototype.publish(\"firstColumnWidth\", \"auto\", \"string\", \"CSS style applied as the 'width' for the first column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the second column (ex: 40px)\");\nStatsTable.prototype.publish(\"thirdColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the third column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnFormat\", \"$,.0f\", \"string\", \"d3-format specifier applied to the second column's values\", undefined, { optional: true });\nStatsTable.prototype.publish(\"thirdColumnFormat\", null, \"string\", \"d3-format specifier applied to the third column's values\", undefined, { optional: true });\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { JSXWidget } from \"./JSXWidget.ts\";\n\nimport \"../src/TitleBar.css\";\n\nexport interface IClickHandler {\n titleBarClick(src: Item, d, idx: number, groups): void;\n}\n\nexport class Item extends HTMLWidget {\n protected _owner: IClickHandler;\n\n constructor(owner: IClickHandler) {\n super();\n this._owner = owner;\n this._tag = \"a\";\n }\n}\nItem.prototype._class += \" html_Item\";\n\nexport class Button extends Item {\n private _icon: string;\n\n constructor(owner: IClickHandler, icon: string) {\n super(owner);\n this._icon = icon;\n }\n\n icon() {\n return this._icon;\n }\n\n enter(domNode: HTMLElement, element) {\n super.enter(domNode, element);\n element\n .attr(\"href\", \"#\")\n .on(\"click\", (d, idx, groups) => this._owner.titleBarClick(this, d, idx, groups))\n .append(\"i\")\n .attr(\"class\", `fa ${this._icon} fa-lg fa-fw`)\n ;\n }\n}\nButton.prototype._class += \" html_Button\";\n\nexport class ToggleButton extends Button {\n\n enter(domNode: HTMLElement, element) {\n element.on(\"click.sel\", (d, idx, groups) => {\n this.selected(!this.selected());\n this.render();\n });\n super.enter(domNode, element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._element.classed(\"selected\", this.selected());\n }\n}\nToggleButton.prototype._class += \" html_ToggleButton\";\nexport interface ToggleButton {\n selected(): boolean;\n selected(_: boolean): this;\n}\nToggleButton.prototype.publish(\"selected\", false, \"boolean\");\n\nexport class Spacer extends Item {\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element\n .attr(\"class\", \"spacer\")\n .attr(\"href\", \"#\")\n .append(\"i\")\n ;\n }\n}\nSpacer.prototype._class += \" html_Spacer\";\n\nexport class TitleBar extends JSXWidget {\n protected _divMain;\n protected _divIconBar;\n protected _divTitle;\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._divMain = element.append(\"div\")\n .attr(\"class\", \"main\")\n ;\n this._divIconBar = this._divMain.append(\"div\")\n .attr(\"class\", \"icon-bar\")\n ;\n this._divTitle = this._divMain.append(\"div\")\n .attr(\"class\", \"title\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._divTitle.text(this.title());\n\n const icons = this._divIconBar.selectAll(\".icon-bar-item\").data(this.buttons());\n icons.enter().append(\"div\")\n .attr(\"class\", \"icon-bar-item\")\n .each(function (this: HTMLElement, d: Item) {\n d.target(this);\n })\n .merge(icons)\n .each(function (d: Item) {\n d.render();\n })\n ;\n icons.exit()\n .each(function (d: Item) {\n d.target(null);\n })\n .remove()\n ;\n icons.order();\n }\n}\nTitleBar.prototype._class += \" html_TitleBar\";\n\nexport interface TitleBar {\n title(): string;\n title(_: string): this;\n buttons(): Item[];\n buttons(items: Item[]): this;\n}\nTitleBar.prototype.publish(\"title\", \"\", \"string\");\nTitleBar.prototype.publish(\"buttons\", [], \"widgetArray\");\n"],"names":["PKG_NAME","PKG_VERSION","BUILD_VERSION","_HTMLTooltip","HTMLWidget","_triggerElement","_contentNode","_prevContentNode","_tooltipElement","_arrowElement","_tooltipHTMLCallback","__name","data","_logger","scopedLogger","constructor","super","this","visible","tooltipHTML","_","tooltipContent","arguments","length","triggerElement","enter","domNode","element","body","d3Select","append","attr","style","update","node","querySelectorAll","map","n","__data__","filter","forEach","w","target","exit","innerHTML","appendChild","onShowContent","html","fitContent","rect","getBoundingClientRect","tooltipWidth_default","width","tooltipHeight_default","height","_closing","tooltipColor","fontColor","tooltipWidth","tooltipHeight","padding","enablePointerEvents","updateTooltipPosition","bbox","calcReferenceBBox","direction","calcTooltipDirection","box","y","x","setArrowPosition","directions","Object","keys","defaultDirection","sort","a","b","windowRect","top","left","window","innerWidth","innerHeight","i","tooltipRect","rectFits","warning","debug","innerRect","outerRect","point","visibleBorderStyle","arrowHeight","arrowWidth","getReferenceNode","parentNode","_cursorLoc","wholeW","wholeH","halfW","halfH","arrowH","p","p2","followCursor","e","s","nw","ne","se","sw","mouseout","on","setTimeout","closeDelay","remove","HTMLTooltip","prototype","_class","publish","_SimpleTable","_table","_tbody","_thead","_theadRow","transformData","autoWidth","theadTrSelection","selectAll","columns","merge","text","_d","toString","trSelection","each","d","tdSelection","SimpleTable","_StyledTable","applyStyleObject","selection","styleObject","styleName","fontFamily","theadColumnStyles","styleObj","select","tbodyColumnStyles","evenRowStylesExist","evenRowStyles","lastRowStylesExist","lastRowStyles","tbodyRows","tbodyEvenRows","tbodyLastRow","arr","StyledTable","_BreakdownTable","_tooltip","rowCount","useCalculatedRowCount","calculateRowCount","breakdownData","limit","len","sum","reduce","acc","row","percSum","showOther","perc","Math","round","push","otherLabel","otherPercentage","theadRowHeight","thFontSize","tbodyRowHeight","fontSize","tbodyAvailableHeight","floor","rowHeight","max","textSize","widestLabel","h","ceil","otherData","slice","join","theadColumnStyles_default","color","thFirstColor","thFontWeight","labelAlignment","percentageAlignment","tbodyColumnStyles_default","topLabelColor","topPercentageColor","lastRowStyles_default","otherLabelColor","otherLabelBold","otherPercentageBold","lastRow","context","render","BreakdownTable","disable","_JSXWidget","rootNode","jsxRender","jsx","React","__publicField","Component","createElement","JSXWidget","_VNode","_attrs","_children","attrs","children","type","key","targetElement","thisElement","tagName","renderChildren","document","VNode","_ConstVNode","_type","ConstVNode","_TextVNode","_text","TextVNode","isReactFn","isIVNode","_ReactD3","child","vdom","ReactD3","l","__e","u","t","r","o","__","__c","getDerivedStateFromError","setState","__d","componentDidCatch","__E","Promise","then","bind","resolve","random","f","c","props","ref","__k","__b","__v","__i","__u","__source","__self","vnode","_VizComponent","widget","refreshProps","componentDidMount","base","componentWillUnmount","componentDidUpdate","VizComponent","_VizInstance","instance","VizInstance","_StatsTable","totalRow","concat","secondColumnFormat_exists","d3Format","secondColumnFormat","thirdColumnFormat_exists","thirdColumnFormat","firstColumnWidth","secondColumnWidth","thirdColumnWidth","evenRowStyles_default","evenRowFontColor","evenRowBackgroundColor","StatsTable","optional","_Item","_owner","owner","_tag","Item","_Button","_icon","icon","idx","groups","titleBarClick","Button","_ToggleButton","selected","_element","classed","ToggleButton","_Spacer","Spacer","_TitleBar","_divMain","_divIconBar","_divTitle","title","icons","buttons","order","TitleBar"],"mappings":"kWAAO,MAAMA,EAAW,gBACXC,EAAc,SACdC,EAAgB,SCMhBC,EAAN,MAAMA,qBAAoBC,EAEtBC,gBACAC,aACGC,iBAEAC,gBACAC,cACAC,oCAAuBC,EAACC,GAA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AND,EAWPC,EAAO3M,UAAUC,QAAU,eAEpB,MAAM2M,EAAN,MAAMA,kBAAiBtG,EAChBuG,SACAC,YACAC,UAEV,WAAAtT,GACIC,OACJ,CAEA,KAAAS,CAAMC,EAASC,GACXX,MAAMS,MAAMC,EAASC,GACrBV,KAAKkT,SAAWxS,EAAQG,OAAO,OAC1BC,KAAK,QAAS,QAEnBd,KAAKmT,YAAcnT,KAAKkT,SAASrS,OAAO,OACnCC,KAAK,QAAS,YAEnBd,KAAKoT,UAAYpT,KAAKkT,SAASrS,OAAO,OACjCC,KAAK,QAAS,QAEvB,CAEA,MAAAE,CAAOP,EAASC,GACZX,MAAMiB,OAAOP,EAASC,GAEtBV,KAAKoT,UAAUjM,KAAKnH,KAAKqT,SAEzB,MAAMC,EAAQtT,KAAKmT,YAAYnM,UAAU,kBAAkBrH,KAAKK,KAAKuT,WACrED,EAAM9S,QAAQK,OAAO,OAChBC,KAAK,QAAS,iBACdyG,KAAK,SAA6BC,GAC/BA,EAAE/F,OAAOzB,KACb,GACCkH,MAAMoM,GACN/L,KAAK,SAAUC,GACZA,EAAEwE,QACN,GAEJsH,EAAM5R,OACD6F,KAAK,SAAUC,GACZA,EAAE/F,OAAO,KACb,GACC0E,SAELmN,EAAME,OACV,GA7CoC9T,EAAAuT,EAAA,YAAjC,IAAMQ,EAANR,EA+CPQ,EAASpN,UAAUC,QAAU,iBAQ7BmN,EAASpN,UAAUE,QAAQ,QAAS,GAAI,UACxCkN,EAASpN,UAAUE,QAAQ,UAAW,GAAI","x_google_ignoreList":[7,8]}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/react")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"],t["@hpcc-js/react"])}(this,function(t,e,o,i){"use strict";var r=Object.defineProperty,s=(t,e)=>r(t,"name",{value:e,configurable:!0}),l=(t,e,o)=>((t,e,o)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,"symbol"!=typeof e?e+"":e,o);const n=class _HTMLTooltip extends e.HTMLWidget{_triggerElement;_contentNode;_prevContentNode;_tooltipElement;_arrowElement;_tooltipHTMLCallback=s(t=>"<b>_tooltipHTMLCallback is undefined</b>","_tooltipHTMLCallback");_logger=o.scopedLogger("html/HTMLTooltip");constructor(){super(),this.visible(!1)}tooltipHTML(t){return this._tooltipHTMLCallback=t,this}tooltipContent(t){return arguments.length?(this._contentNode=t,this):this._contentNode}triggerElement(t){return this._triggerElement=t,this}enter(t,o){super.enter(t,o);const i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(t,e){if(super.update(t,e),this._contentNode!==this._prevContentNode){const t=this._tooltipElement.node();[...t.querySelectorAll("*")].map(t=>t.__data__).filter(t=>t).forEach(t=>{"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),t.innerHTML="",t.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(()=>this._tooltipHTMLCallback(this.data())),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");const t=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(t.width),this.tooltipHeight_default(t.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()}onShowContent(t){}updateTooltipPosition(){const t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o}calcTooltipDirection(t){const e=Object.keys(t),o=this.direction();e.sort((t,e)=>t===o?-1:1);const i={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let r=0;r<e.length;r++){const o={top:t[e[r]].y,left:t[e[r]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(o,i))return e[r]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${o}'`),this._logger.debug(i),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o}rectFits(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top}setArrowPosition(t,e){let o,i,r="border-top-color";switch(this._arrowElement.style("border",`${this.arrowHeight()}px solid ${this.tooltipColor()}`).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),i=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),r="border-top-color",this._arrowElement.style("border-top-width",`${this.arrowHeight()}px`).style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),i=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,r="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",`${this.arrowHeight()}px`).style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,i=t.x-this.arrowHeight(),r="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",`${this.arrowHeight()}px`);break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),i=t.x+this.tooltipWidth()+2*this.padding(),r="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",`${this.arrowHeight()}px`).style("border-right-width","0px")}return void 0!==o&&void 0!==i?this._arrowElement.style("top",o+"px").style("left",i+"px").style(r,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}_cursorLoc;calcReferenceBBox(){const t=this.getReferenceNode();let{top:e,left:o,width:i,height:r}=t.getBoundingClientRect();const s=this.tooltipWidth(),l=this.tooltipHeight(),n=s/2,h=l/2,a=this.arrowHeight(),p=this.padding(),d=2*p;this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],i=1,r=1);return{n:{x:o+i/2-n-p,y:e-l-a-d},e:{x:o+i+a,y:e+r/2-h-p},s:{x:o+i/2-n-p,y:e+r+a},w:{x:o-s-a-d,y:e+r/2-h-p},nw:{x:o-s-d,y:e-l-d},ne:{x:o+i,y:e-l-d},se:{x:o+i,y:e+r},sw:{x:o-s-d,y:e+r}}}_closing=!1;mouseout(){this._closing=!0,this._tooltipElement.on("mouseover",()=>{this._closing=!1}),this._tooltipElement.on("mouseout",()=>{this.mouseout()}),setTimeout(()=>{this._closing&&this.visible(!1)},this.closeDelay())}visible(t){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",t?"visible":"hidden"),this._tooltipElement.style("visibility",t?"visible":"hidden")),super.visible(t),this):super.visible()}exit(t,e){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(t,e)}};s(n,"HTMLTooltip");let h=n;h.prototype._class+=" html_HTMLTooltip",h.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),h.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),h.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),h.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),h.prototype.publish("padding",8,"number","Padding (pixels)"),h.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),h.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),h.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),h.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),h.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),h.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),h.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");const a=class _SimpleTable extends e.HTMLWidget{_table;_tbody;_thead;_theadRow;constructor(){super()}transformData(){return this.data()}enter(t,e){super.enter(t,e),this._table=e.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(t,o){super.update(t,o),this._table.style("width",this.autoWidth()?"auto":"100%");const i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",(t,e)=>`th-${e}`).merge(i).text(t=>t.toString()),i.exit().remove();const r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each(function(t){const o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",(t,e)=>`col-${e}`).merge(o).text(t=>t.toString()),o.exit().remove()}),r.exit().remove()}};s(a,"SimpleTable");let p=a;p.prototype._class+=" html_SimpleTable",p.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");const d=class _StyledTable extends p{constructor(){super()}applyStyleObject(t,e){Object.keys(e).forEach(o=>{t.style(o,e[o])})}update(t,e){super.update(t,e),e.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.select(`.th-${o}`),t)}),this.tbodyColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.selectAll(`.col-${o}`),t)});const o=Object.keys(this.evenRowStyles()).length>0,i=Object.keys(this.lastRowStyles()).length>0,r=e.selectAll("tbody > tr");if(o){const t=r.select(function(t,e){return e%2?this:null});this.applyStyleObject(t,this.evenRowStyles())}if(i){const t=r.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(t,this.lastRowStyles())}}};s(d,"StyledTable");let c=d;c.prototype._class+=" html_StyledTable",c.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),c.prototype.publish("fontColor","#333","string","Base font color used within the table"),c.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),c.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),c.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),c.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');const u=class _BreakdownTable extends c{_tooltip;constructor(){super()}transformData(){const t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)}breakdownData(t){const e=this.data().length,o=this.data().reduce((t,e)=>t+e[1],0),i=[];let r=0;this.data().sort((t,e)=>t[1]>e[1]?-1:1);const s=e-t>0;if(this.data().filter((e,o)=>!s||o<t-1).forEach(t=>{const e=Math.round(t[1]/o*100);r+=e,i.push([t[0],e+"%"])}),s){const o=`${this.otherLabel()} (${e-t+1})`,s="~"+(100-r)+"%";i.push([o,s])}return i}calculateRowCount(){const t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)}enter(t,e){super.enter(t,e),this._tooltip=(new h).target(t),this._tooltip.tooltipHTML(t=>{const e=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),o=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),i=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).width)),r=2*(i+30)+2*this._tooltip.padding(),s=o*Math.ceil((t.length-e)/2)+2*this._tooltip.padding();this._tooltip.tooltipWidth(r),this._tooltip.tooltipHeight(s);const l=this.breakdownData(this.data().length).slice(e-1);return`<div style="\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n ">${l.map(t=>`<div style="\n float:left;\n width:${Math.floor(49.5)}%;\n ">${t[0]}: ${t[1]}</div>`).join("")}</div>`})}update(t,e){this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),super.update(t,e);if((this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){const t=e.select("tbody > tr:last-child"),o=this;t.on("mouseout.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.visible(!1).render()}).on("mouseenter.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.direction("n").data(o.data()).visible(!0).render()})}}};s(u,"BreakdownTable");let g=u;g.prototype._class+=" html_BreakdownTable",g.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),g.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:s(t=>t.useCalculatedRowCount(),"disable")}),g.prototype.publish("fontSize",14,"number","Font size (pixels)"),g.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),g.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),g.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),g.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),g.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),g.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),g.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),g.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),g.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),g.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),g.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),g.prototype.publish("thFontSize",26,"number","Font size for th elements"),g.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),g.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");const b=class _JSXWidget extends e.HTMLWidget{rootNode;jsxRender(t,e){this.rootNode=i.React.render(t,e,this.rootNode)}};s(b,"JSXWidget"),l(b,"Component",i.React.Component),l(b,"createElement",i.React.createElement);let y=b;y.prototype._class+=" html_JSXWidget";const m=class _VNode{_attrs;_children;constructor(t,e){this._attrs=t,this._children=e}type(){return"div"}attrs(){return this._attrs}attr(t){return this._attrs[t]}children(){return this._children}update(t){for(const e in this._attrs)t.attr(e,this._attrs[e])}render(t){const o=t.selectAll(`${t.node().tagName} > *`).data([this]);return o.exit().remove(),o.enter().append(this.type()).attr("reactd3",0).merge(o).each(function(t){const o=e.select(this);t.update(o),t.renderChildren(o)})}renderChildren(t){const o=t.selectAll(`${t.node().tagName} > *`).data(this._children);return o.exit().remove(),o.enter().append(t=>document.createElement(t.type())).attr("reactd3",(t,e)=>e).merge(o).each(function(t){const o=e.select(this);t.update(o),t.renderChildren(o)})}};s(m,"VNode");let f=m;const _=class _ConstVNode extends f{_type;constructor(t,e,o){super(e,o),this._type=t}type(){return this._type}};s(_,"ConstVNode");let w=_;const x=class _TextVNode extends f{_text;constructor(t){super({},[]),this._text=t}type(){return"span"}update(t){super.update(t),t.text(this._text)}};s(x,"TextVNode");let C=x;function v(t){return"function"==typeof t}function S(t){return t.prototype&&t.prototype instanceof f}s(v,"isReactFn"),s(S,"isIVNode");const T=class _ReactD3{static createElement(t,e,...o){return S(t)?new t(e):v(t)?t(e):new w(t,e,o.map(t=>"string"==typeof t?new C(t):t))}static render(t,e){t.render(e)}};s(T,"ReactD3");let E=T;var W;W={__e:s(function(t,e,o,i){for(var r,s,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),l=r.__d),l)return r.__E=r}catch(n){t=n}throw t},"__e")},"function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Math.random().toString(8);var R=0;function B(t,e,o,i,r,s){e||(e={});var l,n,h=e;if("ref"in h)for(n in h={},e)"ref"==n?l=e[n]:h[n]=e[n];var a={type:t,props:h,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--R,__i:-1,__u:0,__source:r,__self:s};return W.vnode&&W.vnode(a),a}s(B,"u");const H=class _VizComponent extends y.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return B("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};s(H,"VizComponent");let A=H;const k=class _VizInstance extends y.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return B("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};s(k,"VizInstance");let z=k;const F=class _StatsTable extends c{transformData(){const t=[["Total",0,0]],o=this.data();return o.forEach(e=>{t[0][1]+=e[1],t[0][2]+=e[2]}),o.concat(t).map(t=>[t[0],this.secondColumnFormat_exists()?e.format(this.secondColumnFormat())(t[1]):t[1],this.thirdColumnFormat_exists()?e.format(this.thirdColumnFormat())(t[2]):t[2]])}update(t,e){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),super.update(t,e)}};s(F,"StatsTable");let L=F;L.prototype._class+=" html_StatsTable",L.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),L.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),L.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),L.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),L.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),L.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),L.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),L.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),L.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),L.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});const N=class _Item extends e.HTMLWidget{_owner;constructor(t){super(),this._owner=t,this._tag="a"}};s(N,"Item");let M=N;M.prototype._class+=" html_Item";const j=class _Button extends M{_icon;constructor(t,e){super(t),this._icon=e}icon(){return this._icon}enter(t,e){super.enter(t,e),e.attr("href","#").on("click",(t,e,o)=>this._owner.titleBarClick(this,t,e,o)).append("i").attr("class",`fa ${this._icon} fa-lg fa-fw`)}};s(j,"Button");let D=j;D.prototype._class+=" html_Button";const P=class _ToggleButton extends D{enter(t,e){e.on("click.sel",(t,e,o)=>{this.selected(!this.selected()),this.render()}),super.enter(t,e)}update(t,e){super.update(t,e),this._element.classed("selected",this.selected())}};s(P,"ToggleButton");let I=P;I.prototype._class+=" html_ToggleButton",I.prototype.publish("selected",!1,"boolean");const $=class _Spacer extends M{enter(t,e){super.enter(t,e),e.attr("class","spacer").attr("href","#").append("i")}};s($,"Spacer");let V=$;V.prototype._class+=" html_Spacer";const O=class _TitleBar extends y{_divMain;_divIconBar;_divTitle;constructor(){super()}enter(t,e){super.enter(t,e),this._divMain=e.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")}update(t,e){super.update(t,e),this._divTitle.text(this.title());const o=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());o.enter().append("div").attr("class","icon-bar-item").each(function(t){t.target(this)}).merge(o).each(function(t){t.render()}),o.exit().each(function(t){t.target(null)}).remove(),o.order()}};s(O,"TitleBar");let U=O;U.prototype._class+=" html_TitleBar",U.prototype.publish("title","","string"),U.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="3.23.0",t.BreakdownTable=g,t.Button=D,t.HTMLTooltip=h,t.Item=M,t.JSXWidget=y,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="3.3.18",t.ReactD3=E,t.SimpleTable=p,t.Spacer=V,t.StatsTable=L,t.StyledTable=c,t.TitleBar=U,t.ToggleButton=I,t.VNode=f,t.VizComponent=A,t.VizInstance=z,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/react")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self)["@hpcc-js/html"]={},t["@hpcc-js/common"],t["@hpcc-js/util"],t["@hpcc-js/react"])}(this,function(t,e,o,i){"use strict";var r=Object.defineProperty,s=(t,e)=>r(t,"name",{value:e,configurable:!0}),l=(t,e,o)=>((t,e,o)=>e in t?r(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o)(t,"symbol"!=typeof e?e+"":e,o);const n=class _HTMLTooltip extends e.HTMLWidget{_triggerElement;_contentNode;_prevContentNode;_tooltipElement;_arrowElement;_tooltipHTMLCallback=s(t=>"<b>_tooltipHTMLCallback is undefined</b>","_tooltipHTMLCallback");_logger=o.scopedLogger("html/HTMLTooltip");constructor(){super(),this.visible(!1)}tooltipHTML(t){return this._tooltipHTMLCallback=t,this}tooltipContent(t){return arguments.length?(this._contentNode=t,this):this._contentNode}triggerElement(t){return this._triggerElement=t,this}enter(t,o){super.enter(t,o);const i=e.select("body");this._tooltipElement=i.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=i.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(t,e){if(super.update(t,e),this._contentNode!==this._prevContentNode){const t=this._tooltipElement.node();[...t.querySelectorAll("*")].map(t=>t.__data__).filter(t=>t).forEach(t=>{"function"==typeof t.target&&t.target(null),"function"==typeof t.exit&&t.exit()}),t.innerHTML="",t.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(()=>this._tooltipHTMLCallback(this.data())),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");const t=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(t.width),this.tooltipHeight_default(t.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()}onShowContent(t){}updateTooltipPosition(){const t=this.calcReferenceBBox(),e=this.calcTooltipDirection(t),o=t[e];return this._tooltipElement.style("top",o.y+"px").style("left",o.x+"px"),this.setArrowPosition(o,e),o}calcTooltipDirection(t){const e=Object.keys(t),o=this.direction();e.sort((t,e)=>t===o?-1:1);const i={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let r=0;r<e.length;r++){const o={top:t[e[r]].y,left:t[e[r]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(o,i))return e[r]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${o}'`),this._logger.debug(i),this._logger.debug({top:t[o].y,left:t[o].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),o}rectFits(t,e){return t.top>=e.top&&t.left>=e.left&&t.width+t.left<=e.width+e.left&&t.height+t.top<=e.height+e.top}setArrowPosition(t,e){let o,i,r="border-top-color";switch(this._arrowElement.style("border",`${this.arrowHeight()}px solid ${this.tooltipColor()}`).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),e){case"n":o=t.y+this.tooltipHeight()+2*this.padding(),i=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),r="border-top-color",this._arrowElement.style("border-top-width",`${this.arrowHeight()}px`).style("border-bottom-width","0px").style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"s":o=t.y-this.arrowHeight(),i=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,r="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",`${this.arrowHeight()}px`).style("border-left-width",this.arrowWidth()/2+"px").style("border-right-width",this.arrowWidth()/2+"px");break;case"e":o=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,i=t.x-this.arrowHeight(),r="border-right-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width","0px").style("border-right-width",`${this.arrowHeight()}px`);break;case"w":o=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),i=t.x+this.tooltipWidth()+2*this.padding(),r="border-left-color",this._arrowElement.style("border-top-width",this.arrowWidth()/2+"px").style("border-bottom-width",this.arrowWidth()/2+"px").style("border-left-width",`${this.arrowHeight()}px`).style("border-right-width","0px")}return void 0!==o&&void 0!==i?this._arrowElement.style("top",o+"px").style("left",i+"px").style(r,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}_cursorLoc;calcReferenceBBox(){const t=this.getReferenceNode();let{top:e,left:o,width:i,height:r}=t.getBoundingClientRect();const s=this.tooltipWidth(),l=this.tooltipHeight(),n=s/2,h=l/2,a=this.arrowHeight(),p=this.padding(),d=2*p;this.followCursor()&&this._cursorLoc&&(o=this._cursorLoc[0],e=this._cursorLoc[1],i=1,r=1);return{n:{x:o+i/2-n-p,y:e-l-a-d},e:{x:o+i+a,y:e+r/2-h-p},s:{x:o+i/2-n-p,y:e+r+a},w:{x:o-s-a-d,y:e+r/2-h-p},nw:{x:o-s-d,y:e-l-d},ne:{x:o+i,y:e-l-d},se:{x:o+i,y:e+r},sw:{x:o-s-d,y:e+r}}}_closing=!1;mouseout(){this._closing=!0,this._tooltipElement.on("mouseover",()=>{this._closing=!1}),this._tooltipElement.on("mouseout",()=>{this.mouseout()}),setTimeout(()=>{this._closing&&this.visible(!1)},this.closeDelay())}visible(t){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",t?"visible":"hidden"),this._tooltipElement.style("visibility",t?"visible":"hidden")),super.visible(t),this):super.visible()}exit(t,e){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(t,e)}};s(n,"HTMLTooltip");let h=n;h.prototype._class+=" html_HTMLTooltip",h.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),h.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),h.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),h.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),h.prototype.publish("padding",8,"number","Padding (pixels)"),h.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),h.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),h.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),h.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),h.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),h.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),h.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");const a=class _SimpleTable extends e.HTMLWidget{_table;_tbody;_thead;_theadRow;constructor(){super()}transformData(){return this.data()}enter(t,e){super.enter(t,e),this._table=e.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(t,o){super.update(t,o),this._table.style("width",this.autoWidth()?"auto":"100%");const i=this._theadRow.selectAll("th").data(this.columns());i.enter().append("th").attr("class",(t,e)=>`th-${e}`).merge(i).text(t=>t.toString()),i.exit().remove();const r=this._tbody.selectAll("tr").data(this.transformData());r.enter().append("tr").merge(r).each(function(t){const o=e.select(this).selectAll("td").data(t);o.enter().append("td").attr("class",(t,e)=>`col-${e}`).merge(o).text(t=>t.toString()),o.exit().remove()}),r.exit().remove()}};s(a,"SimpleTable");let p=a;p.prototype._class+=" html_SimpleTable",p.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");const d=class _StyledTable extends p{constructor(){super()}applyStyleObject(t,e){Object.keys(e).forEach(o=>{t.style(o,e[o])})}update(t,e){super.update(t,e),e.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.select(`.th-${o}`),t)}),this.tbodyColumnStyles().forEach((t,o)=>{this.applyStyleObject(e.selectAll(`.col-${o}`),t)});const o=Object.keys(this.evenRowStyles()).length>0,i=Object.keys(this.lastRowStyles()).length>0,r=e.selectAll("tbody > tr");if(o){const t=r.select(function(t,e){return e%2?this:null});this.applyStyleObject(t,this.evenRowStyles())}if(i){const t=r.select(function(t,e,o){return e===o.length-1?this:null});this.applyStyleObject(t,this.lastRowStyles())}}};s(d,"StyledTable");let c=d;c.prototype._class+=" html_StyledTable",c.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),c.prototype.publish("fontColor","#333","string","Base font color used within the table"),c.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),c.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),c.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),c.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');const u=class _BreakdownTable extends c{_tooltip;constructor(){super()}transformData(){const t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)}breakdownData(t){const e=this.data().length,o=this.data().reduce((t,e)=>t+e[1],0),i=[];let r=0;this.data().sort((t,e)=>t[1]>e[1]?-1:1);const s=e-t>0;if(this.data().filter((e,o)=>!s||o<t-1).forEach(t=>{const e=Math.round(t[1]/o*100);r+=e,i.push([t[0],e+"%"])}),s){const o=`${this.otherLabel()} (${e-t+1})`,s="~"+(100-r)+"%";i.push([o,s])}return i}calculateRowCount(){const t=this.columns().length>0?this.thFontSize()+5:0,e=this.fontSize()+5,o=this.height()-t;return Math.floor(o/e)}enter(t,e){super.enter(t,e),this._tooltip=(new h).target(t),this._tooltip.tooltipHTML(t=>{const e=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),o=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),i=Math.max(...t.map(t=>this.textSize(t[0],this.fontFamily(),this.fontSize()).width)),r=2*(i+30)+2*this._tooltip.padding(),s=o*Math.ceil((t.length-e)/2)+2*this._tooltip.padding();this._tooltip.tooltipWidth(r),this._tooltip.tooltipHeight(s);const l=this.breakdownData(this.data().length).slice(e-1);return`<div style="\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n ">${l.map(t=>`<div style="\n float:left;\n width:${Math.floor(49.5)}%;\n ">${t[0]}: ${t[1]}</div>`).join("")}</div>`})}update(t,e){this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),super.update(t,e);if((this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){const t=e.select("tbody > tr:last-child"),o=this;t.on("mouseout.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.visible(!1).render()}).on("mouseenter.tooltip",e=>{o._tooltip._triggerElement=t,o._tooltip.direction("n").data(o.data()).visible(!0).render()})}}};s(u,"BreakdownTable");let g=u;g.prototype._class+=" html_BreakdownTable",g.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),g.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:s(t=>t.useCalculatedRowCount(),"disable")}),g.prototype.publish("fontSize",14,"number","Font size (pixels)"),g.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),g.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),g.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),g.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),g.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),g.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),g.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),g.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),g.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),g.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),g.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),g.prototype.publish("thFontSize",26,"number","Font size for th elements"),g.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),g.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");const b=class _JSXWidget extends e.HTMLWidget{rootNode;jsxRender(t,e){this.rootNode=i.React.render(t,e,this.rootNode)}};s(b,"JSXWidget"),l(b,"Component",i.React.Component),l(b,"createElement",i.React.createElement);let y=b;y.prototype._class+=" html_JSXWidget";const m=class _VNode{_attrs;_children;constructor(t,e){this._attrs=t,this._children=e}type(){return"div"}attrs(){return this._attrs}attr(t){return this._attrs[t]}children(){return this._children}update(t){for(const e in this._attrs)t.attr(e,this._attrs[e])}render(t){const o=t.selectAll(`${t.node().tagName} > *`).data([this]);return o.exit().remove(),o.enter().append(this.type()).attr("reactd3",0).merge(o).each(function(t){const o=e.select(this);t.update(o),t.renderChildren(o)})}renderChildren(t){const o=t.selectAll(`${t.node().tagName} > *`).data(this._children);return o.exit().remove(),o.enter().append(t=>document.createElement(t.type())).attr("reactd3",(t,e)=>e).merge(o).each(function(t){const o=e.select(this);t.update(o),t.renderChildren(o)})}};s(m,"VNode");let f=m;const _=class _ConstVNode extends f{_type;constructor(t,e,o){super(e,o),this._type=t}type(){return this._type}};s(_,"ConstVNode");let w=_;const x=class _TextVNode extends f{_text;constructor(t){super({},[]),this._text=t}type(){return"span"}update(t){super.update(t),t.text(this._text)}};s(x,"TextVNode");let C=x;function v(t){return"function"==typeof t}function S(t){return t.prototype&&t.prototype instanceof f}s(v,"isReactFn"),s(S,"isIVNode");const T=class _ReactD3{static createElement(t,e,...o){return S(t)?new t(e):v(t)?t(e):new w(t,e,o.map(t=>"string"==typeof t?new C(t):t))}static render(t,e){t.render(e)}};s(T,"ReactD3");let E=T;var W;W={__e:s(function(t,e,o,i){for(var r,s,l;e=e.__;)if((r=e.__c)&&!r.__)try{if((s=r.constructor)&&null!=s.getDerivedStateFromError&&(r.setState(s.getDerivedStateFromError(t)),l=r.__d),null!=r.componentDidCatch&&(r.componentDidCatch(t,i||{}),l=r.__d),l)return r.__E=r}catch(n){t=n}throw t},"__e")},"function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,Math.random().toString(8);var R=0;function B(t,e,o,i,r,s){e||(e={});var l,n,h=e;if("ref"in h)for(n in h={},e)"ref"==n?l=e[n]:h[n]=e[n];var a={type:t,props:h,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--R,__i:-1,__u:0,__source:r,__self:s};return W.vnode&&W.vnode(a),a}s(B,"u");const H=class _VizComponent extends y.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=(new this.props.type).target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return B("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};s(H,"VizComponent");let A=H;const k=class _VizInstance extends y.Component{widget;refreshProps(){for(const t in this.props)this.widget[t]&&"function"==typeof this.widget[t]&&this.widget[t](this.props[t])}componentDidMount(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return B("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};s(k,"VizInstance");let z=k;const F=class _StatsTable extends c{transformData(){const t=[["Total",0,0]],o=this.data();return o.forEach(e=>{t[0][1]+=e[1],t[0][2]+=e[2]}),o.concat(t).map(t=>[t[0],this.secondColumnFormat_exists()?e.format(this.secondColumnFormat())(t[1]):t[1],this.thirdColumnFormat_exists()?e.format(this.thirdColumnFormat())(t[2]):t[2]])}update(t,e){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),super.update(t,e)}};s(F,"StatsTable");let L=F;L.prototype._class+=" html_StatsTable",L.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),L.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),L.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),L.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),L.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),L.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),L.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),L.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),L.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),L.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});const N=class _Item extends e.HTMLWidget{_owner;constructor(t){super(),this._owner=t,this._tag="a"}};s(N,"Item");let M=N;M.prototype._class+=" html_Item";const j=class _Button extends M{_icon;constructor(t,e){super(t),this._icon=e}icon(){return this._icon}enter(t,e){super.enter(t,e),e.attr("href","#").on("click",(t,e,o)=>this._owner.titleBarClick(this,t,e,o)).append("i").attr("class",`fa ${this._icon} fa-lg fa-fw`)}};s(j,"Button");let D=j;D.prototype._class+=" html_Button";const P=class _ToggleButton extends D{enter(t,e){e.on("click.sel",(t,e,o)=>{this.selected(!this.selected()),this.render()}),super.enter(t,e)}update(t,e){super.update(t,e),this._element.classed("selected",this.selected())}};s(P,"ToggleButton");let I=P;I.prototype._class+=" html_ToggleButton",I.prototype.publish("selected",!1,"boolean");const $=class _Spacer extends M{enter(t,e){super.enter(t,e),e.attr("class","spacer").attr("href","#").append("i")}};s($,"Spacer");let V=$;V.prototype._class+=" html_Spacer";const O=class _TitleBar extends y{_divMain;_divIconBar;_divTitle;constructor(){super()}enter(t,e){super.enter(t,e),this._divMain=e.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")}update(t,e){super.update(t,e),this._divTitle.text(this.title());const o=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());o.enter().append("div").attr("class","icon-bar-item").each(function(t){t.target(this)}).merge(o).each(function(t){t.render()}),o.exit().each(function(t){t.target(null)}).remove(),o.order()}};s(O,"TitleBar");let U=O;U.prototype._class+=" html_TitleBar",U.prototype.publish("title","","string"),U.prototype.publish("buttons",[],"widgetArray"),t.BUILD_VERSION="3.24.0",t.BreakdownTable=g,t.Button=D,t.HTMLTooltip=h,t.Item=M,t.JSXWidget=y,t.PKG_NAME="@hpcc-js/html",t.PKG_VERSION="3.3.19",t.ReactD3=E,t.SimpleTable=p,t.Spacer=V,t.StatsTable=L,t.StyledTable=c,t.TitleBar=U,t.ToggleButton=I,t.VNode=f,t.VizComponent=A,t.VizInstance=z,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})});
|
|
2
2
|
//# sourceMappingURL=index.umd.cjs.map
|
|
3
3
|
!function(){"use strict";try{if("undefined"!=typeof document){var t=document.createElement("style");t.appendChild(document.createTextNode("#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;text-align:left;display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}#right{background-color:orange;float:right;text-align:right;white-space:nowrap}.html_TitleBar>.main{width:100%;display:block}.html_TitleBar .title{padding:4px;text-align:left;display:block;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;font-size:20px;font-weight:700}.html_TitleBar .icon-bar{padding:4px;float:right;text-align:right;white-space:nowrap;line-height:28px}.html_TitleBar .icon-bar-item{display:inline}.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{text-align:center;padding-top:4px;padding-bottom:4px;transition:all .3s ease;color:#a9a9a9}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{text-align:center;padding-top:2px;padding-left:8px;padding-bottom:0;color:none}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}}();
|
package/dist/index.umd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/HTMLTooltip.ts","../src/SimpleTable.ts","../src/StyledTable.ts","../src/BreakdownTable.ts","../src/JSXWidget.ts","../src/reactD3.ts","../../../node_modules/preact/dist/preact.module.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../src/VizComponent.tsx","../src/VizInstance.tsx","../src/StatsTable.ts","../src/TitleBar.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\nimport { scopedLogger, ScopedLogging } from \"@hpcc-js/util\";\n\ntype Direction = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\ntype Position = { x: number, y: number };\ntype DirectionalBBox = { [key in Direction]: Position; };\n\ntype Rectangle = { top: number, left: number, width: number, height: number };\nexport class HTMLTooltip extends HTMLWidget {\n\n public _triggerElement;\n public _contentNode;\n protected _prevContentNode;\n\n protected _tooltipElement;\n protected _arrowElement;\n protected _tooltipHTMLCallback = (data?) => \"<b>_tooltipHTMLCallback is undefined</b>\";\n protected _logger: ScopedLogging = scopedLogger(\"html/HTMLTooltip\");\n constructor() {\n super();\n this.visible(false);\n }\n\n tooltipHTML(_: (data?) => string): this {\n this._tooltipHTMLCallback = _;\n return this;\n }\n\n tooltipContent(_): this {\n if (!arguments.length) return this._contentNode;\n this._contentNode = _;\n return this;\n }\n\n triggerElement(_): this {\n this._triggerElement = _;\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const body = d3Select(\"body\");\n this._tooltipElement = body.append(\"div\")\n .attr(\"class\", \"tooltip-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n this._arrowElement = body.append(\"div\")\n .attr(\"class\", \"arrow-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this._contentNode !== this._prevContentNode) {\n const node = this._tooltipElement.node();\n [...node.querySelectorAll(\"*\")]\n .map(n => n.__data__)\n .filter(n => n)\n .forEach(w => {\n if (typeof w.target === \"function\") {\n w.target(null);\n }\n if (typeof w.exit === \"function\") {\n w.exit();\n }\n });\n node.innerHTML = \"\";\n node.appendChild(this._contentNode);\n this._prevContentNode = this._contentNode;\n }\n\n if (this._contentNode) {\n this.onShowContent(this._contentNode);\n } else {\n this._tooltipElement\n .html(() => {\n return this._tooltipHTMLCallback(this.data());\n });\n }\n if (this.fitContent()) {\n this._tooltipElement\n .style(\"width\", \"auto\")\n .style(\"height\", \"auto\")\n .style(\"padding\", \"0px\")\n .style(\"box-sizing\", \"content-box\")\n ;\n const rect = this._tooltipElement.node().getBoundingClientRect();\n this.tooltipWidth_default(rect.width);\n this.tooltipHeight_default(rect.height);\n }\n this._closing = false;\n this._tooltipElement\n .style(\"background-color\", this.tooltipColor())\n .style(\"color\", this.fontColor())\n .style(\"width\", this.tooltipWidth() + \"px\")\n .style(\"height\", this.tooltipHeight() + \"px\")\n .style(\"opacity\", 1)\n .style(\"padding\", this.padding() + \"px\")\n .style(\"pointer-events\", this.enablePointerEvents() ? \"all\" : \"none\")\n .style(\"box-sizing\", \"content-box\")\n ;\n this._arrowElement\n .style(\"opacity\", 1)\n .style(\"pointer-events\", \"none\")\n ;\n this.updateTooltipPosition();\n }\n\n onShowContent(node) {\n\n }\n\n protected updateTooltipPosition(): Position {\n const bbox = this.calcReferenceBBox();\n const direction = this.calcTooltipDirection(bbox);\n const box = bbox[direction];\n this._tooltipElement\n .style(\"top\", box.y + \"px\")\n .style(\"left\", box.x + \"px\")\n ;\n this.setArrowPosition(box, direction);\n return box;\n }\n\n protected calcTooltipDirection(bbox: DirectionalBBox): Direction {\n const directions: Direction[] = Object.keys(bbox) as Direction[];\n\n const defaultDirection = this.direction();\n directions.sort((a, b) => a === defaultDirection ? -1 : 1);\n const windowRect = {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight\n };\n for (let i = 0; i < directions.length; i++) {\n const tooltipRect = {\n top: bbox[directions[i]].y,\n left: bbox[directions[i]].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n };\n if (this.rectFits(tooltipRect, windowRect)) {\n return directions[i];\n }\n }\n this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${defaultDirection}'`);\n this._logger.debug(windowRect);\n this._logger.debug({\n top: bbox[defaultDirection].y,\n left: bbox[defaultDirection].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n });\n return defaultDirection;\n }\n\n protected rectFits(innerRect: Rectangle, outerRect: Rectangle): boolean {\n return (\n innerRect.top >= outerRect.top &&\n innerRect.left >= outerRect.left &&\n innerRect.width + innerRect.left <= outerRect.width + outerRect.left &&\n innerRect.height + innerRect.top <= outerRect.height + outerRect.top\n );\n }\n\n protected setArrowPosition(point: Position, direction: Direction) {\n let top;\n let left;\n let visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border\", `${this.arrowHeight()}px solid ${this.tooltipColor()}`)\n .style(\"border-top-color\", \"transparent\")\n .style(\"border-right-color\", \"transparent\")\n .style(\"border-bottom-color\", \"transparent\")\n .style(\"border-left-color\", \"transparent\")\n ;\n switch (direction) {\n case \"n\":\n top = point.y + this.tooltipHeight() + (this.padding() * 2);\n left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();\n visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowHeight()}px`)\n .style(\"border-bottom-width\", \"0px\")\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"s\":\n top = point.y - this.arrowHeight();\n left = point.x + this.padding() + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2);\n visibleBorderStyle = \"border-bottom-color\";\n this._arrowElement\n .style(\"border-top-width\", \"0px\")\n .style(\"border-bottom-width\", `${this.arrowHeight()}px`)\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"e\":\n top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);\n left = point.x - this.arrowHeight();\n visibleBorderStyle = \"border-right-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", \"0px\")\n .style(\"border-right-width\", `${this.arrowHeight()}px`)\n ;\n break;\n case \"w\":\n top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();\n left = point.x + this.tooltipWidth() + (this.padding() * 2);\n visibleBorderStyle = \"border-left-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", `${this.arrowHeight()}px`)\n .style(\"border-right-width\", \"0px\")\n ;\n break;\n }\n if (typeof top !== \"undefined\" && typeof left !== \"undefined\") {\n this._arrowElement\n .style(\"top\", top + \"px\")\n .style(\"left\", left + \"px\")\n .style(visibleBorderStyle, this.tooltipColor())\n .style(\"opacity\", 1)\n ;\n } else {\n this._arrowElement\n .style(\"opacity\", 0)\n ;\n }\n return point;\n }\n\n protected getReferenceNode() {\n if (!this._triggerElement) {\n return this.element().node().parentNode.parentNode;\n }\n return this._triggerElement.node();\n }\n public _cursorLoc;\n protected calcReferenceBBox() {\n const node = this.getReferenceNode();\n let { top, left, width, height } = node.getBoundingClientRect();\n const wholeW = this.tooltipWidth();\n const wholeH = this.tooltipHeight();\n const halfW = wholeW / 2;\n const halfH = wholeH / 2;\n const arrowH = this.arrowHeight();\n const p = this.padding();\n const p2 = p * 2;\n\n if (this.followCursor() && this._cursorLoc) {\n\n left = this._cursorLoc[0];\n top = this._cursorLoc[1];\n width = 1;\n height = 1;\n }\n const bbox = {\n n: {\n x: left + (width / 2) - halfW - p,\n y: top - wholeH - arrowH - p2\n },\n e: {\n x: left + width + arrowH,\n y: top + (height / 2) - halfH - p\n },\n s: {\n x: left + (width / 2) - halfW - p,\n y: top + height + arrowH\n },\n w: {\n x: left - wholeW - arrowH - p2,\n y: top + (height / 2) - halfH - p\n },\n nw: {\n x: left - wholeW - p2,\n y: top - wholeH - p2\n },\n ne: {\n x: left + width,\n y: top - wholeH - p2\n },\n se: {\n x: left + width,\n y: top + height\n },\n sw: {\n x: left - wholeW - p2,\n y: top + height\n }\n };\n return bbox;\n }\n\n private _closing = false;\n mouseout() {\n this._closing = true;\n this._tooltipElement.on(\"mouseover\", () => {\n this._closing = false;\n });\n this._tooltipElement.on(\"mouseout\", () => {\n this.mouseout();\n });\n setTimeout(() => {\n if (this._closing) {\n this.visible(false);\n }\n }, this.closeDelay());\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return super.visible();\n if (this._arrowElement) {\n this._arrowElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n this._tooltipElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n }\n super.visible(_);\n return this;\n }\n\n exit(domNode, element) {\n if (this._arrowElement) {\n this._arrowElement.remove();\n this._tooltipElement.remove();\n }\n super.exit(domNode, element);\n }\n}\nHTMLTooltip.prototype._class += \" html_HTMLTooltip\";\n\nexport interface HTMLTooltip {\n padding(): number;\n padding(_: number): this;\n direction(): Direction;\n direction(_: Direction): this;\n arrowHeight(): number;\n arrowHeight(_: number): this;\n arrowWidth(): number;\n arrowWidth(_: number): this;\n fontColor(): string;\n fontColor(_: string): this;\n tooltipColor(): string;\n tooltipColor(_: string): this;\n tooltipWidth(): number;\n tooltipWidth(_: number): this;\n tooltipWidth_default(_: number);\n tooltipHeight(): number;\n tooltipHeight(_: number): this;\n tooltipHeight_default(_: number);\n followCursor(): boolean;\n followCursor(_: boolean): this;\n enablePointerEvents(): boolean;\n enablePointerEvents(_: boolean): this;\n closeDelay(): number;\n closeDelay(_: number): this;\n fitContent(): boolean;\n fitContent(_: boolean): this;\n\n}\n\nHTMLTooltip.prototype.publish(\"fitContent\", false, \"boolean\", \"If true, tooltip will grow to fit its html content\");\nHTMLTooltip.prototype.publish(\"followCursor\", false, \"boolean\", \"If true, tooltip will display relative to cursor location\");\nHTMLTooltip.prototype.publish(\"closeDelay\", 400, \"number\", \"Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)\");\nHTMLTooltip.prototype.publish(\"direction\", \"n\", \"set\", \"Direction in which to display the tooltip\", [\"n\", \"s\", \"e\", \"w\", \"ne\", \"nw\", \"se\", \"sw\"]);\nHTMLTooltip.prototype.publish(\"padding\", 8, \"number\", \"Padding (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowWidth\", 16, \"number\", \"Width (or height depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowHeight\", 8, \"number\", \"Height (or width depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"fontColor\", \"#FFF\", \"html-color\", \"The default font color for text in the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipColor\", \"#000000EE\", \"html-color\", \"Background color of the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipWidth\", 200, \"number\", \"Width of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"tooltipHeight\", 200, \"number\", \"Height of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"enablePointerEvents\", false, \"boolean\", \"If true, the 'pointer-events: all' style will be used\");\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\n\nexport class SimpleTable extends HTMLWidget {\n protected _table;\n protected _tbody;\n protected _thead;\n protected _theadRow;\n constructor() {\n super();\n }\n\n protected transformData() {\n return this.data();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._table = element.append(\"table\");\n this._thead = this._table.append(\"thead\");\n this._theadRow = this._thead.append(\"tr\");\n this._tbody = this._table.append(\"tbody\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._table\n .style(\"width\", this.autoWidth() ? \"auto\" : \"100%\")\n ;\n const theadTrSelection = this._theadRow.selectAll(\"th\").data(this.columns());\n theadTrSelection.enter()\n .append(\"th\")\n .attr(\"class\", (n, i) => `th-${i}`)\n .merge(theadTrSelection)\n .text(_d => (_d).toString())\n ;\n theadTrSelection.exit().remove();\n const trSelection = this._tbody.selectAll(\"tr\").data(this.transformData());\n trSelection.enter()\n .append(\"tr\")\n .merge(trSelection)\n .each(function (this, d) {\n const tr = d3Select(this);\n const tdSelection = tr.selectAll(\"td\").data(d);\n tdSelection.enter()\n .append(\"td\")\n .attr(\"class\", (n, i) => `col-${i}`)\n .merge(tdSelection as any)\n .text(_d => (_d).toString())\n ;\n tdSelection.exit().remove();\n })\n ;\n trSelection.exit().remove();\n }\n}\nSimpleTable.prototype._class += \" html_SimpleTable\";\n\nexport interface SimpleTable {\n autoWidth(): boolean;\n autoWidth(_: boolean): this;\n}\nSimpleTable.prototype.publish(\"autoWidth\", false, \"boolean\", \"If true, table width will be set to 'auto'. If false, the width is set to '100%'\");\n","import { SimpleTable } from \"./SimpleTable.ts\";\n\nexport class StyledTable extends SimpleTable {\n constructor() {\n super();\n }\n\n protected applyStyleObject(selection, styleObject) {\n Object.keys(styleObject).forEach(styleName => {\n selection.style(styleName, styleObject[styleName]);\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n element.selectAll(\"tr,th,td\")\n .attr(\"style\", \"\")\n .style(\"font-family\", this.fontFamily())\n .style(\"color\", this.fontColor())\n ;\n\n this.theadColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.select(`.th-${i}`), styleObj);\n });\n this.tbodyColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.selectAll(`.col-${i}`), styleObj);\n });\n const evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;\n const lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;\n const tbodyRows = element.selectAll(\"tbody > tr\");\n if (evenRowStylesExist) {\n const tbodyEvenRows = tbodyRows.select(function (this: HTMLElement, d, i) { return i % 2 ? this : null; });\n this.applyStyleObject(tbodyEvenRows, this.evenRowStyles());\n }\n if (lastRowStylesExist) {\n const tbodyLastRow = tbodyRows.select(function (this: HTMLElement, d, i, arr) { return i === arr.length - 1 ? this : null; });\n this.applyStyleObject(tbodyLastRow, this.lastRowStyles());\n }\n }\n}\nStyledTable.prototype._class += \" html_StyledTable\";\n\nexport interface StyledTable {\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n tbodyColumnStyles(): Array<{ [styleID: string]: any }>;\n tbodyColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n tbodyColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles(): Array<{ [styleID: string]: any }>;\n theadColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n lastRowStyles(): { [styleID: string]: any };\n lastRowStyles(_: { [styleID: string]: any }): this;\n lastRowStyles_default(_: { [styleID: string]: any }): this;\n evenRowStyles(): { [styleID: string]: any };\n evenRowStyles(_: { [styleID: string]: any }): this;\n evenRowStyles_default(_: { [styleID: string]: any }): this;\n}\n\nStyledTable.prototype.publish(\"fontFamily\", \"Verdana\", \"string\", \"Base font-family used within the table\");\nStyledTable.prototype.publish(\"fontColor\", \"#333\", \"string\", \"Base font color used within the table\");\nStyledTable.prototype.publish(\"theadColumnStyles\", [], \"array\", 'Array of objects containing styles for the thead columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"tbodyColumnStyles\", [], \"array\", 'Array of objects containing styles for the tbody columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"lastRowStyles\", {}, \"object\", 'Object containing styles for the last row (ex: {\"color\":\"red\"})');\nStyledTable.prototype.publish(\"evenRowStyles\", {}, \"object\", 'Object containing styles for even rows (ex: {\"background-color\":\"#AAA\"})');\n","import { HTMLTooltip } from \"./HTMLTooltip.ts\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class BreakdownTable extends StyledTable {\n // protected _table;\n // protected _tbody;\n protected _tooltip: HTMLTooltip;\n constructor() {\n super();\n }\n\n protected transformData() {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n return this.breakdownData(rowCount);\n }\n\n protected breakdownData(limit: number): any[] {\n const len = this.data().length;\n const sum = this.data().reduce((acc, row) => acc + row[1], 0);\n const data = [];\n let percSum = 0;\n this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);\n const hiddenRowCount = len - limit;\n const showOther = hiddenRowCount > 0;\n this.data()\n .filter((_, i) => showOther ? i < limit - 1 : true)\n .forEach(row => {\n const perc = Math.round((row[1] / sum) * 100);\n percSum += perc;\n data.push([row[0], perc + \"%\"]);\n });\n if (showOther) {\n const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;\n const otherPercentage = \"~\" + (100 - percSum) + \"%\";\n data.push([otherLabel, otherPercentage]);\n }\n return data;\n }\n\n protected calculateRowCount(): number {\n const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;\n const tbodyRowHeight = this.fontSize() + 5;\n const tbodyAvailableHeight = this.height() - theadRowHeight;\n const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);\n return rowCount;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tooltip = new HTMLTooltip()\n .target(domNode)\n ;\n this._tooltip\n .tooltipHTML(data => {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();\n const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));\n const widestPerc = 30;\n const colCount = 2;\n const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);\n const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);\n this._tooltip.tooltipWidth(w);\n this._tooltip.tooltipHeight(h);\n const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);\n return `<div style=\"\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n \">${otherData.map(row =>\n `<div style=\"\n float:left;\n width:${Math.floor(99 / colCount)}%;\n \">${row[0]}: ${row[1]}</div>`\n ).join(\"\")\n }</div>`;\n })\n ;\n }\n\n update(domNode, element) {\n this.theadColumnStyles_default([\n {\n \"color\": this.thFirstColor(),\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"width\": \"1%\",\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.percentageAlignment(),\n \"padding\": \"0px\"\n }\n ]);\n this.tbodyColumnStyles_default([\n {\n \"color\": this.topLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.topPercentageColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n this.lastRowStyles_default([\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherLabelBold() ? \"bold\" : \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherPercentageBold() ? \"bold\" : \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n\n super.update(domNode, element);\n\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n if (rowCount < this.data().length) {\n const lastRow = element.select(\"tbody > tr:last-child\");\n const context = this;\n lastRow\n .on(\"mouseout.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .visible(false)\n .render()\n ;\n })\n .on(\"mouseenter.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .direction(\"n\")\n .data(context.data())\n .visible(true)\n .render()\n ;\n })\n ;\n }\n }\n\n}\nBreakdownTable.prototype._class += \" html_BreakdownTable\";\n\nexport interface BreakdownTable {\n useCalculatedRowCount(): boolean;\n useCalculatedRowCount(_: boolean): this;\n rowCount(): number;\n rowCount(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n thFirstColor(): string;\n thFirstColor(_: string): this;\n thLastColor(): string;\n thLastColor(_: string): this;\n thFontSize(): number;\n thFontSize(_: number): this;\n thFontWeight(): string;\n thFontWeight(_: string): this;\n labelAlignment(): \"left\" | \"center\" | \"right\";\n labelAlignment(_: \"left\" | \"center\" | \"right\"): this;\n percentageAlignment(): \"left\" | \"center\" | \"right\";\n percentageAlignment(_: \"left\" | \"center\" | \"right\"): this;\n topLabelColor(): string;\n topLabelColor(_: string): this;\n topPercentageColor(): string;\n topPercentageColor(_: string): this;\n topPercentageBold(): boolean;\n topPercentageBold(_: boolean): this;\n otherLabel(): string;\n otherLabel(_: string): this;\n otherLabelColor(): string;\n otherLabelColor(_: string): this;\n otherLabelBold(): boolean;\n otherLabelBold(_: boolean): this;\n otherPercentageColor(): string;\n otherPercentageColor(_: string): this;\n otherPercentageBold(): boolean;\n otherPercentageBold(_: boolean): this;\n}\n\nBreakdownTable.prototype.publish(\"useCalculatedRowCount\", true, \"boolean\", \"If true, rowCount will be calculated and its default will be overwritten\");\nBreakdownTable.prototype.publish(\"rowCount\", 5, \"number\", \"Number of total rows to display (including the 'other' row)\", undefined, { disable: w => w.useCalculatedRowCount() });\nBreakdownTable.prototype.publish(\"fontSize\", 14, \"number\", \"Font size (pixels)\");\nBreakdownTable.prototype.publish(\"labelAlignment\", \"left\", \"set\", \"Alignment of the label column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"percentageAlignment\", \"center\", \"set\", \"Alignment of the percentage column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"topLabelColor\", \"#333\", \"html-color\", \"Color of displayed 'top' labels\");\nBreakdownTable.prototype.publish(\"topPercentageColor\", \"#1A99D5\", \"html-color\", \"Color of displayed 'top' percentages\");\nBreakdownTable.prototype.publish(\"topPercentageBold\", true, \"html-color\", \"If true, the 'top' percentages will be bold\");\nBreakdownTable.prototype.publish(\"otherLabel\", \"Other\", \"string\", \"Label text for the 'other' row\");\nBreakdownTable.prototype.publish(\"otherLabelColor\", \"#AAA\", \"html-color\", \"Color of the 'other' label\");\nBreakdownTable.prototype.publish(\"otherLabelBold\", false, \"html-color\", \"If true, the 'other' label will be bold\");\nBreakdownTable.prototype.publish(\"otherPercentageColor\", \"#AAA\", \"html-color\", \"Color of the 'other' percentage\");\nBreakdownTable.prototype.publish(\"otherPercentageBold\", false, \"html-color\", \"If true, the 'other' percentage will be bold\");\nBreakdownTable.prototype.publish(\"thFontWeight\", \"bold\", \"string\", \"Font weight for th elements\");\nBreakdownTable.prototype.publish(\"thFontSize\", 26, \"number\", \"Font size for th elements\");\nBreakdownTable.prototype.publish(\"thFirstColor\", \"#333\", \"html-color\", \"Text color of the first th element\");\nBreakdownTable.prototype.publish(\"thLastColor\", \"#333\", \"html-color\", \"Text color of the last th element\");\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { React } from \"@hpcc-js/react\";\n\nexport class JSXWidget extends HTMLWidget {\n static Component = React.Component;\n static createElement = React.createElement;\n protected rootNode;\n\n jsxRender(jsx, domNode) {\n this.rootNode = React.render(jsx, domNode, this.rootNode);\n }\n}\nJSXWidget.prototype._class += \" html_JSXWidget\";\n","import { select as d3Select } from \"@hpcc-js/common\";\n\nexport type ReactFn = (attrs: { [key: string]: string }) => VNode;\n\nexport type IVNode = new (attrs: { [key: string]: string }, children: VNode[]) => VNode;\n\nexport class VNode {\n protected _attrs: { [key: string]: string };\n protected _children: VNode[];\n\n constructor(attrs: { [key: string]: string }, children: VNode[]) {\n this._attrs = attrs;\n this._children = children;\n }\n\n type(): string {\n return \"div\";\n }\n\n attrs(): { [key: string]: string } {\n return this._attrs;\n }\n\n attr(key) {\n return this._attrs[key];\n }\n\n children(): VNode[] {\n return this._children;\n }\n\n update(targetElement) {\n for (const key in this._attrs) {\n targetElement.attr(key, this._attrs[key]);\n }\n }\n\n render(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data([this]);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(this.type())\n .attr(\"reactd3\", 0)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n\n renderChildren(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data(this._children);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(d => document.createElement(d.type()))\n .attr(\"reactd3\", (_d, i) => i)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n}\n\nclass ConstVNode extends VNode {\n protected _type: string;\n\n constructor(type: string, attrs: { [key: string]: string }, children: VNode[]) {\n super(attrs, children);\n this._type = type;\n }\n\n type(): string {\n return this._type;\n }\n}\n\nclass TextVNode extends VNode {\n protected _text: string;\n\n constructor(text: string) {\n super({}, []);\n this._text = text;\n }\n\n type(): string {\n return \"span\";\n }\n\n update(targetElement) {\n super.update(targetElement);\n targetElement.text(this._text);\n }\n}\n\nfunction isReactFn(_): _ is ReactFn {\n return typeof _ === \"function\";\n}\n\nfunction isIVNode(_: any): _ is IVNode {\n return _.prototype && _.prototype instanceof VNode;\n}\n\nexport class ReactD3 {\n // static createElementXXX(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n static createElement(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n if (isIVNode(type)) {\n return new (type as any)(attrs);\n } else if (isReactFn(type)) {\n return type(attrs);\n }\n return new ConstVNode(type, attrs, children.map(child => {\n if (typeof child === \"string\") {\n return new TextVNode(child);\n }\n return child;\n }));\n }\n\n static render(vdom: VNode, targetElement) {\n vdom.render(targetElement);\n }\n}\n","var n,l,u,t,i,r,o,e,f,c,s,a,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,_,g,m=t&&t.__k||w,b=l.length;for(f=T(u,l,m,f,b),a=0;a<b;a++)null!=(p=u.__k[a])&&(h=-1!=p.__i&&m[p.__i]||d,p.__i=a,_=q(n,p,h,i,r,o,e,f,c,s),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),s.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),(g=!!(4&p.__u))||h.__k===p.__k?(f=j(p,f,n,g),g&&h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,s=u.length,a=s,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,a))&&(a--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>s?h--:i<s&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(a)for(r=0;r<s;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=j(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=$(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],s=null!=c&&0==(2&c.__u);if(null===c&&null==e||s&&e==c.key&&f==c.type)return u;if(t>(s?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(a,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[s]=t[s]:(u[s]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[s])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,s){var a,h,p,v,y,d,_,k,x,M,$,I,P,A,H,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof T)try{if(k=u.props,x=T.prototype&&T.prototype.render,M=(a=T.contextType)&&i[a.__c],$=a?M?M.props.value:a.__:i,t.__c?_=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(k,$):(u.__c=h=new C(k,$),h.constructor=T,h.render=Q),M&&M.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(k,h.__s))),v=h.props,y=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&k!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,$),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,$)){u.__v!=t.__v&&(h.props=k,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,$),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,d)})}if(h.context=$,h.props=k,h.__P=n,h.__e=!1,I=l.__r,P=0,x)h.state=h.__s,h.__d=!1,I&&I(u),a=h.render(h.props,h.state,h.context),w.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,I&&I(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=m(m({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(d=h.getSnapshotBeforeUpdate(v,y)),A=null!=a&&a.type===S&&null==a.key?E(a.props.children):a,f=L(n,g(A)?A:[A],u,t,i,r,o,e,f,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),_&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(H=o.length;H--;)b(o[H]);B(u)}else u.__e=t.__e,u.__k=t.__k,n.then||B(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,s);return(a=l.diffed)&&a(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):m({},n)}function G(u,t,i,r,o,e,f,c,s){var a,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(a=0;a<e.length;a++)if((y=e[a])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[a]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=e&&n.call(u.childNodes),!c&&null!=e)for(m={},a=0;a<u.attributes.length;a++)m[(y=u.attributes[a]).name]=y.value;for(a in m)y=m[a],\"dangerouslySetInnerHTML\"==a?p=y:\"children\"==a||a in k||\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k||N(u,a,null,y,o);for(a in k)y=k[a],\"children\"==a?v=y:\"dangerouslySetInnerHTML\"==a?h=y:\"value\"==a?w=y:\"checked\"==a?_=y:c&&\"function\"!=typeof y||m[a]===y||N(u,a,y,m[a],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,s),null!=e)for(a=e.length;a--;)b(e[a]);c||(a=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[a]||\"progress\"==x&&!w||\"option\"==x&&w!=m[a])&&N(u,a,w,m[a],o),a=\"checked\",null!=_&&_!=u[a]&&N(u,a,_,m[a],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f)}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,s=\"__a\"+f,a=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizComponent extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = new (this as any).props.type()\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizInstance extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = (this as any).props.instance\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { format as d3Format } from \"d3-format\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class StatsTable extends StyledTable {\n\n protected transformData() {\n const totalRow = [[\"Total\", 0, 0]];\n const data = this.data();\n data.forEach(row => {\n totalRow[0][1] += row[1];\n totalRow[0][2] += row[2];\n });\n return data\n .concat(totalRow)\n .map(row => {\n return [\n row[0],\n this.secondColumnFormat_exists() ? d3Format(this.secondColumnFormat())(row[1]) : row[1],\n this.thirdColumnFormat_exists() ? d3Format(this.thirdColumnFormat())(row[2]) : row[2]\n ];\n })\n ;\n }\n\n update(domNode, element) {\n this.tbodyColumnStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\"\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\"\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\"\n }\n ]);\n this.evenRowStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n }\n ]);\n this.lastRowStyles_default({\n \"font-weight\": \"bold\"\n });\n super.update(domNode, element);\n }\n}\nStatsTable.prototype._class += \" html_StatsTable\";\n\nexport interface StatsTable {\n labelColor(): string;\n labelColor(_: string): this;\n primaryValueColor(): string;\n primaryValueColor(_: string): this;\n secondaryValueColor(): string;\n secondaryValueColor(_: string): this;\n evenRowFontColor(): string;\n evenRowFontColor(_: string): this;\n evenRowBackgroundColor(): string;\n evenRowBackgroundColor(_: string): this;\n firstColumnWidth(): string;\n firstColumnWidth(_: string): this;\n secondColumnWidth(): string;\n secondColumnWidth(_: string): this;\n thirdColumnWidth(): string;\n thirdColumnWidth(_: string): this;\n secondColumnFormat(): string;\n secondColumnFormat(_: string): this;\n secondColumnFormat_exists(): boolean;\n thirdColumnFormat(): string;\n thirdColumnFormat(_: string): this;\n thirdColumnFormat_exists(): boolean;\n}\nStatsTable.prototype.publish(\"labelColor\", \"#333\", \"html-color\", \"Color of the text in the first column\");\nStatsTable.prototype.publish(\"primaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the second column\");\nStatsTable.prototype.publish(\"secondaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the third column\");\nStatsTable.prototype.publish(\"evenRowBackgroundColor\", \"#333\", \"html-color\", \"Background color of the even rows\");\nStatsTable.prototype.publish(\"evenRowFontColor\", \"#333\", \"html-color\", \"Font color of the even rows\");\nStatsTable.prototype.publish(\"firstColumnWidth\", \"auto\", \"string\", \"CSS style applied as the 'width' for the first column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the second column (ex: 40px)\");\nStatsTable.prototype.publish(\"thirdColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the third column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnFormat\", \"$,.0f\", \"string\", \"d3-format specifier applied to the second column's values\", undefined, { optional: true });\nStatsTable.prototype.publish(\"thirdColumnFormat\", null, \"string\", \"d3-format specifier applied to the third column's values\", undefined, { optional: true });\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { JSXWidget } from \"./JSXWidget.ts\";\n\nimport \"../src/TitleBar.css\";\n\nexport interface IClickHandler {\n titleBarClick(src: Item, d, idx: number, groups): void;\n}\n\nexport class Item extends HTMLWidget {\n protected _owner: IClickHandler;\n\n constructor(owner: IClickHandler) {\n super();\n this._owner = owner;\n this._tag = \"a\";\n }\n}\nItem.prototype._class += \" html_Item\";\n\nexport class Button extends Item {\n private _icon: string;\n\n constructor(owner: IClickHandler, icon: string) {\n super(owner);\n this._icon = icon;\n }\n\n icon() {\n return this._icon;\n }\n\n enter(domNode: HTMLElement, element) {\n super.enter(domNode, element);\n element\n .attr(\"href\", \"#\")\n .on(\"click\", (d, idx, groups) => this._owner.titleBarClick(this, d, idx, groups))\n .append(\"i\")\n .attr(\"class\", `fa ${this._icon} fa-lg fa-fw`)\n ;\n }\n}\nButton.prototype._class += \" html_Button\";\n\nexport class ToggleButton extends Button {\n\n enter(domNode: HTMLElement, element) {\n element.on(\"click.sel\", (d, idx, groups) => {\n this.selected(!this.selected());\n this.render();\n });\n super.enter(domNode, element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._element.classed(\"selected\", this.selected());\n }\n}\nToggleButton.prototype._class += \" html_ToggleButton\";\nexport interface ToggleButton {\n selected(): boolean;\n selected(_: boolean): this;\n}\nToggleButton.prototype.publish(\"selected\", false, \"boolean\");\n\nexport class Spacer extends Item {\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element\n .attr(\"class\", \"spacer\")\n .attr(\"href\", \"#\")\n .append(\"i\")\n ;\n }\n}\nSpacer.prototype._class += \" html_Spacer\";\n\nexport class TitleBar extends JSXWidget {\n protected _divMain;\n protected _divIconBar;\n protected _divTitle;\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._divMain = element.append(\"div\")\n .attr(\"class\", \"main\")\n ;\n this._divIconBar = this._divMain.append(\"div\")\n .attr(\"class\", \"icon-bar\")\n ;\n this._divTitle = this._divMain.append(\"div\")\n .attr(\"class\", \"title\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._divTitle.text(this.title());\n\n const icons = this._divIconBar.selectAll(\".icon-bar-item\").data(this.buttons());\n icons.enter().append(\"div\")\n .attr(\"class\", \"icon-bar-item\")\n .each(function (this: HTMLElement, d: Item) {\n d.target(this);\n })\n .merge(icons)\n .each(function (d: Item) {\n d.render();\n })\n ;\n icons.exit()\n .each(function (d: Item) {\n d.target(null);\n })\n .remove()\n ;\n icons.order();\n }\n}\nTitleBar.prototype._class += \" html_TitleBar\";\n\nexport interface TitleBar {\n title(): string;\n title(_: string): this;\n buttons(): Item[];\n buttons(items: Item[]): this;\n}\nTitleBar.prototype.publish(\"title\", \"\", \"string\");\nTitleBar.prototype.publish(\"buttons\", [], \"widgetArray\");\n"],"names":["_HTMLTooltip","HTMLWidget","_triggerElement","_contentNode","_prevContentNode","_tooltipElement","_arrowElement","_tooltipHTMLCallback","__name","data","_logger","scopedLogger","constructor","super","this","visible","tooltipHTML","_","tooltipContent","arguments","length","triggerElement","enter","domNode","element","body","d3Select","append","attr","style","update","node","querySelectorAll","map","n","__data__","filter","forEach","w","target","exit","innerHTML","appendChild","onShowContent","html","fitContent","rect","getBoundingClientRect","tooltipWidth_default","width","tooltipHeight_default","height","_closing","tooltipColor","fontColor","tooltipWidth","tooltipHeight","padding","enablePointerEvents","updateTooltipPosition","bbox","calcReferenceBBox","direction","calcTooltipDirection","box","y","x","setArrowPosition","directions","Object","keys","defaultDirection","sort","a","b","windowRect","top","left","window","innerWidth","innerHeight","i","tooltipRect","rectFits","warning","debug","innerRect","outerRect","point","visibleBorderStyle","arrowHeight","arrowWidth","getReferenceNode","parentNode","_cursorLoc","wholeW","wholeH","halfW","halfH","arrowH","p","p2","followCursor","e","s","nw","ne","se","sw","mouseout","on","setTimeout","closeDelay","remove","HTMLTooltip","prototype","_class","publish","_SimpleTable","_table","_tbody","_thead","_theadRow","transformData","autoWidth","theadTrSelection","selectAll","columns","merge","text","_d","toString","trSelection","each","d","tdSelection","SimpleTable","_StyledTable","applyStyleObject","selection","styleObject","styleName","fontFamily","theadColumnStyles","styleObj","select","tbodyColumnStyles","evenRowStylesExist","evenRowStyles","lastRowStylesExist","lastRowStyles","tbodyRows","tbodyEvenRows","tbodyLastRow","arr","StyledTable","_BreakdownTable","_tooltip","rowCount","useCalculatedRowCount","calculateRowCount","breakdownData","limit","len","sum","reduce","acc","row","percSum","showOther","perc","Math","round","push","otherLabel","otherPercentage","theadRowHeight","thFontSize","tbodyRowHeight","fontSize","tbodyAvailableHeight","floor","rowHeight","max","textSize","widestLabel","h","ceil","otherData","slice","join","theadColumnStyles_default","color","thFirstColor","thFontWeight","labelAlignment","percentageAlignment","tbodyColumnStyles_default","topLabelColor","topPercentageColor","lastRowStyles_default","otherLabelColor","otherLabelBold","otherPercentageBold","lastRow","context","render","BreakdownTable","disable","_JSXWidget","rootNode","jsxRender","jsx","React","__publicField","Component","createElement","JSXWidget","_VNode","_attrs","_children","attrs","children","type","key","targetElement","thisElement","tagName","renderChildren","document","VNode","_ConstVNode","_type","ConstVNode","_TextVNode","_text","TextVNode","isReactFn","isIVNode","_ReactD3","child","vdom","ReactD3","l","__e","u","t","r","o","__","__c","getDerivedStateFromError","setState","__d","componentDidCatch","__E","Promise","then","bind","resolve","random","f","c","props","ref","__k","__b","__v","__i","__u","__source","__self","vnode","_VizComponent","widget","refreshProps","componentDidMount","base","componentWillUnmount","componentDidUpdate","VizComponent","_VizInstance","instance","VizInstance","_StatsTable","totalRow","concat","secondColumnFormat_exists","d3Format","secondColumnFormat","thirdColumnFormat_exists","thirdColumnFormat","firstColumnWidth","secondColumnWidth","thirdColumnWidth","evenRowStyles_default","evenRowFontColor","evenRowBackgroundColor","StatsTable","optional","_Item","_owner","owner","_tag","Item","_Button","_icon","icon","idx","groups","titleBarClick","Button","_ToggleButton","selected","_element","classed","ToggleButton","_Spacer","Spacer","_TitleBar","_divMain","_divIconBar","_divTitle","title","icons","buttons","order","TitleBar"],"mappings":"moBAAO,MCQMA,EAAN,MAAMA,qBAAoBC,EAAAA,WAEtBC,gBACAC,aACGC,iBAEAC,gBACAC,cACAC,qBAAuBC,EAACC,GAAU,2CAAX,wBACvBC,QAAyBC,EAAAA,aAAa,oBAChD,WAAAC,GACIC,QACAC,KAAKC,SAAQ,EACjB,CAEA,WAAAC,CAAYC,GAER,OADAH,KAAKP,qBAAuBU,EACrBH,IACX,CAEA,cAAAI,CAAeD,GACX,OAAKE,UAAUC,QACfN,KAAKX,aAAec,EACbH,MAFuBA,KAAKX,YAGvC,CAEA,cAAAkB,CAAeJ,GAEX,OADAH,KAAKZ,gBAAkBe,EAChBH,IACX,CAEA,KAAAQ,CAAMC,EAASC,GACXX,MAAMS,MAAMC,EAASC,GACrB,MAAMC,EAAOC,EAAAA,OAAS,QACtBZ,KAAKT,gBA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AAKkT,SAASrS,OAAO,OACjCC,KAAK,QAAS,QAEvB,CAEA,MAAAE,CAAOP,EAASC,GACZX,MAAMiB,OAAOP,EAASC,GAEtBV,KAAKoT,UAAUjM,KAAKnH,KAAKqT,SAEzB,MAAMC,EAAQtT,KAAKmT,YAAYnM,UAAU,kBAAkBrH,KAAKK,KAAKuT,WACrED,EAAM9S,QAAQK,OAAO,OAChBC,KAAK,QAAS,iBACdyG,KAAK,SAA6BC,GAC/BA,EAAE/F,OAAOzB,KACb,GACCkH,MAAMoM,GACN/L,KAAK,SAAUC,GACZA,EAAEwE,QACN,GAEJsH,EAAM5R,OACD6F,KAAK,SAAUC,GACZA,EAAE/F,OAAO,KACb,GACC0E,SAELmN,EAAME,OACV,GA7CoC9T,EAAAuT,EAAA,YAAjC,IAAMQ,EAANR,EA+CPQ,EAASpN,UAAUC,QAAU,iBAQ7BmN,EAASpN,UAAUE,QAAQ,QAAS,GAAI,UACxCkN,EAASpN,UAAUE,QAAQ,UAAW,GAAI,+BZrIb,yFAFL,8BACG","x_google_ignoreList":[7,8]}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","sources":["../src/__package__.ts","../src/HTMLTooltip.ts","../src/SimpleTable.ts","../src/StyledTable.ts","../src/BreakdownTable.ts","../src/JSXWidget.ts","../src/reactD3.ts","../../../node_modules/preact/dist/preact.module.js","../../../node_modules/preact/jsx-runtime/dist/jsxRuntime.module.js","../src/VizComponent.tsx","../src/VizInstance.tsx","../src/StatsTable.ts","../src/TitleBar.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\nimport { scopedLogger, ScopedLogging } from \"@hpcc-js/util\";\n\ntype Direction = \"n\" | \"s\" | \"e\" | \"w\" | \"ne\" | \"nw\" | \"se\" | \"sw\";\ntype Position = { x: number, y: number };\ntype DirectionalBBox = { [key in Direction]: Position; };\n\ntype Rectangle = { top: number, left: number, width: number, height: number };\nexport class HTMLTooltip extends HTMLWidget {\n\n public _triggerElement;\n public _contentNode;\n protected _prevContentNode;\n\n protected _tooltipElement;\n protected _arrowElement;\n protected _tooltipHTMLCallback = (data?) => \"<b>_tooltipHTMLCallback is undefined</b>\";\n protected _logger: ScopedLogging = scopedLogger(\"html/HTMLTooltip\");\n constructor() {\n super();\n this.visible(false);\n }\n\n tooltipHTML(_: (data?) => string): this {\n this._tooltipHTMLCallback = _;\n return this;\n }\n\n tooltipContent(_): this {\n if (!arguments.length) return this._contentNode;\n this._contentNode = _;\n return this;\n }\n\n triggerElement(_): this {\n this._triggerElement = _;\n return this;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n const body = d3Select(\"body\");\n this._tooltipElement = body.append(\"div\")\n .attr(\"class\", \"tooltip-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n this._arrowElement = body.append(\"div\")\n .attr(\"class\", \"arrow-div\")\n .style(\"z-index\", \"2147483638\")\n .style(\"position\", \"fixed\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n if (this._contentNode !== this._prevContentNode) {\n const node = this._tooltipElement.node();\n [...node.querySelectorAll(\"*\")]\n .map(n => n.__data__)\n .filter(n => n)\n .forEach(w => {\n if (typeof w.target === \"function\") {\n w.target(null);\n }\n if (typeof w.exit === \"function\") {\n w.exit();\n }\n });\n node.innerHTML = \"\";\n node.appendChild(this._contentNode);\n this._prevContentNode = this._contentNode;\n }\n\n if (this._contentNode) {\n this.onShowContent(this._contentNode);\n } else {\n this._tooltipElement\n .html(() => {\n return this._tooltipHTMLCallback(this.data());\n });\n }\n if (this.fitContent()) {\n this._tooltipElement\n .style(\"width\", \"auto\")\n .style(\"height\", \"auto\")\n .style(\"padding\", \"0px\")\n .style(\"box-sizing\", \"content-box\")\n ;\n const rect = this._tooltipElement.node().getBoundingClientRect();\n this.tooltipWidth_default(rect.width);\n this.tooltipHeight_default(rect.height);\n }\n this._closing = false;\n this._tooltipElement\n .style(\"background-color\", this.tooltipColor())\n .style(\"color\", this.fontColor())\n .style(\"width\", this.tooltipWidth() + \"px\")\n .style(\"height\", this.tooltipHeight() + \"px\")\n .style(\"opacity\", 1)\n .style(\"padding\", this.padding() + \"px\")\n .style(\"pointer-events\", this.enablePointerEvents() ? \"all\" : \"none\")\n .style(\"box-sizing\", \"content-box\")\n ;\n this._arrowElement\n .style(\"opacity\", 1)\n .style(\"pointer-events\", \"none\")\n ;\n this.updateTooltipPosition();\n }\n\n onShowContent(node) {\n\n }\n\n protected updateTooltipPosition(): Position {\n const bbox = this.calcReferenceBBox();\n const direction = this.calcTooltipDirection(bbox);\n const box = bbox[direction];\n this._tooltipElement\n .style(\"top\", box.y + \"px\")\n .style(\"left\", box.x + \"px\")\n ;\n this.setArrowPosition(box, direction);\n return box;\n }\n\n protected calcTooltipDirection(bbox: DirectionalBBox): Direction {\n const directions: Direction[] = Object.keys(bbox) as Direction[];\n\n const defaultDirection = this.direction();\n directions.sort((a, b) => a === defaultDirection ? -1 : 1);\n const windowRect = {\n top: 0,\n left: 0,\n width: window.innerWidth,\n height: window.innerHeight\n };\n for (let i = 0; i < directions.length; i++) {\n const tooltipRect = {\n top: bbox[directions[i]].y,\n left: bbox[directions[i]].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n };\n if (this.rectFits(tooltipRect, windowRect)) {\n return directions[i];\n }\n }\n this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${defaultDirection}'`);\n this._logger.debug(windowRect);\n this._logger.debug({\n top: bbox[defaultDirection].y,\n left: bbox[defaultDirection].x,\n width: this.tooltipWidth(),\n height: this.tooltipHeight()\n });\n return defaultDirection;\n }\n\n protected rectFits(innerRect: Rectangle, outerRect: Rectangle): boolean {\n return (\n innerRect.top >= outerRect.top &&\n innerRect.left >= outerRect.left &&\n innerRect.width + innerRect.left <= outerRect.width + outerRect.left &&\n innerRect.height + innerRect.top <= outerRect.height + outerRect.top\n );\n }\n\n protected setArrowPosition(point: Position, direction: Direction) {\n let top;\n let left;\n let visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border\", `${this.arrowHeight()}px solid ${this.tooltipColor()}`)\n .style(\"border-top-color\", \"transparent\")\n .style(\"border-right-color\", \"transparent\")\n .style(\"border-bottom-color\", \"transparent\")\n .style(\"border-left-color\", \"transparent\")\n ;\n switch (direction) {\n case \"n\":\n top = point.y + this.tooltipHeight() + (this.padding() * 2);\n left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();\n visibleBorderStyle = \"border-top-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowHeight()}px`)\n .style(\"border-bottom-width\", \"0px\")\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"s\":\n top = point.y - this.arrowHeight();\n left = point.x + this.padding() + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2);\n visibleBorderStyle = \"border-bottom-color\";\n this._arrowElement\n .style(\"border-top-width\", \"0px\")\n .style(\"border-bottom-width\", `${this.arrowHeight()}px`)\n .style(\"border-left-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-right-width\", `${this.arrowWidth() / 2}px`)\n ;\n break;\n case \"e\":\n top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);\n left = point.x - this.arrowHeight();\n visibleBorderStyle = \"border-right-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", \"0px\")\n .style(\"border-right-width\", `${this.arrowHeight()}px`)\n ;\n break;\n case \"w\":\n top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();\n left = point.x + this.tooltipWidth() + (this.padding() * 2);\n visibleBorderStyle = \"border-left-color\";\n this._arrowElement\n .style(\"border-top-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-bottom-width\", `${this.arrowWidth() / 2}px`)\n .style(\"border-left-width\", `${this.arrowHeight()}px`)\n .style(\"border-right-width\", \"0px\")\n ;\n break;\n }\n if (typeof top !== \"undefined\" && typeof left !== \"undefined\") {\n this._arrowElement\n .style(\"top\", top + \"px\")\n .style(\"left\", left + \"px\")\n .style(visibleBorderStyle, this.tooltipColor())\n .style(\"opacity\", 1)\n ;\n } else {\n this._arrowElement\n .style(\"opacity\", 0)\n ;\n }\n return point;\n }\n\n protected getReferenceNode() {\n if (!this._triggerElement) {\n return this.element().node().parentNode.parentNode;\n }\n return this._triggerElement.node();\n }\n public _cursorLoc;\n protected calcReferenceBBox() {\n const node = this.getReferenceNode();\n let { top, left, width, height } = node.getBoundingClientRect();\n const wholeW = this.tooltipWidth();\n const wholeH = this.tooltipHeight();\n const halfW = wholeW / 2;\n const halfH = wholeH / 2;\n const arrowH = this.arrowHeight();\n const p = this.padding();\n const p2 = p * 2;\n\n if (this.followCursor() && this._cursorLoc) {\n\n left = this._cursorLoc[0];\n top = this._cursorLoc[1];\n width = 1;\n height = 1;\n }\n const bbox = {\n n: {\n x: left + (width / 2) - halfW - p,\n y: top - wholeH - arrowH - p2\n },\n e: {\n x: left + width + arrowH,\n y: top + (height / 2) - halfH - p\n },\n s: {\n x: left + (width / 2) - halfW - p,\n y: top + height + arrowH\n },\n w: {\n x: left - wholeW - arrowH - p2,\n y: top + (height / 2) - halfH - p\n },\n nw: {\n x: left - wholeW - p2,\n y: top - wholeH - p2\n },\n ne: {\n x: left + width,\n y: top - wholeH - p2\n },\n se: {\n x: left + width,\n y: top + height\n },\n sw: {\n x: left - wholeW - p2,\n y: top + height\n }\n };\n return bbox;\n }\n\n private _closing = false;\n mouseout() {\n this._closing = true;\n this._tooltipElement.on(\"mouseover\", () => {\n this._closing = false;\n });\n this._tooltipElement.on(\"mouseout\", () => {\n this.mouseout();\n });\n setTimeout(() => {\n if (this._closing) {\n this.visible(false);\n }\n }, this.closeDelay());\n }\n\n visible(): boolean;\n visible(_: boolean): this;\n visible(_?: boolean): boolean | this {\n if (!arguments.length) return super.visible();\n if (this._arrowElement) {\n this._arrowElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n this._tooltipElement.style(\"visibility\", _ ? \"visible\" : \"hidden\");\n }\n super.visible(_);\n return this;\n }\n\n exit(domNode, element) {\n if (this._arrowElement) {\n this._arrowElement.remove();\n this._tooltipElement.remove();\n }\n super.exit(domNode, element);\n }\n}\nHTMLTooltip.prototype._class += \" html_HTMLTooltip\";\n\nexport interface HTMLTooltip {\n padding(): number;\n padding(_: number): this;\n direction(): Direction;\n direction(_: Direction): this;\n arrowHeight(): number;\n arrowHeight(_: number): this;\n arrowWidth(): number;\n arrowWidth(_: number): this;\n fontColor(): string;\n fontColor(_: string): this;\n tooltipColor(): string;\n tooltipColor(_: string): this;\n tooltipWidth(): number;\n tooltipWidth(_: number): this;\n tooltipWidth_default(_: number);\n tooltipHeight(): number;\n tooltipHeight(_: number): this;\n tooltipHeight_default(_: number);\n followCursor(): boolean;\n followCursor(_: boolean): this;\n enablePointerEvents(): boolean;\n enablePointerEvents(_: boolean): this;\n closeDelay(): number;\n closeDelay(_: number): this;\n fitContent(): boolean;\n fitContent(_: boolean): this;\n\n}\n\nHTMLTooltip.prototype.publish(\"fitContent\", false, \"boolean\", \"If true, tooltip will grow to fit its html content\");\nHTMLTooltip.prototype.publish(\"followCursor\", false, \"boolean\", \"If true, tooltip will display relative to cursor location\");\nHTMLTooltip.prototype.publish(\"closeDelay\", 400, \"number\", \"Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)\");\nHTMLTooltip.prototype.publish(\"direction\", \"n\", \"set\", \"Direction in which to display the tooltip\", [\"n\", \"s\", \"e\", \"w\", \"ne\", \"nw\", \"se\", \"sw\"]);\nHTMLTooltip.prototype.publish(\"padding\", 8, \"number\", \"Padding (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowWidth\", 16, \"number\", \"Width (or height depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"arrowHeight\", 8, \"number\", \"Height (or width depending on direction) of the tooltip arrow (pixels)\");\nHTMLTooltip.prototype.publish(\"fontColor\", \"#FFF\", \"html-color\", \"The default font color for text in the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipColor\", \"#000000EE\", \"html-color\", \"Background color of the tooltip\");\nHTMLTooltip.prototype.publish(\"tooltipWidth\", 200, \"number\", \"Width of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"tooltipHeight\", 200, \"number\", \"Height of the tooltip (not including arrow) (pixels)\");\nHTMLTooltip.prototype.publish(\"enablePointerEvents\", false, \"boolean\", \"If true, the 'pointer-events: all' style will be used\");\n","import { HTMLWidget, select as d3Select } from \"@hpcc-js/common\";\n\nexport class SimpleTable extends HTMLWidget {\n protected _table;\n protected _tbody;\n protected _thead;\n protected _theadRow;\n constructor() {\n super();\n }\n\n protected transformData() {\n return this.data();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n\n this._table = element.append(\"table\");\n this._thead = this._table.append(\"thead\");\n this._theadRow = this._thead.append(\"tr\");\n this._tbody = this._table.append(\"tbody\");\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._table\n .style(\"width\", this.autoWidth() ? \"auto\" : \"100%\")\n ;\n const theadTrSelection = this._theadRow.selectAll(\"th\").data(this.columns());\n theadTrSelection.enter()\n .append(\"th\")\n .attr(\"class\", (n, i) => `th-${i}`)\n .merge(theadTrSelection)\n .text(_d => (_d).toString())\n ;\n theadTrSelection.exit().remove();\n const trSelection = this._tbody.selectAll(\"tr\").data(this.transformData());\n trSelection.enter()\n .append(\"tr\")\n .merge(trSelection)\n .each(function (this, d) {\n const tr = d3Select(this);\n const tdSelection = tr.selectAll(\"td\").data(d);\n tdSelection.enter()\n .append(\"td\")\n .attr(\"class\", (n, i) => `col-${i}`)\n .merge(tdSelection as any)\n .text(_d => (_d).toString())\n ;\n tdSelection.exit().remove();\n })\n ;\n trSelection.exit().remove();\n }\n}\nSimpleTable.prototype._class += \" html_SimpleTable\";\n\nexport interface SimpleTable {\n autoWidth(): boolean;\n autoWidth(_: boolean): this;\n}\nSimpleTable.prototype.publish(\"autoWidth\", false, \"boolean\", \"If true, table width will be set to 'auto'. If false, the width is set to '100%'\");\n","import { SimpleTable } from \"./SimpleTable.ts\";\n\nexport class StyledTable extends SimpleTable {\n constructor() {\n super();\n }\n\n protected applyStyleObject(selection, styleObject) {\n Object.keys(styleObject).forEach(styleName => {\n selection.style(styleName, styleObject[styleName]);\n });\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n element.selectAll(\"tr,th,td\")\n .attr(\"style\", \"\")\n .style(\"font-family\", this.fontFamily())\n .style(\"color\", this.fontColor())\n ;\n\n this.theadColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.select(`.th-${i}`), styleObj);\n });\n this.tbodyColumnStyles().forEach((styleObj, i) => {\n this.applyStyleObject(element.selectAll(`.col-${i}`), styleObj);\n });\n const evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;\n const lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;\n const tbodyRows = element.selectAll(\"tbody > tr\");\n if (evenRowStylesExist) {\n const tbodyEvenRows = tbodyRows.select(function (this: HTMLElement, d, i) { return i % 2 ? this : null; });\n this.applyStyleObject(tbodyEvenRows, this.evenRowStyles());\n }\n if (lastRowStylesExist) {\n const tbodyLastRow = tbodyRows.select(function (this: HTMLElement, d, i, arr) { return i === arr.length - 1 ? this : null; });\n this.applyStyleObject(tbodyLastRow, this.lastRowStyles());\n }\n }\n}\nStyledTable.prototype._class += \" html_StyledTable\";\n\nexport interface StyledTable {\n fontFamily(): string;\n fontFamily(_: string): this;\n fontColor(): string;\n fontColor(_: string): this;\n tbodyColumnStyles(): Array<{ [styleID: string]: any }>;\n tbodyColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n tbodyColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles(): Array<{ [styleID: string]: any }>;\n theadColumnStyles(_: Array<{ [styleID: string]: any }>): this;\n theadColumnStyles_default(_: Array<{ [styleID: string]: any }>): this;\n lastRowStyles(): { [styleID: string]: any };\n lastRowStyles(_: { [styleID: string]: any }): this;\n lastRowStyles_default(_: { [styleID: string]: any }): this;\n evenRowStyles(): { [styleID: string]: any };\n evenRowStyles(_: { [styleID: string]: any }): this;\n evenRowStyles_default(_: { [styleID: string]: any }): this;\n}\n\nStyledTable.prototype.publish(\"fontFamily\", \"Verdana\", \"string\", \"Base font-family used within the table\");\nStyledTable.prototype.publish(\"fontColor\", \"#333\", \"string\", \"Base font color used within the table\");\nStyledTable.prototype.publish(\"theadColumnStyles\", [], \"array\", 'Array of objects containing styles for the thead columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"tbodyColumnStyles\", [], \"array\", 'Array of objects containing styles for the tbody columns (ex: [{\"color\":\"red\"},{\"color\":\"blue\"}])');\nStyledTable.prototype.publish(\"lastRowStyles\", {}, \"object\", 'Object containing styles for the last row (ex: {\"color\":\"red\"})');\nStyledTable.prototype.publish(\"evenRowStyles\", {}, \"object\", 'Object containing styles for even rows (ex: {\"background-color\":\"#AAA\"})');\n","import { HTMLTooltip } from \"./HTMLTooltip.ts\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class BreakdownTable extends StyledTable {\n // protected _table;\n // protected _tbody;\n protected _tooltip: HTMLTooltip;\n constructor() {\n super();\n }\n\n protected transformData() {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n return this.breakdownData(rowCount);\n }\n\n protected breakdownData(limit: number): any[] {\n const len = this.data().length;\n const sum = this.data().reduce((acc, row) => acc + row[1], 0);\n const data = [];\n let percSum = 0;\n this.data().sort((a, b) => a[1] > b[1] ? -1 : 1);\n const hiddenRowCount = len - limit;\n const showOther = hiddenRowCount > 0;\n this.data()\n .filter((_, i) => showOther ? i < limit - 1 : true)\n .forEach(row => {\n const perc = Math.round((row[1] / sum) * 100);\n percSum += perc;\n data.push([row[0], perc + \"%\"]);\n });\n if (showOther) {\n const otherLabel = `${this.otherLabel()} (${len - limit + 1})`;\n const otherPercentage = \"~\" + (100 - percSum) + \"%\";\n data.push([otherLabel, otherPercentage]);\n }\n return data;\n }\n\n protected calculateRowCount(): number {\n const theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;\n const tbodyRowHeight = this.fontSize() + 5;\n const tbodyAvailableHeight = this.height() - theadRowHeight;\n const rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);\n return rowCount;\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._tooltip = new HTMLTooltip()\n .target(domNode)\n ;\n this._tooltip\n .tooltipHTML(data => {\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n const rowHeight = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).height)) ?? this.fontSize();\n const widestLabel = Math.max(...data.map(row => this.textSize(row[0], this.fontFamily(), this.fontSize()).width));\n const widestPerc = 30;\n const colCount = 2;\n const w = colCount * (widestLabel + widestPerc) + (this._tooltip.padding() * 2);\n const h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (this._tooltip.padding() * 2);\n this._tooltip.tooltipWidth(w);\n this._tooltip.tooltipHeight(h);\n const otherData = this.breakdownData(this.data().length).slice(rowCount - 1);\n return `<div style=\"\n width: 100%;\n height: 100%;\n font-size: ${this.fontSize()}px;\n \">${otherData.map(row =>\n `<div style=\"\n float:left;\n width:${Math.floor(99 / colCount)}%;\n \">${row[0]}: ${row[1]}</div>`\n ).join(\"\")\n }</div>`;\n })\n ;\n }\n\n update(domNode, element) {\n this.theadColumnStyles_default([\n {\n \"color\": this.thFirstColor(),\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"width\": \"1%\",\n \"font-size\": this.thFontSize() + \"px\",\n \"font-weight\": this.thFontWeight(),\n \"text-align\": this.percentageAlignment(),\n \"padding\": \"0px\"\n }\n ]);\n this.tbodyColumnStyles_default([\n {\n \"color\": this.topLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.topPercentageColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n this.lastRowStyles_default([\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherLabelBold() ? \"bold\" : \"normal\",\n \"text-align\": this.labelAlignment(),\n \"width\": \"auto\",\n \"padding\": \"0px\"\n },\n {\n \"color\": this.otherLabelColor(),\n \"font-size\": this.fontSize() + \"px\",\n \"font-weight\": this.otherPercentageBold() ? \"bold\" : \"normal\",\n \"text-align\": this.percentageAlignment(),\n \"width\": \"1%\",\n \"padding\": \"0px\"\n }\n ]);\n\n super.update(domNode, element);\n\n const rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();\n if (rowCount < this.data().length) {\n const lastRow = element.select(\"tbody > tr:last-child\");\n const context = this;\n lastRow\n .on(\"mouseout.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .visible(false)\n .render()\n ;\n })\n .on(\"mouseenter.tooltip\", d => {\n context._tooltip._triggerElement = lastRow;\n context._tooltip\n .direction(\"n\")\n .data(context.data())\n .visible(true)\n .render()\n ;\n })\n ;\n }\n }\n\n}\nBreakdownTable.prototype._class += \" html_BreakdownTable\";\n\nexport interface BreakdownTable {\n useCalculatedRowCount(): boolean;\n useCalculatedRowCount(_: boolean): this;\n rowCount(): number;\n rowCount(_: number): this;\n fontSize(): number;\n fontSize(_: number): this;\n thFirstColor(): string;\n thFirstColor(_: string): this;\n thLastColor(): string;\n thLastColor(_: string): this;\n thFontSize(): number;\n thFontSize(_: number): this;\n thFontWeight(): string;\n thFontWeight(_: string): this;\n labelAlignment(): \"left\" | \"center\" | \"right\";\n labelAlignment(_: \"left\" | \"center\" | \"right\"): this;\n percentageAlignment(): \"left\" | \"center\" | \"right\";\n percentageAlignment(_: \"left\" | \"center\" | \"right\"): this;\n topLabelColor(): string;\n topLabelColor(_: string): this;\n topPercentageColor(): string;\n topPercentageColor(_: string): this;\n topPercentageBold(): boolean;\n topPercentageBold(_: boolean): this;\n otherLabel(): string;\n otherLabel(_: string): this;\n otherLabelColor(): string;\n otherLabelColor(_: string): this;\n otherLabelBold(): boolean;\n otherLabelBold(_: boolean): this;\n otherPercentageColor(): string;\n otherPercentageColor(_: string): this;\n otherPercentageBold(): boolean;\n otherPercentageBold(_: boolean): this;\n}\n\nBreakdownTable.prototype.publish(\"useCalculatedRowCount\", true, \"boolean\", \"If true, rowCount will be calculated and its default will be overwritten\");\nBreakdownTable.prototype.publish(\"rowCount\", 5, \"number\", \"Number of total rows to display (including the 'other' row)\", undefined, { disable: w => w.useCalculatedRowCount() });\nBreakdownTable.prototype.publish(\"fontSize\", 14, \"number\", \"Font size (pixels)\");\nBreakdownTable.prototype.publish(\"labelAlignment\", \"left\", \"set\", \"Alignment of the label column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"percentageAlignment\", \"center\", \"set\", \"Alignment of the percentage column text\", [\"left\", \"center\", \"right\"]);\nBreakdownTable.prototype.publish(\"topLabelColor\", \"#333\", \"html-color\", \"Color of displayed 'top' labels\");\nBreakdownTable.prototype.publish(\"topPercentageColor\", \"#1A99D5\", \"html-color\", \"Color of displayed 'top' percentages\");\nBreakdownTable.prototype.publish(\"topPercentageBold\", true, \"html-color\", \"If true, the 'top' percentages will be bold\");\nBreakdownTable.prototype.publish(\"otherLabel\", \"Other\", \"string\", \"Label text for the 'other' row\");\nBreakdownTable.prototype.publish(\"otherLabelColor\", \"#AAA\", \"html-color\", \"Color of the 'other' label\");\nBreakdownTable.prototype.publish(\"otherLabelBold\", false, \"html-color\", \"If true, the 'other' label will be bold\");\nBreakdownTable.prototype.publish(\"otherPercentageColor\", \"#AAA\", \"html-color\", \"Color of the 'other' percentage\");\nBreakdownTable.prototype.publish(\"otherPercentageBold\", false, \"html-color\", \"If true, the 'other' percentage will be bold\");\nBreakdownTable.prototype.publish(\"thFontWeight\", \"bold\", \"string\", \"Font weight for th elements\");\nBreakdownTable.prototype.publish(\"thFontSize\", 26, \"number\", \"Font size for th elements\");\nBreakdownTable.prototype.publish(\"thFirstColor\", \"#333\", \"html-color\", \"Text color of the first th element\");\nBreakdownTable.prototype.publish(\"thLastColor\", \"#333\", \"html-color\", \"Text color of the last th element\");\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { React } from \"@hpcc-js/react\";\n\nexport class JSXWidget extends HTMLWidget {\n static Component = React.Component;\n static createElement = React.createElement;\n protected rootNode;\n\n jsxRender(jsx, domNode) {\n this.rootNode = React.render(jsx, domNode, this.rootNode);\n }\n}\nJSXWidget.prototype._class += \" html_JSXWidget\";\n","import { select as d3Select } from \"@hpcc-js/common\";\n\nexport type ReactFn = (attrs: { [key: string]: string }) => VNode;\n\nexport type IVNode = new (attrs: { [key: string]: string }, children: VNode[]) => VNode;\n\nexport class VNode {\n protected _attrs: { [key: string]: string };\n protected _children: VNode[];\n\n constructor(attrs: { [key: string]: string }, children: VNode[]) {\n this._attrs = attrs;\n this._children = children;\n }\n\n type(): string {\n return \"div\";\n }\n\n attrs(): { [key: string]: string } {\n return this._attrs;\n }\n\n attr(key) {\n return this._attrs[key];\n }\n\n children(): VNode[] {\n return this._children;\n }\n\n update(targetElement) {\n for (const key in this._attrs) {\n targetElement.attr(key, this._attrs[key]);\n }\n }\n\n render(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data([this]);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(this.type())\n .attr(\"reactd3\", 0)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n\n renderChildren(targetElement) {\n const thisElement = targetElement.selectAll(`${targetElement.node().tagName} > *`).data(this._children);\n thisElement.exit()\n .remove();\n return thisElement.enter().append(d => document.createElement(d.type()))\n .attr(\"reactd3\", (_d, i) => i)\n .merge(thisElement)\n .each(function (this: HTMLElement, d: VNode) {\n const element = d3Select(this);\n d.update(element);\n d.renderChildren(element);\n })\n ;\n }\n}\n\nclass ConstVNode extends VNode {\n protected _type: string;\n\n constructor(type: string, attrs: { [key: string]: string }, children: VNode[]) {\n super(attrs, children);\n this._type = type;\n }\n\n type(): string {\n return this._type;\n }\n}\n\nclass TextVNode extends VNode {\n protected _text: string;\n\n constructor(text: string) {\n super({}, []);\n this._text = text;\n }\n\n type(): string {\n return \"span\";\n }\n\n update(targetElement) {\n super.update(targetElement);\n targetElement.text(this._text);\n }\n}\n\nfunction isReactFn(_): _ is ReactFn {\n return typeof _ === \"function\";\n}\n\nfunction isIVNode(_: any): _ is IVNode {\n return _.prototype && _.prototype instanceof VNode;\n}\n\nexport class ReactD3 {\n // static createElementXXX(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n static createElement(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {\n if (isIVNode(type)) {\n return new (type as any)(attrs);\n } else if (isReactFn(type)) {\n return type(attrs);\n }\n return new ConstVNode(type, attrs, children.map(child => {\n if (typeof child === \"string\") {\n return new TextVNode(child);\n }\n return child;\n }));\n }\n\n static render(vdom: VNode, targetElement) {\n vdom.render(targetElement);\n }\n}\n","var n,l,u,t,i,r,o,e,f,c,a,s,h,p,v,y,d={},w=[],_=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,g=Array.isArray;function m(n,l){for(var u in l)n[u]=l[u];return n}function b(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function k(l,u,t){var i,r,o,e={};for(o in u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:e[o]=u[o];if(arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===e[o]&&(e[o]=l.defaultProps[o]);return x(l,e,i,r,null)}function x(n,t,i,r,o){var e={type:n,props:t,key:i,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=l.vnode&&l.vnode(e),e}function M(){return{current:null}}function S(n){return n.children}function C(n,l){this.props=n,this.context=l}function $(n,l){if(null==l)return n.__?$(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return\"function\"==typeof n.type?$(n):null}function I(n){if(n.__P&&n.__d){var u=n.__v,t=u.__e,i=[],r=[],o=m({},u);o.__v=u.__v+1,l.vnode&&l.vnode(o),q(n.__P,o,u,n.__n,n.__P.namespaceURI,32&u.__u?[t]:null,i,null==t?$(u):t,!!(32&u.__u),r),o.__v=u.__v,o.__.__k[o.__i]=o,D(i,o,r),u.__e=u.__=null,o.__e!=t&&P(o)}}function P(n){if(null!=(n=n.__)&&null!=n.__c)return n.__e=n.__c.base=null,n.__k.some(function(l){if(null!=l&&null!=l.__e)return n.__e=n.__c.base=l.__e}),P(n)}function A(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!H.__r++||r!=l.debounceRendering)&&((r=l.debounceRendering)||o)(H)}function H(){try{for(var n,l=1;i.length;)i.length>l&&i.sort(e),n=i.shift(),l=i.length,I(n)}finally{i.length=H.__r=0}}function L(n,l,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,_,g,m=t&&t.__k||w,b=l.length;for(f=T(u,l,m,f,b),s=0;s<b;s++)null!=(p=u.__k[s])&&(h=-1!=p.__i&&m[p.__i]||d,p.__i=s,_=q(n,p,h,i,r,o,e,f,c,a),v=p.__e,p.ref&&h.ref!=p.ref&&(h.ref&&J(h.ref,null,p),a.push(p.ref,p.__c||v,p)),null==y&&null!=v&&(y=v),(g=!!(4&p.__u))||h.__k===p.__k?(f=j(p,f,n,g),g&&h.__e&&(h.__e=null)):\"function\"==typeof p.type&&void 0!==_?f=_:v&&(f=v.nextSibling),p.__u&=-7);return u.__e=y,f}function T(n,l,u,t,i){var r,o,e,f,c,a=u.length,s=a,h=0;for(n.__k=new Array(i),r=0;r<i;r++)null!=(o=l[r])&&\"boolean\"!=typeof o&&\"function\"!=typeof o?(\"string\"==typeof o||\"number\"==typeof o||\"bigint\"==typeof o||o.constructor==String?o=n.__k[r]=x(null,o,null,null,null):g(o)?o=n.__k[r]=x(S,{children:o},null,null,null):void 0===o.constructor&&o.__b>0?o=n.__k[r]=x(o.type,o.props,o.key,o.ref?o.ref:null,o.__v):n.__k[r]=o,f=r+h,o.__=n,o.__b=n.__b+1,e=null,-1!=(c=o.__i=O(o,u,f,s))&&(s--,(e=u[c])&&(e.__u|=2)),null==e||null==e.__v?(-1==c&&(i>a?h--:i<a&&h++),\"function\"!=typeof o.type&&(o.__u|=4)):c!=f&&(c==f-1?h--:c==f+1?h++:(c>f?h--:h++,o.__u|=4))):n.__k[r]=null;if(s)for(r=0;r<a;r++)null!=(e=u[r])&&0==(2&e.__u)&&(e.__e==t&&(t=$(e)),K(e,e));return t}function j(n,l,u,t){var i,r;if(\"function\"==typeof n.type){for(i=n.__k,r=0;i&&r<i.length;r++)i[r]&&(i[r].__=n,l=j(i[r],l,u,t));return l}n.__e!=l&&(t&&(l&&n.type&&!l.parentNode&&(l=$(n)),u.insertBefore(n.__e,l||null)),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8==l.nodeType);return l}function F(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(g(n)?n.some(function(n){F(n,l)}):l.push(n)),l}function O(n,l,u,t){var i,r,o,e=n.key,f=n.type,c=l[u],a=null!=c&&0==(2&c.__u);if(null===c&&null==e||a&&e==c.key&&f==c.type)return u;if(t>(a?1:0))for(i=u-1,r=u+1;i>=0||r<l.length;)if(null!=(c=l[o=i>=0?i--:r++])&&0==(2&c.__u)&&e==c.key&&f==c.type)return o;return-1}function z(n,l,u){\"-\"==l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||_.test(l)?u:u+\"px\"}function N(n,l,u,t,i){var r,o;n:if(\"style\"==l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof t&&(n.style.cssText=t=\"\"),t)for(l in t)u&&l in u||z(n.style,l,\"\");if(u)for(l in u)t&&u[l]==t[l]||z(n.style,l,u[l])}else if(\"o\"==l[0]&&\"n\"==l[1])r=l!=(l=l.replace(s,\"$1\")),o=l.toLowerCase(),l=o in n||\"onFocusOut\"==l||\"onFocusIn\"==l?o.slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?t?u[a]=t[a]:(u[a]=h,n.addEventListener(l,r?v:p,r)):n.removeEventListener(l,r?v:p,r);else{if(\"http://www.w3.org/2000/svg\"==i)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!=l&&\"height\"!=l&&\"href\"!=l&&\"list\"!=l&&\"form\"!=l&&\"tabIndex\"!=l&&\"download\"!=l&&\"rowSpan\"!=l&&\"colSpan\"!=l&&\"role\"!=l&&\"popover\"!=l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&\"-\"!=l[4]?n.removeAttribute(l):n.setAttribute(l,\"popover\"==l&&1==u?\"\":u))}}function V(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u[c])u[c]=h++;else if(u[c]<t[a])return;return t(l.event?l.event(u):u)}}}function q(n,u,t,i,r,o,e,f,c,a){var s,h,p,v,y,d,_,k,x,M,$,I,P,A,H,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),o=[f=u.__e=t.__e]),(s=l.__b)&&s(u);n:if(\"function\"==typeof T)try{if(k=u.props,x=T.prototype&&T.prototype.render,M=(s=T.contextType)&&i[s.__c],$=s?M?M.props.value:s.__:i,t.__c?_=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(k,$):(u.__c=h=new C(k,$),h.constructor=T,h.render=Q),M&&M.sub(h),h.state||(h.state={}),h.__n=i,p=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=m({},h.__s)),m(h.__s,T.getDerivedStateFromProps(k,h.__s))),v=h.props,y=h.state,h.__v=u,p)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&k!==v&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(k,$),u.__v==t.__v||!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(k,h.__s,$)){u.__v!=t.__v&&(h.props=k,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),w.push.apply(h.__h,h._sb),h._sb=[],h.__h.length&&e.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(k,h.__s,$),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(v,y,d)})}if(h.context=$,h.props=k,h.__P=n,h.__e=!1,I=l.__r,P=0,x)h.state=h.__s,h.__d=!1,I&&I(u),s=h.render(h.props,h.state,h.context),w.push.apply(h.__h,h._sb),h._sb=[];else do{h.__d=!1,I&&I(u),s=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++P<25);h.state=h.__s,null!=h.getChildContext&&(i=m(m({},i),h.getChildContext())),x&&!p&&null!=h.getSnapshotBeforeUpdate&&(d=h.getSnapshotBeforeUpdate(v,y)),A=null!=s&&s.type===S&&null==s.key?E(s.props.children):s,f=L(n,g(A)?A:[A],u,t,i,r,o,e,f,c,a),h.base=u.__e,u.__u&=-161,h.__h.length&&e.push(h),_&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=o)if(n.then){for(u.__u|=c?160:128;f&&8==f.nodeType&&f.nextSibling;)f=f.nextSibling;o[o.indexOf(f)]=null,u.__e=f}else{for(H=o.length;H--;)b(o[H]);B(u)}else u.__e=t.__e,u.__k=t.__k,n.then||B(u);l.__e(n,u,t)}else null==o&&u.__v==t.__v?(u.__k=t.__k,u.__e=t.__e):f=u.__e=G(t.__e,u,t,i,r,o,e,c,a);return(s=l.diffed)&&s(u),128&u.__u?void 0:f}function B(n){n&&(n.__c&&(n.__c.__e=!0),n.__k&&n.__k.some(B))}function D(n,u,t){for(var i=0;i<t.length;i++)J(t[i],t[++i],t[++i]);l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function E(n){return\"object\"!=typeof n||null==n||n.__b>0?n:g(n)?n.map(E):void 0!==n.constructor?null:m({},n)}function G(u,t,i,r,o,e,f,c,a){var s,h,p,v,y,w,_,m=i.props||d,k=t.props,x=t.type;if(\"svg\"==x?o=\"http://www.w3.org/2000/svg\":\"math\"==x?o=\"http://www.w3.org/1998/Math/MathML\":o||(o=\"http://www.w3.org/1999/xhtml\"),null!=e)for(s=0;s<e.length;s++)if((y=e[s])&&\"setAttribute\"in y==!!x&&(x?y.localName==x:3==y.nodeType)){u=y,e[s]=null;break}if(null==u){if(null==x)return document.createTextNode(k);u=document.createElementNS(o,x,k.is&&k),c&&(l.__m&&l.__m(t,e),c=!1),e=null}if(null==x)m===k||c&&u.data==k||(u.data=k);else{if(e=\"textarea\"==x&&null!=k.defaultValue?null:e&&n.call(u.childNodes),!c&&null!=e)for(m={},s=0;s<u.attributes.length;s++)m[(y=u.attributes[s]).name]=y.value;for(s in m)y=m[s],\"dangerouslySetInnerHTML\"==s?p=y:\"children\"==s||s in k||\"value\"==s&&\"defaultValue\"in k||\"checked\"==s&&\"defaultChecked\"in k||N(u,s,null,y,o);for(s in k)y=k[s],\"children\"==s?v=y:\"dangerouslySetInnerHTML\"==s?h=y:\"value\"==s?w=y:\"checked\"==s?_=y:c&&\"function\"!=typeof y||m[s]===y||N(u,s,y,m[s],o);if(h)c||p&&(h.__html==p.__html||h.__html==u.innerHTML)||(u.innerHTML=h.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),L(\"template\"==t.type?u.content:u,g(v)?v:[v],t,i,r,\"foreignObject\"==x?\"http://www.w3.org/1999/xhtml\":o,e,f,e?e[0]:i.__k&&$(i,0),c,a),null!=e)for(s=e.length;s--;)b(e[s]);c&&\"textarea\"!=x||(s=\"value\",\"progress\"==x&&null==w?u.removeAttribute(\"value\"):null!=w&&(w!==u[s]||\"progress\"==x&&!w||\"option\"==x&&w!=m[s])&&N(u,s,w,m[s],o),s=\"checked\",null!=_&&_!=u[s]&&N(u,s,_,m[s],o))}return u}function J(n,u,t){try{if(\"function\"==typeof n){var i=\"function\"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u))}else n.current=u}catch(n){l.__e(n,t)}}function K(n,u,t){var i,r;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!=n.__e||J(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(n){l.__e(n,u)}i.base=i.__P=null}if(i=n.__k)for(r=0;r<i.length;r++)i[r]&&K(i[r],u,t||\"function\"!=typeof n.type);t||b(n.__e),n.__c=n.__=n.__e=void 0}function Q(n,l,u){return this.constructor(n,u)}function R(u,t,i){var r,o,e,f;t==document&&(t=document.documentElement),l.__&&l.__(u,t),o=(r=\"function\"==typeof i)?null:i&&i.__k||t.__k,e=[],f=[],q(t,u=(!r&&i||t).__k=k(S,null,[u]),o||d,d,t.namespaceURI,!r&&i?[i]:o?null:t.firstChild?n.call(t.childNodes):null,e,!r&&i?i:o?o.__e:t.firstChild,r,f),D(e,u,f)}function U(n,l){R(n,l,U)}function W(l,u,t){var i,r,o,e,f=m({},l.props);for(o in l.type&&l.type.defaultProps&&(e=l.type.defaultProps),u)\"key\"==o?i=u[o]:\"ref\"==o?r=u[o]:f[o]=void 0===u[o]&&null!=e?e[o]:u[o];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),x(l.type,f,i||l.key,r||l.ref,null)}function X(n){function l(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l.__c]=this,this.getChildContext=function(){return t},this.componentWillUnmount=function(){u=null},this.shouldComponentUpdate=function(n){this.props.value!=n.value&&u.forEach(function(n){n.__e=!0,A(n)})},this.sub=function(n){u.add(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u&&u.delete(n),l&&l.call(n)}}),n.children}return l.__c=\"__cC\"+y++,l.__=n,l.Provider=l.__l=(l.Consumer=function(n,l){return n.children(l)}).contextType=l,l}n=w.slice,l={__e:function(n,l,u,t){for(var i,r,o;l=l.__;)if((i=l.__c)&&!i.__)try{if((r=i.constructor)&&null!=r.getDerivedStateFromError&&(i.setState(r.getDerivedStateFromError(n)),o=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),o=i.__d),o)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&void 0===n.constructor},C.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=m({},this.state),\"function\"==typeof n&&(n=n(m({},u),this.props)),n&&m(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),A(this))},C.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),A(this))},C.prototype.render=S,i=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,e=function(n,l){return n.__v.__b-l.__v.__b},H.__r=0,f=Math.random().toString(8),c=\"__d\"+f,a=\"__a\"+f,s=/(PointerCapture)$|Capture$/i,h=0,p=V(!1),v=V(!0),y=0;export{C as Component,S as Fragment,W as cloneElement,X as createContext,k as createElement,M as createRef,k as h,U as hydrate,t as isValidElement,l as options,R as render,F as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as r,Fragment as e}from\"preact\";export{Fragment}from\"preact\";var t=/[\"&<]/;function n(r){if(0===r.length||!1===t.test(r))return r;for(var e=0,n=0,o=\"\",f=\"\";n<r.length;n++){switch(r.charCodeAt(n)){case 34:f=\""\";break;case 38:f=\"&\";break;case 60:f=\"<\";break;default:continue}n!==e&&(o+=r.slice(e,n)),o+=f,e=n+1}return n!==e&&(o+=r.slice(e,n)),o}var o=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=0,i=Array.isArray;function u(e,t,n,o,i,u){t||(t={});var a,c,p=t;if(\"ref\"in p)for(c in p={},t)\"ref\"==c?a=t[c]:p[c]=t[c];var l={type:e,props:p,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u};if(\"function\"==typeof e&&(a=e.defaultProps))for(c in a)void 0===p[c]&&(p[c]=a[c]);return r.vnode&&r.vnode(l),l}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},p=/[A-Z]/g;function l(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(t=function(r){return null!==r&&\"object\"==typeof r&&\"function\"==typeof r.valueOf?r.valueOf():r}(t),\"ref\"===e||\"key\"===e)return\"\";if(\"style\"===e&&\"object\"==typeof t){var i=\"\";for(var u in t){var a=t[u];if(null!=a&&\"\"!==a){var l=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(p,\"-$&\").toLowerCase()),s=\";\";\"number\"!=typeof a||l.startsWith(\"--\")||o.test(l)||(s=\"px;\"),i=i+l+\":\"+a+s}}return e+'=\"'+n(i)+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(\"\"+t)+'\"'}function s(r){if(null==r||\"boolean\"==typeof r||\"function\"==typeof r)return null;if(\"object\"==typeof r){if(void 0===r.constructor)return r;if(i(r)){for(var e=0;e<r.length;e++)r[e]=s(r[e]);return r}}return n(\"\"+r)}export{u as jsx,l as jsxAttr,u as jsxDEV,s as jsxEscape,a as jsxTemplate,u as jsxs};\n//# sourceMappingURL=jsxRuntime.module.js.map\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizComponent extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = new (this as any).props.type()\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { JSXWidget } from \"./JSXWidget.ts\";\n\nexport class VizInstance extends JSXWidget.Component<any, any> {\n widget;\n\n refreshProps() {\n for (const key in (this as any).props) {\n if (this.widget[key] && typeof this.widget[key] === \"function\") {\n this.widget[key]((this as any).props[key]);\n }\n }\n }\n\n componentDidMount() {\n this.widget = (this as any).props.instance\n .target((this as any).base)\n ;\n this.refreshProps();\n this.widget\n .render()\n ;\n }\n\n componentWillUnmount() {\n this.widget\n .target(null)\n .render()\n ;\n }\n\n render() {\n return <div style={(this as any).props.style} />;\n }\n\n componentDidUpdate() {\n this.refreshProps();\n this.widget.render();\n }\n}\n","import { format as d3Format } from \"d3-format\";\nimport { StyledTable } from \"./StyledTable.ts\";\n\nexport class StatsTable extends StyledTable {\n\n protected transformData() {\n const totalRow = [[\"Total\", 0, 0]];\n const data = this.data();\n data.forEach(row => {\n totalRow[0][1] += row[1];\n totalRow[0][2] += row[2];\n });\n return data\n .concat(totalRow)\n .map(row => {\n return [\n row[0],\n this.secondColumnFormat_exists() ? d3Format(this.secondColumnFormat())(row[1]) : row[1],\n this.thirdColumnFormat_exists() ? d3Format(this.thirdColumnFormat())(row[2]) : row[2]\n ];\n })\n ;\n }\n\n update(domNode, element) {\n this.tbodyColumnStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\"\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\"\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\"\n }\n ]);\n this.evenRowStyles_default([\n {\n \"font-weight\": \"bold\",\n \"width\": this.firstColumnWidth(),\n \"text-align\": \"left\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.secondColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n },\n {\n \"width\": this.thirdColumnWidth(),\n \"text-align\": \"right\",\n \"font-color\": this.evenRowFontColor(),\n \"background-color\": this.evenRowBackgroundColor()\n }\n ]);\n this.lastRowStyles_default({\n \"font-weight\": \"bold\"\n });\n super.update(domNode, element);\n }\n}\nStatsTable.prototype._class += \" html_StatsTable\";\n\nexport interface StatsTable {\n labelColor(): string;\n labelColor(_: string): this;\n primaryValueColor(): string;\n primaryValueColor(_: string): this;\n secondaryValueColor(): string;\n secondaryValueColor(_: string): this;\n evenRowFontColor(): string;\n evenRowFontColor(_: string): this;\n evenRowBackgroundColor(): string;\n evenRowBackgroundColor(_: string): this;\n firstColumnWidth(): string;\n firstColumnWidth(_: string): this;\n secondColumnWidth(): string;\n secondColumnWidth(_: string): this;\n thirdColumnWidth(): string;\n thirdColumnWidth(_: string): this;\n secondColumnFormat(): string;\n secondColumnFormat(_: string): this;\n secondColumnFormat_exists(): boolean;\n thirdColumnFormat(): string;\n thirdColumnFormat(_: string): this;\n thirdColumnFormat_exists(): boolean;\n}\nStatsTable.prototype.publish(\"labelColor\", \"#333\", \"html-color\", \"Color of the text in the first column\");\nStatsTable.prototype.publish(\"primaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the second column\");\nStatsTable.prototype.publish(\"secondaryValueColor\", \"#333\", \"html-color\", \"Color of the text in the third column\");\nStatsTable.prototype.publish(\"evenRowBackgroundColor\", \"#333\", \"html-color\", \"Background color of the even rows\");\nStatsTable.prototype.publish(\"evenRowFontColor\", \"#333\", \"html-color\", \"Font color of the even rows\");\nStatsTable.prototype.publish(\"firstColumnWidth\", \"auto\", \"string\", \"CSS style applied as the 'width' for the first column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the second column (ex: 40px)\");\nStatsTable.prototype.publish(\"thirdColumnWidth\", \"1%\", \"string\", \"CSS style applied as the 'width' for the third column (ex: 40px)\");\nStatsTable.prototype.publish(\"secondColumnFormat\", \"$,.0f\", \"string\", \"d3-format specifier applied to the second column's values\", undefined, { optional: true });\nStatsTable.prototype.publish(\"thirdColumnFormat\", null, \"string\", \"d3-format specifier applied to the third column's values\", undefined, { optional: true });\n","import { HTMLWidget } from \"@hpcc-js/common\";\nimport { JSXWidget } from \"./JSXWidget.ts\";\n\nimport \"../src/TitleBar.css\";\n\nexport interface IClickHandler {\n titleBarClick(src: Item, d, idx: number, groups): void;\n}\n\nexport class Item extends HTMLWidget {\n protected _owner: IClickHandler;\n\n constructor(owner: IClickHandler) {\n super();\n this._owner = owner;\n this._tag = \"a\";\n }\n}\nItem.prototype._class += \" html_Item\";\n\nexport class Button extends Item {\n private _icon: string;\n\n constructor(owner: IClickHandler, icon: string) {\n super(owner);\n this._icon = icon;\n }\n\n icon() {\n return this._icon;\n }\n\n enter(domNode: HTMLElement, element) {\n super.enter(domNode, element);\n element\n .attr(\"href\", \"#\")\n .on(\"click\", (d, idx, groups) => this._owner.titleBarClick(this, d, idx, groups))\n .append(\"i\")\n .attr(\"class\", `fa ${this._icon} fa-lg fa-fw`)\n ;\n }\n}\nButton.prototype._class += \" html_Button\";\n\nexport class ToggleButton extends Button {\n\n enter(domNode: HTMLElement, element) {\n element.on(\"click.sel\", (d, idx, groups) => {\n this.selected(!this.selected());\n this.render();\n });\n super.enter(domNode, element);\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n this._element.classed(\"selected\", this.selected());\n }\n}\nToggleButton.prototype._class += \" html_ToggleButton\";\nexport interface ToggleButton {\n selected(): boolean;\n selected(_: boolean): this;\n}\nToggleButton.prototype.publish(\"selected\", false, \"boolean\");\n\nexport class Spacer extends Item {\n\n enter(domNode, element) {\n super.enter(domNode, element);\n element\n .attr(\"class\", \"spacer\")\n .attr(\"href\", \"#\")\n .append(\"i\")\n ;\n }\n}\nSpacer.prototype._class += \" html_Spacer\";\n\nexport class TitleBar extends JSXWidget {\n protected _divMain;\n protected _divIconBar;\n protected _divTitle;\n\n constructor() {\n super();\n }\n\n enter(domNode, element) {\n super.enter(domNode, element);\n this._divMain = element.append(\"div\")\n .attr(\"class\", \"main\")\n ;\n this._divIconBar = this._divMain.append(\"div\")\n .attr(\"class\", \"icon-bar\")\n ;\n this._divTitle = this._divMain.append(\"div\")\n .attr(\"class\", \"title\")\n ;\n }\n\n update(domNode, element) {\n super.update(domNode, element);\n\n this._divTitle.text(this.title());\n\n const icons = this._divIconBar.selectAll(\".icon-bar-item\").data(this.buttons());\n icons.enter().append(\"div\")\n .attr(\"class\", \"icon-bar-item\")\n .each(function (this: HTMLElement, d: Item) {\n d.target(this);\n })\n .merge(icons)\n .each(function (d: Item) {\n d.render();\n })\n ;\n icons.exit()\n .each(function (d: Item) {\n d.target(null);\n })\n .remove()\n ;\n icons.order();\n }\n}\nTitleBar.prototype._class += \" html_TitleBar\";\n\nexport interface TitleBar {\n title(): string;\n title(_: string): this;\n buttons(): Item[];\n buttons(items: Item[]): this;\n}\nTitleBar.prototype.publish(\"title\", \"\", \"string\");\nTitleBar.prototype.publish(\"buttons\", [], \"widgetArray\");\n"],"names":["_HTMLTooltip","HTMLWidget","_triggerElement","_contentNode","_prevContentNode","_tooltipElement","_arrowElement","_tooltipHTMLCallback","__name","data","_logger","scopedLogger","constructor","super","this","visible","tooltipHTML","_","tooltipContent","arguments","length","triggerElement","enter","domNode","element","body","d3Select","append","attr","style","update","node","querySelectorAll","map","n","__data__","filter","forEach","w","target","exit","innerHTML","appendChild","onShowContent","html","fitContent","rect","getBoundingClientRect","tooltipWidth_default","width","tooltipHeight_default","height","_closing","tooltipColor","fontColor","tooltipWidth","tooltipHeight","padding","enablePointerEvents","updateTooltipPosition","bbox","calcReferenceBBox","direction","calcTooltipDirection","box","y","x","setArrowPosition","directions","Object","keys","defaultDirection","sort","a","b","windowRect","top","left","window","innerWidth","innerHeight","i","tooltipRect","rectFits","warning","debug","innerRect","outerRect","point","visibleBorderStyle","arrowHeight","arrowWidth","getReferenceNode","parentNode","_cursorLoc","wholeW","wholeH","halfW","halfH","arrowH","p","p2","followCursor","e","s","nw","ne","se","sw","mouseout","on","setTimeout","closeDelay","remove","HTMLTooltip","prototype","_class","publish","_SimpleTable","_table","_tbody","_thead","_theadRow","transformData","autoWidth","theadTrSelection","selectAll","columns","merge","text","_d","toString","trSelection","each","d","tdSelection","SimpleTable","_StyledTable","applyStyleObject","selection","styleObject","styleName","fontFamily","theadColumnStyles","styleObj","select","tbodyColumnStyles","evenRowStylesExist","evenRowStyles","lastRowStylesExist","lastRowStyles","tbodyRows","tbodyEvenRows","tbodyLastRow","arr","StyledTable","_BreakdownTable","_tooltip","rowCount","useCalculatedRowCount","calculateRowCount","breakdownData","limit","len","sum","reduce","acc","row","percSum","showOther","perc","Math","round","push","otherLabel","otherPercentage","theadRowHeight","thFontSize","tbodyRowHeight","fontSize","tbodyAvailableHeight","floor","rowHeight","max","textSize","widestLabel","h","ceil","otherData","slice","join","theadColumnStyles_default","color","thFirstColor","thFontWeight","labelAlignment","percentageAlignment","tbodyColumnStyles_default","topLabelColor","topPercentageColor","lastRowStyles_default","otherLabelColor","otherLabelBold","otherPercentageBold","lastRow","context","render","BreakdownTable","disable","_JSXWidget","rootNode","jsxRender","jsx","React","__publicField","Component","createElement","JSXWidget","_VNode","_attrs","_children","attrs","children","type","key","targetElement","thisElement","tagName","renderChildren","document","VNode","_ConstVNode","_type","ConstVNode","_TextVNode","_text","TextVNode","isReactFn","isIVNode","_ReactD3","child","vdom","ReactD3","l","__e","u","t","r","o","__","__c","getDerivedStateFromError","setState","__d","componentDidCatch","__E","Promise","then","bind","resolve","random","f","c","props","ref","__k","__b","__v","__i","__u","__source","__self","vnode","_VizComponent","widget","refreshProps","componentDidMount","base","componentWillUnmount","componentDidUpdate","VizComponent","_VizInstance","instance","VizInstance","_StatsTable","totalRow","concat","secondColumnFormat_exists","d3Format","secondColumnFormat","thirdColumnFormat_exists","thirdColumnFormat","firstColumnWidth","secondColumnWidth","thirdColumnWidth","evenRowStyles_default","evenRowFontColor","evenRowBackgroundColor","StatsTable","optional","_Item","_owner","owner","_tag","Item","_Button","_icon","icon","idx","groups","titleBarClick","Button","_ToggleButton","selected","_element","classed","ToggleButton","_Spacer","Spacer","_TitleBar","_divMain","_divIconBar","_divTitle","title","icons","buttons","order","TitleBar"],"mappings":"moBAAO,MCQMA,EAAN,MAAMA,qBAAoBC,EAAAA,WAEtBC,gBACAC,aACGC,iBAEAC,gBACAC,cACAC,qBAAuBC,EAACC,GAAU,2CAAX,wBACvBC,QAAyBC,EAAAA,aAAa,oBAChD,WAAAC,GACIC,QACAC,KAAKC,SAAQ,EACjB,CAEA,WAAAC,CAAYC,GAER,OADAH,KAAKP,qBAAuBU,EACrBH,IACX,CAEA,cAAAI,CAAeD,GACX,OAAKE,UAAUC,QACfN,KAAKX,aAAec,EACbH,MAFuBA,KAAKX,YAGvC,CAEA,cAAAkB,CAAeJ,GAEX,O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AAKkT,SAAWxS,EAAQG,OAAO,OAC1BC,KAAK,QAAS,QAEnBd,KAAKmT,YAAcnT,KAAKkT,SAASrS,OAAO,OACnCC,KAAK,QAAS,YAEnBd,KAAKoT,UAAYpT,KAAKkT,SAASrS,OAAO,OACjCC,KAAK,QAAS,QAEvB,CAEA,MAAAE,CAAOP,EAASC,GACZX,MAAMiB,OAAOP,EAASC,GAEtBV,KAAKoT,UAAUjM,KAAKnH,KAAKqT,SAEzB,MAAMC,EAAQtT,KAAKmT,YAAYnM,UAAU,kBAAkBrH,KAAKK,KAAKuT,WACrED,EAAM9S,QAAQK,OAAO,OAChBC,KAAK,QAAS,iBACdyG,KAAK,SAA6BC,GAC/BA,EAAE/F,OAAOzB,KACb,GACCkH,MAAMoM,GACN/L,KAAK,SAAUC,GACZA,EAAEwE,QACN,GAEJsH,EAAM5R,OACD6F,KAAK,SAAUC,GACZA,EAAE/F,OAAO,KACb,GACC0E,SAELmN,EAAME,OACV,GA7CoC9T,EAAAuT,EAAA,YAAjC,IAAMQ,EAANR,EA+CPQ,EAASpN,UAAUC,QAAU,iBAQ7BmN,EAASpN,UAAUE,QAAQ,QAAS,GAAI,UACxCkN,EAASpN,UAAUE,QAAQ,UAAW,GAAI,+BZrIb,yFAFL,8BACG","x_google_ignoreList":[7,8]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/html",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.19",
|
|
4
4
|
"description": "hpcc-js - Viz HTML",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"update-major": "npx --yes npm-check-updates -u"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hpcc-js/common": "^3.7.
|
|
43
|
-
"@hpcc-js/react": "^3.4.
|
|
44
|
-
"@hpcc-js/util": "^3.5.
|
|
42
|
+
"@hpcc-js/common": "^3.7.9",
|
|
43
|
+
"@hpcc-js/react": "^3.4.19",
|
|
44
|
+
"@hpcc-js/util": "^3.5.8"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
|
-
"@hpcc-js/esbuild-plugins": "^1.8.
|
|
47
|
+
"@hpcc-js/esbuild-plugins": "^1.8.10",
|
|
48
48
|
"d3-format": "^1",
|
|
49
49
|
"d3-selection": "^1"
|
|
50
50
|
},
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "83d7d72530df75074464a3b746abfa800c62b555"
|
|
63
63
|
}
|