Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@hpcc-js/api

Package Overview
Dependencies
Maintainers
1
Versions
198
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@hpcc-js/api - npm Package Compare versions

Comparing version 2.4.0 to 2.5.0

12

CHANGELOG.md

@@ -6,2 +6,14 @@ # Change Log

# [2.5.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@2.3.3...@hpcc-js/api@2.5.0) (2019-03-29)
### Features
* **loader:** Improved loader to manage specific versions ([cfcdfac](https://github.com/hpcc-systems/Visualization/commit/cfcdfac))
# [2.4.0](https://github.com/hpcc-systems/Visualization/compare/@hpcc-js/api@2.3.3...@hpcc-js/api@2.4.0) (2019-03-21)

@@ -8,0 +20,0 @@

4

dist/index.es6.js
import { Palette, hsl, Widget, select, selection, map, format } from '@hpcc-js/common';
var PKG_NAME = "@hpcc-js/api";
var PKG_VERSION = "2.4.0";
var BUILD_VERSION = "2.3.0";
var PKG_VERSION = "2.5.0";
var BUILD_VERSION = "2.4.0";

@@ -7,0 +7,0 @@ function I1DChart() {

@@ -8,4 +8,4 @@ (function (global, factory) {

var PKG_NAME = "@hpcc-js/api";
var PKG_VERSION = "2.4.0";
var BUILD_VERSION = "2.3.0";
var PKG_VERSION = "2.5.0";
var BUILD_VERSION = "2.4.0";

@@ -12,0 +12,0 @@ function I1DChart() {

@@ -1,1 +0,1 @@

!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],o):o((t=t||self)["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,o){"use strict";function e(){}function r(){}function n(){}function l(){}e.prototype._dataFamily="1D",e.prototype._palette=o.Palette.rainbow("default"),e.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},e.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},r.prototype._dataFamily="2D",r.prototype._palette=o.Palette.ordinal("default"),r.prototype.fillColor=function(t,o,e){return this._palette(t[0])},r.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},r.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},r.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},r.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},n.prototype._palette=o.Palette.rainbow("default"),n.prototype.fillColor=function(t,o,e){return this._palette(t.length)},n.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},n.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},n.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},n.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},l.prototype._dataFamily="graph",l.prototype.vertex_click=function(t,o,e,r){r&&r.vertex&&console.log("Vertex click: "+r.vertex.id())},l.prototype.vertex_dblclick=function(t,o,e,r){r&&r.vertex&&console.log("Vertex double click: "+r.vertex.id())},l.prototype.edge_click=function(t,o,e,r){r&&r.edge&&console.log("Edge click: "+r.edge.id())},l.prototype.edge_dblclick=function(t,o,e,r){r&&r.edge&&console.log("Edge double click: "+r.edge.id())};var i=function(t,o){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])})(t,o)};function p(t,o){function e(){this.constructor=t}i(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}var a=function(t){function o(){return t.call(this)||this}return p(o,t),o.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},o.prototype.hasValue=function(){if("function"==typeof this.type){switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1}return""!==this.value()},o.prototype.blur=function(t){},o.prototype.keyup=function(t){},o.prototype.focus=function(t){},o.prototype.click=function(t){},o.prototype.dblclick=function(t){},o.prototype.change=function(t,o){},o.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},o.prototype.disable=function(t){this._inputElement.forEach(function(o,e){o.attr("disabled",t?"disabled":null)})},o.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},o}(o.Widget);function s(){}a.prototype.publish("name","","string","HTML name for the input"),a.prototype.publish("label","","string","Descriptive label"),a.prototype.publish("value","","string","Input Current Value"),a.prototype.publish("validate",null,"string","Input Validation"),s.prototype._dataFamily="ND",s.prototype._palette=o.Palette.ordinal("default"),s.prototype.fillColor=function(t,o,e){return this._palette(o)},s.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},s.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},s.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},s.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)};!function(t,o){void 0===o&&(o={});var e=o.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===e&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: " ";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n\r\n.d3-tip.ITooltip-tooltipStyle-series-table{\r\n padding: 0;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th,\r\n.d3-tip .ITooltip-series-table td{\r\n padding: 6px;\r\n text-align: left;\r\n border: 1px solid #D1D1D1;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-color{\r\n display: inline-block;\r\n height: 10px;\r\n width: 10px;\r\n margin-right: 10px;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-label{\r\n display: inline-block;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th{\r\n background-color: #B3B3B3;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td{\r\n background-color: #FFF;\r\n color: #555;\r\n font-weight: normal;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td:first-child{\r\n border-right: 0;\r\n}\r\n\r\ntable.ITooltip-series-table td:last-child{\r\n border-left: 1px dotted #A3A3A3;\r\n}\r\n');var c=function(t){function e(){var e=t.call(this)||this;if(e.tooltip=function(){var t=function(){return"n"},e=function(){return[0,0]},r=function(){return" "},n=y(document.body),l=f(),i=null,p=null,a=null,s=function(t){var o;if(o=t.node(),i=o?"svg"===o.tagName.toLowerCase()?o:o.ownerSVGElement:null){p=i.createSVGPoint();var e=n();e&&l&&e.appendChild(l)}};s.show=function(t,o,l){a=l[o];var i=Array.prototype.slice.call(arguments),p=r.apply(this,i);if(null===p)return s;var f,h=e.apply(this,i),y=d(),b=u.length,g=n().getBoundingClientRect();for(y.html(p).style("opacity",1).style("pointer-events","all");b--;)y.classed(u[b],!1);for(var v,m=!1,x={},w=u[0],k=0;k<u.length&&!(m=S(u[k]));k++);if(m)y.classed("notick",!1);else{y.classed("notick",!0);var C=(v=x[w]).top>v.bottom?v.top>0?-v.top:0:v.bottom,_=function(t){return t.left>t.right?t.left>0?-t.left:0:t.right>0?t.right:0}(x[w]);S(w,C,_)}return s;function S(t,o,e){o=o||0,e=e||0,y.style("white-space","nowrap"),f=c.get(t).apply(this),y.classed(t,!0).style("top",f.top+h[0]-o+"px").style("left",f.left+h[1]-e+"px");var r=y.node().getBoundingClientRect(),n=r.top>g.top&&r.left>g.left&&r.bottom<g.bottom&&r.right<g.right;return x[t]={top:g.top-r.top,right:r.right-g.right,bottom:r.bottom-g.bottom,left:g.left-r.left},y.style("white-space","normal"),x[t].total_overflow=Object.keys(x[t]).filter(function(o){return x[t][o]>0}).reduce(function(o,e){return o+x[t][e]},0),x[w].total_overflow>x[t].total_overflow&&(w=t),n||y.classed(t,!1),n}},s.hide=function(){return d().style("opacity",0).style("pointer-events","none"),s},s.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return d().attr(t);var r=Array.prototype.slice.call(arguments);return o.selection.prototype.attr.apply(d(),r),s},s.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return d().style(t);var r=Array.prototype.slice.call(arguments);return o.selection.prototype.style.apply(d(),r),s},s.direction=function(o){return arguments.length?(t=null==o?o:y(o),s):t},s.offset=function(t){return arguments.length?(e=null==t?t:y(t),s):e},s.html=function(t){return arguments.length?(r=null==t?t:y(t),s):r},s.rootElement=function(t){return arguments.length?(n=y(t),s):n},s.destroy=function(){return l&&(d().remove(),l=null),s};var c=o.map({n:function(){var t=h(window);return{top:t.n.y-l.offsetHeight,left:t.n.x-l.offsetWidth/2}},s:function(){var t=h(window);return{top:t.s.y+8,left:t.s.x-l.offsetWidth/2}},e:function(){var t=h(window);return{top:t.e.y-l.offsetHeight/2,left:t.e.x+8}},w:function(){var t=h(window);return{top:t.w.y-l.offsetHeight/2,left:t.w.x-l.offsetWidth-8}},nw:function(){var t=h(window);return{top:t.nw.y-l.offsetHeight,left:t.nw.x-l.offsetWidth}},ne:function(){var t=h(window);return{top:t.ne.y-l.offsetHeight,left:t.ne.x}},sw:function(){var t=h(window);return{top:t.sw.y,left:t.sw.x-l.offsetWidth}},se:function(){var t=h(window);return{top:t.se.y,left:t.se.x}}}),u=c.keys();function f(){var t=o.select(document.createElement("div"));return t.attr("class","d3-tip").style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function d(){return null==l&&(l=f(),n().appendChild(l)),o.select(l)}function h(t){for(var o=a||t;null==o.getCTM&&null!=o.parentNode;)o=o.parentNode;var e={},r=o.getCTM(),n=o.getBBox(),l=n.width,i=n.height,s=n.x,c=n.y;return p.x=s,p.y=c,e.nw=p.matrixTransform(r),p.x+=l,e.ne=p.matrixTransform(r),p.y+=i,e.se=p.matrixTransform(r),p.x-=l,e.sw=p.matrixTransform(r),p.y-=i/2,e.w=p.matrixTransform(r),p.x+=l,e.e=p.matrixTransform(r),p.x-=l/2,p.y-=i/2,e.n=p.matrixTransform(r),p.y+=i,e.s=p.matrixTransform(r),e}function y(t){return"function"==typeof t?t:function(){return t}}return s}(),e._valueFormatter=o.format(e.tooltipValueFormat()),e.layerEnter){var r=e.layerEnter;e.layerEnter=function(t,o,e){this._parentOverlay||(this._parentOverlay=t._parentOverlay),this.tooltipEnter(o),r.apply(this,arguments)};var n=e.layerUpdate;e.layerUpdate=function(t){n.apply(this,arguments),this.tooltipUpdate()};var l=e.layerExit;e.layerExit=function(t){this.tooltipExit(),l.apply(this,arguments)}}else{var i=e.enter;e.enter=function(t,o){this.tooltipEnter(o),i.apply(this,arguments)};var p=e.update;e.update=function(t,o){p.apply(this,arguments),this.tooltipUpdate()};var a=e.exit;e.exit=function(t,o){this.tooltipExit(),a.apply(this,arguments)}}return e}return p(e,t),e.prototype.tooltipEnter=function(t){var o=this.parentOverlay();o.empty()||this.tooltip.rootElement(o.node().parentNode),t.call(this.tooltip)},e.prototype.tooltipUpdate=function(){var t=this;this.tooltip.offset(function(){if(event&&t.tooltipFollowMouse()){var o=document.querySelector(".d3-tip");return o.style.display="block",o.style.left=t.tooltipOffset()+event.clientX+"px",o.style.top=event.clientY+"px",[]}switch(t.tooltip.direction()()){case"e":return[0,t.tooltipOffset()];default:return[-t.tooltipOffset(),0]}});var o=this.tooltip.attr("class");o&&(o=(o=o.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":"")).split(" ").filter(function(t){return 0!==t.indexOf("ITooltip-tooltipStyle-")}).join(" "),o+=" ITooltip-tooltipStyle-"+this.tooltipStyle(),this.tooltip.attr("class",o))},e.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},e.prototype._tooltipHTML=function(t){return t},e.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},e.prototype.tooltipFormat=function(t){switch(void 0===t&&(t={}),t.label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;case"series-table":var o='<table class="ITooltip-series-table"><thead><tr><th colspan="2">'+t.label+"</th></tr></thead><tbody>";return t.arr.forEach(function(t){o+="<tr>",o+="<td>",o+='<div class="series-table-row-color" style="background-color:'+t.color+'"></div>',o+='<div class="series-table-row-label">'+t.label+"</div>",o+="</td>",o+='<td><div class="series-table-row-value">'+t.value+"</div></td>",o+="</tr>"}),o+="</tbody>",o+="</table>";default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},e.prototype.tooltipKeyValueFormat=function(t,o){var e="";for(var r in o)if(r!==t){var n=o&&o[r]?o[r]:"";e+='<tr><td style="'+(this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():"")+'">'+r+'</td><td style="font-weight:normal">'+n+"</td></tr>"}return'<table>\n <thead>\n <tr><th colspan="2" style="font-weight:bold;font-size:16px">'+o[t]+"</th></tr>\n </thead>\n <tbody>\n "+e+"\n </tbody>\n </table>"},e}(o.Widget);c.prototype.publish("tooltipStyle","default","set","Style mode",["default","none","series-table"],{}),c.prototype.publish("tooltipFollowMouse",!1,"boolean","If true, the tooltip will follow mouse movement",null,{}),c.prototype.publish("tooltipValueFormat",",.2f","string","Number format of tooltip value(s)",null,{}),c.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),c.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text",null,{}),c.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),c.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),c.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var u=c.prototype.tooltipValueFormat;c.prototype.tooltipValueFormat=function(t){var e=u.apply(this,arguments);return arguments.length&&(this._valueFormatter=o.format(t)),e};var f=function(){function t(){}return t.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},t.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},t}();f.prototype._palette=o.Palette.ordinal("default"),t.PKG_NAME="@hpcc-js/api",t.PKG_VERSION="2.4.0",t.BUILD_VERSION="2.3.0",t.I1DChart=e,t.I2DChart=r,t.I2DAggrChart=n,t.IGraph=l,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=a,t.INDChart=s,t.ITooltip=c,t.ITree=f,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,o){"object"==typeof exports&&"undefined"!=typeof module?o(exports,require("@hpcc-js/common")):"function"==typeof define&&define.amd?define(["exports","@hpcc-js/common"],o):o((t=t||self)["@hpcc-js/api"]={},t["@hpcc-js/common"])}(this,function(t,o){"use strict";function e(){}function r(){}function n(){}function l(){}e.prototype._dataFamily="1D",e.prototype._palette=o.Palette.rainbow("default"),e.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},e.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},r.prototype._dataFamily="2D",r.prototype._palette=o.Palette.ordinal("default"),r.prototype.fillColor=function(t,o,e){return this._palette(t[0])},r.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},r.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},r.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},r.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},n.prototype._palette=o.Palette.rainbow("default"),n.prototype.fillColor=function(t,o,e){return this._palette(t.length)},n.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},n.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},n.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},n.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},l.prototype._dataFamily="graph",l.prototype.vertex_click=function(t,o,e,r){r&&r.vertex&&console.log("Vertex click: "+r.vertex.id())},l.prototype.vertex_dblclick=function(t,o,e,r){r&&r.vertex&&console.log("Vertex double click: "+r.vertex.id())},l.prototype.edge_click=function(t,o,e,r){r&&r.edge&&console.log("Edge click: "+r.edge.id())},l.prototype.edge_dblclick=function(t,o,e,r){r&&r.edge&&console.log("Edge double click: "+r.edge.id())};var i=function(t,o){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,o){t.__proto__=o}||function(t,o){for(var e in o)o.hasOwnProperty(e)&&(t[e]=o[e])})(t,o)};function p(t,o){function e(){this.constructor=t}i(t,o),t.prototype=null===o?Object.create(o):(e.prototype=o.prototype,new e)}var a=function(t){function o(){return t.call(this)||this}return p(o,t),o.prototype.isValid=function(){if(this.validate()&&!new RegExp(this.validate()).test(this.value()))return!1;return!0},o.prototype.hasValue=function(){if("function"==typeof this.type){switch(this.type()){case"radio":case"checkbox":if(this.value()&&"false"!==this.value())return!0;break;default:if(this.value())return!0}return!1}return""!==this.value()},o.prototype.blur=function(t){},o.prototype.keyup=function(t){},o.prototype.focus=function(t){},o.prototype.click=function(t){},o.prototype.dblclick=function(t){},o.prototype.change=function(t,o){},o.prototype.resetValue=function(t){t.value(t._inputElement[0].node().value)},o.prototype.disable=function(t){this._inputElement.forEach(function(o,e){o.attr("disabled",t?"disabled":null)})},o.prototype.setFocus=function(){this._inputElement.length&&this._inputElement[0].node().focus()},o}(o.Widget);function s(){}a.prototype.publish("name","","string","HTML name for the input"),a.prototype.publish("label","","string","Descriptive label"),a.prototype.publish("value","","string","Input Current Value"),a.prototype.publish("validate",null,"string","Input Validation"),s.prototype._dataFamily="ND",s.prototype._palette=o.Palette.ordinal("default"),s.prototype.fillColor=function(t,o,e){return this._palette(o)},s.prototype.strokeColor=function(t,e,r){return o.hsl(this.fillColor(t,e,r)).darker().toString()},s.prototype.textColor=function(t,e,r){return o.Palette.textColor(this.fillColor(t,e,r))},s.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},s.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)};!function(t,o){void 0===o&&(o={});var e=o.insertAt;if(t&&"undefined"!=typeof document){var r=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css","top"===e&&r.firstChild?r.insertBefore(n,r.firstChild):r.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}}('.d3-tip {\r\n line-height: 1;\r\n font-weight: bold;\r\n padding: 12px;\r\n background: rgba(0, 0, 0, 0.66);\r\n color: #fff;\r\n border-radius: 2px;\r\n pointer-events: none !important;\r\n z-index:10;\r\n}\r\n\r\n.d3-tip.hidden {\r\n visibility:hidden;\r\n}\r\n\r\n/* Creates a small triangle extender for the tooltip */\r\n.d3-tip:after {\r\n content: " ";\r\n box-sizing: border-box;\r\n display: inline-block;\r\n border: 4px solid rgba(0, 0, 0, 0.66);\r\n position: absolute;\r\n pointer-events: none !important;\r\n width: 8px;\r\n height: 8px;\r\n margin: 0;\r\n}\r\n\r\n/* Northward tooltips */\r\n.d3-tip.n:after {\r\n top: 100%;\r\n left: calc(50% - 4px);\r\n border-top-width: 8px;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Eastward tooltips */\r\n.d3-tip.e:after {\r\n top: calc(50% - 4px);\r\n left: -12px;\r\n border-top-color: transparent;\r\n border-right-width: 8px;\r\n border-bottom-color: transparent;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Southward tooltips */\r\n.d3-tip.s {\r\n margin-top: 8px;\r\n}\r\n.d3-tip.s:after {\r\n top: -12px;\r\n left: calc(50% - 4px);\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-width: 8px;\r\n border-left-color: transparent;\r\n}\r\n\r\n/* Westward tooltips */\r\n.d3-tip.w:after {\r\n top: calc(50% - 4px);\r\n left: 100%;\r\n border-top-color: transparent;\r\n border-right-color: transparent;\r\n border-bottom-color: transparent;\r\n border-left-width: 8px;\r\n}\r\n\r\n.d3-tip.notick:after {\r\n border-color: transparent !important;\r\n}\r\n\r\n.common_Widget .over {\r\n stroke: rgba(0, 0, 0, 0.66);\r\n opacity: 0.66;\r\n}\r\n\r\n.d3-tip.ITooltip-tooltipStyle-series-table{\r\n padding: 0;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th,\r\n.d3-tip .ITooltip-series-table td{\r\n padding: 6px;\r\n text-align: left;\r\n border: 1px solid #D1D1D1;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-color{\r\n display: inline-block;\r\n height: 10px;\r\n width: 10px;\r\n margin-right: 10px;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table .series-table-row-label{\r\n display: inline-block;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table th{\r\n background-color: #B3B3B3;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td{\r\n background-color: #FFF;\r\n color: #555;\r\n font-weight: normal;\r\n}\r\n\r\n.d3-tip .ITooltip-series-table td:first-child{\r\n border-right: 0;\r\n}\r\n\r\ntable.ITooltip-series-table td:last-child{\r\n border-left: 1px dotted #A3A3A3;\r\n}\r\n');var c=function(t){function e(){var e=t.call(this)||this;if(e.tooltip=function(){var t=function(){return"n"},e=function(){return[0,0]},r=function(){return" "},n=y(document.body),l=f(),i=null,p=null,a=null,s=function(t){var o;if(o=t.node(),i=o?"svg"===o.tagName.toLowerCase()?o:o.ownerSVGElement:null){p=i.createSVGPoint();var e=n();e&&l&&e.appendChild(l)}};s.show=function(t,o,l){a=l[o];var i=Array.prototype.slice.call(arguments),p=r.apply(this,i);if(null===p)return s;var f,h=e.apply(this,i),y=d(),b=u.length,g=n().getBoundingClientRect();for(y.html(p).style("opacity",1).style("pointer-events","all");b--;)y.classed(u[b],!1);for(var v,m=!1,x={},w=u[0],k=0;k<u.length&&!(m=S(u[k]));k++);if(m)y.classed("notick",!1);else{y.classed("notick",!0);var C=(v=x[w]).top>v.bottom?v.top>0?-v.top:0:v.bottom,_=function(t){return t.left>t.right?t.left>0?-t.left:0:t.right>0?t.right:0}(x[w]);S(w,C,_)}return s;function S(t,o,e){o=o||0,e=e||0,y.style("white-space","nowrap"),f=c.get(t).apply(this),y.classed(t,!0).style("top",f.top+h[0]-o+"px").style("left",f.left+h[1]-e+"px");var r=y.node().getBoundingClientRect(),n=r.top>g.top&&r.left>g.left&&r.bottom<g.bottom&&r.right<g.right;return x[t]={top:g.top-r.top,right:r.right-g.right,bottom:r.bottom-g.bottom,left:g.left-r.left},y.style("white-space","normal"),x[t].total_overflow=Object.keys(x[t]).filter(function(o){return x[t][o]>0}).reduce(function(o,e){return o+x[t][e]},0),x[w].total_overflow>x[t].total_overflow&&(w=t),n||y.classed(t,!1),n}},s.hide=function(){return d().style("opacity",0).style("pointer-events","none"),s},s.attr=function(t,e){if(arguments.length<2&&"string"==typeof t)return d().attr(t);var r=Array.prototype.slice.call(arguments);return o.selection.prototype.attr.apply(d(),r),s},s.style=function(t,e){if(arguments.length<2&&"string"==typeof t)return d().style(t);var r=Array.prototype.slice.call(arguments);return o.selection.prototype.style.apply(d(),r),s},s.direction=function(o){return arguments.length?(t=null==o?o:y(o),s):t},s.offset=function(t){return arguments.length?(e=null==t?t:y(t),s):e},s.html=function(t){return arguments.length?(r=null==t?t:y(t),s):r},s.rootElement=function(t){return arguments.length?(n=y(t),s):n},s.destroy=function(){return l&&(d().remove(),l=null),s};var c=o.map({n:function(){var t=h(window);return{top:t.n.y-l.offsetHeight,left:t.n.x-l.offsetWidth/2}},s:function(){var t=h(window);return{top:t.s.y+8,left:t.s.x-l.offsetWidth/2}},e:function(){var t=h(window);return{top:t.e.y-l.offsetHeight/2,left:t.e.x+8}},w:function(){var t=h(window);return{top:t.w.y-l.offsetHeight/2,left:t.w.x-l.offsetWidth-8}},nw:function(){var t=h(window);return{top:t.nw.y-l.offsetHeight,left:t.nw.x-l.offsetWidth}},ne:function(){var t=h(window);return{top:t.ne.y-l.offsetHeight,left:t.ne.x}},sw:function(){var t=h(window);return{top:t.sw.y,left:t.sw.x-l.offsetWidth}},se:function(){var t=h(window);return{top:t.se.y,left:t.se.x}}}),u=c.keys();function f(){var t=o.select(document.createElement("div"));return t.attr("class","d3-tip").style("position","absolute").style("top",0).style("opacity",0).style("pointer-events","none").style("box-sizing","border-box"),t.node()}function d(){return null==l&&(l=f(),n().appendChild(l)),o.select(l)}function h(t){for(var o=a||t;null==o.getCTM&&null!=o.parentNode;)o=o.parentNode;var e={},r=o.getCTM(),n=o.getBBox(),l=n.width,i=n.height,s=n.x,c=n.y;return p.x=s,p.y=c,e.nw=p.matrixTransform(r),p.x+=l,e.ne=p.matrixTransform(r),p.y+=i,e.se=p.matrixTransform(r),p.x-=l,e.sw=p.matrixTransform(r),p.y-=i/2,e.w=p.matrixTransform(r),p.x+=l,e.e=p.matrixTransform(r),p.x-=l/2,p.y-=i/2,e.n=p.matrixTransform(r),p.y+=i,e.s=p.matrixTransform(r),e}function y(t){return"function"==typeof t?t:function(){return t}}return s}(),e._valueFormatter=o.format(e.tooltipValueFormat()),e.layerEnter){var r=e.layerEnter;e.layerEnter=function(t,o,e){this._parentOverlay||(this._parentOverlay=t._parentOverlay),this.tooltipEnter(o),r.apply(this,arguments)};var n=e.layerUpdate;e.layerUpdate=function(t){n.apply(this,arguments),this.tooltipUpdate()};var l=e.layerExit;e.layerExit=function(t){this.tooltipExit(),l.apply(this,arguments)}}else{var i=e.enter;e.enter=function(t,o){this.tooltipEnter(o),i.apply(this,arguments)};var p=e.update;e.update=function(t,o){p.apply(this,arguments),this.tooltipUpdate()};var a=e.exit;e.exit=function(t,o){this.tooltipExit(),a.apply(this,arguments)}}return e}return p(e,t),e.prototype.tooltipEnter=function(t){var o=this.parentOverlay();o.empty()||this.tooltip.rootElement(o.node().parentNode),t.call(this.tooltip)},e.prototype.tooltipUpdate=function(){var t=this;this.tooltip.offset(function(){if(event&&t.tooltipFollowMouse()){var o=document.querySelector(".d3-tip");return o.style.display="block",o.style.left=t.tooltipOffset()+event.clientX+"px",o.style.top=event.clientY+"px",[]}switch(t.tooltip.direction()()){case"e":return[0,t.tooltipOffset()];default:return[-t.tooltipOffset(),0]}});var o=this.tooltip.attr("class");o&&(o=(o=o.split(" notick").join("")+(this.tooltipTick()?"":" notick")+("none"===this.tooltipStyle()?" hidden":"")).split(" ").filter(function(t){return 0!==t.indexOf("ITooltip-tooltipStyle-")}).join(" "),o+=" ITooltip-tooltipStyle-"+this.tooltipStyle(),this.tooltip.attr("class",o))},e.prototype.tooltipExit=function(){this.tooltip&&this.tooltip.destroy()},e.prototype._tooltipHTML=function(t){return t},e.prototype.tooltipHTML=function(t){return this.tooltip.html(t)},e.prototype.tooltipFormat=function(t){switch(void 0===t&&(t={}),t.label=void 0===t.label?"":t.label,t.series=t.series||"",t.value instanceof Date?t.value=t.value||"":t.value=this._valueFormatter(t.value)||"",this.tooltipStyle()){case"none":break;case"series-table":var o='<table class="ITooltip-series-table"><thead><tr><th colspan="2">'+t.label+"</th></tr></thead><tbody>";return t.arr.forEach(function(t){o+="<tr>",o+="<td>",o+='<div class="series-table-row-color" style="background-color:'+t.color+'"></div>',o+='<div class="series-table-row-label">'+t.label+"</div>",o+="</td>",o+='<td><div class="series-table-row-value">'+t.value+"</div></td>",o+="</tr>"}),o+="</tbody>",o+="</table>";default:return t.series?"<span style='color:"+this.tooltipSeriesColor()+"'>"+t.series+"</span> / <span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":""!==t.label?"<span style='color:"+this.tooltipLabelColor()+"'>"+t.label+"</span>: <span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>":"<span style='color:"+this.tooltipValueColor()+"'>"+t.value+"</span>"}},e.prototype.tooltipKeyValueFormat=function(t,o){var e="";for(var r in o)if(r!==t){var n=o&&o[r]?o[r]:"";e+='<tr><td style="'+(this.tooltipLabelColor_exists()?"color:"+this.tooltipLabelColor():"")+'">'+r+'</td><td style="font-weight:normal">'+n+"</td></tr>"}return'<table>\n <thead>\n <tr><th colspan="2" style="font-weight:bold;font-size:16px">'+o[t]+"</th></tr>\n </thead>\n <tbody>\n "+e+"\n </tbody>\n </table>"},e}(o.Widget);c.prototype.publish("tooltipStyle","default","set","Style mode",["default","none","series-table"],{}),c.prototype.publish("tooltipFollowMouse",!1,"boolean","If true, the tooltip will follow mouse movement",null,{}),c.prototype.publish("tooltipValueFormat",",.2f","string","Number format of tooltip value(s)",null,{}),c.prototype.publish("tooltipSeriesColor","#EAFFFF","html-color","Color of tooltip series text",null,{}),c.prototype.publish("tooltipLabelColor","#CCFFFF","html-color","Color of tooltip label text",null,{}),c.prototype.publish("tooltipValueColor","white","html-color","Color of tooltip value(s)",null,{}),c.prototype.publish("tooltipTick",!0,"boolean","Show tooltip tick",null,{}),c.prototype.publish("tooltipOffset",8,"number","Offset from the cursor",null,{});var u=c.prototype.tooltipValueFormat;c.prototype.tooltipValueFormat=function(t){var e=u.apply(this,arguments);return arguments.length&&(this._valueFormatter=o.format(t)),e};var f=function(){function t(){}return t.prototype.click=function(t,o,e){console.log("Click: "+JSON.stringify(t)+", "+o+", "+e)},t.prototype.dblclick=function(t,o,e){console.log("Double click: "+JSON.stringify(t)+", "+o+", "+e)},t}();f.prototype._palette=o.Palette.ordinal("default"),t.PKG_NAME="@hpcc-js/api",t.PKG_VERSION="2.5.0",t.BUILD_VERSION="2.4.0",t.I1DChart=e,t.I2DChart=r,t.I2DAggrChart=n,t.IGraph=l,t.instanceOfIHighlight=function(t){return"function"==typeof t.highlightColumn},t.IInput=a,t.INDChart=s,t.ITooltip=c,t.ITree=f,Object.defineProperty(t,"__esModule",{value:!0})});
{
"name": "@hpcc-js/api",
"version": "2.4.0",
"version": "2.5.0",
"description": "hpcc-js - Viz api",

@@ -29,6 +29,6 @@ "main": "dist/index.js",

"dependencies": {
"@hpcc-js/common": "^2.13.0"
"@hpcc-js/common": "^2.14.0"
},
"devDependencies": {
"@hpcc-js/bundle": "^2.1.0",
"@hpcc-js/bundle": "^2.2.0",
"npm-run-all": "4.1.5",

@@ -58,3 +58,3 @@ "rimraf": "2.6.3",

"homepage": "https://github.com/hpcc-systems/Visualization",
"gitHead": "5e7a03de2a9c7a09731a942de3d20fe7319400da"
"gitHead": "f67511e84ca52cea8f480f0c4f0b1322ee935e04"
}
export declare const PKG_NAME = "@hpcc-js/api";
export declare const PKG_VERSION = "2.4.0";
export declare const BUILD_VERSION = "2.3.0";
export declare const PKG_VERSION = "2.5.0";
export declare const BUILD_VERSION = "2.4.0";
//# sourceMappingURL=__package__.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc