@hpcc-js/html 3.1.1 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +653 -88
- package/dist/index.js.map +1 -7
- package/dist/index.umd.cjs +10 -0
- package/dist/index.umd.cjs.map +1 -0
- package/package.json +13 -11
- package/src/JSXWidget.ts +4 -4
- package/src/VizComponent.tsx +0 -1
- package/src/VizInstance.tsx +0 -1
- package/types/JSXWidget.d.ts +3 -3
- package/types/VizComponent.d.ts +1 -1
- package/types/VizInstance.d.ts +1 -1
- package/types/__package__.d.ts +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){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)}})();
|
|
2
|
+
(function(global,factory){typeof exports=="object"&&typeof module<"u"?factory(exports,require("@hpcc-js/common"),require("@hpcc-js/util"),require("@hpcc-js/react")):typeof define=="function"&&define.amd?define(["exports","@hpcc-js/common","@hpcc-js/util","@hpcc-js/react"],factory):(global=typeof globalThis<"u"?globalThis:global||self,factory(global["@hpcc-js/html"]={},global["@hpcc-js/common"],global["@hpcc-js/util"],global["@hpcc-js/react"]))})(this,function(exports2,common,util,react){"use strict";var __defProp=Object.defineProperty;var __defNormalProp=(obj,key,value)=>key in obj?__defProp(obj,key,{enumerable:!0,configurable:!0,writable:!0,value}):obj[key]=value;var __publicField=(obj,key,value)=>__defNormalProp(obj,typeof key!="symbol"?key+"":key,value);const PKG_NAME="@hpcc-js/html",PKG_VERSION="3.1.1",BUILD_VERSION="3.2.1";class HTMLTooltip extends common.HTMLWidget{constructor(){super();__publicField(this,"_triggerElement");__publicField(this,"_contentNode");__publicField(this,"_prevContentNode");__publicField(this,"_tooltipElement");__publicField(this,"_arrowElement");__publicField(this,"_tooltipHTMLCallback",data=>"<b>_tooltipHTMLCallback is undefined</b>");__publicField(this,"_logger",util.scopedLogger("html/HTMLTooltip"));__publicField(this,"_cursorLoc");__publicField(this,"_closing",!1);this.visible(!1)}tooltipHTML(_){return this._tooltipHTMLCallback=_,this}tooltipContent(_){return arguments.length?(this._contentNode=_,this):this._contentNode}triggerElement(_){return this._triggerElement=_,this}enter(domNode,element){super.enter(domNode,element);const body=common.select("body");this._tooltipElement=body.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=body.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(domNode,element){if(super.update(domNode,element),this._contentNode!==this._prevContentNode){const node=this._tooltipElement.node();[...node.querySelectorAll("*")].map(n=>n.__data__).filter(n=>n).forEach(w=>{typeof w.target=="function"&&w.target(null),typeof w.exit=="function"&&w.exit()}),node.innerHTML="",node.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 rect=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(rect.width),this.tooltipHeight_default(rect.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(node){}updateTooltipPosition(){const bbox=this.calcReferenceBBox(),direction=this.calcTooltipDirection(bbox),box=bbox[direction];return this._tooltipElement.style("top",box.y+"px").style("left",box.x+"px"),this.setArrowPosition(box,direction),box}calcTooltipDirection(bbox){const directions=Object.keys(bbox),defaultDirection=this.direction();directions.sort((a,b)=>a===defaultDirection?-1:1);const windowRect={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let i=0;i<directions.length;i++){const tooltipRect={top:bbox[directions[i]].y,left:bbox[directions[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(tooltipRect,windowRect))return directions[i]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${defaultDirection}'`),this._logger.debug(windowRect),this._logger.debug({top:bbox[defaultDirection].y,left:bbox[defaultDirection].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),defaultDirection}rectFits(innerRect,outerRect){return innerRect.top>=outerRect.top&&innerRect.left>=outerRect.left&&innerRect.width+innerRect.left<=outerRect.width+outerRect.left&&innerRect.height+innerRect.top<=outerRect.height+outerRect.top}setArrowPosition(point,direction){let top,left,visibleBorderStyle="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"),direction){case"n":top=point.y+this.tooltipHeight()+this.padding()*2,left=point.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),visibleBorderStyle="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":top=point.y-this.arrowHeight(),left=point.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,visibleBorderStyle="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":top=point.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,left=point.x-this.arrowHeight(),visibleBorderStyle="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":top=point.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),left=point.x+this.tooltipWidth()+this.padding()*2,visibleBorderStyle="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");break}return typeof top<"u"&&typeof left<"u"?this._arrowElement.style("top",top+"px").style("left",left+"px").style(visibleBorderStyle,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),point}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}calcReferenceBBox(){const node=this.getReferenceNode();let{top,left,width,height}=node.getBoundingClientRect();const wholeW=this.tooltipWidth(),wholeH=this.tooltipHeight(),halfW=wholeW/2,halfH=wholeH/2,arrowH=this.arrowHeight(),p=this.padding(),p2=p*2;return this.followCursor()&&this._cursorLoc&&(left=this._cursorLoc[0],top=this._cursorLoc[1],width=1,height=1),{n:{x:left+width/2-halfW-p,y:top-wholeH-arrowH-p2},e:{x:left+width+arrowH,y:top+height/2-halfH-p},s:{x:left+width/2-halfW-p,y:top+height+arrowH},w:{x:left-wholeW-arrowH-p2,y:top+height/2-halfH-p},nw:{x:left-wholeW-p2,y:top-wholeH-p2},ne:{x:left+width,y:top-wholeH-p2},se:{x:left+width,y:top+height},sw:{x:left-wholeW-p2,y:top+height}}}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(_){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",_?"visible":"hidden"),this._tooltipElement.style("visibility",_?"visible":"hidden")),super.visible(_),this):super.visible()}exit(domNode,element){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(domNode,element)}}HTMLTooltip.prototype._class+=" html_HTMLTooltip",HTMLTooltip.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content"),HTMLTooltip.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location"),HTMLTooltip.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)"),HTMLTooltip.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]),HTMLTooltip.prototype.publish("padding",8,"number","Padding (pixels)"),HTMLTooltip.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)"),HTMLTooltip.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)"),HTMLTooltip.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip"),HTMLTooltip.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip"),HTMLTooltip.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)"),HTMLTooltip.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)"),HTMLTooltip.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");class SimpleTable extends common.HTMLWidget{constructor(){super();__publicField(this,"_table");__publicField(this,"_tbody");__publicField(this,"_thead");__publicField(this,"_theadRow")}transformData(){return this.data()}enter(domNode,element){super.enter(domNode,element),this._table=element.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(domNode,element){super.update(domNode,element),this._table.style("width",this.autoWidth()?"auto":"100%");const theadTrSelection=this._theadRow.selectAll("th").data(this.columns());theadTrSelection.enter().append("th").attr("class",(n,i)=>`th-${i}`).merge(theadTrSelection).text(_d=>_d.toString()),theadTrSelection.exit().remove();const trSelection=this._tbody.selectAll("tr").data(this.transformData());trSelection.enter().append("tr").merge(trSelection).each(function(d){const tdSelection=common.select(this).selectAll("td").data(d);tdSelection.enter().append("td").attr("class",(n,i)=>`col-${i}`).merge(tdSelection).text(_d=>_d.toString()),tdSelection.exit().remove()}),trSelection.exit().remove()}}SimpleTable.prototype._class+=" html_SimpleTable",SimpleTable.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");class StyledTable extends SimpleTable{constructor(){super()}applyStyleObject(selection,styleObject){Object.keys(styleObject).forEach(styleName=>{selection.style(styleName,styleObject[styleName])})}update(domNode,element){super.update(domNode,element),element.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((styleObj,i)=>{this.applyStyleObject(element.select(`.th-${i}`),styleObj)}),this.tbodyColumnStyles().forEach((styleObj,i)=>{this.applyStyleObject(element.selectAll(`.col-${i}`),styleObj)});const evenRowStylesExist=Object.keys(this.evenRowStyles()).length>0,lastRowStylesExist=Object.keys(this.lastRowStyles()).length>0,tbodyRows=element.selectAll("tbody > tr");if(evenRowStylesExist){const tbodyEvenRows=tbodyRows.select(function(d,i){return i%2?this:null});this.applyStyleObject(tbodyEvenRows,this.evenRowStyles())}if(lastRowStylesExist){const tbodyLastRow=tbodyRows.select(function(d,i,arr){return i===arr.length-1?this:null});this.applyStyleObject(tbodyLastRow,this.lastRowStyles())}}}StyledTable.prototype._class+=" html_StyledTable",StyledTable.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table"),StyledTable.prototype.publish("fontColor","#333","string","Base font color used within the table"),StyledTable.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])'),StyledTable.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])'),StyledTable.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})'),StyledTable.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');class BreakdownTable extends StyledTable{constructor(){super();__publicField(this,"_tooltip")}transformData(){const rowCount=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(rowCount)}breakdownData(limit){const len=this.data().length,sum=this.data().reduce((acc,row)=>acc+row[1],0),data=[];let percSum=0;this.data().sort((a,b)=>a[1]>b[1]?-1:1);const showOther=len-limit>0;if(this.data().filter((_,i)=>showOther?i<limit-1:!0).forEach(row=>{const perc=Math.round(row[1]/sum*100);percSum+=perc,data.push([row[0],perc+"%"])}),showOther){const otherLabel=`${this.otherLabel()} (${len-limit+1})`,otherPercentage="~"+(100-percSum)+"%";data.push([otherLabel,otherPercentage])}return data}calculateRowCount(){const theadRowHeight=this.columns().length>0?this.thFontSize()+5:0,tbodyRowHeight=this.fontSize()+5,tbodyAvailableHeight=this.height()-theadRowHeight;return Math.floor(tbodyAvailableHeight/tbodyRowHeight)}enter(domNode,element){super.enter(domNode,element),this._tooltip=new HTMLTooltip().target(domNode),this._tooltip.tooltipHTML(data=>{const rowCount=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),rowHeight=Math.max(...data.map(row=>this.textSize(row[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),widestLabel=Math.max(...data.map(row=>this.textSize(row[0],this.fontFamily(),this.fontSize()).width)),widestPerc=30,colCount=2,w=colCount*(widestLabel+widestPerc)+this._tooltip.padding()*2,h=rowHeight*Math.ceil((data.length-rowCount)/colCount)+this._tooltip.padding()*2;this._tooltip.tooltipWidth(w),this._tooltip.tooltipHeight(h);const otherData=this.breakdownData(this.data().length).slice(rowCount-1);return`<div style="
|
|
3
|
+
width: 100%;
|
|
4
|
+
height: 100%;
|
|
5
|
+
font-size: ${this.fontSize()}px;
|
|
6
|
+
">${otherData.map(row=>`<div style="
|
|
7
|
+
float:left;
|
|
8
|
+
width:${Math.floor(99/colCount)}%;
|
|
9
|
+
">${row[0]}: ${row[1]}</div>`).join("")}</div>`})}update(domNode,element){if(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(domNode,element),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){const lastRow=element.select("tbody > tr:last-child"),context=this;lastRow.on("mouseout.tooltip",d=>{context._tooltip._triggerElement=lastRow,context._tooltip.visible(!1).render()}).on("mouseenter.tooltip",d=>{context._tooltip._triggerElement=lastRow,context._tooltip.direction("n").data(context.data()).visible(!0).render()})}}}BreakdownTable.prototype._class+=" html_BreakdownTable",BreakdownTable.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten"),BreakdownTable.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:w=>w.useCalculatedRowCount()}),BreakdownTable.prototype.publish("fontSize",14,"number","Font size (pixels)"),BreakdownTable.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]),BreakdownTable.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]),BreakdownTable.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels"),BreakdownTable.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages"),BreakdownTable.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold"),BreakdownTable.prototype.publish("otherLabel","Other","string","Label text for the 'other' row"),BreakdownTable.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label"),BreakdownTable.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold"),BreakdownTable.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage"),BreakdownTable.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold"),BreakdownTable.prototype.publish("thFontWeight","bold","string","Font weight for th elements"),BreakdownTable.prototype.publish("thFontSize",26,"number","Font size for th elements"),BreakdownTable.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element"),BreakdownTable.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");class JSXWidget extends common.HTMLWidget{constructor(){super(...arguments);__publicField(this,"rootNode")}jsxRender(jsx,domNode){this.rootNode=react.React.render(jsx,domNode,this.rootNode)}}__publicField(JSXWidget,"Component",react.React.Component),__publicField(JSXWidget,"createElement",react.React.createElement),JSXWidget.prototype._class+=" html_JSXWidget";class VNode{constructor(attrs,children){__publicField(this,"_attrs");__publicField(this,"_children");this._attrs=attrs,this._children=children}type(){return"div"}attrs(){return this._attrs}attr(key){return this._attrs[key]}children(){return this._children}update(targetElement){for(const key in this._attrs)targetElement.attr(key,this._attrs[key])}render(targetElement){const thisElement=targetElement.selectAll(`${targetElement.node().tagName} > *`).data([this]);return thisElement.exit().remove(),thisElement.enter().append(this.type()).attr("reactd3",0).merge(thisElement).each(function(d){const element=common.select(this);d.update(element),d.renderChildren(element)})}renderChildren(targetElement){const thisElement=targetElement.selectAll(`${targetElement.node().tagName} > *`).data(this._children);return thisElement.exit().remove(),thisElement.enter().append(d=>document.createElement(d.type())).attr("reactd3",(_d,i)=>i).merge(thisElement).each(function(d){const element=common.select(this);d.update(element),d.renderChildren(element)})}}class ConstVNode extends VNode{constructor(type,attrs,children){super(attrs,children);__publicField(this,"_type");this._type=type}type(){return this._type}}class TextVNode extends VNode{constructor(text){super({},[]);__publicField(this,"_text");this._text=text}type(){return"span"}update(targetElement){super.update(targetElement),targetElement.text(this._text)}}function isReactFn(_){return typeof _=="function"}function isIVNode(_){return _.prototype&&_.prototype instanceof VNode}class ReactD3{static createElement(type,attrs,...children){return isIVNode(type)?new type(attrs):isReactFn(type)?type(attrs):new ConstVNode(type,attrs,children.map(child=>typeof child=="string"?new TextVNode(child):child))}static render(vdom,targetElement){vdom.render(targetElement)}}var l;l={__e:function(n,l2,u2,t){for(var i,o,r;l2=l2.__;)if((i=l2.__c)&&!i.__)try{if((o=i.constructor)&&o.getDerivedStateFromError!=null&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),i.componentDidCatch!=null&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l3){n=l3}throw n}},typeof Promise=="function"&&Promise.prototype.then.bind(Promise.resolve());var f=0;function u(e,t,n,o,i,u2){t||(t={});var a,l$1=t;"ref"in t&&(a=t.ref,delete t.ref);var p={type:e,props:l$1,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:--f,__i:-1,__u:0,__source:i,__self:u2};return l.vnode&&l.vnode(p),p}class VizComponent extends JSXWidget.Component{constructor(){super(...arguments);__publicField(this,"widget")}refreshProps(){for(const key in this.props)this.widget[key]&&typeof this.widget[key]=="function"&&this.widget[key](this.props[key])}componentDidMount(){this.widget=new this.props.type().target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return u("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}}class VizInstance extends JSXWidget.Component{constructor(){super(...arguments);__publicField(this,"widget")}refreshProps(){for(const key in this.props)this.widget[key]&&typeof this.widget[key]=="function"&&this.widget[key](this.props[key])}componentDidMount(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return u("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}}class StatsTable extends StyledTable{transformData(){const totalRow=[["Total",0,0]],data=this.data();return data.forEach(row=>{totalRow[0][1]+=row[1],totalRow[0][2]+=row[2]}),data.concat(totalRow).map(row=>[row[0],this.secondColumnFormat_exists()?common.format(this.secondColumnFormat())(row[1]):row[1],this.thirdColumnFormat_exists()?common.format(this.thirdColumnFormat())(row[2]):row[2]])}update(domNode,element){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(domNode,element)}}StatsTable.prototype._class+=" html_StatsTable",StatsTable.prototype.publish("labelColor","#333","html-color","Color of the text in the first column"),StatsTable.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column"),StatsTable.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column"),StatsTable.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows"),StatsTable.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows"),StatsTable.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)"),StatsTable.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)"),StatsTable.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)"),StatsTable.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0}),StatsTable.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});class Item extends common.HTMLWidget{constructor(owner){super();__publicField(this,"_owner");this._owner=owner,this._tag="a"}}Item.prototype._class+=" html_Item";class Button extends Item{constructor(owner,icon){super(owner);__publicField(this,"_icon");this._icon=icon}icon(){return this._icon}enter(domNode,element){super.enter(domNode,element),element.attr("href","#").on("click",(d,idx,groups)=>this._owner.titleBarClick(this,d,idx,groups)).append("i").attr("class",`fa ${this._icon} fa-lg fa-fw`)}}Button.prototype._class+=" html_Button";class ToggleButton extends Button{enter(domNode,element){element.on("click.sel",(d,idx,groups)=>{this.selected(!this.selected()),this.render()}),super.enter(domNode,element)}update(domNode,element){super.update(domNode,element),this._element.classed("selected",this.selected())}}ToggleButton.prototype._class+=" html_ToggleButton",ToggleButton.prototype.publish("selected",!1,"boolean");class Spacer extends Item{enter(domNode,element){super.enter(domNode,element),element.attr("class","spacer").attr("href","#").append("i")}}Spacer.prototype._class+=" html_Spacer";class TitleBar extends JSXWidget{constructor(){super();__publicField(this,"_divMain");__publicField(this,"_divIconBar");__publicField(this,"_divTitle")}enter(domNode,element){super.enter(domNode,element),this._divMain=element.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(domNode,element){super.update(domNode,element),this._divTitle.text(this.title());const icons=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());icons.enter().append("div").attr("class","icon-bar-item").each(function(d){d.target(this)}).merge(icons).each(function(d){d.render()}),icons.exit().each(function(d){d.target(null)}).remove(),icons.order()}}TitleBar.prototype._class+=" html_TitleBar",TitleBar.prototype.publish("title","","string"),TitleBar.prototype.publish("buttons",[],"widgetArray"),exports2.BUILD_VERSION=BUILD_VERSION,exports2.BreakdownTable=BreakdownTable,exports2.Button=Button,exports2.HTMLTooltip=HTMLTooltip,exports2.Item=Item,exports2.JSXWidget=JSXWidget,exports2.PKG_NAME=PKG_NAME,exports2.PKG_VERSION=PKG_VERSION,exports2.ReactD3=ReactD3,exports2.SimpleTable=SimpleTable,exports2.Spacer=Spacer,exports2.StatsTable=StatsTable,exports2.StyledTable=StyledTable,exports2.TitleBar=TitleBar,exports2.ToggleButton=ToggleButton,exports2.VNode=VNode,exports2.VizComponent=VizComponent,exports2.VizInstance=VizInstance,Object.defineProperty(exports2,Symbol.toStringTag,{value:"Module"})});
|
|
10
|
+
//# sourceMappingURL=index.umd.cjs.map
|
|
@@ -0,0 +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 = \"@hpcc-js/html\";\nexport const PKG_VERSION = \"3.1.1\";\nexport const BUILD_VERSION = \"3.2.1\";\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,o,r,f,e,c,s,a,h={},v=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y=Array.isArray;function d(n,l){for(var u in l)n[u]=l[u];return n}function w(n){n&&n.parentNode&&n.parentNode.removeChild(n)}function _(l,u,t){var i,o,r,f={};for(r in u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),\"function\"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u:r,__i:-1,__u:0};return null==r&&null!=l.vnode&&l.vnode(f),f}function m(){return{current:null}}function b(n){return n.children}function k(n,l){this.props=n,this.context=l}function x(n,l){if(null==l)return n.__?x(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?x(n):null}function C(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C(n)}}function S(n){(!n.__d&&(n.__d=!0)&&i.push(n)&&!M.__r++||o!==l.debounceRendering)&&((o=l.debounceRendering)||r)(M)}function M(){var n,u,t,o,r,e,c,s;for(i.sort(f);n=i.shift();)n.__d&&(u=i.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d({},r)).__v=r.__v+1,l.vnode&&l.vnode(o),O(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j(c,o,s),o.__e!=e&&C(o)),i.length>u&&i.sort(f));M.__r=0}function P(n,l,u,t,i,o,r,f,e,c,s){var a,p,y,d,w,_=t&&t.__k||v,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&(p=-1===y.__i?h:_[y.__i]||h,y.__i=a,O(n,y,p,i,o,r,f,e,c,s),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&E(p.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||p.__k===y.__k?e=I(y,e,n):\"function\"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w}function $(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=l[t])&&\"boolean\"!=typeof i&&\"function\"!=typeof i?(r=t+a,(i=n.__k[t]=\"string\"==typeof i||\"number\"==typeof i||\"bigint\"==typeof i||i.constructor==String?g(null,i,null,null,null):y(i)?g(b,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=n,i.__b=n.__b+1,o=null,-1!==(f=i.__i=L(i,u,r,s))&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,\"function\"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a--:f==r+1?a++:(f>r?a--:a++,i.__u|=65536))):i=n.__k[t]=null;if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),N(o,o))}function I(n,l,u){var t,i;if(\"function\"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling}while(null!=l&&8===l.nodeType);return l}function H(n,l){return l=l||[],null==n||\"boolean\"==typeof n||(y(n)?n.some(function(n){H(n,l)}):l.push(n)),l}function L(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if((\"function\"!=typeof o||o===b||i)&&t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++}}return-1}function T(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||p.test(l)?u:u+\"px\"}function A(n,l,u,t,i){var 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||T(n.style,l,\"\");if(u)for(l in u)t&&u[l]===t[l]||T(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,\"$1\")),l=l.toLowerCase()in n||\"onFocusOut\"===l||\"onFocusIn\"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e,n.addEventListener(l,o?s:c,o)):n.removeEventListener(l,o?s:c,o);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 F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e++;else if(u.t<t.u)return;return l.event&&(u=l.event(u)),\"handleEvent\"in t?t.handleEvent(u):t(u)}}}function O(n,u,t,i,o,r,f,e,c,s){var a,h,v,p,w,_,g,m,x,C,S,M,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l.__b)&&a(u);n:if(\"function\"==typeof T)try{if(m=u.props,x=\"prototype\"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],S=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,S):(u.__c=h=new k(m,S),h.constructor=T,h.render=V),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=S,h.__n=i,v=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=d({},h.__s)),d(h.__s,T.getDerivedStateFromProps(m,h.__s))),p=h.props,w=h.state,h.__v=u,v)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(x&&null==T.getDerivedStateFromProps&&m!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,S),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,S)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u)}),M=0;M<h._sb.length;M++)h.__h.push(h._sb[M]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,S),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(p,w,_)})}if(h.context=S,h.props=m,h.__P=n,h.__e=!1,$=l.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[]}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d(d({},i),h.getChildContext())),x&&!v&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(p,w)),P(n,y(L=null!=a&&a.type===b&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null)}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:128;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e}else u.__e=t.__e,u.__k=t.__k;l.__e(n,u,t)}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z(t.__e,u,t,i,o,r,f,c,s);(a=l.diffed)&&a(u)}function j(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)E(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 z(u,t,i,o,r,f,e,c,s){var a,v,p,d,_,g,m,b=i.props,k=t.props,C=t.type;if(\"svg\"===C?r=\"http://www.w3.org/2000/svg\":\"math\"===C?r=\"http://www.w3.org/1998/Math/MathML\":r||(r=\"http://www.w3.org/1999/xhtml\"),null!=f)for(a=0;a<f.length;a++)if((_=f[a])&&\"setAttribute\"in _==!!C&&(C?_.localName===C:3===_.nodeType)){u=_,f[a]=null;break}if(null==u){if(null===C)return document.createTextNode(k);u=document.createElementNS(r,C,k.is&&k),c&&(l.__m&&l.__m(t,f),c=!1),f=null}if(null===C)b===k||c&&u.data===k||(u.data=k);else{if(f=f&&n.call(u.childNodes),b=i.props||h,!c&&null!=f)for(b={},a=0;a<u.attributes.length;a++)b[(_=u.attributes[a]).name]=_.value;for(a in b)if(_=b[a],\"children\"==a);else if(\"dangerouslySetInnerHTML\"==a)p=_;else if(!(a in k)){if(\"value\"==a&&\"defaultValue\"in k||\"checked\"==a&&\"defaultChecked\"in k)continue;A(u,a,null,_,r)}for(a in k)_=k[a],\"children\"==a?d=_:\"dangerouslySetInnerHTML\"==a?v=_:\"value\"==a?g=_:\"checked\"==a?m=_:c&&\"function\"!=typeof _||b[a]===_||A(u,a,_,b[a],r);if(v)c||p&&(v.__html===p.__html||v.__html===u.innerHTML)||(u.innerHTML=v.__html),t.__k=[];else if(p&&(u.innerHTML=\"\"),P(u,y(d)?d:[d],t,i,o,\"foreignObject\"===C?\"http://www.w3.org/1999/xhtml\":r,f,e,f?f[0]:i.__k&&x(i,0),c,s),null!=f)for(a=f.length;a--;)w(f[a]);c||(a=\"value\",\"progress\"===C&&null==g?u.removeAttribute(\"value\"):void 0!==g&&(g!==u[a]||\"progress\"===C&&!g||\"option\"===C&&g!==b[a])&&A(u,a,g,b[a],r),a=\"checked\",void 0!==m&&m!==u[a]&&A(u,a,m,b[a],r))}return u}function E(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 N(n,u,t){var i,o;if(l.unmount&&l.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||E(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(o=0;o<i.length;o++)i[o]&&N(i[o],u,t||\"function\"!=typeof n.type);t||w(n.__e),n.__c=n.__=n.__e=n.__d=void 0}function V(n,l,u){return this.constructor(n,u)}function q(u,t,i){var o,r,f,e;l.__&&l.__(u,t),r=(o=\"function\"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O(t,u=(!o&&i||t).__k=_(b,null,[u]),r||h,h,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j(f,u,e)}function B(n,l){q(n,l,B)}function D(l,u,t){var i,o,r,f,e=d({},l.props);for(r in l.type&&l.type.defaultProps&&(f=l.type.defaultProps),u)\"key\"==r?i=u[r]:\"ref\"==r?o=u[r]:e[r]=void 0===u[r]&&void 0!==f?f[r]:u[r];return arguments.length>2&&(e.children=arguments.length>3?n.call(arguments,2):t),g(l.type,e,i||l.key,o||l.ref,null)}function G(n,l){var u={__c:l=\"__cC\"+a++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,t;return this.getChildContext||(u=new Set,(t={})[l]=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,S(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 u.Provider.__=u.Consumer.contextType=u}n=v.slice,l={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l}throw n}},u=0,t=function(n){return null!=n&&null==n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d({},this.state),\"function\"==typeof n&&(n=n(d({},u),this.props)),n&&d(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),S(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),S(this))},k.prototype.render=b,i=[],r=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},M.__r=0,e=0,c=F(!1),s=F(!0),a=0;export{k as Component,b as Fragment,D as cloneElement,G as createContext,_ as createElement,m as createRef,_ as h,B as hydrate,t as isValidElement,l as options,q as render,H 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,l=t;\"ref\"in t&&(a=t.ref,delete t.ref);var p={type:e,props:l,key:n,ref:a,__k:null,__:null,__b:0,__e:null,__d:void 0,__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===l[c]&&(l[c]=a[c]);return r.vnode&&r.vnode(p),p}function a(r){var t=u(e,{tpl:r,exprs:[].slice.call(arguments,1)});return t.key=t.__v,t}var c={},l=/[A-Z]/g;function p(e,t){if(r.attr){var f=r.attr(e,t);if(\"string\"==typeof f)return f}if(\"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 p=\"-\"==u[0]?u:c[u]||(c[u]=u.replace(l,\"-$&\").toLowerCase()),_=\";\";\"number\"!=typeof a||p.startsWith(\"--\")||o.test(p)||(_=\"px;\"),i=i+p+\":\"+a+_}}return e+'=\"'+i+'\"'}return null==t||!1===t||\"function\"==typeof t||\"object\"==typeof t?\"\":!0===t?e:e+'=\"'+n(t)+'\"'}function _(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]=_(r[e]);return r}}return n(\"\"+r)}export{u as jsx,p as jsxAttr,u as jsxDEV,_ 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"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SAAS,OAAO,KAAK,EACxC,KAAK,QAAS,UAAU,EAExB,KAAA,UAAY,KAAK,SAAS,OAAO,KAAK,EACtC,KAAK,QAAS,OAAO,CAAA,CAI9B,OAAO,QAAS,QAAS,CACf,MAAA,OAAO,QAAS,OAAO,EAE7B,KAAK,UAAU,KAAK,KAAK,MAAA,CAAO,EAE1B,MAAA,MAAQ,KAAK,YAAY,UAAU,gBAAgB,EAAE,KAAK,KAAK,SAAS,EACxE,MAAA,MAAA,EAAQ,OAAO,KAAK,EACrB,KAAK,QAAS,eAAe,EAC7B,KAAK,SAA6B,EAAS,CACxC,EAAE,OAAO,IAAI,CAChB,CAAA,EACA,MAAM,KAAK,EACX,KAAK,SAAU,EAAS,CACrB,EAAE,OAAO,CAAA,CACZ,EAEL,MAAM,KAAK,EACN,KAAK,SAAU,EAAS,CACrB,EAAE,OAAO,IAAI,CAChB,CAAA,EACA,OAAO,EAEZ,MAAM,MAAM,CAAA,CAEpB,CACA,SAAS,UAAU,QAAU,iBAQ7B,SAAS,UAAU,QAAQ,QAAS,GAAI,QAAQ,EAChD,SAAS,UAAU,QAAQ,UAAW,CAAA,EAAI,aAAa","x_google_ignoreList":[7,8]}
|
package/package.json
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/html",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"description": "hpcc-js - Viz HTML",
|
|
5
5
|
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
6
8
|
"exports": {
|
|
7
9
|
".": {
|
|
8
10
|
"types": "./types/index.d.ts",
|
|
9
|
-
"
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.umd.cjs"
|
|
10
13
|
},
|
|
11
14
|
"./dist/*": "./dist/*"
|
|
12
15
|
},
|
|
13
|
-
"
|
|
14
|
-
"browser": "./dist/index.js",
|
|
16
|
+
"browser": "./dist/index.umd.cjs",
|
|
15
17
|
"types": "./types/index.d.ts",
|
|
16
18
|
"files": [
|
|
17
19
|
"dist/*",
|
|
@@ -20,8 +22,8 @@
|
|
|
20
22
|
],
|
|
21
23
|
"scripts": {
|
|
22
24
|
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
23
|
-
"bundle": "
|
|
24
|
-
"bundle-watch": "
|
|
25
|
+
"bundle": "vite build",
|
|
26
|
+
"bundle-watch": "vite --port 5510",
|
|
25
27
|
"gen-types": "tsc --project tsconfig.json",
|
|
26
28
|
"gen-types-watch": "npm run gen-types -- --watch",
|
|
27
29
|
"build": "run-p gen-types bundle",
|
|
@@ -35,12 +37,12 @@
|
|
|
35
37
|
"update-major": "npx --yes npm-check-updates -u"
|
|
36
38
|
},
|
|
37
39
|
"dependencies": {
|
|
38
|
-
"@hpcc-js/common": "^3.
|
|
39
|
-
"@hpcc-js/
|
|
40
|
+
"@hpcc-js/common": "^3.3.0",
|
|
41
|
+
"@hpcc-js/react": "^3.2.1",
|
|
42
|
+
"@hpcc-js/util": "^3.3.0"
|
|
40
43
|
},
|
|
41
44
|
"devDependencies": {
|
|
42
|
-
"@hpcc-js/esbuild-plugins": "^1.
|
|
43
|
-
"@hpcc-js/preact-shim": "^3.0.0",
|
|
45
|
+
"@hpcc-js/esbuild-plugins": "^1.4.0",
|
|
44
46
|
"d3-format": "^1",
|
|
45
47
|
"d3-selection": "^1"
|
|
46
48
|
},
|
|
@@ -55,5 +57,5 @@
|
|
|
55
57
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
56
58
|
},
|
|
57
59
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
58
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "ed4453ec6a4a8af9c0beb11b46c7f4365bc0669e"
|
|
59
61
|
}
|
package/src/JSXWidget.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { HTMLWidget } from "@hpcc-js/common";
|
|
2
|
-
import {
|
|
2
|
+
import { React } from "@hpcc-js/react";
|
|
3
3
|
|
|
4
4
|
export class JSXWidget extends HTMLWidget {
|
|
5
|
-
static Component = Component;
|
|
6
|
-
static createElement = createElement;
|
|
5
|
+
static Component = React.Component;
|
|
6
|
+
static createElement = React.createElement;
|
|
7
7
|
protected rootNode;
|
|
8
8
|
|
|
9
9
|
jsxRender(jsx, domNode) {
|
|
10
|
-
this.rootNode = render(jsx, domNode, this.rootNode);
|
|
10
|
+
this.rootNode = React.render(jsx, domNode, this.rootNode);
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
JSXWidget.prototype._class += " html_JSXWidget";
|
package/src/VizComponent.tsx
CHANGED
package/src/VizInstance.tsx
CHANGED
package/types/JSXWidget.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HTMLWidget } from "@hpcc-js/common";
|
|
2
|
-
import {
|
|
2
|
+
import { React } from "@hpcc-js/react";
|
|
3
3
|
export declare class JSXWidget extends HTMLWidget {
|
|
4
|
-
static Component: typeof Component;
|
|
5
|
-
static createElement: typeof createElement;
|
|
4
|
+
static Component: typeof React.Component;
|
|
5
|
+
static createElement: typeof React.createElement;
|
|
6
6
|
protected rootNode: any;
|
|
7
7
|
jsxRender(jsx: any, domNode: any): void;
|
|
8
8
|
}
|
package/types/VizComponent.d.ts
CHANGED
package/types/VizInstance.d.ts
CHANGED
package/types/__package__.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export declare const PKG_NAME = "@hpcc-js/html";
|
|
2
|
-
export declare const PKG_VERSION = "3.1.
|
|
3
|
-
export declare const BUILD_VERSION = "3.2.
|
|
2
|
+
export declare const PKG_VERSION = "3.1.1";
|
|
3
|
+
export declare const BUILD_VERSION = "3.2.1";
|