@hpcc-js/html 2.40.0 → 2.41.3
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 +35 -39
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +38 -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 +9 -25
- package/src/__package__.ts +2 -2
- package/src/reactD3.ts +0 -4
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types/reactD3.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@hpcc-js/common'), require('@hpcc-js/util')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', '@hpcc-js/common', '@hpcc-js/util'], factory) :
|
|
4
|
-
(global = global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, common, util) { 'use strict';
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["@hpcc-js/html"] = {}, global["@hpcc-js/common"], global["@hpcc-js/util"]));
|
|
5
|
+
})(this, (function (exports, common, util) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/html";
|
|
8
|
-
var PKG_VERSION = "2.
|
|
9
|
-
var BUILD_VERSION = "2.
|
|
8
|
+
var PKG_VERSION = "2.41.3";
|
|
9
|
+
var BUILD_VERSION = "2.102.11";
|
|
10
10
|
|
|
11
11
|
/*! *****************************************************************************
|
|
12
12
|
Copyright (c) Microsoft Corporation.
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
ar[i] = from[i];
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
return to.concat(ar || from);
|
|
49
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
var HTMLTooltip = /** @class */ (function (_super) {
|
|
@@ -90,7 +90,7 @@
|
|
|
90
90
|
_super.prototype.update.call(this, domNode, element);
|
|
91
91
|
if (this._contentNode !== this._prevContentNode) {
|
|
92
92
|
var node = this._tooltipElement.node();
|
|
93
|
-
__spreadArray([], node.querySelectorAll("*")).map(function (n) { return n.__data__; })
|
|
93
|
+
__spreadArray([], node.querySelectorAll("*"), true).map(function (n) { return n.__data__; })
|
|
94
94
|
.filter(function (n) { return n; })
|
|
95
95
|
.forEach(function (w) {
|
|
96
96
|
if (typeof w.target === "function") {
|
|
@@ -171,7 +171,7 @@
|
|
|
171
171
|
return directions[i];
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
|
-
this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '"
|
|
174
|
+
this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '".concat(defaultDirection, "'"));
|
|
175
175
|
this._logger.debug(windowRect);
|
|
176
176
|
this._logger.debug({
|
|
177
177
|
top: bbox[defaultDirection].y,
|
|
@@ -192,7 +192,7 @@
|
|
|
192
192
|
var left;
|
|
193
193
|
var visibleBorderStyle = "border-top-color";
|
|
194
194
|
this._arrowElement
|
|
195
|
-
.style("border", this.arrowHeight()
|
|
195
|
+
.style("border", "".concat(this.arrowHeight(), "px solid ").concat(this.tooltipColor()))
|
|
196
196
|
.style("border-top-color", "transparent")
|
|
197
197
|
.style("border-right-color", "transparent")
|
|
198
198
|
.style("border-bottom-color", "transparent")
|
|
@@ -203,10 +203,10 @@
|
|
|
203
203
|
left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
204
204
|
visibleBorderStyle = "border-top-color";
|
|
205
205
|
this._arrowElement
|
|
206
|
-
.style("border-top-width", this.arrowHeight()
|
|
206
|
+
.style("border-top-width", "".concat(this.arrowHeight(), "px"))
|
|
207
207
|
.style("border-bottom-width", "0px")
|
|
208
|
-
.style("border-left-width", this.arrowWidth() / 2
|
|
209
|
-
.style("border-right-width", this.arrowWidth() / 2
|
|
208
|
+
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
209
|
+
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
210
210
|
break;
|
|
211
211
|
case "s":
|
|
212
212
|
top = point.y - this.arrowHeight();
|
|
@@ -214,28 +214,28 @@
|
|
|
214
214
|
visibleBorderStyle = "border-bottom-color";
|
|
215
215
|
this._arrowElement
|
|
216
216
|
.style("border-top-width", "0px")
|
|
217
|
-
.style("border-bottom-width", this.arrowHeight()
|
|
218
|
-
.style("border-left-width", this.arrowWidth() / 2
|
|
219
|
-
.style("border-right-width", this.arrowWidth() / 2
|
|
217
|
+
.style("border-bottom-width", "".concat(this.arrowHeight(), "px"))
|
|
218
|
+
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
219
|
+
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
220
220
|
break;
|
|
221
221
|
case "e":
|
|
222
222
|
top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);
|
|
223
223
|
left = point.x - this.arrowHeight();
|
|
224
224
|
visibleBorderStyle = "border-right-color";
|
|
225
225
|
this._arrowElement
|
|
226
|
-
.style("border-top-width", this.arrowWidth() / 2
|
|
227
|
-
.style("border-bottom-width", this.arrowWidth() / 2
|
|
226
|
+
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
227
|
+
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
228
228
|
.style("border-left-width", "0px")
|
|
229
|
-
.style("border-right-width", this.arrowHeight()
|
|
229
|
+
.style("border-right-width", "".concat(this.arrowHeight(), "px"));
|
|
230
230
|
break;
|
|
231
231
|
case "w":
|
|
232
232
|
top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
233
233
|
left = point.x + this.tooltipWidth() + (this.padding() * 2);
|
|
234
234
|
visibleBorderStyle = "border-left-color";
|
|
235
235
|
this._arrowElement
|
|
236
|
-
.style("border-top-width", this.arrowWidth() / 2
|
|
237
|
-
.style("border-bottom-width", this.arrowWidth() / 2
|
|
238
|
-
.style("border-left-width", this.arrowHeight()
|
|
236
|
+
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
237
|
+
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
238
|
+
.style("border-left-width", "".concat(this.arrowHeight(), "px"))
|
|
239
239
|
.style("border-right-width", "0px");
|
|
240
240
|
break;
|
|
241
241
|
}
|
|
@@ -380,7 +380,7 @@
|
|
|
380
380
|
var theadTrSelection = this._theadRow.selectAll("th").data(this.columns());
|
|
381
381
|
theadTrSelection.enter()
|
|
382
382
|
.append("th")
|
|
383
|
-
.attr("class", function (n, i) { return "th-"
|
|
383
|
+
.attr("class", function (n, i) { return "th-".concat(i); })
|
|
384
384
|
.merge(theadTrSelection)
|
|
385
385
|
.text(function (_d) { return (_d).toString(); });
|
|
386
386
|
theadTrSelection.exit().remove();
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
var tdSelection = tr.selectAll("td").data(d);
|
|
394
394
|
tdSelection.enter()
|
|
395
395
|
.append("td")
|
|
396
|
-
.attr("class", function (n, i) { return "col-"
|
|
396
|
+
.attr("class", function (n, i) { return "col-".concat(i); })
|
|
397
397
|
.merge(tdSelection)
|
|
398
398
|
.text(function (_d) { return (_d).toString(); });
|
|
399
399
|
tdSelection.exit().remove();
|
|
@@ -423,10 +423,10 @@
|
|
|
423
423
|
.style("font-family", this.fontFamily())
|
|
424
424
|
.style("color", this.fontColor());
|
|
425
425
|
this.theadColumnStyles().forEach(function (styleObj, i) {
|
|
426
|
-
_this.applyStyleObject(element.select(".th-"
|
|
426
|
+
_this.applyStyleObject(element.select(".th-".concat(i)), styleObj);
|
|
427
427
|
});
|
|
428
428
|
this.tbodyColumnStyles().forEach(function (styleObj, i) {
|
|
429
|
-
_this.applyStyleObject(element.selectAll(".col-"
|
|
429
|
+
_this.applyStyleObject(element.selectAll(".col-".concat(i)), styleObj);
|
|
430
430
|
});
|
|
431
431
|
var evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;
|
|
432
432
|
var lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;
|
|
@@ -475,7 +475,7 @@
|
|
|
475
475
|
data.push([row[0], perc + "%"]);
|
|
476
476
|
});
|
|
477
477
|
if (showOther) {
|
|
478
|
-
var otherLabel = this.otherLabel()
|
|
478
|
+
var otherLabel = "".concat(this.otherLabel(), " (").concat(len - limit + 1, ")");
|
|
479
479
|
var otherPercentage = "~" + (100 - percSum) + "%";
|
|
480
480
|
data.push([otherLabel, otherPercentage]);
|
|
481
481
|
}
|
|
@@ -505,7 +505,7 @@
|
|
|
505
505
|
_this._tooltip.tooltipWidth(w);
|
|
506
506
|
_this._tooltip.tooltipHeight(h);
|
|
507
507
|
var otherData = _this.breakdownData(_this.data().length).slice(rowCount - 1);
|
|
508
|
-
return "<div style=\"\n width: 100%;\n height: 100%;\n font-size: "
|
|
508
|
+
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>");
|
|
509
509
|
});
|
|
510
510
|
};
|
|
511
511
|
BreakdownTable.prototype.update = function (domNode, element) {
|
|
@@ -605,9 +605,9 @@
|
|
|
605
605
|
BreakdownTable.prototype.publish("thFirstColor", "#333", "html-color", "Text color of the first th element");
|
|
606
606
|
BreakdownTable.prototype.publish("thLastColor", "#333", "html-color", "Text color of the last th element");
|
|
607
607
|
|
|
608
|
-
var n,u,
|
|
608
|
+
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;
|
|
609
609
|
|
|
610
|
-
var
|
|
610
|
+
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.__();}
|
|
611
611
|
|
|
612
612
|
var JSXWidget = /** @class */ (function (_super) {
|
|
613
613
|
__extends(JSXWidget, _super);
|
|
@@ -615,10 +615,10 @@
|
|
|
615
615
|
return _super !== null && _super.apply(this, arguments) || this;
|
|
616
616
|
}
|
|
617
617
|
JSXWidget.prototype.jsxRender = function (jsx, domNode) {
|
|
618
|
-
this.rootNode =
|
|
618
|
+
this.rootNode = S(jsx, domNode, this.rootNode);
|
|
619
619
|
};
|
|
620
|
-
JSXWidget.Component =
|
|
621
|
-
JSXWidget.createElement =
|
|
620
|
+
JSXWidget.Component = _;
|
|
621
|
+
JSXWidget.createElement = v$1;
|
|
622
622
|
return JSXWidget;
|
|
623
623
|
}(common.HTMLWidget));
|
|
624
624
|
JSXWidget.prototype._class += " html_JSXWidget";
|
|
@@ -646,12 +646,10 @@
|
|
|
646
646
|
}
|
|
647
647
|
};
|
|
648
648
|
VNode.prototype.render = function (targetElement) {
|
|
649
|
-
var thisElement = targetElement.selectAll(targetElement.node().tagName
|
|
649
|
+
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data([this]);
|
|
650
650
|
thisElement.exit()
|
|
651
|
-
.each(function (d) { return console.log("render: Exit - " + d.type()); })
|
|
652
651
|
.remove();
|
|
653
652
|
return thisElement.enter().append(this.type())
|
|
654
|
-
.each(function (d) { return console.log("render: Enter - " + d.type()); })
|
|
655
653
|
.attr("reactd3", 0)
|
|
656
654
|
.merge(thisElement)
|
|
657
655
|
.each(function (d) {
|
|
@@ -661,12 +659,10 @@
|
|
|
661
659
|
});
|
|
662
660
|
};
|
|
663
661
|
VNode.prototype.renderChildren = function (targetElement) {
|
|
664
|
-
var thisElement = targetElement.selectAll(targetElement.node().tagName
|
|
662
|
+
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data(this._children);
|
|
665
663
|
thisElement.exit()
|
|
666
|
-
.each(function (d) { return console.log("renderChildren: Exit - " + d.type()); })
|
|
667
664
|
.remove();
|
|
668
665
|
return thisElement.enter().append(function (d) { return document.createElement(d.type()); })
|
|
669
|
-
.each(function (d) { return console.log("renderChildren: Enter - " + d.type()); })
|
|
670
666
|
.attr("reactd3", function (_d, i) { return i; })
|
|
671
667
|
.merge(thisElement)
|
|
672
668
|
.each(function (d) {
|
|
@@ -764,7 +760,7 @@
|
|
|
764
760
|
.render();
|
|
765
761
|
};
|
|
766
762
|
VizComponent.prototype.render = function () {
|
|
767
|
-
return
|
|
763
|
+
return v$1("div", { style: this.props.style });
|
|
768
764
|
};
|
|
769
765
|
VizComponent.prototype.componentDidUpdate = function () {
|
|
770
766
|
this.refreshProps();
|
|
@@ -798,7 +794,7 @@
|
|
|
798
794
|
.render();
|
|
799
795
|
};
|
|
800
796
|
VizInstance.prototype.render = function () {
|
|
801
|
-
return
|
|
797
|
+
return v$1("div", { style: this.props.style });
|
|
802
798
|
};
|
|
803
799
|
VizInstance.prototype.componentDidUpdate = function () {
|
|
804
800
|
this.refreshProps();
|
|
@@ -913,7 +909,7 @@
|
|
|
913
909
|
}
|
|
914
910
|
}
|
|
915
911
|
|
|
916
|
-
var css_248z = "#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;text-align:left;
|
|
912
|
+
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}";
|
|
917
913
|
styleInject(css_248z);
|
|
918
914
|
|
|
919
915
|
var Item = /** @class */ (function (_super) {
|
|
@@ -943,7 +939,7 @@
|
|
|
943
939
|
.attr("href", "#")
|
|
944
940
|
.on("click", function (d, idx, groups) { return _this._owner.titleBarClick(_this, d, idx, groups); })
|
|
945
941
|
.append("i")
|
|
946
|
-
.attr("class", "fa "
|
|
942
|
+
.attr("class", "fa ".concat(this._icon, " fa-lg fa-fw"));
|
|
947
943
|
};
|
|
948
944
|
return Button;
|
|
949
945
|
}(Item));
|
|
@@ -1042,5 +1038,5 @@
|
|
|
1042
1038
|
|
|
1043
1039
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1044
1040
|
|
|
1045
|
-
}))
|
|
1041
|
+
}));
|
|
1046
1042
|
//# sourceMappingURL=index.js.map
|