@hpcc-js/html 2.40.0 → 2.41.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.es6.js +39 -39
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +42 -42
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/package.json +8 -24
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.es6.js
CHANGED
|
@@ -2,8 +2,8 @@ import { select, HTMLWidget, format } from '@hpcc-js/common';
|
|
|
2
2
|
import { scopedLogger } from '@hpcc-js/util';
|
|
3
3
|
|
|
4
4
|
var PKG_NAME = "@hpcc-js/html";
|
|
5
|
-
var PKG_VERSION = "2.
|
|
6
|
-
var BUILD_VERSION = "2.
|
|
5
|
+
var PKG_VERSION = "2.41.1";
|
|
6
|
+
var BUILD_VERSION = "2.102.4";
|
|
7
7
|
|
|
8
8
|
/*! *****************************************************************************
|
|
9
9
|
Copyright (c) Microsoft Corporation.
|
|
@@ -43,7 +43,7 @@ function __spreadArray(to, from, pack) {
|
|
|
43
43
|
ar[i] = from[i];
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
|
-
return to.concat(ar || from);
|
|
46
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
var HTMLTooltip = /** @class */ (function (_super) {
|
|
@@ -87,7 +87,7 @@ var HTMLTooltip = /** @class */ (function (_super) {
|
|
|
87
87
|
_super.prototype.update.call(this, domNode, element);
|
|
88
88
|
if (this._contentNode !== this._prevContentNode) {
|
|
89
89
|
var node = this._tooltipElement.node();
|
|
90
|
-
__spreadArray([], node.querySelectorAll("*")).map(function (n) { return n.__data__; })
|
|
90
|
+
__spreadArray([], node.querySelectorAll("*"), true).map(function (n) { return n.__data__; })
|
|
91
91
|
.filter(function (n) { return n; })
|
|
92
92
|
.forEach(function (w) {
|
|
93
93
|
if (typeof w.target === "function") {
|
|
@@ -168,7 +168,7 @@ var HTMLTooltip = /** @class */ (function (_super) {
|
|
|
168
168
|
return directions[i];
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '"
|
|
171
|
+
this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '".concat(defaultDirection, "'"));
|
|
172
172
|
this._logger.debug(windowRect);
|
|
173
173
|
this._logger.debug({
|
|
174
174
|
top: bbox[defaultDirection].y,
|
|
@@ -189,7 +189,7 @@ var HTMLTooltip = /** @class */ (function (_super) {
|
|
|
189
189
|
var left;
|
|
190
190
|
var visibleBorderStyle = "border-top-color";
|
|
191
191
|
this._arrowElement
|
|
192
|
-
.style("border", this.arrowHeight()
|
|
192
|
+
.style("border", "".concat(this.arrowHeight(), "px solid ").concat(this.tooltipColor()))
|
|
193
193
|
.style("border-top-color", "transparent")
|
|
194
194
|
.style("border-right-color", "transparent")
|
|
195
195
|
.style("border-bottom-color", "transparent")
|
|
@@ -200,10 +200,10 @@ var HTMLTooltip = /** @class */ (function (_super) {
|
|
|
200
200
|
left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
201
201
|
visibleBorderStyle = "border-top-color";
|
|
202
202
|
this._arrowElement
|
|
203
|
-
.style("border-top-width", this.arrowHeight()
|
|
203
|
+
.style("border-top-width", "".concat(this.arrowHeight(), "px"))
|
|
204
204
|
.style("border-bottom-width", "0px")
|
|
205
|
-
.style("border-left-width", this.arrowWidth() / 2
|
|
206
|
-
.style("border-right-width", this.arrowWidth() / 2
|
|
205
|
+
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
206
|
+
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
207
207
|
break;
|
|
208
208
|
case "s":
|
|
209
209
|
top = point.y - this.arrowHeight();
|
|
@@ -211,28 +211,28 @@ var HTMLTooltip = /** @class */ (function (_super) {
|
|
|
211
211
|
visibleBorderStyle = "border-bottom-color";
|
|
212
212
|
this._arrowElement
|
|
213
213
|
.style("border-top-width", "0px")
|
|
214
|
-
.style("border-bottom-width", this.arrowHeight()
|
|
215
|
-
.style("border-left-width", this.arrowWidth() / 2
|
|
216
|
-
.style("border-right-width", this.arrowWidth() / 2
|
|
214
|
+
.style("border-bottom-width", "".concat(this.arrowHeight(), "px"))
|
|
215
|
+
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
216
|
+
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
217
217
|
break;
|
|
218
218
|
case "e":
|
|
219
219
|
top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);
|
|
220
220
|
left = point.x - this.arrowHeight();
|
|
221
221
|
visibleBorderStyle = "border-right-color";
|
|
222
222
|
this._arrowElement
|
|
223
|
-
.style("border-top-width", this.arrowWidth() / 2
|
|
224
|
-
.style("border-bottom-width", this.arrowWidth() / 2
|
|
223
|
+
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
224
|
+
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
225
225
|
.style("border-left-width", "0px")
|
|
226
|
-
.style("border-right-width", this.arrowHeight()
|
|
226
|
+
.style("border-right-width", "".concat(this.arrowHeight(), "px"));
|
|
227
227
|
break;
|
|
228
228
|
case "w":
|
|
229
229
|
top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
230
230
|
left = point.x + this.tooltipWidth() + (this.padding() * 2);
|
|
231
231
|
visibleBorderStyle = "border-left-color";
|
|
232
232
|
this._arrowElement
|
|
233
|
-
.style("border-top-width", this.arrowWidth() / 2
|
|
234
|
-
.style("border-bottom-width", this.arrowWidth() / 2
|
|
235
|
-
.style("border-left-width", this.arrowHeight()
|
|
233
|
+
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
234
|
+
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
235
|
+
.style("border-left-width", "".concat(this.arrowHeight(), "px"))
|
|
236
236
|
.style("border-right-width", "0px");
|
|
237
237
|
break;
|
|
238
238
|
}
|
|
@@ -377,7 +377,7 @@ var SimpleTable = /** @class */ (function (_super) {
|
|
|
377
377
|
var theadTrSelection = this._theadRow.selectAll("th").data(this.columns());
|
|
378
378
|
theadTrSelection.enter()
|
|
379
379
|
.append("th")
|
|
380
|
-
.attr("class", function (n, i) { return "th-"
|
|
380
|
+
.attr("class", function (n, i) { return "th-".concat(i); })
|
|
381
381
|
.merge(theadTrSelection)
|
|
382
382
|
.text(function (_d) { return (_d).toString(); });
|
|
383
383
|
theadTrSelection.exit().remove();
|
|
@@ -390,7 +390,7 @@ var SimpleTable = /** @class */ (function (_super) {
|
|
|
390
390
|
var tdSelection = tr.selectAll("td").data(d);
|
|
391
391
|
tdSelection.enter()
|
|
392
392
|
.append("td")
|
|
393
|
-
.attr("class", function (n, i) { return "col-"
|
|
393
|
+
.attr("class", function (n, i) { return "col-".concat(i); })
|
|
394
394
|
.merge(tdSelection)
|
|
395
395
|
.text(function (_d) { return (_d).toString(); });
|
|
396
396
|
tdSelection.exit().remove();
|
|
@@ -420,10 +420,10 @@ var StyledTable = /** @class */ (function (_super) {
|
|
|
420
420
|
.style("font-family", this.fontFamily())
|
|
421
421
|
.style("color", this.fontColor());
|
|
422
422
|
this.theadColumnStyles().forEach(function (styleObj, i) {
|
|
423
|
-
_this.applyStyleObject(element.select(".th-"
|
|
423
|
+
_this.applyStyleObject(element.select(".th-".concat(i)), styleObj);
|
|
424
424
|
});
|
|
425
425
|
this.tbodyColumnStyles().forEach(function (styleObj, i) {
|
|
426
|
-
_this.applyStyleObject(element.selectAll(".col-"
|
|
426
|
+
_this.applyStyleObject(element.selectAll(".col-".concat(i)), styleObj);
|
|
427
427
|
});
|
|
428
428
|
var evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;
|
|
429
429
|
var lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;
|
|
@@ -472,7 +472,7 @@ var BreakdownTable = /** @class */ (function (_super) {
|
|
|
472
472
|
data.push([row[0], perc + "%"]);
|
|
473
473
|
});
|
|
474
474
|
if (showOther) {
|
|
475
|
-
var otherLabel = this.otherLabel()
|
|
475
|
+
var otherLabel = "".concat(this.otherLabel(), " (").concat(len - limit + 1, ")");
|
|
476
476
|
var otherPercentage = "~" + (100 - percSum) + "%";
|
|
477
477
|
data.push([otherLabel, otherPercentage]);
|
|
478
478
|
}
|
|
@@ -502,7 +502,7 @@ var BreakdownTable = /** @class */ (function (_super) {
|
|
|
502
502
|
_this._tooltip.tooltipWidth(w);
|
|
503
503
|
_this._tooltip.tooltipHeight(h);
|
|
504
504
|
var otherData = _this.breakdownData(_this.data().length).slice(rowCount - 1);
|
|
505
|
-
return "<div style=\"\n width: 100%;\n height: 100%;\n font-size: "
|
|
505
|
+
return "<div style=\"\n width: 100%;\n height: 100%;\n font-size: ".concat(_this.fontSize(), "px\n \">").concat(otherData.map(function (row) { return "<div style=\"\n float:left;\n width:".concat(Math.floor(99 / colCount), "%;\n \">").concat(row[0], ": ").concat(row[1], "</div>"); }).join(""), "</div>");
|
|
506
506
|
});
|
|
507
507
|
};
|
|
508
508
|
BreakdownTable.prototype.update = function (domNode, element) {
|
|
@@ -602,9 +602,9 @@ BreakdownTable.prototype.publish("thFontSize", 26, "number", "Font size for th e
|
|
|
602
602
|
BreakdownTable.prototype.publish("thFirstColor", "#333", "html-color", "Text color of the first th element");
|
|
603
603
|
BreakdownTable.prototype.publish("thLastColor", "#333", "html-color", "Text color of the last th element");
|
|
604
604
|
|
|
605
|
-
var n,u,
|
|
605
|
+
var n,l$1,u$1,t$1,o$1,r$1,e$1={},c$1=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a$1(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n);}function v$1(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return y$1(l,f,t,o,null)}function y$1(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u$1:r};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function d$1(n){return n.children}function _(n,l){this.props=n,this.context=l;}function k$1(n,l){if(null==l)return n.__?k$1(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?k$1(n):null}function b$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b$1(n)}}function m$1(n){(!n.__d&&(n.__d=!0)&&t$1.push(n)&&!g$1.__r++||r$1!==l$1.debounceRendering)&&((r$1=l$1.debounceRendering)||o$1)(g$1);}function g$1(){for(var n;g$1.__r=t$1.length;)n=t$1.sort(function(n,l){return n.__v.__b-l.__v.__b}),t$1=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=a$1({},t)).__v=t.__v+1,j$1(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k$1(t):o,t.__h),z(u,t),t.__e!=o&&b$1(t)));});}function w$1(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c$1,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y$1(null,_,null,null,_):Array.isArray(_)?y$1(d$1,{children:_},null,null,null):_.__b>0?y$1(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null;}j$1(n,_,p=p||e$1,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x$1(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k$1(p));}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k$1(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h]);}function x$1(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?x$1(i,l,u):P(u,i,i,t,i.__e,l));return l}function P(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else {for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o;}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i);}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px";}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T:I,o):n.removeEventListener(l,o?T:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink[H:h]/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l));}}function I(n){this.l[n.type+!1](l$1.event?l$1.event(n):n);}function T(n){this.l[n.type+!0](l$1.event?l$1.event(n):n);}function j$1(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l$1.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a$1({},h.__s)),a$1(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u);}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k);});}h.context=x,h.props=m,h.state=h.__s,(s=l$1.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a$1(a$1({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d$1&&null==s.key?s.props.children:s,w$1(n,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1;}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(s=l$1.diffed)&&s(u);}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l$1.__e(n,u,i);}}function z(n,u){l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function L(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1;}if(null===d)y===p||c&&l.data===p||(l.data=p);else {if(r=r&&n.call(l.childNodes),a=(y=i.props||e$1).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""));}if(C(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w$1(l,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,r,f,r?r[0]:i.__k&&k$1(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,y.checked,!1));}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,i);}}function N(n,u,i){var t,o;if(l$1.unmount&&l$1.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount();}catch(n){l$1.__e(n,u);}t.base=t.__P=null;}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var o,r,f;l$1.__&&l$1.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j$1(i,u=(!o&&t||i).__k=v$1(d$1,null,[u]),r||e$1,e$1,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z(f,u);}n=c$1.slice,l$1={__e:function(n,l){for(var u,i,t;l=l.__;)if((u=l.__c)&&!u.__)try{if((i=u.constructor)&&null!=i.getDerivedStateFromError&&(u.setState(i.getDerivedStateFromError(n)),t=u.__d),null!=u.componentDidCatch&&(u.componentDidCatch(n),t=u.__d),t)return u.__E=u}catch(l){n=l;}throw n}},u$1=0,_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a$1({},this.state),"function"==typeof n&&(n=n(a$1({},u),this.props)),n&&a$1(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m$1(this));},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m$1(this));},_.prototype.render=d$1,t$1=[],o$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g$1.__r=0;
|
|
606
606
|
|
|
607
|
-
var
|
|
607
|
+
var r,i=[],c=l$1.__b,f=l$1.__r,e=l$1.diffed,a=l$1.__c,v=l$1.unmount;function x(){for(var t;t=i.shift();)if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[];}catch(u){t.__H.__h=[],l$1.__e(u,t.__v);}}l$1.__b=function(n){c&&c(n);},l$1.__r=function(n){f&&f(n);var r=(n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[]);},l$1.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===l$1.requestAnimationFrame||((r=l$1.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n);},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u));})(x));},l$1.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return !n.__||j(n)});}catch(r){u.some(function(n){n.__h&&(n.__h=[]);}),u=[],l$1.__e(r,t.__v);}}),a&&a(t,u);},l$1.unmount=function(t){v&&v(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{g(n);}catch(n){u=n;}}),u&&l$1.__e(u,r.__v));};var b="function"==typeof requestAnimationFrame;function g(n){var r=n.__c;"function"==typeof r&&(n.__c=void 0,r());}function j(n){n.__c=n.__();}
|
|
608
608
|
|
|
609
609
|
var JSXWidget = /** @class */ (function (_super) {
|
|
610
610
|
__extends(JSXWidget, _super);
|
|
@@ -612,10 +612,10 @@ var JSXWidget = /** @class */ (function (_super) {
|
|
|
612
612
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
613
613
|
}
|
|
614
614
|
JSXWidget.prototype.jsxRender = function (jsx, domNode) {
|
|
615
|
-
this.rootNode =
|
|
615
|
+
this.rootNode = S(jsx, domNode, this.rootNode);
|
|
616
616
|
};
|
|
617
|
-
JSXWidget.Component =
|
|
618
|
-
JSXWidget.createElement =
|
|
617
|
+
JSXWidget.Component = _;
|
|
618
|
+
JSXWidget.createElement = v$1;
|
|
619
619
|
return JSXWidget;
|
|
620
620
|
}(HTMLWidget));
|
|
621
621
|
JSXWidget.prototype._class += " html_JSXWidget";
|
|
@@ -643,12 +643,12 @@ var VNode = /** @class */ (function () {
|
|
|
643
643
|
}
|
|
644
644
|
};
|
|
645
645
|
VNode.prototype.render = function (targetElement) {
|
|
646
|
-
var thisElement = targetElement.selectAll(targetElement.node().tagName
|
|
646
|
+
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data([this]);
|
|
647
647
|
thisElement.exit()
|
|
648
|
-
.each(function (d) { return console.log("render: Exit - "
|
|
648
|
+
.each(function (d) { return console.log("render: Exit - ".concat(d.type())); })
|
|
649
649
|
.remove();
|
|
650
650
|
return thisElement.enter().append(this.type())
|
|
651
|
-
.each(function (d) { return console.log("render: Enter - "
|
|
651
|
+
.each(function (d) { return console.log("render: Enter - ".concat(d.type())); })
|
|
652
652
|
.attr("reactd3", 0)
|
|
653
653
|
.merge(thisElement)
|
|
654
654
|
.each(function (d) {
|
|
@@ -658,12 +658,12 @@ var VNode = /** @class */ (function () {
|
|
|
658
658
|
});
|
|
659
659
|
};
|
|
660
660
|
VNode.prototype.renderChildren = function (targetElement) {
|
|
661
|
-
var thisElement = targetElement.selectAll(targetElement.node().tagName
|
|
661
|
+
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data(this._children);
|
|
662
662
|
thisElement.exit()
|
|
663
|
-
.each(function (d) { return console.log("renderChildren: Exit - "
|
|
663
|
+
.each(function (d) { return console.log("renderChildren: Exit - ".concat(d.type())); })
|
|
664
664
|
.remove();
|
|
665
665
|
return thisElement.enter().append(function (d) { return document.createElement(d.type()); })
|
|
666
|
-
.each(function (d) { return console.log("renderChildren: Enter - "
|
|
666
|
+
.each(function (d) { return console.log("renderChildren: Enter - ".concat(d.type())); })
|
|
667
667
|
.attr("reactd3", function (_d, i) { return i; })
|
|
668
668
|
.merge(thisElement)
|
|
669
669
|
.each(function (d) {
|
|
@@ -761,7 +761,7 @@ var VizComponent = /** @class */ (function (_super) {
|
|
|
761
761
|
.render();
|
|
762
762
|
};
|
|
763
763
|
VizComponent.prototype.render = function () {
|
|
764
|
-
return
|
|
764
|
+
return v$1("div", { style: this.props.style });
|
|
765
765
|
};
|
|
766
766
|
VizComponent.prototype.componentDidUpdate = function () {
|
|
767
767
|
this.refreshProps();
|
|
@@ -795,7 +795,7 @@ var VizInstance = /** @class */ (function (_super) {
|
|
|
795
795
|
.render();
|
|
796
796
|
};
|
|
797
797
|
VizInstance.prototype.render = function () {
|
|
798
|
-
return
|
|
798
|
+
return v$1("div", { style: this.props.style });
|
|
799
799
|
};
|
|
800
800
|
VizInstance.prototype.componentDidUpdate = function () {
|
|
801
801
|
this.refreshProps();
|
|
@@ -910,7 +910,7 @@ function styleInject(css, ref) {
|
|
|
910
910
|
}
|
|
911
911
|
}
|
|
912
912
|
|
|
913
|
-
var css_248z = "#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;text-align:left;
|
|
913
|
+
var css_248z = "#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;display:block;overflow:hidden;text-align:left;text-overflow:ellipsis}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{display:block;width:100%}.html_TitleBar .title{display:block;font-size:20px;font-weight:700;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.html_TitleBar .icon-bar{float:right;line-height:28px;padding:4px;text-align:right;white-space:nowrap}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{color:#a9a9a9;padding-bottom:4px;padding-top:4px;text-align:center;transition:all .3s ease}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{color:none;padding-bottom:0;padding-left:8px;padding-top:2px;text-align:center}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}";
|
|
914
914
|
styleInject(css_248z);
|
|
915
915
|
|
|
916
916
|
var Item = /** @class */ (function (_super) {
|
|
@@ -940,7 +940,7 @@ var Button = /** @class */ (function (_super) {
|
|
|
940
940
|
.attr("href", "#")
|
|
941
941
|
.on("click", function (d, idx, groups) { return _this._owner.titleBarClick(_this, d, idx, groups); })
|
|
942
942
|
.append("i")
|
|
943
|
-
.attr("class", "fa "
|
|
943
|
+
.attr("class", "fa ".concat(this._icon, " fa-lg fa-fw"));
|
|
944
944
|
};
|
|
945
945
|
return Button;
|
|
946
946
|
}(Item));
|