@hpcc-js/react 2.53.12 → 2.53.14
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 +127 -127
- package/dist/index.es6.js.map +1 -1
- package/dist/index.js +127 -127
- 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 +3 -3
- package/src/__package__.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/__package__.d.ts.map +1 -1
- package/types-3.4/__package__.d.ts +2 -2
package/dist/index.js
CHANGED
|
@@ -5,32 +5,32 @@
|
|
|
5
5
|
})(this, (function (exports, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
var PKG_NAME$1 = "@hpcc-js/react";
|
|
8
|
-
var PKG_VERSION$1 = "2.53.
|
|
9
|
-
var BUILD_VERSION$1 = "2.
|
|
8
|
+
var PKG_VERSION$1 = "2.53.14";
|
|
9
|
+
var BUILD_VERSION$1 = "2.105.5";
|
|
10
10
|
|
|
11
11
|
var PKG_NAME = "@hpcc-js/preact-shim";
|
|
12
|
-
var PKG_VERSION = "2.16.
|
|
13
|
-
var BUILD_VERSION = "2.
|
|
12
|
+
var PKG_VERSION = "2.16.10";
|
|
13
|
+
var BUILD_VERSION = "2.105.5";
|
|
14
14
|
|
|
15
|
-
var n,l$1,u$1,i$1,o$1,r$1,f$1,c$1={},s$1=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h$1=Array.isArray;function v$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,i,o,null)}function d$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function g$1(n){return n.children}function b$1(n,l){this.props=n,this.context=l;}function m$1(n,l){if(null==l)return n.__?m$1(n.__,n.__i+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?m$1(n):null}function k$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 k$1(n)}}function w$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!x.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(x);}function x(){var n,u,t,o,r,e,c,s,a;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,s=[],a=[],(c=t.__P)&&((o=v$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),L(c,o,r,t.__n,void 0!==c.ownerSVGElement,32&r.__u?[e]:null,s,null==e?m$1(r):e,!!(32&r.__u),a),o.__.__k[o.__i]=o,M(s,o,a),o.__e!=e&&k$1(o)),i$1.length>u&&i$1.sort(f$1));x.__r=0;}function C(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s$1,b=l.length;for(u.__d=e,P(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&"boolean"!=typeof y&&"function"!=typeof y&&(p=-1===y.__i?c$1:g[y.__i]||c$1,y.__i=v,L(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&z$1(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=S(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_;}function P(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?d$1(null,i,null,null,i):h$1(i)?d$1(g$1,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=H(i,u,r=t+a,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:a=f<r&&f==r-1?f-r:0,f!==t+a&&(i.__u|=65536))):(o=u[t])&&null==o.key&&o.__e&&(o.__e==n.__d&&(n.__d=m$1(o)),N(o,o,!1),u[t]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m$1(o)),N(o,o));}function S(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=S(t[i],l,u));return l}return n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e),l&&l.nextSibling}function H(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type)return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function I(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function T$1(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||I(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||I(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/,"$1")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?D:A,o)):n.removeEventListener(l,o?D:A,o);else {if(i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&"role"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function A(n){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l$1.event?l$1.event(n):n)}function D(n){return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function L(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,k,w,x,P,S,$,H,I,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof A)try{if(w=u.props,x=(a=A.contextType)&&i[a.__c],P=a?x?x.props.value:a.__:i,t.__c?k=(p=u.__c=t.__c).__=p.__E:("prototype"in A&&A.prototype.render?u.__c=p=new A(w,P):(u.__c=p=new b$1(w,P),p.constructor=A,p.render=O),x&&x.sub(p),p.props=w,p.state||(p.state={}),p.context=P,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v$1({},p.__s)),v$1(p.__s,A.getDerivedStateFromProps(w,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else {if(null==A.getDerivedStateFromProps&&w!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(w,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(w,p.__s,P)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=w,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(w,p.__s,P),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m);});}if(p.context=P,p.props=w,p.__P=n,p.__e=!1,$=l$1.__r,H=0,"prototype"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),I=0;I<p._sb.length;I++)p.__h.push(p._sb[I]);p._sb=[];}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s;}while(p.__d&&++H<25);p.state=p.__s,null!=p.getChildContext&&(i=v$1(v$1({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),C(n,h$1(T=null!=a&&a.type===g$1&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),k&&(p.__E=p.__=null);}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=j$1(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function M(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)z$1(t[i],t[++i],t[++i]);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 j$1(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,k=t.props,w=u.props,x=u.type;if("svg"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&"setAttribute"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(w);l=o?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,w.is&&w),r=null,e=!1;}if(null===x)k===w||e&&l.data===w||(l.data=w);else {if(r=r&&n.call(l.childNodes),k=t.props||c$1,!e&&null!=r)for(k={},a=0;a<l.attributes.length;a++)k[(_=l.attributes[a]).name]=_.value;for(a in k)_=k[a],"children"==a||("dangerouslySetInnerHTML"==a?y=_:"key"===a||a in w||T$1(l,a,null,_,o));for(a in w)_=w[a],"children"==a?d=_:"dangerouslySetInnerHTML"==a?v=_:"value"==a?g=_:"checked"==a?b=_:"key"===a||e&&"function"!=typeof _||k[a]===_||T$1(l,a,_,k[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=""),C(l,h$1(d)?d:[d],u,t,i,o&&"foreignObject"!==x,r,f,r?r[0]:t.__k&&m$1(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p$1(r[a]);e||(a="value",void 0!==g&&(g!==l[a]||"progress"===x&&!g||"option"===x&&g!==k[a])&&T$1(l,a,g,k[a],!1),a="checked",void 0!==b&&b!==l[a]&&T$1(l,a,b,k[a],!1));}return l}function z$1(n,u,t){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,t);}}function N(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||z$1(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null,n.__c=void 0;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&N(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function O(n,l,u){return this.constructor(n,u)}function q(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],L(t,u=(!o&&i||t).__k=y(g$1,null,[u]),r||c$1,c$1,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),M(f,u,e);}n=s$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,b$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v$1({},this.state),"function"==typeof n&&(n=n(v$1({},u),this.props)),n&&v$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),w$1(this));},b$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),w$1(this));},b$1.prototype.render=g$1,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},x.__r=0;
|
|
15
|
+
var n,l$1,u$1,i$1,o$1,r$1,f$1,c$1={},s$1=[],a$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,h$1=Array.isArray;function v$1(n,l){for(var u in l)n[u]=l[u];return n}function p$1(n){var l=n.parentNode;l&&l.removeChild(n);}function y$1(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return d$1(l,f,i,o,null)}function d$1(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function g(n){return n.children}function b(n,l){this.props=n,this.context=l;}function m$1(n,l){if(null==l)return n.__?m$1(n.__,n.__i+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?m$1(n):null}function w$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 w$1(n)}}function k$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!x$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(x$1);}function x$1(){var n,u,t,o,r,e,c,s,a;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,s=[],a=[],(c=t.__P)&&((o=v$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),F(c,o,r,t.__n,void 0!==c.ownerSVGElement,32&r.__u?[e]:null,s,null==e?m$1(r):e,!!(32&r.__u),a),o.__v=r.__v,o.__.__k[o.__i]=o,L(s,o,a),o.__e!=e&&w$1(o)),i$1.length>u&&i$1.sort(f$1));x$1.__r=0;}function C$1(n,l,u,t,i,o,r,f,e,a,h){var v,p,y,d,_,g=t&&t.__k||s$1,b=l.length;for(u.__d=e,P(u,l,g),e=u.__d,v=0;v<b;v++)null!=(y=u.__k[v])&&"boolean"!=typeof y&&"function"!=typeof y&&(p=-1===y.__i?c$1:g[y.__i]||c$1,y.__i=v,F(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&O(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?(d||p.__e!=e||(e=m$1(p)),e=S(y,e,n)):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=_;}function P(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)r=t+a,null!=(i=n.__k[t]=null==(i=l[t])||"boolean"==typeof i||"function"==typeof i?null:"string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?d$1(null,i,null,null,null):h$1(i)?d$1(g,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?d$1(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i)?(i.__=n,i.__b=n.__b+1,f=I(i,u,r,s),i.__i=f,o=null,-1!==f&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f===r+1?a++:f>r?s>e-r?a+=f-r:a--:f<r?f==r-1&&(a=f-r):a=0,f!==t+a&&(i.__u|=65536))):(o=u[r])&&null==o.key&&o.__e&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m$1(o)),j$1(o,o,!1),u[r]=null,s--);if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=m$1(o)),j$1(o,o));}function S(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=S(t[i],l,u));return l}n.__e!=l&&(u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function I(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function H(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||a$1.test(l)?u:u+"px";}function T(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||H(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||H(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=Date.now(),n.addEventListener(l,o?D$1:A,o)):n.removeEventListener(l,o?D$1:A,o);else {if(i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==l&&"height"!==l&&"href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&"rowSpan"!==l&&"colSpan"!==l&&"role"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,u));}}function A(n){if(this.l){var u=this.l[n.type+!1];if(n.t){if(n.t<=u.u)return}else n.t=Date.now();return u(l$1.event?l$1.event(n):n)}}function D$1(n){if(this.l)return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function F(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,w,k,x,P,S,$,I,H,T,A=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof A)try{if(k=u.props,x=(a=A.contextType)&&i[a.__c],P=a?x?x.props.value:a.__:i,t.__c?w=(p=u.__c=t.__c).__=p.__E:("prototype"in A&&A.prototype.render?u.__c=p=new A(k,P):(u.__c=p=new b(k,P),p.constructor=A,p.render=z$1),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=P,p.__n=i,y=p.__d=!0,p.__h=[],p._sb=[]),null==p.__s&&(p.__s=p.state),null!=A.getDerivedStateFromProps&&(p.__s==p.state&&(p.__s=v$1({},p.__s)),v$1(p.__s,A.getDerivedStateFromProps(k,p.__s))),d=p.props,_=p.state,p.__v=u,y)null==A.getDerivedStateFromProps&&null!=p.componentWillMount&&p.componentWillMount(),null!=p.componentDidMount&&p.__h.push(p.componentDidMount);else {if(null==A.getDerivedStateFromProps&&k!==d&&null!=p.componentWillReceiveProps&&p.componentWillReceiveProps(k,P),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,P)||u.__v===t.__v)){for(u.__v!==t.__v&&(p.props=k,p.state=p.__s,p.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.forEach(function(n){n&&(n.__=u);}),S=0;S<p._sb.length;S++)p.__h.push(p._sb[S]);p._sb=[],p.__h.length&&f.push(p);break n}null!=p.componentWillUpdate&&p.componentWillUpdate(k,p.__s,P),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m);});}if(p.context=P,p.props=k,p.__P=n,p.__e=!1,$=l$1.__r,I=0,"prototype"in A&&A.prototype.render){for(p.state=p.__s,p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),H=0;H<p._sb.length;H++)p.__h.push(p._sb[H]);p._sb=[];}else do{p.__d=!1,$&&$(u),a=p.render(p.props,p.state,p.context),p.state=p.__s;}while(p.__d&&++I<25);p.state=p.__s,null!=p.getChildContext&&(i=v$1(v$1({},i),p.getChildContext())),y||null==p.getSnapshotBeforeUpdate||(m=p.getSnapshotBeforeUpdate(d,_)),C$1(n,h$1(T=null!=a&&a.type===g&&null==a.key?a.props.children:a)?T:[T],u,t,i,o,r,f,e,c,s),p.base=u.__e,u.__u&=-161,p.__h.length&&f.push(p),w&&(p.__E=p.__=null);}catch(n){u.__v=null,c||null!=r?(u.__e=e,u.__u|=c?160:32,r[r.indexOf(e)]=null):(u.__e=t.__e,u.__k=t.__k),l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=M(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function L(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)O(t[i],t[++i],t[++i]);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 M(l,u,t,i,o,r,f,e,s){var a,v,y,d,_,g,b,w=t.props,k=u.props,x=u.type;if("svg"===x&&(o=!0),null!=r)for(a=0;a<r.length;a++)if((_=r[a])&&"setAttribute"in _==!!x&&(x?_.localName===x:3===_.nodeType)){l=_,r[a]=null;break}if(null==l){if(null===x)return document.createTextNode(k);l=o?document.createElementNS("http://www.w3.org/2000/svg",x):document.createElement(x,k.is&&k),r=null,e=!1;}if(null===x)w===k||e&&l.data===k||(l.data=k);else {if(r=r&&n.call(l.childNodes),w=t.props||c$1,!e&&null!=r)for(w={},a=0;a<l.attributes.length;a++)w[(_=l.attributes[a]).name]=_.value;for(a in w)_=w[a],"children"==a||("dangerouslySetInnerHTML"==a?y=_:"key"===a||a in k||T(l,a,null,_,o));for(a in k)_=k[a],"children"==a?d=_:"dangerouslySetInnerHTML"==a?v=_:"value"==a?g=_:"checked"==a?b=_:"key"===a||e&&"function"!=typeof _||w[a]===_||T(l,a,_,w[a],o);if(v)e||y&&(v.__html===y.__html||v.__html===l.innerHTML)||(l.innerHTML=v.__html),u.__k=[];else if(y&&(l.innerHTML=""),C$1(l,h$1(d)?d:[d],u,t,i,o&&"foreignObject"!==x,r,f,r?r[0]:t.__k&&m$1(t,0),e,s),null!=r)for(a=r.length;a--;)null!=r[a]&&p$1(r[a]);e||(a="value",void 0!==g&&(g!==l[a]||"progress"===x&&!g||"option"===x&&g!==w[a])&&T(l,a,g,w[a],!1),a="checked",void 0!==b&&b!==l[a]&&T(l,a,b,w[a],!1));}return l}function O(n,u,t){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,t);}}function j$1(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||O(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null,n.__c=void 0;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&j$1(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function z$1(n,l,u){return this.constructor(n,u)}function N(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],F(t,u=(!o&&i||t).__k=y$1(g,null,[u]),r||c$1,c$1,void 0!==t.ownerSVGElement,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),L(f,u,e);}n=s$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,b.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v$1({},this.state),"function"==typeof n&&(n=n(v$1({},u),this.props)),n&&v$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),k$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),k$1(this));},b.prototype.render=g,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},x$1.__r=0;
|
|
16
16
|
|
|
17
|
-
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,
|
|
17
|
+
var t,r,u,i,o=0,f=[],c=[],e=l$1,a=e.__b,v=e.__r,l=e.diffed,m=e.__c,s=e.unmount,d=e.__;function h(n,t){e.__h&&e.__h(r,n,o||t),o=0;var u=r.__H||(r.__H={__:[],__h:[]});return n>=u.__.length&&u.__.push({__V:c}),u.__[n]}function p(n){return o=1,y(D,n)}function y(n,u,i){var o=h(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):D(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}));}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return !0;var u=o.__c.__H.__.filter(function(n){return !!n.__c});if(u.every(function(n){return !n.__N}))return !c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0);}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u;}e&&e.call(this,n,t,r);},r.shouldComponentUpdate=f;}return o.__N||o.__}function _(n,u){var i=h(t++,3);!e.__s&&C(i.__H,u)&&(i.__=n,i.i=u,r.__H.__h.push(i));}function q(n,r){var u=h(t++,7);return C(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function x(n,t){return o=8,q(function(){return n},t)}function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[];}catch(t){n.__H.__h=[],e.__e(t,n.__v);}}e.__b=function(n){r=null,a&&a(n);},e.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),d&&d(n,t);},e.__r=function(n){v&&v(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0;})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],t=0)),u=r;},e.diffed=function(n){l&&l(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===e.requestAnimationFrame||((i=e.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c;})),u=r=null;},e.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return !n.__||B(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],e.__e(r,n.__v);}}),m&&m(n,t);},e.unmount=function(n){s&&s(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n);}catch(n){t=n;}}),r.__H=void 0,t&&e.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B(n){var t=r;n.__c=n.__(),r=t;}function C(n,t){return !n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function D(n,t){return "function"==typeof t?t(n):t}
|
|
18
18
|
|
|
19
19
|
var index_es6 = /*#__PURE__*/Object.freeze({
|
|
20
20
|
__proto__: null,
|
|
21
21
|
BUILD_VERSION: BUILD_VERSION,
|
|
22
|
-
Component: b
|
|
23
|
-
Fragment: g
|
|
22
|
+
Component: b,
|
|
23
|
+
Fragment: g,
|
|
24
24
|
PKG_NAME: PKG_NAME,
|
|
25
25
|
PKG_VERSION: PKG_VERSION,
|
|
26
|
-
createElement: y,
|
|
27
|
-
h: y,
|
|
28
|
-
render:
|
|
29
|
-
useCallback:
|
|
30
|
-
useEffect:
|
|
31
|
-
useMemo:
|
|
32
|
-
useReducer:
|
|
33
|
-
useState:
|
|
26
|
+
createElement: y$1,
|
|
27
|
+
h: y$1,
|
|
28
|
+
render: N,
|
|
29
|
+
useCallback: x,
|
|
30
|
+
useEffect: _,
|
|
31
|
+
useMemo: q,
|
|
32
|
+
useReducer: y,
|
|
33
|
+
useState: p
|
|
34
34
|
});
|
|
35
35
|
|
|
36
36
|
/******************************************************************************
|
|
@@ -92,138 +92,138 @@
|
|
|
92
92
|
};
|
|
93
93
|
|
|
94
94
|
var Image = function (_a) {
|
|
95
|
-
var href = _a.href, x = _a.x, _b = _a.y, y
|
|
96
|
-
return y("image", { href: href, x: x - height / 2, y: y
|
|
95
|
+
var href = _a.href, x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c;
|
|
96
|
+
return y$1("image", { href: href, x: x - height / 2, y: y - height / 2, width: height, height: height });
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
var ImageChar = function (_a) {
|
|
100
|
-
var x = _a.x, _b = _a.y, y
|
|
101
|
-
var renderChar =
|
|
100
|
+
var x = _a.x, _b = _a.y, y = _b === void 0 ? 0 : _b, _c = _a.height, height = _c === void 0 ? 12 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.fontFamily, fontFamily = _d === void 0 ? "FontAwesome" : _d, _e = _a.char, char = _e === void 0 ? "" : _e;
|
|
101
|
+
var renderChar = q(function () {
|
|
102
102
|
return fontFamily === "FontAwesome" ? common.Utility.faChar(char) : char;
|
|
103
103
|
}, [char, fontFamily]);
|
|
104
|
-
return y("text", { x: x, y: y
|
|
104
|
+
return y$1("text", { x: x, y: y, fill: fill, stroke: stroke, "font-family": fontFamily, "font-size": "".concat(height, "px"), "dominant-baseline": "middle", style: "text-anchor: middle;alignment-baseline:middle;" }, renderChar);
|
|
105
105
|
};
|
|
106
106
|
|
|
107
107
|
var Circle = function (_a) {
|
|
108
108
|
var _b = _a.radius, radius = _b === void 0 ? 32 : _b, _c = _a.fill, fill = _c === void 0 ? "navy" : _c, _d = _a.stroke, stroke = _d === void 0 ? fill : _d, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
|
|
109
|
-
return y("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
109
|
+
return y$1("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
110
110
|
};
|
|
111
111
|
var Square = function (_a) {
|
|
112
112
|
var _b = _a.radius, radius = _b === void 0 ? 30 : _b, _c = _a.cornerRadius, cornerRadius = _c === void 0 ? 0 : _c, _d = _a.fill, fill = _d === void 0 ? "white" : _d, stroke = _a.stroke, _e = _a.strokeWidth, strokeWidth = _e === void 0 ? 1 : _e, shapeRendering = _a.shapeRendering;
|
|
113
|
-
return y("rect", { x: -radius, y: -radius, rx: cornerRadius, ry: cornerRadius, width: radius * 2, height: radius * 2, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
113
|
+
return y$1("rect", { x: -radius, y: -radius, rx: cornerRadius, ry: cornerRadius, width: radius * 2, height: radius * 2, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
114
114
|
};
|
|
115
115
|
var Rectangle = function (_a) {
|
|
116
116
|
var _b = _a.width, width = _b === void 0 ? 30 : _b, _c = _a.height, height = _c === void 0 ? 30 : _c, _d = _a.cornerRadius, cornerRadius = _d === void 0 ? 0 : _d, _e = _a.fill, fill = _e === void 0 ? "white" : _e, _f = _a.stroke, stroke = _f === void 0 ? "black" : _f, _g = _a.strokeWidth, strokeWidth = _g === void 0 ? 1 : _g, shapeRendering = _a.shapeRendering;
|
|
117
|
-
return y("rect", { x: -width / 2, y: -height / 2, rx: cornerRadius, ry: cornerRadius, width: width, height: height, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
117
|
+
return y$1("rect", { x: -width / 2, y: -height / 2, rx: cornerRadius, ry: cornerRadius, width: width, height: height, fill: fill, stroke: stroke || fill, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
118
118
|
};
|
|
119
119
|
var Shape = function (_a) {
|
|
120
120
|
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, _c = _a.height, height = _c === void 0 ? 128 : _c, width = _a.width, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 1 : _d, shapeRendering = _a.shapeRendering, cornerRadius = _a.cornerRadius;
|
|
121
121
|
switch (shape) {
|
|
122
122
|
case "square":
|
|
123
|
-
return y(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
123
|
+
return y$1(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
124
124
|
case "rectangle":
|
|
125
|
-
return y(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
125
|
+
return y$1(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
126
126
|
case "circle":
|
|
127
127
|
default:
|
|
128
|
-
return y(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
|
|
128
|
+
return y$1(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
|
|
129
129
|
}
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
var Icon = function (_a) {
|
|
133
133
|
var _b = _a.shape, shape = _b === void 0 ? "circle" : _b, width = _a.width, _c = _a.height, height = _c === void 0 ? 32 : _c, fill = _a.fill, stroke = _a.stroke, _d = _a.strokeWidth, strokeWidth = _d === void 0 ? 0 : _d, _e = _a.imageUrl, imageUrl = _e === void 0 ? "" : _e, _f = _a.imageFontFamily, imageFontFamily = _f === void 0 ? "FontAwesome" : _f, _g = _a.imageChar, imageChar = _g === void 0 ? "" : _g, _h = _a.imageCharFill, imageCharFill = _h === void 0 ? common.Palette.textColor(fill) : _h, _j = _a.padding, padding = _j === void 0 ? height / 5 : _j, _k = _a.xOffset, xOffset = _k === void 0 ? 0 : _k, _l = _a.yOffset, yOffset = _l === void 0 ? 0 : _l, cornerRadius = _a.cornerRadius, shapeRendering = _a.shapeRendering;
|
|
134
|
-
return y(g
|
|
135
|
-
y(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
|
|
134
|
+
return y$1(g, null,
|
|
135
|
+
y$1(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
|
|
136
136
|
imageUrl ?
|
|
137
|
-
y(Image, { href: imageUrl, x: xOffset, y: yOffset, height: height - padding }) :
|
|
138
|
-
y(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
|
|
137
|
+
y$1(Image, { href: imageUrl, x: xOffset, y: yOffset, height: height - padding }) :
|
|
138
|
+
y$1(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
|
|
139
139
|
};
|
|
140
140
|
var Icons = function (_a) {
|
|
141
141
|
var _b = _a.icons, icons = _b === void 0 ? [] : _b;
|
|
142
142
|
var IconComponents = icons.map(function (cat) {
|
|
143
|
-
return y("g", { key: cat.id, id: cat.id },
|
|
144
|
-
y(Icon, __assign({}, cat)));
|
|
143
|
+
return y$1("g", { key: cat.id, id: cat.id },
|
|
144
|
+
y$1(Icon, __assign({}, cat)));
|
|
145
145
|
});
|
|
146
|
-
return y(g
|
|
146
|
+
return y$1(g, null, IconComponents);
|
|
147
147
|
};
|
|
148
148
|
|
|
149
149
|
var TextLine = function (_a) {
|
|
150
150
|
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.anchor, anchor = _c === void 0 ? "middle" : _c, _d = _a.baseline, baseline = _d === void 0 ? "middle" : _d, _e = _a.fontFamily, fontFamily = _e === void 0 ? "Verdana" : _e, _f = _a.fill, fill = _f === void 0 ? "black" : _f;
|
|
151
|
-
return y("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
|
|
151
|
+
return y$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
|
|
152
152
|
};
|
|
153
153
|
var Text = function (_a) {
|
|
154
154
|
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.fill, fill = _d === void 0 ? "black" : _d, onSizeUpdate = _a.onSizeUpdate;
|
|
155
|
-
var _e =
|
|
156
|
-
var _f =
|
|
157
|
-
|
|
155
|
+
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
|
|
156
|
+
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
|
|
157
|
+
_(function () {
|
|
158
158
|
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
|
|
159
159
|
}, [totalWidth, totalHeight, onSizeUpdate]);
|
|
160
|
-
var parts =
|
|
160
|
+
var parts = q(function () {
|
|
161
161
|
return text.split("\n");
|
|
162
162
|
}, [text]);
|
|
163
|
-
var ts =
|
|
163
|
+
var ts = q(function () {
|
|
164
164
|
return common.Utility.textSize(parts, fontFamily, height);
|
|
165
165
|
}, [fontFamily, height, parts]);
|
|
166
166
|
setTotalWidthUpdate(ts.width);
|
|
167
167
|
setTotalHeightUpdate(parts.length * (height + 2) - 2);
|
|
168
168
|
var yOffset = -(totalHeight / 2) + (height / 2);
|
|
169
|
-
var TextLines =
|
|
169
|
+
var TextLines = q(function () {
|
|
170
170
|
return parts.map(function (p, i) {
|
|
171
|
-
return y("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
|
|
172
|
-
y(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
|
|
171
|
+
return y$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
|
|
172
|
+
y$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
|
|
173
173
|
});
|
|
174
174
|
}, [fill, fontFamily, height, parts, yOffset]);
|
|
175
|
-
return y(g
|
|
175
|
+
return y$1(g, null, TextLines);
|
|
176
176
|
};
|
|
177
177
|
var TextBox = function (_a) {
|
|
178
178
|
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.fontFamily, fontFamily = _c === void 0 ? "Verdana" : _c, _d = _a.padding, padding = _d === void 0 ? 4 : _d, _e = _a.fill, fill = _e === void 0 ? "whitesmoke" : _e, _f = _a.stroke, stroke = _f === void 0 ? "lightgray" : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.strokeWidth, strokeWidth = _h === void 0 ? 1 : _h, _j = _a.cornerRadius, cornerRadius = _j === void 0 ? 0 : _j, onSizeUpdate = _a.onSizeUpdate;
|
|
179
|
-
var _k =
|
|
180
|
-
var _l =
|
|
181
|
-
|
|
179
|
+
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
|
|
180
|
+
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
|
|
181
|
+
_(function () {
|
|
182
182
|
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
|
|
183
183
|
}, [textWidth, textHeight, onSizeUpdate]);
|
|
184
|
-
var onTextSizeUpdate =
|
|
184
|
+
var onTextSizeUpdate = x(function (size) {
|
|
185
185
|
setTextWidthUpdate(size.width);
|
|
186
186
|
setTextHeightUpdate(size.height);
|
|
187
187
|
}, []);
|
|
188
188
|
var w = textWidth + padding * 2 + strokeWidth;
|
|
189
|
-
var h
|
|
189
|
+
var h = textHeight + padding * 2 + strokeWidth;
|
|
190
190
|
var textOffsetY = Math.floor(height / 10);
|
|
191
|
-
return y(g
|
|
192
|
-
y(Rectangle, { width: w, height: h
|
|
193
|
-
y("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
|
|
194
|
-
y(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
|
|
191
|
+
return y$1(g, null,
|
|
192
|
+
y$1(Rectangle, { width: w, height: h, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
193
|
+
y$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
|
|
194
|
+
y$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
|
|
195
195
|
};
|
|
196
196
|
var LabelledRect = function (_a) {
|
|
197
197
|
var text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
|
|
198
|
-
return y(g
|
|
199
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
200
|
-
y("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
201
|
-
y(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
198
|
+
return y$1(g, null,
|
|
199
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
200
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
201
|
+
y$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
202
202
|
};
|
|
203
203
|
var IconLabelledRect = function (_a) {
|
|
204
204
|
var icon = _a.icon, iconFontFamily = _a.iconFontFamily, text = _a.text, _b = _a.height, height = _b === void 0 ? 12 : _b, _c = _a.width, width = _c === void 0 ? 12 : _c, _d = _a.fontFamily, fontFamily = _d === void 0 ? "Verdana" : _d, _e = _a.fontSize, fontSize = _e === void 0 ? 10 : _e, _f = _a.padding, padding = _f === void 0 ? 3 : _f, _g = _a.fill, fill = _g === void 0 ? "whitesmoke" : _g, _h = _a.stroke, stroke = _h === void 0 ? "lightgray" : _h, _j = _a.textFill, textFill = _j === void 0 ? "black" : _j, _k = _a.strokeWidth, strokeWidth = _k === void 0 ? 1 : _k, _l = _a.cornerRadius, cornerRadius = _l === void 0 ? 0 : _l; _a.onSizeUpdate;
|
|
205
|
-
return y(g
|
|
206
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
207
|
-
y("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
208
|
-
y(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
|
|
209
|
-
y("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
|
|
210
|
-
y(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
205
|
+
return y$1(g, null,
|
|
206
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
207
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
208
|
+
y$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
|
|
209
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
|
|
210
|
+
y$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
211
211
|
};
|
|
212
212
|
|
|
213
213
|
var Edge = function (_a) {
|
|
214
214
|
var label = _a.label, labelPos = _a.labelPos, _b = _a.labelFill, labelFill = _b === void 0 ? "black" : _b, _c = _a.labelHeight, labelHeight = _c === void 0 ? 12 : _c, path = _a.path, stroke = _a.stroke, strokeWidth = _a.strokeWidth, strokeDasharray = _a.strokeDasharray;
|
|
215
|
-
return y(g
|
|
216
|
-
y("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
|
|
215
|
+
return y$1(g, null,
|
|
216
|
+
y$1("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
|
|
217
217
|
label && labelPos && labelPos.length === 2 ?
|
|
218
|
-
y("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
|
|
219
|
-
y(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
|
|
218
|
+
y$1("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
|
|
219
|
+
y$1(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
|
|
220
220
|
};
|
|
221
221
|
|
|
222
222
|
function render(C, props, parent, replaceNode) {
|
|
223
|
-
|
|
223
|
+
N(y$1(C, props), parent, replaceNode);
|
|
224
224
|
}
|
|
225
225
|
function svgRender(C, props, parent, replaceNode) {
|
|
226
|
-
|
|
226
|
+
N(y$1("svg", null, y$1(C, props)), parent, replaceNode);
|
|
227
227
|
}
|
|
228
228
|
var HTMLAdapter = /** @class */ (function (_super) {
|
|
229
229
|
__extends(HTMLAdapter, _super);
|
|
@@ -287,16 +287,16 @@
|
|
|
287
287
|
}(common.SVGWidget));
|
|
288
288
|
|
|
289
289
|
var Annotations = function (_a) {
|
|
290
|
-
var x = _a.x, y
|
|
291
|
-
var IconComponents = annotationIDs.map(function (id, i) { return y("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y
|
|
292
|
-
y("use", { href: "#" + id })); });
|
|
293
|
-
return y(g
|
|
290
|
+
var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
|
|
291
|
+
var IconComponents = annotationIDs.map(function (id, i) { return y$1("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y, ")") },
|
|
292
|
+
y$1("use", { href: "#" + id })); });
|
|
293
|
+
return y$1(g, null, IconComponents);
|
|
294
294
|
};
|
|
295
295
|
var Vertex = function (_a) {
|
|
296
296
|
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.annotationsHeight, annotationsHeight = _g === void 0 ? 12 : _g, _h = _a.annotationIDs, annotationIDs = _h === void 0 ? [] : _h, textFill = _a.textFill, textboxFill = _a.textboxFill, textboxStroke = _a.textboxStroke, textFontFamily = _a.textFontFamily, onSizeUpdate = _a.onSizeUpdate, _j = _a.showLabel, showLabel = _j === void 0 ? true : _j, _k = _a.scale, scale = _k === void 0 ? 1 : _k;
|
|
297
|
-
var _l =
|
|
298
|
-
var _m =
|
|
299
|
-
|
|
297
|
+
var _l = p(0), textBoxWidth = _l[0], setTextBoxWidthUpdate = _l[1];
|
|
298
|
+
var _m = p(0), textBoxHeight = _m[0], setTextBoxHeightUpdate = _m[1];
|
|
299
|
+
_(function () {
|
|
300
300
|
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
|
|
301
301
|
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
302
302
|
icon = __assign({ imageChar: "fa-question", height: 32, fill: "transparent" }, icon);
|
|
@@ -309,19 +309,19 @@
|
|
|
309
309
|
offsetY += (textHeight + 8) / 2;
|
|
310
310
|
annotationOffsetY -= textBoxHeight + textPadding;
|
|
311
311
|
}
|
|
312
|
-
var onTextBoxSizeUpdate =
|
|
312
|
+
var onTextBoxSizeUpdate = x(function (size) {
|
|
313
313
|
setTextBoxWidthUpdate(size.width);
|
|
314
314
|
setTextBoxHeightUpdate(size.height);
|
|
315
315
|
}, []);
|
|
316
|
-
var label = showLabel ? y("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
|
|
317
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
|
|
316
|
+
var label = showLabel ? y$1("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
|
|
317
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
|
|
318
318
|
return categoryID ?
|
|
319
|
-
y("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
320
|
-
y("use", { href: "#" + categoryID }),
|
|
319
|
+
y$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
320
|
+
y$1("use", { href: "#" + categoryID }),
|
|
321
321
|
label,
|
|
322
|
-
y(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
|
|
323
|
-
y("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
324
|
-
y(Icon, __assign({}, icon)),
|
|
322
|
+
y$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
|
|
323
|
+
y$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
324
|
+
y$1(Icon, __assign({}, icon)),
|
|
325
325
|
label);
|
|
326
326
|
};
|
|
327
327
|
|
|
@@ -329,7 +329,7 @@
|
|
|
329
329
|
var _b = _a.categoryID, categoryID = _b === void 0 ? "" : _b, _c = _a.text, text = _c === void 0 ? "" : _c, _d = _a.textHeight, textHeight = _d === void 0 ? 12 : _d, _e = _a.textPadding, textPadding = _e === void 0 ? 4 : _e, _f = _a.icon, icon = _f === void 0 ? {} : _f, _g = _a.textFill, textFill = _g === void 0 ? "black" : _g, _h = _a.textboxFill, textboxFill = _h === void 0 ? "white" : _h, _j = _a.textboxStroke, textboxStroke = _j === void 0 ? "black" : _j, textFontFamily = _a.textFontFamily, _k = _a.annotationsHeight, annotationsHeight = _k === void 0 ? 12 : _k, _l = _a.annotationIDs, annotationIDs = _l === void 0 ? [] : _l;
|
|
330
330
|
icon = __assign({ imageChar: "fa-question", imageCharFill: "white", height: 32, fill: "black", shape: "square" }, icon);
|
|
331
331
|
var textBoxHeight = textHeight + textPadding * 2;
|
|
332
|
-
var width =
|
|
332
|
+
var width = q(function () {
|
|
333
333
|
return common.Utility.textSize(text, textFontFamily, textHeight, false);
|
|
334
334
|
}, [text, textFontFamily, textHeight]).width;
|
|
335
335
|
var stepSize = annotationsHeight;
|
|
@@ -344,18 +344,18 @@
|
|
|
344
344
|
var annotationOffsetX = stepSize / 2;
|
|
345
345
|
var annotationOffsetY = halfTextboxHeight;
|
|
346
346
|
return categoryID ?
|
|
347
|
-
y("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
|
|
348
|
-
y("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
349
|
-
y("use", { href: "#" + categoryID })),
|
|
350
|
-
y("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
|
|
351
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
|
|
352
|
-
y(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
|
|
347
|
+
y$1("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
|
|
348
|
+
y$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
349
|
+
y$1("use", { href: "#" + categoryID })),
|
|
350
|
+
y$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
|
|
351
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
|
|
352
|
+
y$1(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
|
|
353
353
|
:
|
|
354
|
-
y(g
|
|
355
|
-
y("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
|
|
356
|
-
y(Icon, __assign({}, icon, { shape: "square" }))),
|
|
357
|
-
y("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
|
|
358
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
|
|
354
|
+
y$1(g, null,
|
|
355
|
+
y$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
|
|
356
|
+
y$1(Icon, __assign({}, icon, { shape: "square" }))),
|
|
357
|
+
y$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
|
|
358
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
|
|
359
359
|
};
|
|
360
360
|
|
|
361
361
|
var Vertex3 = function (_a) {
|
|
@@ -365,7 +365,7 @@
|
|
|
365
365
|
expansionIcon = expansionIcon ? __assign({ height: 16, shape: "circle", padding: 6, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "black", fill: "whitesmoke", stroke: "whitesmoke", strokeWidth: 0 }, expansionIcon) : undefined;
|
|
366
366
|
var fullAnnotationWidth = 0;
|
|
367
367
|
var annoOffsetY = 0;
|
|
368
|
-
var labelWidth =
|
|
368
|
+
var labelWidth = q(function () {
|
|
369
369
|
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
|
|
370
370
|
}, [text, textFontFamily, textHeight]);
|
|
371
371
|
var labelShapeWidth = 0;
|
|
@@ -381,13 +381,13 @@
|
|
|
381
381
|
var annoShapeWidth = textShapeHeight;
|
|
382
382
|
fullAnnotationWidth += annoShapeWidth + annotationGutter;
|
|
383
383
|
var annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
|
|
384
|
-
annotationArr.push(y("g", { key: idx, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
385
|
-
y(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
384
|
+
annotationArr.push(y$1("g", { key: idx, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
385
|
+
y$1(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
386
386
|
});
|
|
387
387
|
if (annotations.length > 0) {
|
|
388
388
|
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
|
|
389
389
|
}
|
|
390
|
-
var textElement = y("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? y("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : y(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
|
|
390
|
+
var textElement = y$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? y$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : y$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
|
|
391
391
|
var iconHeight = icon.height || 20;
|
|
392
392
|
var iconStrokeWidth = icon.strokeWidth || 0;
|
|
393
393
|
var iconOffsetX = 0;
|
|
@@ -400,15 +400,15 @@
|
|
|
400
400
|
else if (subText.text !== "") {
|
|
401
401
|
subTextOffsetY = (iconHeight / 2) + iconStrokeWidth + (annotationGutter * 2);
|
|
402
402
|
}
|
|
403
|
-
var subtextElement = subText.text === "" ? null : y("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
404
|
-
y(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
405
|
-
return y("g", { transform: "scale(".concat(scale, ")") },
|
|
406
|
-
y("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
407
|
-
y(Icon, __assign({}, icon)),
|
|
403
|
+
var subtextElement = subText.text === "" ? null : y$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
404
|
+
y$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
405
|
+
return y$1("g", { transform: "scale(".concat(scale, ")") },
|
|
406
|
+
y$1("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
407
|
+
y$1(Icon, __assign({}, icon)),
|
|
408
408
|
expansionIcon &&
|
|
409
|
-
y("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: "translate(".concat((icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2, " ").concat(-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2, ")") },
|
|
410
|
-
y(Icon, __assign({}, expansionIcon)))),
|
|
411
|
-
y("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
409
|
+
y$1("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: "translate(".concat((icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2, " ").concat(-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2, ")") },
|
|
410
|
+
y$1(Icon, __assign({}, expansionIcon)))),
|
|
411
|
+
y$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
412
412
|
textElement,
|
|
413
413
|
annotationArr),
|
|
414
414
|
subtextElement);
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
expansionIcon: expansionIcon,
|
|
437
437
|
scale: scale
|
|
438
438
|
};
|
|
439
|
-
return y(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
|
|
439
|
+
return y$1(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
|
|
440
440
|
};
|
|
441
441
|
|
|
442
442
|
var Vertex4 = function (_a) {
|
|
@@ -444,7 +444,7 @@
|
|
|
444
444
|
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
|
|
445
445
|
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
|
|
446
446
|
var annoOffsetY = 0;
|
|
447
|
-
var labelWidth =
|
|
447
|
+
var labelWidth = q(function () {
|
|
448
448
|
return common.Utility.textSize(text, textFontFamily, textHeight, false).width;
|
|
449
449
|
}, [text, textFontFamily, textHeight]);
|
|
450
450
|
var labelShapeWidth = 0;
|
|
@@ -465,8 +465,8 @@
|
|
|
465
465
|
var annoTextHeight = (_a = anno.height) !== null && _a !== void 0 ? _a : textShapeHeight;
|
|
466
466
|
_labelAnnoOffsetX += annoWidthArr[i] + annotationGutter;
|
|
467
467
|
var annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2);
|
|
468
|
-
annotationArr.push(y("g", { key: i, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
469
|
-
y(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
468
|
+
annotationArr.push(y$1("g", { key: i, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
469
|
+
y$1(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
470
470
|
});
|
|
471
471
|
if (annotations.length > 0) {
|
|
472
472
|
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
|
|
@@ -475,20 +475,20 @@
|
|
|
475
475
|
iconAnnotations.forEach(function (anno, i) {
|
|
476
476
|
var _a;
|
|
477
477
|
var x = anno.shapeOffsetX;
|
|
478
|
-
var y
|
|
479
|
-
iconAnnotationArr.push(y("g", { key: i, class: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(x, " ").concat(y
|
|
480
|
-
y(Icon, __assign({}, anno, { shape: (_a = anno.shape) !== null && _a !== void 0 ? _a : "square", imageChar: anno.imageChar, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, stroke: anno.stroke, strokeWidth: anno.strokeWidth }))));
|
|
478
|
+
var y = anno.shapeOffsetY;
|
|
479
|
+
iconAnnotationArr.push(y$1("g", { key: i, class: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(x, " ").concat(y, ")") },
|
|
480
|
+
y$1(Icon, __assign({}, anno, { shape: (_a = anno.shape) !== null && _a !== void 0 ? _a : "square", imageChar: anno.imageChar, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, stroke: anno.stroke, strokeWidth: anno.strokeWidth }))));
|
|
481
481
|
});
|
|
482
|
-
var textElement = y("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? y("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : y(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
|
|
482
|
+
var textElement = y$1("g", { "data-click": "text", transform: "translate(".concat(textOffsetX, " ").concat(annoOffsetY, ")") }, !showLabel || text === "" ? y$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : y$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily, cornerRadius: cornerRadius }));
|
|
483
483
|
var subTextOffsetX = 0;
|
|
484
484
|
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
|
|
485
|
-
var subtextElement = subText.text === "" ? null : y("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
486
|
-
y(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
487
|
-
return y("g", null,
|
|
488
|
-
y("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
|
|
489
|
-
y(Icon, __assign({}, icon, { strokeWidth: iconBorderWidth, shape: "circle", height: iconFontSize, fill: iconBackgroundColor, stroke: iconBorderColor, imageFontFamily: iconFontFamily, imageChar: iconText, imageCharFill: iconFontColor, padding: iconPadding, xOffset: iconOffsetX, yOffset: iconOffsetY, cornerRadius: cornerRadius, shapeRendering: shapeRendering })),
|
|
485
|
+
var subtextElement = subText.text === "" ? null : y$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
486
|
+
y$1(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
487
|
+
return y$1("g", null,
|
|
488
|
+
y$1("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
|
|
489
|
+
y$1(Icon, __assign({}, icon, { strokeWidth: iconBorderWidth, shape: "circle", height: iconFontSize, fill: iconBackgroundColor, stroke: iconBorderColor, imageFontFamily: iconFontFamily, imageChar: iconText, imageCharFill: iconFontColor, padding: iconPadding, xOffset: iconOffsetX, yOffset: iconOffsetY, cornerRadius: cornerRadius, shapeRendering: shapeRendering })),
|
|
490
490
|
iconAnnotationArr),
|
|
491
|
-
y("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
491
|
+
y$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
492
492
|
textElement,
|
|
493
493
|
annotationArr),
|
|
494
494
|
subtextElement);
|
|
@@ -530,16 +530,16 @@
|
|
|
530
530
|
iconText: iconText,
|
|
531
531
|
shapeRendering: shapeRendering
|
|
532
532
|
};
|
|
533
|
-
return y(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
|
|
533
|
+
return y$1(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
|
|
534
534
|
};
|
|
535
535
|
|
|
536
536
|
var Subgraph = function (_a) {
|
|
537
537
|
var text = _a.text, _b = _a.width, width = _b === void 0 ? 100 : _b, _c = _a.height, height = _c === void 0 ? 100 : _c, _d = _a.fill, fill = _d === void 0 ? "transparent" : _d, _e = _a.stroke, stroke = _e === void 0 ? "black" : _e, _f = _a.fontHeight, fontHeight = _f === void 0 ? 12 : _f, fontFamily = _a.fontFamily;
|
|
538
538
|
var tSize = common.Utility.textSize(text, fontFamily, fontHeight, false);
|
|
539
|
-
return y(g
|
|
540
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
|
|
541
|
-
y("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
|
|
542
|
-
y(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
|
|
539
|
+
return y$1(g, null,
|
|
540
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
|
|
541
|
+
y$1("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
|
|
542
|
+
y$1(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
|
|
543
543
|
};
|
|
544
544
|
|
|
545
545
|
exports.Annotations = Annotations;
|