@hpcc-js/html 3.1.0 → 3.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js.map CHANGED
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/__package__.ts", "../src/HTMLTooltip.ts", "../src/SimpleTable.ts", "../src/StyledTable.ts", "../src/BreakdownTable.ts", "../src/JSXWidget.ts", "../src/reactD3.ts", "../src/VizComponent.tsx", "../src/VizInstance.tsx", "../src/StatsTable.ts", "../src/TitleBar.ts", "../src/TitleBar.css"],
4
- "sourcesContent": ["export const PKG_NAME = \"@hpcc-js/html\";\nexport const PKG_VERSION = \"3.1.0\";\nexport const BUILD_VERSION = \"3.2.0\";\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 React from \"react\";\nimport { render } from \"react-dom\";\nimport { HTMLWidget } from \"@hpcc-js/common\";\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 = 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", "import React from \"react\";\nimport { 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 React from \"react\";\nimport { 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", "(function(){\n if (!document.getElementById('f5fc3b48')) {\n var e = document.createElement('style');\n e.id = 'f5fc3b48';\n e.textContent = `#wrap\n{\n width: 100%;\n}\n#left, #right {padding:5px;}\n\n#left {\n background-color:red;\n text-align:left;\n display: block;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n}\n\n#right {\n background-color:orange;\n float:right;\n text-align:right;\n white-space: nowrap;\n}\n\n.html_TitleBar > .main {\n width: 100%;\n display: block;\n}\n\n.html_TitleBar .title {\n padding:4px;\n text-align:left;\n display: block;\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n font-size:20px;\n font-weight: bold;\n}\n\n.html_TitleBar .icon-bar {\n padding:4px;\n float: right;\n text-align:right;\n white-space: nowrap;\n line-height: 28px;\n}\n\n.html_TitleBar .icon-bar-item {\n display: inline; \n}\n\n.html_TitleBar .icon-bar-item > div {\n display: inline; \n}\n\n.html_TitleBar .icon-bar a {\n text-align: center; /* Center-align text */\n padding-top: 4px;\n padding-bottom: 4px;\n transition: all 0.3s ease; /* Add transition for hover effects */\n color: darkgray; /* White text color */\n}\n\n.html_TitleBar .icon-bar a:hover {\n background-color: whitesmoke; /* Add a hover color */\n}\n\n.html_TitleBar .icon-bar a.selected {\n background-color: #efe5e5; /* Add a hover color */\n}\n\n.html_TitleBar .icon-bar a.spacer {\n text-align: center; /* Center-align text */\n padding-top: 2px;\n padding-left: 8px;\n padding-bottom: 0px;\n color: none;\n}\n\n.html_TitleBar .icon-bar a.spacer:hover {\n background-color: transparent;\n}\n\n.html_TitleBar .icon-bar .active {\n background-color: #4CAF50; /* Add an active/current color */\n}`;\n document.head.appendChild(e);\n }\n })();"],
5
- "mappings": "+EAAO,IAAMA,EAAW,gBACXC,EAAc,QACdC,EAAgB,QCF7B,OAAS,cAAAC,EAAY,UAAUC,MAAgB,kBAC/C,OAAS,gBAAAC,MAAmC,gBAOrC,IAAMC,EAAN,cAA0BC,CAAW,CAR5C,MAQ4C,CAAAC,EAAA,oBAEjC,gBACA,aACG,iBAEA,gBACA,cACA,qBAAuBA,EAACC,GAAU,2CAAX,wBACvB,QAAyBC,EAAa,kBAAkB,EAClE,aAAc,CACV,MAAM,EACN,KAAK,QAAQ,EAAK,CACtB,CAEA,YAAYC,EAA4B,CACpC,YAAK,qBAAuBA,EACrB,IACX,CAEA,eAAeA,EAAS,CACpB,OAAK,UAAU,QACf,KAAK,aAAeA,EACb,MAFuB,KAAK,YAGvC,CAEA,eAAeA,EAAS,CACpB,YAAK,gBAAkBA,EAChB,IACX,CAEA,MAAMC,EAASC,EAAS,CACpB,MAAM,MAAMD,EAASC,CAAO,EAC5B,IAAMC,EAAOC,EAAS,MAAM,EAC5B,KAAK,gBAAkBD,EAAK,OAAO,KAAK,EACnC,KAAK,QAAS,aAAa,EAC3B,MAAM,UAAW,YAAY,EAC7B,MAAM,WAAY,OAAO,EAE9B,KAAK,cAAgBA,EAAK,OAAO,KAAK,EACjC,KAAK,QAAS,WAAW,EACzB,MAAM,UAAW,YAAY,EAC7B,MAAM,WAAY,OAAO,CAElC,CAEA,OAAOF,EAASC,EAAS,CAGrB,GAFA,MAAM,OAAOD,EAASC,CAAO,EAEzB,KAAK,eAAiB,KAAK,iBAAkB,CAC7C,IAAMG,EAAO,KAAK,gBAAgB,KAAK,EACvC,CAAC,GAAGA,EAAK,iBAAiB,GAAG,CAAC,EACzB,IAAIC,GAAKA,EAAE,QAAQ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EAChB,OAAO,GAAG,CAEnB,CACJ,EACAK,EAAO,UAAU,QAAU,eAEpB,IAAMC,EAAN,cAAuBC,CAAU,CA/ExC,MA+EwC,CAAAZ,EAAA,iBAC1B,SACA,YACA,UAEV,aAAc,CACV,MAAM,CACV,CAEA,MAAMI,EAASC,EAAS,CACpB,MAAM,MAAMD,EAASC,CAAO,EAC5B,KAAK,SAAWA,EAAQ,OAAO,KAAK,EAC/B,KAAK,QAAS,MAAM,EAEzB,KAAK,YAAc,KAAK,SAAS,OAAO,KAAK,EACxC,KAAK,QAAS,UAAU,EAE7B,KAAK,UAAY,KAAK,SAAS,OAAO,KAAK,EACtC,KAAK,QAAS,OAAO,CAE9B,CAEA,OAAOD,EAASC,EAAS,CACrB,MAAM,OAAOD,EAASC,CAAO,EAE7B,KAAK,UAAU,KAAK,KAAK,MAAM,CAAC,EAEhC,IAAMQ,EAAQ,KAAK,YAAY,UAAU,gBAAgB,EAAE,KAAK,KAAK,QAAQ,CAAC,EAC9EA,EAAM,MAAM,EAAE,OAAO,KAAK,EACrB,KAAK,QAAS,eAAe,EAC7B,KAAK,SAA6BP,EAAS,CACxCA,EAAE,OAAO,IAAI,CACjB,CAAC,EACA,MAAMO,CAAK,EACX,KAAK,SAAUP,EAAS,CACrBA,EAAE,OAAO,CACb,CAAC,EAELO,EAAM,KAAK,EACN,KAAK,SAAUP,EAAS,CACrBA,EAAE,OAAO,IAAI,CACjB,CAAC,EACA,OAAO,EAEZO,EAAM,MAAM,CAChB,CACJ,EACAF,EAAS,UAAU,QAAU,iBAQ7BA,EAAS,UAAU,QAAQ,QAAS,GAAI,QAAQ,EAChDA,EAAS,UAAU,QAAQ,UAAW,CAAC,EAAG,aAAa",
6
- "names": ["PKG_NAME", "PKG_VERSION", "BUILD_VERSION", "HTMLWidget", "d3Select", "scopedLogger", "HTMLTooltip", "HTMLWidget", "__name", "data", "scopedLogger", "_", "domNode", "element", "body", "d3Select", "node", "n", "w", "rect", "bbox", "direction", "box", "directions", "defaultDirection", "a", "b", "windowRect", "i", "tooltipRect", "innerRect", "outerRect", "point", "top", "left", "visibleBorderStyle", "width", "height", "wholeW", "wholeH", "halfW", "halfH", "arrowH", "p", "p2", "HTMLWidget", "d3Select", "SimpleTable", "HTMLWidget", "__name", "domNode", "element", "theadTrSelection", "n", "i", "_d", "trSelection", "d", "tdSelection", "d3Select", "StyledTable", "SimpleTable", "__name", "selection", "styleObject", "styleName", "domNode", "element", "styleObj", "i", "evenRowStylesExist", "lastRowStylesExist", "tbodyRows", "tbodyEvenRows", "d", "tbodyLastRow", "arr", "BreakdownTable", "StyledTable", "__name", "rowCount", "limit", "len", "sum", "acc", "row", "data", "percSum", "a", "b", "showOther", "_", "i", "perc", "otherLabel", "otherPercentage", "theadRowHeight", "tbodyRowHeight", "tbodyAvailableHeight", "domNode", "element", "HTMLTooltip", "rowHeight", "widestLabel", "widestPerc", "colCount", "w", "h", "otherData", "lastRow", "context", "d", "React", "render", "HTMLWidget", "JSXWidget", "HTMLWidget", "__name", "React", "jsx", "domNode", "render", "d3Select", "VNode", "__name", "attrs", "children", "key", "targetElement", "thisElement", "d", "element", "d3Select", "_d", "ConstVNode", "type", "TextVNode", "text", "isReactFn", "_", "isIVNode", "ReactD3", "child", "vdom", "React", "VizComponent", "JSXWidget", "__name", "key", "React", "React", "VizInstance", "JSXWidget", "__name", "key", "React", "d3Format", "StatsTable", "StyledTable", "__name", "totalRow", "data", "row", "d3Format", "domNode", "element", "HTMLWidget", "e", "Item", "HTMLWidget", "__name", "owner", "Button", "icon", "domNode", "element", "d", "idx", "groups", "ToggleButton", "Spacer", "TitleBar", "JSXWidget", "icons"]
7
- }
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 = \"@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=\"&quot;\";break;case 38:f=\"&amp;\";break;case 60:f=\"&lt;\";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"],"names":["d3Select","l","u","r","jsx","d3Format"],"mappings":";;;;;;AAAO,MAAM,WAAW,iBACX,cAAc,SACd,gBAAgB;ACMtB,MAAM,oBAAoB,WAAW;AAAA,EAUxC,cAAc;AACJ,UAAA;AATH;AACA;AACG;AAEA;AACA;AACA,gDAAuB,CAAC,SAAU;AAClC,mCAAyB,aAAa,kBAAkB;AAuO3D;AAwDC,oCAAW;AA5Rf,SAAK,QAAQ,EAAK;AAAA,EAAA;AAAA,EAGtB,YAAY,GAA4B;AACpC,gBAAK,uBAAuB,GACrB;AAAA,EAAA;AAAA,EAGX,eAAe,GAAS;AACpB,WAAK,UAAU,UACf,KAAK,eAAe,GACb,QAFuB,KAAK;AAAA,EAE5B;AAAA,EAGX,eAAe,GAAS;AACpB,gBAAK,kBAAkB,GAChB;AAAA,EAAA;AAAA,EAGX,MAAM,SAAS,SAAS;AACd,UAAA,MAAM,SAAS,OAAO;AACtB,UAAA,OAAOA,OAAS,MAAM;AAC5B,SAAK,kBAAkB,KAAK,OAAO,KAAK,EACnC,KAAK,SAAS,aAAa,EAC3B,MAAM,WAAW,YAAY,EAC7B,MAAM,YAAY,OAAO,GAE9B,KAAK,gBAAgB,KAAK,OAAO,KAAK,EACjC,KAAK,SAAS,WAAW,EACzB,MAAM,WAAW,YAAY,EAC7B,MAAM,YAAY,OAAO;AAAA,EAAA;AAAA,EAIlC,OAAO,SAAS,SAAS;AAGjB,QAFE,MAAA,OAAO,SAAS,OAAO,GAEzB,KAAK,iBAAiB,KAAK,kBAAkB;AACvC,YAAA,OAAO,KAAK,gBAAgB,KAAK;AACvC,OAAC,GAAG,KAAK,iBAAiB,G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S;AACxE,UAAA,MAAA,EAAQ,OAAO,KAAK,EACrB,KAAK,SAAS,eAAe,EAC7B,KAAK,SAA6B,GAAS;AACxC,QAAE,OAAO,IAAI;AAAA,IAChB,CAAA,EACA,MAAM,KAAK,EACX,KAAK,SAAU,GAAS;AACrB,QAAE,OAAO;AAAA,IAAA,CACZ,GAEL,MAAM,KAAK,EACN,KAAK,SAAU,GAAS;AACrB,QAAE,OAAO,IAAI;AAAA,IAChB,CAAA,EACA,OAAO,GAEZ,MAAM,MAAM;AAAA,EAAA;AAEpB;AACA,SAAS,UAAU,UAAU;AAQ7B,SAAS,UAAU,QAAQ,SAAS,IAAI,QAAQ;AAChD,SAAS,UAAU,QAAQ,WAAW,CAAA,GAAI,aAAa;","x_google_ignoreList":[7,8]}
@@ -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