@hpcc-js/api 3.4.20 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.umd.cjs +1 -1
- package/dist/index.umd.cjs.map +1 -1
- package/package.json +6 -6
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Palette as e, Widget as t, format as n, hsl as r, map as i, select as a, selection as o } from "@hpcc-js/common";
|
|
2
2
|
//#region \0rolldown/runtime.js
|
|
3
|
-
var s = "@hpcc-js/api", c = "3.
|
|
3
|
+
var s = "@hpcc-js/api", c = "3.5.1", l = "3.26.1";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/I1DChart.ts
|
|
6
6
|
function I1DChart() {}
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"mappings":";;IAAa,IAAW,gBACX,IAAc,UACd,IAAgB;;;ACA7B,SAAgB,WAAW,CAC3B;AACA,SAAS,UAAU,cAAc,MACjC,SAAS,UAAU,WAAW,EAAQ,QAAQ,SAAS,GAGvD,SAAS,UAAU,QAAQ,SAAU,GAAK,GAAQ,GAAU,CAC5D,GAEA,SAAS,UAAU,WAAW,SAAU,GAAK,GAAQ,GAAU,C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","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"mappings":";;IAAa,IAAW,gBACX,IAAc,SACd,IAAgB;;;ACA7B,SAAgB,WAAW,CAC3B;AACA,SAAS,UAAU,cAAc,MACjC,SAAS,UAAU,WAAW,EAAQ,QAAQ,SAAS,GAGvD,SAAS,UAAU,QAAQ,SAAU,GAAK,GAAQ,GAAU,CAC5D,GAEA,SAAS,UAAU,WAAW,SAAU,GAAK,GAAQ,GAAU,CAC/D;;;ACTA,SAAgB,WAAW,CAC3B;AACA,SAAS,UAAU,cAAc,MACjC,SAAS,UAAU,WAAW,EAAQ,QAAQ,SAAS,GAEvD,SAAS,UAAU,YAAY,SAAU,GAAY,GAAQ,GAAO,GAAiB;CACjF,OAAO,KAAK,SAAS,EAAI,EAAE;AAC/B,GAEA,SAAS,UAAU,cAAc,SAAU,GAAY,GAAQ,GAAO,GAAiB;CACnF,OAAO,EAAM,KAAK,UAAU,GAAK,GAAQ,GAAO,CAAO,CAAC,EAAE,OAAO,EAAE,SAAS;AAChF,GAEA,SAAS,UAAU,YAAY,SAAU,GAAY,GAAQ,GAAO,GAAiB;CACjF,OAAO,EAAQ,UAAU,KAAK,UAAU,GAAK,GAAQ,GAAO,CAAO,CAAC;AACxE,GAGA,SAAS,UAAU,QAAQ,SAAU,GAAa,GAAQ,GAAU,CACpE,GAEA,SAAS,UAAU,WAAW,SAAU,GAAa,GAAQ,GAAU,CACvE;;;ACtBA,SAAgB,eA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3F,IAAM,IAAqB,SAAS,UAAU;AAC9C,SAAS,UAAU,qBAAqB,SAAU,GAAuB;CACrE,IAAM,IAAS,EAAmB,MAAM,MAAM,SAAS;CAIvD,OAHI,UAAU,WACV,KAAK,kBAAkB,EAAS,CAAC,IAE9B;AACX;AAEA,IAAM,IAAqB,SAAS,UAAU;AAC9C,SAAS,UAAU,qBAAqB,SAAU,GAAuB;CACrE,IAAM,IAAS,EAAmB,MAAM,MAAM,SAAS;CAIvD,OAHI,UAAU,WACV,KAAK,kBAAkB,EAAS,CAAC,IAE9B;AACX;;;AC7NA,SAAgB,QAAQ,CACxB;AACA,MAAM,UAAU,cAAc,OAG9B,MAAM,UAAU,QAAQ,SAAU,GAAK,GAAQ,GAAU,CACzD,GAEA,MAAM,UAAU,WAAW,SAAU,GAAK,GAAQ,GAAU,CAC5D,GAEA,MAAM,UAAU,WAAW,EAAQ,QAAQ,SAAS"}
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@hpcc-js/common")):typeof define==`function`&&define.amd?define([`exports`,`@hpcc-js/common`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@hpcc-js/api`]={},e[`@hpcc-js/common`]))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=`@hpcc-js/api`,r=`3.4.20`,i=`3.25.1`;function I1DChart(){}I1DChart.prototype._dataFamily=`1D`,I1DChart.prototype._palette=t.Palette.rainbow(`default`),I1DChart.prototype.click=function(e,t,n){},I1DChart.prototype.dblclick=function(e,t,n){};function I2DChart(){}I2DChart.prototype._dataFamily=`2D`,I2DChart.prototype._palette=t.Palette.ordinal(`default`),I2DChart.prototype.fillColor=function(e,t,n,r){return this._palette(e[0])},I2DChart.prototype.strokeColor=function(e,n,r,i){return(0,t.hsl)(this.fillColor(e,n,r,i)).darker().toString()},I2DChart.prototype.textColor=function(e,n,r,i){return t.Palette.textColor(this.fillColor(e,n,r,i))},I2DChart.prototype.click=function(e,t,n){},I2DChart.prototype.dblclick=function(e,t,n){};function I2DAggrChart(){}I2DAggrChart.prototype._palette=t.Palette.rainbow(`default`),I2DAggrChart.prototype.fillColor=function(e,t,n){return this._palette(e.length)},I2DAggrChart.prototype.strokeColor=function(e,n,r){return(0,t.hsl)(this.fillColor(e,n,r)).darker().toString()},I2DAggrChart.prototype.textColor=function(e,n,r){return t.Palette.textColor(this.fillColor(e,n,r))},I2DAggrChart.prototype.click=function(e,t,n){},I2DAggrChart.prototype.dblclick=function(e,t,n){};function IGraph(){}IGraph.prototype._dataFamily=`graph`,IGraph.prototype.vertex_click=function(e,t,n,r){r&&r.vertex},IGraph.prototype.vertex_dblclick=function(e,t,n,r){r&&r.vertex},IGraph.prototype.edge_click=function(e,t,n,r){r&&r.edge},IGraph.prototype.edge_dblclick=function(e,t,n,r){r&&r.edge};function instanceOfIHighlight(e){return typeof e.highlightColumn==`function`}function IInput(){}IInput.prototype=Object.create(t.Widget.prototype),IInput.prototype.constructor=IInput,IInput.prototype.isValid=function(){return!(this.validate()&&!new RegExp(this.validate()).test(this.value()))},IInput.prototype.hasValue=function(){if(typeof this.type==`function`){switch(this.type()){case`radio`:case`checkbox`:if(this.value()&&this.value()!==`false`)return!0;break;default:if(this.value())return!0;break}return!1}return this.value()!==``},IInput.prototype.blur=function(e){},IInput.prototype.keyup=function(e){},IInput.prototype.focus=function(e){},IInput.prototype.click=function(e){},IInput.prototype.dblclick=function(e){},IInput.prototype.change=function(e,t){},IInput.prototype.resetValue=function(e){e.value(e._inputElement[0].node().value)},IInput.prototype.disable=function(e){this._inputElement.forEach(function(t,n){t.attr(`disabled`,e?`disabled`:null)})},IInput.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},IInput.prototype.publish(`name`,``,`string`,`HTML name for the input`),IInput.prototype.publish(`label`,``,`string`,`Descriptive label`),IInput.prototype.publish(`value`,``,`string`,`Input Current Value`),IInput.prototype.publish(`validate`,null,`string`,`Input Validation`);function INDChart(){}INDChart.prototype._dataFamily=`ND`,INDChart.prototype._palette=t.Palette.ordinal(`default`),INDChart.prototype.fillColor=function(e,t,n,r){return this._palette(t)},INDChart.prototype.strokeColor=function(e,n,r,i){return(0,t.hsl)(this.fillColor(e,n,r,i)).darker().toString()},INDChart.prototype.textColor=function(e,n,r,i){return t.Palette.textColor(this.fillColor(e,n,r,i))},INDChart.prototype.click=function(e,t,n){},INDChart.prototype.dblclick=function(e,t,n){};function tip(){let e=d3TipDirection,n=d3TipOffset,r=d3TipHTML,i=functor(document.body),a=initNode(),o=null,s=null,c=null,tip=function(e){if(o=getSVGNode(e),!o)return;s=o.createSVGPoint();let t=i();t&&a&&t.appendChild(a)};tip.show=function(e,t,a){c=a[t];let o=Array.prototype.slice.call(arguments),s=r.apply(this,o);if(s===null)return tip;let d=n.apply(this,o),f=getNodeEl(),p=u.length,m,h=i().getBoundingClientRect();for(f.html(s).style(`opacity`,1).style(`pointer-events`,`all`);p--;)f.classed(u[p],!1);let g=!1,_={},v=u[0];for(let e=0;e<u.length&&(g=_placement_attempt(u[e]),!g);e++);if(g)f.classed(`notick`,!1);else{f.classed(`notick`,!0);let e=_vertical_adjustment(_[v]),t=_horizontal_adjustment(_[v]);_placement_attempt(v,e,t)}return tip;function _horizontal_adjustment(e){return e.left>e.right?e.left>0?-e.left:0:e.right>0?e.right:0}function _vertical_adjustment(e){return e.top>e.bottom?e.top>0?-e.top:0:e.bottom}function _placement_attempt(e,t,n){t||=0,n||=0,f.style(`white-space`,`nowrap`),m=l.get(e).apply(this),f.classed(e,!0).style(`top`,m.top+d[0]-t+`px`).style(`left`,m.left+d[1]-n+`px`);let r=f.node().getBoundingClientRect(),i=r.top>h.top&&r.left>h.left&&r.bottom<h.bottom&&r.right<h.right;return _[e]={top:h.top-r.top,right:r.right-h.right,bottom:r.bottom-h.bottom,left:h.left-r.left},f.style(`white-space`,`normal`),_[e].total_overflow=Object.keys(_[e]).filter(t=>_[e][t]>0).reduce((t,n)=>t+_[e][n],0),_[v].total_overflow>_[e].total_overflow&&(v=e),i||f.classed(e,!1),i}},tip.hide=function(){return getNodeEl().style(`opacity`,0).style(`pointer-events`,`none`),tip},tip.attr=function(e,n){if(arguments.length<2&&typeof e==`string`)return getNodeEl().attr(e);let r=Array.prototype.slice.call(arguments);return t.selection.prototype.attr.apply(getNodeEl(),r),tip},tip.style=function(e,n){if(arguments.length<2&&typeof e==`string`)return getNodeEl().style(e);let r=Array.prototype.slice.call(arguments);return t.selection.prototype.style.apply(getNodeEl(),r),tip},tip.direction=function(t){return arguments.length?(e=t==null?t:functor(t),tip):e},tip.offset=function(e){return arguments.length?(n=e==null?e:functor(e),tip):n},tip.html=function(e){return arguments.length?(r=e==null?e:functor(e),tip):r},tip.rootElement=function(e){return arguments.length?(i=functor(e),tip):i},tip.destroy=function(){return a&&=(getNodeEl().remove(),null),tip};function d3TipDirection(){return`n`}function d3TipOffset(){return[0,0]}function d3TipHTML(){return` `}let l=(0,t.map)({n:directionNorth,s:directionSouth,e:directionEast,w:directionWest,nw:directionNorthWest,ne:directionNorthEast,sw:directionSouthWest,se:directionSouthEast}),u=l.keys();function directionNorth(){let e=getScreenBBox(window);return{top:e.n.y-a.offsetHeight,left:e.n.x-a.offsetWidth/2}}function directionSouth(){let e=getScreenBBox(window);return{top:e.s.y+8,left:e.s.x-a.offsetWidth/2}}function directionEast(){let e=getScreenBBox(window);return{top:e.e.y-a.offsetHeight/2,left:e.e.x+8}}function directionWest(){let e=getScreenBBox(window);return{top:e.w.y-a.offsetHeight/2,left:e.w.x-a.offsetWidth-8}}function directionNorthWest(){let e=getScreenBBox(window);return{top:e.nw.y-a.offsetHeight,left:e.nw.x-a.offsetWidth}}function directionNorthEast(){let e=getScreenBBox(window);return{top:e.ne.y-a.offsetHeight,left:e.ne.x}}function directionSouthWest(){let e=getScreenBBox(window);return{top:e.sw.y,left:e.sw.x-a.offsetWidth}}function directionSouthEast(){let e=getScreenBBox(window);return{top:e.se.y,left:e.se.x}}function initNode(){let e=(0,t.select)(document.createElement(`div`));return e.attr(`class`,`d3-tip`).style(`position`,`absolute`).style(`top`,`0px`).style(`opacity`,0).style(`pointer-events`,`none`).style(`box-sizing`,`border-box`),e.node()}function getSVGNode(e){let t=e.node();return t?t.tagName.toLowerCase()===`svg`?t:t.ownerSVGElement:null}function getNodeEl(){return a??(a=initNode(),i().appendChild(a)),(0,t.select)(a)}function getScreenBBox(e){let t=c||e;for(;t.getCTM==null&&t.parentNode!=null;)t=t.parentNode;let n={},r=t.getCTM(),i=t.getBBox(),a=i.width,o=i.height,l=i.x,u=i.y;return s.x=l,s.y=u,n.nw=s.matrixTransform(r),s.x+=a,n.ne=s.matrixTransform(r),s.y+=o,n.se=s.matrixTransform(r),s.x-=a,n.sw=s.matrixTransform(r),s.y-=o/2,n.w=s.matrixTransform(r),s.x+=a,n.e=s.matrixTransform(r),s.x-=a/2,s.y-=o/2,n.n=s.matrixTransform(r),s.y+=o,n.s=s.matrixTransform(r),n}function functor(e){return typeof e==`function`?e:function(){return e}}return tip}function ITooltip(){if(this.tooltip=tip(),this.tooltipLabelFormat_exists()&&(this._labelFormatter=(0,t.format)(this.tooltipLabelFormat())),this.tooltipValueFormat_exists()&&(this._valueFormatter=(0,t.format)(this.tooltipValueFormat())),this.layerEnter){let e=this.layerEnter;this.layerEnter=function(t,n,r){this._parentOverlay||=t._parentOverlay,this.tooltipEnter(n),e.apply(this,arguments)};let t=this.layerUpdate;this.layerUpdate=function(e){t.apply(this,arguments),this.tooltipUpdate()};let n=this.layerExit;this.layerExit=function(e){this.tooltipExit(),n.apply(this,arguments)}}else{let e=this.enter;this.enter=function(t,n){this.tooltipEnter(n),e.apply(this,arguments)};let t=this.update;this.update=function(e,n){t.apply(this,arguments),this.tooltipUpdate()};let n=this.exit;this.exit=function(e,t){this.tooltipExit(),n.apply(this,arguments)}}}ITooltip.prototype=Object.create(t.Widget.prototype),ITooltip.prototype.constructor=ITooltip,ITooltip.prototype.tooltipEnter=function(e){let t=this.parentOverlay();t.empty()||this.tooltip.rootElement(t.node().parentNode),e.call(this.tooltip)},ITooltip.prototype.tooltipUpdate=function(){this.tooltip.offset(()=>{if(event&&this.tooltipFollowMouse()){let e=document.querySelector(`.d3-tip`);return e.style.display=`block`,e.style.left=this.tooltipOffset()+event.clientX+`px`,e.style.top=event.clientY+`px`,[]}switch(this.tooltip.direction()()){case`e`:return[0,this.tooltipOffset()];default:return[-this.tooltipOffset(),0]}});let e=this.tooltip.attr(`class`);e&&(e=e.split(` notick`).join(``)+(this.tooltipTick()?``:` notick`)+(this.tooltipStyle()===`none`?` hidden`:``),e=e.split(` `).filter(function(e){return e.indexOf(`ITooltip-tooltipStyle-`)!==0}).join(` `),e+=` ITooltip-tooltipStyle-`+this.tooltipStyle(),this.tooltip.attr(`class`,e))},ITooltip.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},ITooltip.prototype._tooltipHTML=function(e){return e},ITooltip.prototype.tooltipHTML=function(e){return this.tooltip.html(e)},ITooltip.prototype.tooltipFormat=function(e={}){switch(e.label=e.label===void 0?``:e.label,this._labelFormatter?e.label=this._labelFormatter(e.label)||``:this.formatData&&this.parseData&&(e.label=this.formatData(this.parseData(e.label))),e.series=e.series||``,e.value instanceof Date?e.value=e.value||``:this._valueFormatter?e.value=this._valueFormatter(e.value)||``:this.formatValue&&this.parseValue&&(e.value=this.formatValue(this.parseValue(e.value))),this.tooltipStyle()){case`none`:break;case`series-table`:let t=`<table class="ITooltip-series-table"><thead><tr><th colspan="2">`+e.label+`</th></tr></thead><tbody>`;return e.arr.forEach(function(e){t+=`<tr>`,t+=`<td>`,t+=`<div class="series-table-row-color" style="background-color:`+e.color+`"></div>`,t+=`<div class="series-table-row-label">`+e.label+`</div>`,t+=`</td>`,t+=`<td><div class="series-table-row-value">`+e.value+`</div></td>`,t+=`</tr>`}),t+=`</tbody>`,t+=`</table>`,t;default:return e.series?`<span style='color:`+this.tooltipSeriesColor()+`'>`+e.series+`</span> / <span style='color:`+this.tooltipLabelColor()+`'>`+e.label+`</span>: <span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`:e.label===``?`<span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`:`<span style='color:`+this.tooltipLabelColor()+`'>`+e.label+`</span>: <span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`}},ITooltip.prototype.tooltipKeyValueFormat=function(e,t){let n=``;for(let r in t)if(r!==e){let e=t&&t[r]?t[r]:``;n+=`<tr><td style="${this.tooltipLabelColor_exists()?`color:`+this.tooltipLabelColor():``}">${r}</td><td style="font-weight:normal">${e}</td></tr>`}return`<table>
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require("@hpcc-js/common")):typeof define==`function`&&define.amd?define([`exports`,`@hpcc-js/common`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`@hpcc-js/api`]={},e[`@hpcc-js/common`]))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=`@hpcc-js/api`,r=`3.5.1`,i=`3.26.1`;function I1DChart(){}I1DChart.prototype._dataFamily=`1D`,I1DChart.prototype._palette=t.Palette.rainbow(`default`),I1DChart.prototype.click=function(e,t,n){},I1DChart.prototype.dblclick=function(e,t,n){};function I2DChart(){}I2DChart.prototype._dataFamily=`2D`,I2DChart.prototype._palette=t.Palette.ordinal(`default`),I2DChart.prototype.fillColor=function(e,t,n,r){return this._palette(e[0])},I2DChart.prototype.strokeColor=function(e,n,r,i){return(0,t.hsl)(this.fillColor(e,n,r,i)).darker().toString()},I2DChart.prototype.textColor=function(e,n,r,i){return t.Palette.textColor(this.fillColor(e,n,r,i))},I2DChart.prototype.click=function(e,t,n){},I2DChart.prototype.dblclick=function(e,t,n){};function I2DAggrChart(){}I2DAggrChart.prototype._palette=t.Palette.rainbow(`default`),I2DAggrChart.prototype.fillColor=function(e,t,n){return this._palette(e.length)},I2DAggrChart.prototype.strokeColor=function(e,n,r){return(0,t.hsl)(this.fillColor(e,n,r)).darker().toString()},I2DAggrChart.prototype.textColor=function(e,n,r){return t.Palette.textColor(this.fillColor(e,n,r))},I2DAggrChart.prototype.click=function(e,t,n){},I2DAggrChart.prototype.dblclick=function(e,t,n){};function IGraph(){}IGraph.prototype._dataFamily=`graph`,IGraph.prototype.vertex_click=function(e,t,n,r){r&&r.vertex},IGraph.prototype.vertex_dblclick=function(e,t,n,r){r&&r.vertex},IGraph.prototype.edge_click=function(e,t,n,r){r&&r.edge},IGraph.prototype.edge_dblclick=function(e,t,n,r){r&&r.edge};function instanceOfIHighlight(e){return typeof e.highlightColumn==`function`}function IInput(){}IInput.prototype=Object.create(t.Widget.prototype),IInput.prototype.constructor=IInput,IInput.prototype.isValid=function(){return!(this.validate()&&!new RegExp(this.validate()).test(this.value()))},IInput.prototype.hasValue=function(){if(typeof this.type==`function`){switch(this.type()){case`radio`:case`checkbox`:if(this.value()&&this.value()!==`false`)return!0;break;default:if(this.value())return!0;break}return!1}return this.value()!==``},IInput.prototype.blur=function(e){},IInput.prototype.keyup=function(e){},IInput.prototype.focus=function(e){},IInput.prototype.click=function(e){},IInput.prototype.dblclick=function(e){},IInput.prototype.change=function(e,t){},IInput.prototype.resetValue=function(e){e.value(e._inputElement[0].node().value)},IInput.prototype.disable=function(e){this._inputElement.forEach(function(t,n){t.attr(`disabled`,e?`disabled`:null)})},IInput.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},IInput.prototype.publish(`name`,``,`string`,`HTML name for the input`),IInput.prototype.publish(`label`,``,`string`,`Descriptive label`),IInput.prototype.publish(`value`,``,`string`,`Input Current Value`),IInput.prototype.publish(`validate`,null,`string`,`Input Validation`);function INDChart(){}INDChart.prototype._dataFamily=`ND`,INDChart.prototype._palette=t.Palette.ordinal(`default`),INDChart.prototype.fillColor=function(e,t,n,r){return this._palette(t)},INDChart.prototype.strokeColor=function(e,n,r,i){return(0,t.hsl)(this.fillColor(e,n,r,i)).darker().toString()},INDChart.prototype.textColor=function(e,n,r,i){return t.Palette.textColor(this.fillColor(e,n,r,i))},INDChart.prototype.click=function(e,t,n){},INDChart.prototype.dblclick=function(e,t,n){};function tip(){let e=d3TipDirection,n=d3TipOffset,r=d3TipHTML,i=functor(document.body),a=initNode(),o=null,s=null,c=null,tip=function(e){if(o=getSVGNode(e),!o)return;s=o.createSVGPoint();let t=i();t&&a&&t.appendChild(a)};tip.show=function(e,t,a){c=a[t];let o=Array.prototype.slice.call(arguments),s=r.apply(this,o);if(s===null)return tip;let d=n.apply(this,o),f=getNodeEl(),p=u.length,m,h=i().getBoundingClientRect();for(f.html(s).style(`opacity`,1).style(`pointer-events`,`all`);p--;)f.classed(u[p],!1);let g=!1,_={},v=u[0];for(let e=0;e<u.length&&(g=_placement_attempt(u[e]),!g);e++);if(g)f.classed(`notick`,!1);else{f.classed(`notick`,!0);let e=_vertical_adjustment(_[v]),t=_horizontal_adjustment(_[v]);_placement_attempt(v,e,t)}return tip;function _horizontal_adjustment(e){return e.left>e.right?e.left>0?-e.left:0:e.right>0?e.right:0}function _vertical_adjustment(e){return e.top>e.bottom?e.top>0?-e.top:0:e.bottom}function _placement_attempt(e,t,n){t||=0,n||=0,f.style(`white-space`,`nowrap`),m=l.get(e).apply(this),f.classed(e,!0).style(`top`,m.top+d[0]-t+`px`).style(`left`,m.left+d[1]-n+`px`);let r=f.node().getBoundingClientRect(),i=r.top>h.top&&r.left>h.left&&r.bottom<h.bottom&&r.right<h.right;return _[e]={top:h.top-r.top,right:r.right-h.right,bottom:r.bottom-h.bottom,left:h.left-r.left},f.style(`white-space`,`normal`),_[e].total_overflow=Object.keys(_[e]).filter(t=>_[e][t]>0).reduce((t,n)=>t+_[e][n],0),_[v].total_overflow>_[e].total_overflow&&(v=e),i||f.classed(e,!1),i}},tip.hide=function(){return getNodeEl().style(`opacity`,0).style(`pointer-events`,`none`),tip},tip.attr=function(e,n){if(arguments.length<2&&typeof e==`string`)return getNodeEl().attr(e);let r=Array.prototype.slice.call(arguments);return t.selection.prototype.attr.apply(getNodeEl(),r),tip},tip.style=function(e,n){if(arguments.length<2&&typeof e==`string`)return getNodeEl().style(e);let r=Array.prototype.slice.call(arguments);return t.selection.prototype.style.apply(getNodeEl(),r),tip},tip.direction=function(t){return arguments.length?(e=t==null?t:functor(t),tip):e},tip.offset=function(e){return arguments.length?(n=e==null?e:functor(e),tip):n},tip.html=function(e){return arguments.length?(r=e==null?e:functor(e),tip):r},tip.rootElement=function(e){return arguments.length?(i=functor(e),tip):i},tip.destroy=function(){return a&&=(getNodeEl().remove(),null),tip};function d3TipDirection(){return`n`}function d3TipOffset(){return[0,0]}function d3TipHTML(){return` `}let l=(0,t.map)({n:directionNorth,s:directionSouth,e:directionEast,w:directionWest,nw:directionNorthWest,ne:directionNorthEast,sw:directionSouthWest,se:directionSouthEast}),u=l.keys();function directionNorth(){let e=getScreenBBox(window);return{top:e.n.y-a.offsetHeight,left:e.n.x-a.offsetWidth/2}}function directionSouth(){let e=getScreenBBox(window);return{top:e.s.y+8,left:e.s.x-a.offsetWidth/2}}function directionEast(){let e=getScreenBBox(window);return{top:e.e.y-a.offsetHeight/2,left:e.e.x+8}}function directionWest(){let e=getScreenBBox(window);return{top:e.w.y-a.offsetHeight/2,left:e.w.x-a.offsetWidth-8}}function directionNorthWest(){let e=getScreenBBox(window);return{top:e.nw.y-a.offsetHeight,left:e.nw.x-a.offsetWidth}}function directionNorthEast(){let e=getScreenBBox(window);return{top:e.ne.y-a.offsetHeight,left:e.ne.x}}function directionSouthWest(){let e=getScreenBBox(window);return{top:e.sw.y,left:e.sw.x-a.offsetWidth}}function directionSouthEast(){let e=getScreenBBox(window);return{top:e.se.y,left:e.se.x}}function initNode(){let e=(0,t.select)(document.createElement(`div`));return e.attr(`class`,`d3-tip`).style(`position`,`absolute`).style(`top`,`0px`).style(`opacity`,0).style(`pointer-events`,`none`).style(`box-sizing`,`border-box`),e.node()}function getSVGNode(e){let t=e.node();return t?t.tagName.toLowerCase()===`svg`?t:t.ownerSVGElement:null}function getNodeEl(){return a??(a=initNode(),i().appendChild(a)),(0,t.select)(a)}function getScreenBBox(e){let t=c||e;for(;t.getCTM==null&&t.parentNode!=null;)t=t.parentNode;let n={},r=t.getCTM(),i=t.getBBox(),a=i.width,o=i.height,l=i.x,u=i.y;return s.x=l,s.y=u,n.nw=s.matrixTransform(r),s.x+=a,n.ne=s.matrixTransform(r),s.y+=o,n.se=s.matrixTransform(r),s.x-=a,n.sw=s.matrixTransform(r),s.y-=o/2,n.w=s.matrixTransform(r),s.x+=a,n.e=s.matrixTransform(r),s.x-=a/2,s.y-=o/2,n.n=s.matrixTransform(r),s.y+=o,n.s=s.matrixTransform(r),n}function functor(e){return typeof e==`function`?e:function(){return e}}return tip}function ITooltip(){if(this.tooltip=tip(),this.tooltipLabelFormat_exists()&&(this._labelFormatter=(0,t.format)(this.tooltipLabelFormat())),this.tooltipValueFormat_exists()&&(this._valueFormatter=(0,t.format)(this.tooltipValueFormat())),this.layerEnter){let e=this.layerEnter;this.layerEnter=function(t,n,r){this._parentOverlay||=t._parentOverlay,this.tooltipEnter(n),e.apply(this,arguments)};let t=this.layerUpdate;this.layerUpdate=function(e){t.apply(this,arguments),this.tooltipUpdate()};let n=this.layerExit;this.layerExit=function(e){this.tooltipExit(),n.apply(this,arguments)}}else{let e=this.enter;this.enter=function(t,n){this.tooltipEnter(n),e.apply(this,arguments)};let t=this.update;this.update=function(e,n){t.apply(this,arguments),this.tooltipUpdate()};let n=this.exit;this.exit=function(e,t){this.tooltipExit(),n.apply(this,arguments)}}}ITooltip.prototype=Object.create(t.Widget.prototype),ITooltip.prototype.constructor=ITooltip,ITooltip.prototype.tooltipEnter=function(e){let t=this.parentOverlay();t.empty()||this.tooltip.rootElement(t.node().parentNode),e.call(this.tooltip)},ITooltip.prototype.tooltipUpdate=function(){this.tooltip.offset(()=>{if(event&&this.tooltipFollowMouse()){let e=document.querySelector(`.d3-tip`);return e.style.display=`block`,e.style.left=this.tooltipOffset()+event.clientX+`px`,e.style.top=event.clientY+`px`,[]}switch(this.tooltip.direction()()){case`e`:return[0,this.tooltipOffset()];default:return[-this.tooltipOffset(),0]}});let e=this.tooltip.attr(`class`);e&&(e=e.split(` notick`).join(``)+(this.tooltipTick()?``:` notick`)+(this.tooltipStyle()===`none`?` hidden`:``),e=e.split(` `).filter(function(e){return e.indexOf(`ITooltip-tooltipStyle-`)!==0}).join(` `),e+=` ITooltip-tooltipStyle-`+this.tooltipStyle(),this.tooltip.attr(`class`,e))},ITooltip.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},ITooltip.prototype._tooltipHTML=function(e){return e},ITooltip.prototype.tooltipHTML=function(e){return this.tooltip.html(e)},ITooltip.prototype.tooltipFormat=function(e={}){switch(e.label=e.label===void 0?``:e.label,this._labelFormatter?e.label=this._labelFormatter(e.label)||``:this.formatData&&this.parseData&&(e.label=this.formatData(this.parseData(e.label))),e.series=e.series||``,e.value instanceof Date?e.value=e.value||``:this._valueFormatter?e.value=this._valueFormatter(e.value)||``:this.formatValue&&this.parseValue&&(e.value=this.formatValue(this.parseValue(e.value))),this.tooltipStyle()){case`none`:break;case`series-table`:let t=`<table class="ITooltip-series-table"><thead><tr><th colspan="2">`+e.label+`</th></tr></thead><tbody>`;return e.arr.forEach(function(e){t+=`<tr>`,t+=`<td>`,t+=`<div class="series-table-row-color" style="background-color:`+e.color+`"></div>`,t+=`<div class="series-table-row-label">`+e.label+`</div>`,t+=`</td>`,t+=`<td><div class="series-table-row-value">`+e.value+`</div></td>`,t+=`</tr>`}),t+=`</tbody>`,t+=`</table>`,t;default:return e.series?`<span style='color:`+this.tooltipSeriesColor()+`'>`+e.series+`</span> / <span style='color:`+this.tooltipLabelColor()+`'>`+e.label+`</span>: <span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`:e.label===``?`<span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`:`<span style='color:`+this.tooltipLabelColor()+`'>`+e.label+`</span>: <span style='color:`+this.tooltipValueColor()+`'>`+e.value+`</span>`}},ITooltip.prototype.tooltipKeyValueFormat=function(e,t){let n=``;for(let r in t)if(r!==e){let e=t&&t[r]?t[r]:``;n+=`<tr><td style="${this.tooltipLabelColor_exists()?`color:`+this.tooltipLabelColor():``}">${r}</td><td style="font-weight:normal">${e}</td></tr>`}return`<table>
|
|
2
2
|
<thead>
|
|
3
3
|
<tr><th colspan="2" style="font-weight:bold;font-size:16px">${t[e]}</th></tr>
|
|
4
4
|
</thead>
|
package/dist/index.umd.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.umd.cjs","names":[],"sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"mappings":"+VAAa,EAAW,eACX,EAAc,SACd,EAAgB,SCA7B,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS,EAGvD,SAAS,UAAU,MAAQ,SAAU,EAAK,EAAQ,EAAU,CAC5D,EAEA,SAAS,UAAU,SAAW,SAAU,EAAK,EAAQ,EAAU,CAC/D,ECTA,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS,EAEvD,SAAS,UAAU,UAAY,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACjF,OAAO,KAAK,SAAS,EAAI,EAAE,CAC/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SAAS,UAAU,QAAQ,qBAAsB,IAAA,GAAW,SAAU,oCAAqC,KAAM,CAAC,CAAC,EACnH,SAAS,UAAU,QAAQ,qBAAsB,UAAW,aAAc,+BAAgC,KAAM,CAAC,CAAC,EAClH,SAAS,UAAU,QAAQ,oBAAqB,UAAW,aAAc,gDAAiD,KAAM,CAAC,CAAC,EAClI,SAAS,UAAU,QAAQ,oBAAqB,QAAS,aAAc,4BAA6B,KAAM,CAAC,CAAC,EAC5G,SAAS,UAAU,QAAQ,cAAe,GAAM,UAAW,oBAAqB,KAAM,CAAC,CAAC,EACxF,SAAS,UAAU,QAAQ,gBAAiB,EAAG,SAAU,yBAA0B,KAAM,CAAC,CAAC,EAE3F,IAAM,EAAqB,SAAS,UAAU,mBAC9C,SAAS,UAAU,mBAAqB,SAAU,EAAuB,CACrE,IAAM,EAAS,EAAmB,MAAM,KAAM,SAAS,EAIvD,OAHI,UAAU,SACV,KAAK,iBAAA,EAAA,EAAA,QAA2B,CAAC,GAE9B,CACX,EAEA,IAAM,EAAqB,SAAS,UAAU,mBAC9C,SAAS,UAAU,mBAAqB,SAAU,EAAuB,CACrE,IAAM,EAAS,EAAmB,MAAM,KAAM,SAAS,EAIvD,OAHI,UAAU,SACV,KAAK,iBAAA,EAAA,EAAA,QAA2B,CAAC,GAE9B,CACX,EC7NA,SAAgB,OAAQ,CACxB,CACA,MAAM,UAAU,YAAc,MAG9B,MAAM,UAAU,MAAQ,SAAU,EAAK,EAAQ,EAAU,CACzD,EAEA,MAAM,UAAU,SAAW,SAAU,EAAK,EAAQ,EAAU,CAC5D,EAEA,MAAM,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS"}
|
|
1
|
+
{"version":3,"file":"index.umd.cjs","names":[],"sources":["../src/__package__.ts","../src/I1DChart.ts","../src/I2DChart.ts","../src/I2DAggrChart.ts","../src/IGraph.ts","../src/IHighlight.ts","../src/IInput.ts","../src/INDChart.ts","../src/Tooltip.ts","../src/ITooltip.ts","../src/ITree.ts"],"sourcesContent":["export const PKG_NAME = \"__PACKAGE_NAME__\";\nexport const PKG_VERSION = \"__PACKAGE_VERSION__\";\nexport const BUILD_VERSION = \"__BUILD_VERSION__\";\n","import { Palette } from \"@hpcc-js/common\";\n\nexport function I1DChart() {\n}\nI1DChart.prototype._dataFamily = \"1D\";\nI1DChart.prototype._palette = Palette.rainbow(\"default\");\n\n// Events ---\nI1DChart.prototype.click = function (row, column, selected) {\n};\n\nI1DChart.prototype.dblclick = function (row, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DChart() {\n}\nI2DChart.prototype._dataFamily = \"2D\";\nI2DChart.prototype._palette = Palette.ordinal(\"default\");\n\nI2DChart.prototype.fillColor = function (row: any[], column, value, origRow): string {\n return this._palette(row[0]);\n};\n\nI2DChart.prototype.strokeColor = function (row: any[], column, value, origRow): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nI2DChart.prototype.textColor = function (row: any[], column, value, origRow): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nI2DChart.prototype.click = function (row: object, column, selected) {\n};\n\nI2DChart.prototype.dblclick = function (row: object, column, selected) {\n};\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function I2DAggrChart() {\n}\nI2DAggrChart.prototype._palette = Palette.rainbow(\"default\");\n\nI2DAggrChart.prototype.fillColor = function (row: any[][], column, value): string {\n return this._palette(row.length);\n};\n\nI2DAggrChart.prototype.strokeColor = function (row: any[][], column, value): string {\n return d3Hsl(this.fillColor(row, column, value)).darker().toString();\n};\n\nI2DAggrChart.prototype.textColor = function (row: any[][], column, value): string {\n return Palette.textColor(this.fillColor(row, column, value));\n};\n\n// Events ---\nI2DAggrChart.prototype.click = function (row: object[], column, selected) {\n};\n\nI2DAggrChart.prototype.dblclick = function (row: object[], column, selected) {\n};\n","export function IGraph() {\n}\nIGraph.prototype._dataFamily = \"graph\";\n\n// Events ---\nIGraph.prototype.vertex_click = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.vertex_dblclick = function (_row, _col, _sel, more) {\n if (more && more.vertex) {\n }\n};\n\nIGraph.prototype.edge_click = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n\nIGraph.prototype.edge_dblclick = function (_row, _col, _sel, more) {\n if (more && more.edge) {\n }\n};\n","export interface IHighlight {\n highlightColumn(column: string): this;\n}\n\nexport function instanceOfIHighlight(w: any): w is IHighlight {\n return typeof (w as any).highlightColumn === \"function\";\n}\n","import { Widget } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function IInput() {\n}\nIInput.prototype = Object.create(Widget.prototype);\nIInput.prototype.constructor = IInput;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\n// Implementation ---\nIInput.prototype.isValid = function () {\n if (this.validate()) {\n const re = new RegExp(this.validate());\n if (!re.test(this.value())) {\n return false;\n }\n }\n return true;\n};\n\nIInput.prototype.hasValue = function () {\n if (typeof (this as any).type === \"function\") {\n switch ((this as any).type()) {\n case \"radio\":\n /* falls through */\n case \"checkbox\":\n if (this.value() && this.value() !== \"false\") {\n return true;\n }\n break;\n default:\n if (this.value()) {\n return true;\n }\n break;\n }\n return false;\n }\n return this.value() !== \"\";\n};\n\n// Events ---\nIInput.prototype.blur = function (_w) {\n};\nIInput.prototype.keyup = function (_w) {\n};\nIInput.prototype.focus = function (_w) {\n};\nIInput.prototype.click = function (_w) {\n};\nIInput.prototype.dblclick = function (_w) {\n};\nIInput.prototype.change = function (_w, complete: boolean) {\n};\n\nIInput.prototype.resetValue = function (w) {\n w.value(w._inputElement[0].node().value);\n};\n\nIInput.prototype.disable = function (disable) {\n this._inputElement.forEach(function (e, idx) {\n e.attr(\"disabled\", disable ? \"disabled\" : null);\n });\n};\n\nIInput.prototype.setFocus = function () {\n if (this._inputElement.length) {\n this._inputElement[0].node().focus();\n }\n};\n\nexport interface IInput {\n name: { (): string; (_: string): IInput };\n name_exists: () => boolean;\n label: { (): string; (_: string): IInput };\n label_exists: () => boolean;\n value: { (): any; (_: any): IInput };\n value_exists: () => boolean;\n validate: { (): string; (_: string): IInput };\n validate_exists: () => boolean;\n}\nIInput.prototype.publish(\"name\", \"\", \"string\", \"HTML name for the input\");\nIInput.prototype.publish(\"label\", \"\", \"string\", \"Descriptive label\");\nIInput.prototype.publish(\"value\", \"\", \"string\", \"Input Current Value\");\nIInput.prototype.publish(\"validate\", null, \"string\", \"Input Validation\");\n","import { Palette } from \"@hpcc-js/common\";\nimport { hsl as d3Hsl } from \"d3-color\";\n\nexport function INDChart() {\n}\nINDChart.prototype._dataFamily = \"ND\";\nINDChart.prototype._palette = Palette.ordinal(\"default\");\n\nINDChart.prototype.fillColor = function (row: any[], column: string, value: number, origRow: any): string {\n return this._palette(column);\n};\n\nINDChart.prototype.strokeColor = function (row: any[], column: string, value: number, origRow: any): string {\n return d3Hsl(this.fillColor(row, column, value, origRow)).darker().toString();\n};\n\nINDChart.prototype.textColor = function (row: any[], column: string, value: number, origRow: any): string {\n return Palette.textColor(this.fillColor(row, column, value, origRow));\n};\n\n// Events ---\nINDChart.prototype.click = function (row, column, selected) {\n};\n\nINDChart.prototype.dblclick = function (row, column, selected) {\n};\n","// Based on https://github.com/GordonSmith/d3-tip forked from https://github.com/Caged/d3-tip\n\nimport { map } from \"d3-collection\";\nimport { select, selection } from \"d3-selection\";\n\nexport function tip() {\n let direction = d3TipDirection;\n let offset = d3TipOffset;\n let html = d3TipHTML;\n let rootElement = functor(document.body);\n let node = initNode();\n let svg = null;\n let point = null;\n let target = null;\n\n const tip: any = function (vis) {\n svg = getSVGNode(vis);\n if (!svg) return;\n point = svg.createSVGPoint();\n const re = rootElement();\n if (!re) return;\n if (!node) return;\n re.appendChild(node);\n };\n\n // Public - show the tooltip on the screen\n //\n // Returns a tip\n tip.show = function (d, idx, arr) {\n target = arr[idx];\n const args = Array.prototype.slice.call(arguments) as [];\n const content = html.apply(this, args);\n if (content === null) {\n return tip;\n }\n const poffset = offset.apply(this, args);\n const nodel = getNodeEl();\n let i = directions.length;\n let coords;\n const root_bbox = rootElement().getBoundingClientRect();\n nodel.html(content)\n .style(\"opacity\", 1).style(\"pointer-events\", \"all\");\n\n while (i--) nodel.classed(directions[i], false);\n let placement_success = false;\n const placement_overflow = {};\n let least_overflow_direction = directions[0];\n for (let i = 0; i < directions.length; i++) {\n placement_success = _placement_attempt(directions[i]);\n if (placement_success) break;\n }\n if (!placement_success) {\n nodel.classed(\"notick\", true);\n const top_offset = _vertical_adjustment(placement_overflow[least_overflow_direction]);\n const left_offset = _horizontal_adjustment(placement_overflow[least_overflow_direction]);\n _placement_attempt(least_overflow_direction, top_offset, left_offset);\n } else {\n nodel.classed(\"notick\", false);\n }\n return tip;\n\n function _horizontal_adjustment(overflow_obj) {\n if (overflow_obj.left > overflow_obj.right) {\n return overflow_obj.left > 0 ? -overflow_obj.left : 0;\n } else {\n return overflow_obj.right > 0 ? overflow_obj.right : 0;\n }\n }\n function _vertical_adjustment(overflow_obj) {\n if (overflow_obj.top > overflow_obj.bottom) {\n return overflow_obj.top > 0 ? -overflow_obj.top : 0;\n } else {\n return overflow_obj.bottom;\n }\n }\n\n function _placement_attempt(this: any, _dir, _top_offset?, _left_offset?) {\n _top_offset = _top_offset ? _top_offset : 0;\n _left_offset = _left_offset ? _left_offset : 0;\n nodel.style(\"white-space\", \"nowrap\");\n coords = directionCallbacks.get(_dir).apply(this);\n nodel.classed(_dir, true)\n .style(\"top\", (coords.top + poffset[0] - _top_offset) + \"px\")\n .style(\"left\", (coords.left + poffset[1] - _left_offset) + \"px\");\n const nodel_bbox = nodel.node().getBoundingClientRect();\n const ret = nodel_bbox.top > root_bbox.top\n && nodel_bbox.left > root_bbox.left\n && nodel_bbox.bottom < root_bbox.bottom\n && nodel_bbox.right < root_bbox.right\n ;\n placement_overflow[_dir] = {\n top: root_bbox.top - nodel_bbox.top,\n right: nodel_bbox.right - root_bbox.right,\n bottom: nodel_bbox.bottom - root_bbox.bottom,\n left: root_bbox.left - nodel_bbox.left\n };\n nodel.style(\"white-space\", \"normal\");\n placement_overflow[_dir].total_overflow = Object.keys(placement_overflow[_dir])\n .filter(side => placement_overflow[_dir][side] > 0)\n .reduce((sum, side) => {\n const side_overflow = placement_overflow[_dir][side];\n return sum + side_overflow;\n }, 0);\n if (placement_overflow[least_overflow_direction].total_overflow > placement_overflow[_dir].total_overflow) {\n least_overflow_direction = _dir;\n }\n if (!ret) {\n nodel.classed(_dir, false);\n }\n return ret;\n }\n };\n\n // Public - hide the tooltip\n //\n // Returns a tip\n tip.hide = function () {\n const nodel = getNodeEl();\n nodel.style(\"opacity\", 0).style(\"pointer-events\", \"none\");\n return tip;\n };\n\n // Public: Proxy attr calls to the d3 tip container.\n // Sets or gets attribute value.\n //\n // n - name of the attribute\n // v - value of the attribute\n //\n // Returns tip or attribute value\n tip.attr = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().attr(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.attr.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Proxy style calls to the d3 tip container.\n // Sets or gets a style value.\n //\n // n - name of the property\n // v - value of the property\n //\n // Returns tip or style property value \n tip.style = function (n, v) {\n if (arguments.length < 2 && typeof n === \"string\") {\n return getNodeEl().style(n);\n }\n\n const args = Array.prototype.slice.call(arguments);\n selection.prototype.style.apply(getNodeEl(), args);\n return tip;\n };\n\n // Public: Set or get the direction of the tooltip\n //\n // v - One of n(north), s(south), e(east), or w(west), nw(northwest),\n // sw(southwest), ne(northeast) or se(southeast)\n //\n // Returns tip or direction\n tip.direction = function (v) {\n if (!arguments.length) return direction;\n direction = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: Sets or gets the offset of the tip\n //\n // v - Array of [x, y] offset\n //\n // Returns offset or\n tip.offset = function (v) {\n if (!arguments.length) return offset;\n offset = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the html value of the tooltip\n //\n // v - String value of the tip\n //\n // Returns html value or tip\n tip.html = function (v) {\n if (!arguments.length) return html;\n html = v == null ? v : functor(v);\n\n return tip;\n };\n\n // Public: sets or gets the root element anchor of the tooltip\n //\n // v - root element of the tooltip\n //\n // Returns root node of tip\n tip.rootElement = function (v) {\n if (!arguments.length) return rootElement;\n rootElement = functor(v);\n\n return tip;\n };\n\n // Public: destroys the tooltip and removes it from the DOM\n //\n // Returns a tip\n tip.destroy = function () {\n if (node) {\n getNodeEl().remove();\n node = null;\n }\n return tip;\n };\n\n function d3TipDirection() { return \"n\"; }\n function d3TipOffset() { return [0, 0]; }\n function d3TipHTML() { return \" \"; }\n\n const directionCallbacks = map({\n n: directionNorth,\n s: directionSouth,\n e: directionEast,\n w: directionWest,\n nw: directionNorthWest,\n ne: directionNorthEast,\n sw: directionSouthWest,\n se: directionSouthEast\n });\n const directions = directionCallbacks.keys();\n\n function directionNorth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.n.y - node.offsetHeight,\n left: bbox.n.x - node.offsetWidth / 2\n };\n }\n\n function directionSouth() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.s.y + 8,\n left: bbox.s.x - node.offsetWidth / 2\n };\n }\n\n function directionEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.e.y - node.offsetHeight / 2,\n left: bbox.e.x + 8\n };\n }\n\n function directionWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.w.y - node.offsetHeight / 2,\n left: bbox.w.x - node.offsetWidth - 8\n };\n }\n\n function directionNorthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.nw.y - node.offsetHeight,\n left: bbox.nw.x - node.offsetWidth\n };\n }\n\n function directionNorthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.ne.y - node.offsetHeight,\n left: bbox.ne.x\n };\n }\n\n function directionSouthWest() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.sw.y,\n left: bbox.sw.x - node.offsetWidth\n };\n }\n\n function directionSouthEast() {\n const bbox = getScreenBBox(window);\n return {\n top: bbox.se.y,\n left: bbox.se.x\n };\n }\n\n function initNode() {\n const div = select(document.createElement(\"div\"));\n div\n .attr(\"class\", \"d3-tip\")\n .style(\"position\", \"absolute\")\n .style(\"top\", \"0px\")\n .style(\"opacity\", 0)\n .style(\"pointer-events\", \"none\")\n .style(\"box-sizing\", \"border-box\");\n\n return div.node();\n }\n\n function getSVGNode(element) {\n const svgNode = element.node();\n if (!svgNode) return null;\n if (svgNode.tagName.toLowerCase() === \"svg\") return svgNode;\n return svgNode.ownerSVGElement;\n }\n\n function getNodeEl() {\n if (node == null) {\n node = initNode();\n // re-add node to DOM\n rootElement().appendChild(node);\n }\n return select(node);\n }\n\n // Private - gets the screen coordinates of a shape\n //\n // Given a shape on the screen, will return an SVGPoint for the directions\n // n(north), s(south), e(east), w(west), ne(northeast), se(southeast),\n // nw(northwest), sw(southwest).\n //\n // +-+-+\n // | |\n // + +\n // | |\n // +-+-+\n //\n // Returns an Object {n, s, e, w, nw, sw, ne, se}\n function getScreenBBox(targetShape) {\n let targetel = target || targetShape;\n\n while (targetel.getCTM == null && targetel.parentNode != null) {\n targetel = targetel.parentNode;\n }\n\n const bbox: any = {};\n const matrix = targetel.getCTM();\n const tbbox = targetel.getBBox();\n const width = tbbox.width;\n const height = tbbox.height;\n const x = tbbox.x;\n const y = tbbox.y;\n\n point.x = x;\n point.y = y;\n bbox.nw = point.matrixTransform(matrix);\n point.x += width;\n bbox.ne = point.matrixTransform(matrix);\n point.y += height;\n bbox.se = point.matrixTransform(matrix);\n point.x -= width;\n bbox.sw = point.matrixTransform(matrix);\n point.y -= height / 2;\n bbox.w = point.matrixTransform(matrix);\n point.x += width;\n bbox.e = point.matrixTransform(matrix);\n point.x -= width / 2;\n point.y -= height / 2;\n bbox.n = point.matrixTransform(matrix);\n point.y += height;\n bbox.s = point.matrixTransform(matrix);\n\n return bbox;\n }\n\n // Private - replace D3JS 3.X d3.functor() function\n function functor(v) {\n return typeof v === \"function\" ? v : function () {\n return v;\n };\n }\n\n return tip;\n}\n","import { Widget } from \"@hpcc-js/common\";\nimport { format as d3Format } from \"d3-format\";\nimport { tip } from \"./Tooltip.ts\";\n\nimport \"../src/ITooltip.css\";\n\ndeclare const event: object;\n\n// Use old school class declaration as this is a mixin ---\nexport function ITooltip(this: any) {\n this.tooltip = tip();\n\n if (this.tooltipLabelFormat_exists()) {\n this._labelFormatter = d3Format(this.tooltipLabelFormat() as string);\n }\n\n if (this.tooltipValueFormat_exists()) {\n this._valueFormatter = d3Format(this.tooltipValueFormat() as string);\n }\n\n if (this.layerEnter) {\n const layerEnter = this.layerEnter;\n this.layerEnter = function (_base, svgElement, _domElement) {\n if (!this._parentOverlay) {\n this._parentOverlay = _base._parentOverlay;\n }\n this.tooltipEnter(svgElement);\n layerEnter.apply(this, arguments);\n };\n const layerUpdate = this.layerUpdate;\n this.layerUpdate = function (_base) {\n layerUpdate.apply(this, arguments);\n this.tooltipUpdate();\n };\n const layerExit = this.layerExit;\n this.layerExit = function (_base) {\n this.tooltipExit();\n layerExit.apply(this, arguments);\n };\n } else {\n const enter = this.enter;\n this.enter = function (_domNode, element) {\n this.tooltipEnter(element);\n enter.apply(this, arguments);\n };\n const update = this.update;\n this.update = function (_domNode, _element) {\n update.apply(this, arguments);\n this.tooltipUpdate();\n };\n const exit = this.exit;\n this.exit = function (_domNode, _element) {\n this.tooltipExit();\n exit.apply(this, arguments);\n };\n }\n}\nITooltip.prototype = Object.create(Widget.prototype);\nITooltip.prototype.constructor = ITooltip;\n\n// abstract target(): any;\n// abstract target(_: any): this;\n\nITooltip.prototype.tooltipEnter = function (element) {\n const overlayElement = this.parentOverlay();\n if (!overlayElement.empty()) {\n this.tooltip.rootElement(overlayElement.node().parentNode);\n }\n element.call(this.tooltip);\n};\n\nITooltip.prototype.tooltipUpdate = function () {\n this.tooltip.offset(() => {\n if (event && this.tooltipFollowMouse()) {\n const d3tipElement: HTMLDivElement = document.querySelector(\".d3-tip\"); // d3Tip offers no reference to the '.d3-tip' element...?\n d3tipElement.style.display = \"block\";\n d3tipElement.style.left = this.tooltipOffset() + ((event as any).clientX) + \"px\";\n d3tipElement.style.top = (event as any).clientY + \"px\";\n return [];\n }\n switch (this.tooltip.direction()()) {\n case \"e\":\n return [0, this.tooltipOffset()];\n default:\n return [-this.tooltipOffset(), 0];\n }\n });\n\n let classed = this.tooltip.attr(\"class\");\n if (classed) {\n classed = classed.split(\" notick\").join(\"\") + (this.tooltipTick() ? \"\" : \" notick\") + (this.tooltipStyle() === \"none\" ? \" hidden\" : \"\");\n classed = classed.split(\" \")\n .filter(function (_class) {\n return _class.indexOf(\"ITooltip-tooltipStyle-\") !== 0;\n })\n .join(\" \")\n ;\n classed += \" ITooltip-tooltipStyle-\" + this.tooltipStyle();\n this.tooltip\n .attr(\"class\", classed)\n ;\n }\n};\n\nITooltip.prototype.tooltipExit = function () {\n if (this.tooltip) {\n this.tooltip.destroy();\n }\n};\n\nITooltip.prototype._tooltipHTML = function (d) {\n return d;\n};\n\nITooltip.prototype.tooltipHTML = function (_) {\n return this.tooltip.html(_);\n};\n\nITooltip.prototype.tooltipFormat = function (opts: { label?: string | number, series?: string | number, value?: Date | string | number, arr?: Array<{ color: string, label: string, value: string }> } = {}) {\n opts.label = opts.label === undefined ? \"\" : opts.label;\n if (this._labelFormatter) {\n opts.label = this._labelFormatter(opts.label) || \"\";\n } else if (this.formatData && this.parseData) {\n opts.label = this.formatData(this.parseData(opts.label));\n }\n opts.series = opts.series || \"\";\n if (opts.value instanceof Date) {\n opts.value = opts.value || \"\";\n } else if (this._valueFormatter) {\n opts.value = this._valueFormatter(opts.value) || \"\";\n } else if (this.formatValue && this.parseValue) {\n opts.value = this.formatValue(this.parseValue(opts.value));\n }\n switch (this.tooltipStyle()) {\n case \"none\":\n break;\n case \"series-table\":\n let html = '<table class=\"ITooltip-series-table\">'\n + \"<thead>\"\n + '<tr><th colspan=\"2\">' + opts.label + \"</th></tr>\"\n + \"</thead>\"\n + \"<tbody>\";\n opts.arr.forEach(function (row) {\n html += \"<tr>\";\n html += \"<td>\";\n html += '<div class=\"series-table-row-color\" style=\"background-color:' + row.color + '\"></div>';\n html += '<div class=\"series-table-row-label\">' + row.label + \"</div>\";\n html += \"</td>\";\n html += '<td><div class=\"series-table-row-value\">' + row.value + \"</div></td>\";\n html += \"</tr>\";\n });\n html += \"</tbody>\";\n html += \"</table>\";\n return html;\n default:\n if (opts.series) {\n return \"<span style='color:\" + this.tooltipSeriesColor() + \"'>\" + opts.series + \"</span> / <span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n if (opts.label !== \"\") {\n return \"<span style='color:\" + this.tooltipLabelColor() + \"'>\" + opts.label + \"</span>: <span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n return \"<span style='color:\" + this.tooltipValueColor() + \"'>\" + opts.value + \"</span>\";\n }\n};\n\nITooltip.prototype.tooltipKeyValueFormat = function (titleKey: string, obj: object): string {\n let body = \"\";\n for (const key in obj) {\n if (key !== titleKey) {\n const value = obj && obj[key] ? obj[key] : \"\";\n body += `<tr><td style=\"${this.tooltipLabelColor_exists() ? \"color:\" + this.tooltipLabelColor() : \"\"}\">${key}</td><td style=\"font-weight:normal\">${value}</td></tr>`;\n }\n }\n return `<table>\n <thead>\n <tr><th colspan=\"2\" style=\"font-weight:bold;font-size:16px\">${obj[titleKey]}</th></tr>\n </thead>\n <tbody>\n ${body}\n </tbody>\n </table>`;\n};\n\nexport interface ITooltip {\n tooltipStyle: { (): \"default\" | \"none\" | \"series-table\"; (_: \"default\" | \"none\" | \"series-table\"): ITooltip; };\n tooltipFollowMouse: { (): boolean; (_: boolean): ITooltip; };\n tooltipLabelFormat: (_?) => string | ITooltip;\n tooltipLabelFormat_exists: () => boolean;\n tooltipValueFormat: (_?) => string | ITooltip;\n tooltipValueFormat_exists: () => boolean;\n tooltipSeriesColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor: { (): string; (_: string): ITooltip; };\n tooltipLabelColor_exists: () => boolean;\n tooltipValueColor: { (): string; (_: string): ITooltip; };\n tooltipTick: { (): boolean; (_: boolean): ITooltip; };\n tooltipOffset: { (): number; (_: number): ITooltip; };\n tooltipOffset_default: { (): number; (_: number): ITooltip; };\n}\nITooltip.prototype.publish(\"tooltipStyle\", \"default\", \"set\", \"Style mode\", [\"default\", \"none\", \"series-table\"], {});\nITooltip.prototype.publish(\"tooltipFollowMouse\", false, \"boolean\", \"If true, the tooltip will follow mouse movement\", null, {});\nITooltip.prototype.publish(\"tooltipLabelFormat\", undefined, \"string\", \"Format of tooltip label(s) (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueFormat\", undefined, \"string\", \"Number format of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipSeriesColor\", \"#EAFFFF\", \"html-color\", \"Color of tooltip series text\", null, {});\nITooltip.prototype.publish(\"tooltipLabelColor\", \"#CCFFFF\", \"html-color\", \"Color of tooltip label text (the domain axis)\", null, {});\nITooltip.prototype.publish(\"tooltipValueColor\", \"white\", \"html-color\", \"Color of tooltip value(s)\", null, {});\nITooltip.prototype.publish(\"tooltipTick\", true, \"boolean\", \"Show tooltip tick\", null, {});\nITooltip.prototype.publish(\"tooltipOffset\", 8, \"number\", \"Offset from the cursor\", null, {});\n\nconst tooltipLabelFormat = ITooltip.prototype.tooltipLabelFormat;\nITooltip.prototype.tooltipLabelFormat = function (_?): string | ITooltip {\n const retVal = tooltipLabelFormat.apply(this, arguments);\n if (arguments.length) {\n this._labelFormatter = d3Format(_);\n }\n return retVal;\n};\n\nconst tooltipValueFormat = ITooltip.prototype.tooltipValueFormat;\nITooltip.prototype.tooltipValueFormat = function (_?): string | ITooltip {\n const retVal = tooltipValueFormat.apply(this, arguments);\n if (arguments.length) {\n this._valueFormatter = d3Format(_);\n }\n return retVal;\n};\n","import { Palette } from \"@hpcc-js/common\";\n\n// Use old school class declaration as this is a mixin ---\nexport function ITree() {\n}\nITree.prototype.constructor = ITree;\n\n// Events ---\nITree.prototype.click = function (row, column, selected) {\n};\n\nITree.prototype.dblclick = function (row, column, selected) {\n};\n\nITree.prototype._palette = Palette.ordinal(\"default\");\n"],"mappings":"+VAAa,EAAW,eACX,EAAc,QACd,EAAgB,SCA7B,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS,EAGvD,SAAS,UAAU,MAAQ,SAAU,EAAK,EAAQ,EAAU,CAC5D,EAEA,SAAS,UAAU,SAAW,SAAU,EAAK,EAAQ,EAAU,CAC/D,ECTA,SAAgB,UAAW,CAC3B,CACA,SAAS,UAAU,YAAc,KACjC,SAAS,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS,EAEvD,SAAS,UAAU,UAAY,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACjF,OAAO,KAAK,SAAS,EAAI,EAAE,CAC/B,EAEA,SAAS,UAAU,YAAc,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACnF,OAAA,EAAA,EAAA,KAAa,KAAK,UAAU,EAAK,EAAQ,EAAO,CAAO,CAAC,EAAE,OAAO,EAAE,SAAS,CAChF,EAEA,SAAS,UAAU,UAAY,SAAU,EAAY,EAAQ,EAAO,EAAiB,CACjF,OAAO,EAAA,QAAQ,UAAU,KAAK,UAAU,EAAK,EAAQ,EAAO,CAAO,CAAC,CACxE,EAGA,SAAS,UAAU,MAAQ,SAAU,EAAa,EAAQ,EAAU,CACpE,EAEA,SAAS,UAAU,SAAW,SAAU,EAAa,EAAQ,EAAU,CACvE,ECtBA,SAAgB,cAAe,CAC/B,CACA,aAAa,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS,EAE3D,aAAa,UAAU,UAAY,SAAU,EAAc,EAAQ,EAAe,CAC9E,OA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,EAIvD,OAHI,UAAU,SACV,KAAK,iBAAA,EAAA,EAAA,QAA2B,CAAC,GAE9B,CACX,EAEA,IAAM,EAAqB,SAAS,UAAU,mBAC9C,SAAS,UAAU,mBAAqB,SAAU,EAAuB,CACrE,IAAM,EAAS,EAAmB,MAAM,KAAM,SAAS,EAIvD,OAHI,UAAU,SACV,KAAK,iBAAA,EAAA,EAAA,QAA2B,CAAC,GAE9B,CACX,EC7NA,SAAgB,OAAQ,CACxB,CACA,MAAM,UAAU,YAAc,MAG9B,MAAM,UAAU,MAAQ,SAAU,EAAK,EAAQ,EAAU,CACzD,EAEA,MAAM,UAAU,SAAW,SAAU,EAAK,EAAQ,EAAU,CAC5D,EAEA,MAAM,UAAU,SAAW,EAAA,QAAQ,QAAQ,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/api",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.1",
|
|
4
4
|
"description": "hpcc-js - Viz api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -21,11 +21,11 @@
|
|
|
21
21
|
"types/*"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"clean": "rimraf --glob lib* types dist *.tsbuildinfo .turbo",
|
|
24
|
+
"clean": "rimraf --glob lib* types types-3.4 dist *.tsbuildinfo .turbo",
|
|
25
25
|
"bundle": "vite build",
|
|
26
26
|
"bundle-watch": "vite build --watch",
|
|
27
27
|
"bundle-serve": "vite",
|
|
28
|
-
"gen-types": "
|
|
28
|
+
"gen-types": "tsgo --project tsconfig.json",
|
|
29
29
|
"gen-types-watch": "npm run gen-types -- --watch",
|
|
30
30
|
"build": "run-p gen-types bundle",
|
|
31
31
|
"watch": "run-p gen-types-watch bundle-watch",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"update-major": "npx --yes npm-check-updates -u"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hpcc-js/common": "^3.
|
|
42
|
+
"@hpcc-js/common": "^3.8.1"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@hpcc-js/esbuild-plugins": "^1.
|
|
45
|
+
"@hpcc-js/esbuild-plugins": "^1.9.1",
|
|
46
46
|
"d3-collection": "^1",
|
|
47
47
|
"d3-color": "3.1.0",
|
|
48
48
|
"d3-format": "^1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"url": "https://github.com/hpcc-systems/Visualization/issues"
|
|
60
60
|
},
|
|
61
61
|
"homepage": "https://github.com/hpcc-systems/Visualization",
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "0cfcae9b4ccbd0b3c9f21381f4581bf121392585"
|
|
63
63
|
}
|