@hpcc-js/api 3.5.0 → 3.5.2
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.umd.cjs +1 -1
- package/package.json +5 -5
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.5.
|
|
3
|
+
var s = "@hpcc-js/api", c = "3.5.2", l = "3.27.0";
|
|
4
4
|
//#endregion
|
|
5
5
|
//#region src/I1DChart.ts
|
|
6
6
|
function I1DChart() {}
|
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.5.0`,i=`3.26.0`;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.2`,i=`3.27.0`;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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hpcc-js/api",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "hpcc-js - Viz api",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
@@ -21,7 +21,7 @@
|
|
|
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",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"update-major": "npx --yes npm-check-updates -u"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@hpcc-js/common": "^3.8.
|
|
42
|
+
"@hpcc-js/common": "^3.8.2"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
|
-
"@hpcc-js/esbuild-plugins": "^1.9.
|
|
45
|
+
"@hpcc-js/esbuild-plugins": "^1.9.2",
|
|
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": "9d31241482c78decca86e3bf624244ce5b40f3d6"
|
|
63
63
|
}
|