@hpcc-js/react 2.53.11 → 2.53.13
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 +4 -4
- 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
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { Utility, Palette, publish, HTMLWidget, SVGWidget } from '@hpcc-js/common';
|
|
2
2
|
|
|
3
3
|
var PKG_NAME$1 = "@hpcc-js/react";
|
|
4
|
-
var PKG_VERSION$1 = "2.53.
|
|
5
|
-
var BUILD_VERSION$1 = "2.104.
|
|
4
|
+
var PKG_VERSION$1 = "2.53.13";
|
|
5
|
+
var BUILD_VERSION$1 = "2.104.42";
|
|
6
6
|
|
|
7
7
|
var PKG_NAME = "@hpcc-js/preact-shim";
|
|
8
|
-
var PKG_VERSION = "2.16.
|
|
9
|
-
var BUILD_VERSION = "2.104.
|
|
8
|
+
var PKG_VERSION = "2.16.9";
|
|
9
|
+
var BUILD_VERSION = "2.104.42";
|
|
10
10
|
|
|
11
|
-
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;
|
|
11
|
+
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,u,t){var i,o=n.__v,r=o.__e,f=n.__P;if(f)return (i=v$1({},o)).__v=o.__v+1,l$1.vnode&&l$1.vnode(i),M(f,i,o,n.__n,void 0!==f.ownerSVGElement,32&o.__u?[r]:null,u,null==r?m$1(o):r,!!(32&o.__u),t),i.__v=o.__v,i.__.__k[i.__i]=i,i.__d=void 0,i.__e!=r&&k$1(i),i}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 x$1(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!C$1.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(C$1);}function C$1(){var n,u,t,o=[],r=[];for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(t=i$1.length,u=w$1(n,o,r)||u,0===t||i$1.length>t?(j$1(o,u,r),r.length=o.length=0,u=void 0,i$1.sort(f$1)):u&&l$1.__c&&l$1.__c(u,s$1));u&&j$1(o,u,r),C$1.__r=0;}function P(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,S(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,M(n,y,p,i,o,r,f,e,a,h),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&N(p.ref,null,y),h.push(y.ref,y.__c||d,y)),null==_&&null!=d&&(_=d),65536&y.__u||p.__k===y.__k?e=$(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 S(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)),O(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)),O(o,o));}function $(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=$(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 T(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 A(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||T(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T(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?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?L:D$1,o)):n.removeEventListener(l,o?L:D$1,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 D$1(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 L(n){if(this.l)return this.l[n.type+!0](l$1.event?l$1.event(n):n)}function M(n,u,t,i,o,r,f,e,c,s){var a,p,y,d,_,m,w,k,x,C,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(k=u.props,x=(a=A.contextType)&&i[a.__c],C=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,C):(u.__c=p=new b(k,C),p.constructor=A,p.render=q$1),x&&x.sub(p),p.props=k,p.state||(p.state={}),p.context=C,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,C),!p.__e&&(null!=p.shouldComponentUpdate&&!1===p.shouldComponentUpdate(k,p.__s,C)||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,C),null!=p.componentDidUpdate&&p.__h.push(function(){p.componentDidUpdate(d,_,m);});}if(p.context=C,p.props=k,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,_)),P(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=z$1(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$1(n,u,t){for(var i=0;i<t.length;i++)N(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 z$1(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||A(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]===_||A(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=""),P(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])&&A(l,a,g,w[a],!1),a="checked",void 0!==b&&b!==l[a]&&A(l,a,b,w[a],!1));}return l}function N(n,u,t){try{"function"==typeof n?n(u):n.current=u;}catch(n){l$1.__e(n,t);}}function O(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(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]&&O(i[o],u,t||"function"!=typeof n.type);t||null==n.__e||p$1(n.__e),n.__=n.__e=n.__d=void 0;}function q$1(n,l,u){return this.constructor(n,u)}function B$1(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=[],M(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),u.__d=void 0,j$1(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),x$1(this));},b.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),x$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},C$1.__r=0;
|
|
12
12
|
|
|
13
|
-
var t,r,u,i,o=0,f=[],c=[],e=l$1.__b,
|
|
13
|
+
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}
|
|
14
14
|
|
|
15
15
|
var index_es6 = /*#__PURE__*/Object.freeze({
|
|
16
16
|
__proto__: null,
|
|
17
17
|
BUILD_VERSION: BUILD_VERSION,
|
|
18
|
-
Component: b
|
|
19
|
-
Fragment: g
|
|
18
|
+
Component: b,
|
|
19
|
+
Fragment: g,
|
|
20
20
|
PKG_NAME: PKG_NAME,
|
|
21
21
|
PKG_VERSION: PKG_VERSION,
|
|
22
|
-
createElement: y,
|
|
23
|
-
h: y,
|
|
24
|
-
render:
|
|
25
|
-
useCallback:
|
|
26
|
-
useEffect:
|
|
27
|
-
useMemo:
|
|
28
|
-
useReducer:
|
|
29
|
-
useState:
|
|
22
|
+
createElement: y$1,
|
|
23
|
+
h: y$1,
|
|
24
|
+
render: B$1,
|
|
25
|
+
useCallback: x,
|
|
26
|
+
useEffect: _,
|
|
27
|
+
useMemo: q,
|
|
28
|
+
useReducer: y,
|
|
29
|
+
useState: p
|
|
30
30
|
});
|
|
31
31
|
|
|
32
32
|
/******************************************************************************
|
|
@@ -88,138 +88,138 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
var Image = function (_a) {
|
|
91
|
-
var href = _a.href, x = _a.x, _b = _a.y, y
|
|
92
|
-
return y("image", { href: href, x: x - height / 2, y: y
|
|
91
|
+
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;
|
|
92
|
+
return y$1("image", { href: href, x: x - height / 2, y: y - height / 2, width: height, height: height });
|
|
93
93
|
};
|
|
94
94
|
|
|
95
95
|
var ImageChar = function (_a) {
|
|
96
|
-
var x = _a.x, _b = _a.y, y
|
|
97
|
-
var renderChar =
|
|
96
|
+
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;
|
|
97
|
+
var renderChar = q(function () {
|
|
98
98
|
return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
|
|
99
99
|
}, [char, fontFamily]);
|
|
100
|
-
return y("text", { x: x, y: y
|
|
100
|
+
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);
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
var Circle = function (_a) {
|
|
104
104
|
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;
|
|
105
|
-
return y("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
105
|
+
return y$1("circle", { r: radius, fill: fill, stroke: stroke, "stroke-width": strokeWidth, "shape-rendering": shapeRendering });
|
|
106
106
|
};
|
|
107
107
|
var Square = function (_a) {
|
|
108
108
|
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;
|
|
109
|
-
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 });
|
|
109
|
+
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 });
|
|
110
110
|
};
|
|
111
111
|
var Rectangle = function (_a) {
|
|
112
112
|
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;
|
|
113
|
-
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 });
|
|
113
|
+
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 });
|
|
114
114
|
};
|
|
115
115
|
var Shape = function (_a) {
|
|
116
116
|
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;
|
|
117
117
|
switch (shape) {
|
|
118
118
|
case "square":
|
|
119
|
-
return y(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
119
|
+
return y$1(Square, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
120
120
|
case "rectangle":
|
|
121
|
-
return y(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
121
|
+
return y$1(Rectangle, { width: width !== null && width !== void 0 ? width : height, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius });
|
|
122
122
|
case "circle":
|
|
123
123
|
default:
|
|
124
|
-
return y(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
|
|
124
|
+
return y$1(Circle, { radius: height / 2, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering });
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
127
|
|
|
128
128
|
var Icon = function (_a) {
|
|
129
129
|
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 ? 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;
|
|
130
|
-
return y(g
|
|
131
|
-
y(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
|
|
130
|
+
return y$1(g, null,
|
|
131
|
+
y$1(Shape, { shape: shape, width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, shapeRendering: shapeRendering, cornerRadius: cornerRadius }),
|
|
132
132
|
imageUrl ?
|
|
133
|
-
y(Image, { href: imageUrl, x: xOffset, y: yOffset, height: height - padding }) :
|
|
134
|
-
y(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
|
|
133
|
+
y$1(Image, { href: imageUrl, x: xOffset, y: yOffset, height: height - padding }) :
|
|
134
|
+
y$1(ImageChar, { x: xOffset, y: yOffset, height: height - padding, fontFamily: imageFontFamily, char: imageChar, fill: imageCharFill, "font-weight": 400 }));
|
|
135
135
|
};
|
|
136
136
|
var Icons = function (_a) {
|
|
137
137
|
var _b = _a.icons, icons = _b === void 0 ? [] : _b;
|
|
138
138
|
var IconComponents = icons.map(function (cat) {
|
|
139
|
-
return y("g", { key: cat.id, id: cat.id },
|
|
140
|
-
y(Icon, __assign({}, cat)));
|
|
139
|
+
return y$1("g", { key: cat.id, id: cat.id },
|
|
140
|
+
y$1(Icon, __assign({}, cat)));
|
|
141
141
|
});
|
|
142
|
-
return y(g
|
|
142
|
+
return y$1(g, null, IconComponents);
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
var TextLine = function (_a) {
|
|
146
146
|
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;
|
|
147
|
-
return y("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
|
|
147
|
+
return y$1("text", { "font-family": fontFamily, "font-size": "".concat(height, "px"), "text-anchor": anchor, "dominant-baseline": baseline, fill: fill }, text);
|
|
148
148
|
};
|
|
149
149
|
var Text = function (_a) {
|
|
150
150
|
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;
|
|
151
|
-
var _e =
|
|
152
|
-
var _f =
|
|
153
|
-
|
|
151
|
+
var _e = p(0), totalWidth = _e[0], setTotalWidthUpdate = _e[1];
|
|
152
|
+
var _f = p(0), totalHeight = _f[0], setTotalHeightUpdate = _f[1];
|
|
153
|
+
_(function () {
|
|
154
154
|
onSizeUpdate && onSizeUpdate({ width: totalWidth, height: totalHeight });
|
|
155
155
|
}, [totalWidth, totalHeight, onSizeUpdate]);
|
|
156
|
-
var parts =
|
|
156
|
+
var parts = q(function () {
|
|
157
157
|
return text.split("\n");
|
|
158
158
|
}, [text]);
|
|
159
|
-
var ts =
|
|
159
|
+
var ts = q(function () {
|
|
160
160
|
return Utility.textSize(parts, fontFamily, height);
|
|
161
161
|
}, [fontFamily, height, parts]);
|
|
162
162
|
setTotalWidthUpdate(ts.width);
|
|
163
163
|
setTotalHeightUpdate(parts.length * (height + 2) - 2);
|
|
164
164
|
var yOffset = -(totalHeight / 2) + (height / 2);
|
|
165
|
-
var TextLines =
|
|
165
|
+
var TextLines = q(function () {
|
|
166
166
|
return parts.map(function (p, i) {
|
|
167
|
-
return y("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
|
|
168
|
-
y(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
|
|
167
|
+
return y$1("g", { key: i, transform: "translate(0 ".concat(yOffset + i * (height + 2), ")") },
|
|
168
|
+
y$1(TextLine, { text: p, height: height, fontFamily: fontFamily, fill: fill }));
|
|
169
169
|
});
|
|
170
170
|
}, [fill, fontFamily, height, parts, yOffset]);
|
|
171
|
-
return y(g
|
|
171
|
+
return y$1(g, null, TextLines);
|
|
172
172
|
};
|
|
173
173
|
var TextBox = function (_a) {
|
|
174
174
|
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;
|
|
175
|
-
var _k =
|
|
176
|
-
var _l =
|
|
177
|
-
|
|
175
|
+
var _k = p(0), textWidth = _k[0], setTextWidthUpdate = _k[1];
|
|
176
|
+
var _l = p(0), textHeight = _l[0], setTextHeightUpdate = _l[1];
|
|
177
|
+
_(function () {
|
|
178
178
|
onSizeUpdate && onSizeUpdate({ width: textWidth, height: textHeight });
|
|
179
179
|
}, [textWidth, textHeight, onSizeUpdate]);
|
|
180
|
-
var onTextSizeUpdate =
|
|
180
|
+
var onTextSizeUpdate = x(function (size) {
|
|
181
181
|
setTextWidthUpdate(size.width);
|
|
182
182
|
setTextHeightUpdate(size.height);
|
|
183
183
|
}, []);
|
|
184
184
|
var w = textWidth + padding * 2 + strokeWidth;
|
|
185
|
-
var h
|
|
185
|
+
var h = textHeight + padding * 2 + strokeWidth;
|
|
186
186
|
var textOffsetY = Math.floor(height / 10);
|
|
187
|
-
return y(g
|
|
188
|
-
y(Rectangle, { width: w, height: h
|
|
189
|
-
y("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
|
|
190
|
-
y(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
|
|
187
|
+
return y$1(g, null,
|
|
188
|
+
y$1(Rectangle, { width: w, height: h, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
189
|
+
y$1("g", { transform: "translate(0 ".concat(textOffsetY, ")") },
|
|
190
|
+
y$1(Text, { text: text, fontFamily: fontFamily, height: height, fill: textFill, onSizeUpdate: onTextSizeUpdate })));
|
|
191
191
|
};
|
|
192
192
|
var LabelledRect = function (_a) {
|
|
193
193
|
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;
|
|
194
|
-
return y(g
|
|
195
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
196
|
-
y("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
197
|
-
y(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
194
|
+
return y$1(g, null,
|
|
195
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
196
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
197
|
+
y$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
198
198
|
};
|
|
199
199
|
var IconLabelledRect = function (_a) {
|
|
200
200
|
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;
|
|
201
|
-
return y(g
|
|
202
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
203
|
-
y("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
204
|
-
y(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
|
|
205
|
-
y("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
|
|
206
|
-
y(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
201
|
+
return y$1(g, null,
|
|
202
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke, strokeWidth: strokeWidth, cornerRadius: cornerRadius }),
|
|
203
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + padding, " ").concat(-(height / 2) + padding, ")") },
|
|
204
|
+
y$1(Icon, { shape: "square", imageFontFamily: iconFontFamily, imageChar: icon, height: height, fill: fill, imageCharFill: textFill })),
|
|
205
|
+
y$1("g", { transform: "translate(".concat(-(width / 2) + (padding * 2) + height, " ").concat(-(height / 2) + padding, ")") },
|
|
206
|
+
y$1(TextLine, { text: text, fontFamily: fontFamily, height: fontSize, fill: textFill, anchor: "start", baseline: "hanging" })));
|
|
207
207
|
};
|
|
208
208
|
|
|
209
209
|
var Edge = function (_a) {
|
|
210
210
|
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;
|
|
211
|
-
return y(g
|
|
212
|
-
y("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
|
|
211
|
+
return y$1(g, null,
|
|
212
|
+
y$1("path", { d: path, stroke: stroke, style: { strokeWidth: strokeWidth, strokeDasharray: strokeDasharray } }),
|
|
213
213
|
label && labelPos && labelPos.length === 2 ?
|
|
214
|
-
y("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
|
|
215
|
-
y(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
|
|
214
|
+
y$1("g", { transform: "translate(".concat(labelPos[0], " ").concat(labelPos[1], ")") },
|
|
215
|
+
y$1(Text, { text: label, fill: labelFill, height: labelHeight })) : undefined);
|
|
216
216
|
};
|
|
217
217
|
|
|
218
218
|
function render(C, props, parent, replaceNode) {
|
|
219
|
-
|
|
219
|
+
B$1(y$1(C, props), parent, replaceNode);
|
|
220
220
|
}
|
|
221
221
|
function svgRender(C, props, parent, replaceNode) {
|
|
222
|
-
|
|
222
|
+
B$1(y$1("svg", null, y$1(C, props)), parent, replaceNode);
|
|
223
223
|
}
|
|
224
224
|
var HTMLAdapter = /** @class */ (function (_super) {
|
|
225
225
|
__extends(HTMLAdapter, _super);
|
|
@@ -283,16 +283,16 @@ var SVGAdapter = /** @class */ (function (_super) {
|
|
|
283
283
|
}(SVGWidget));
|
|
284
284
|
|
|
285
285
|
var Annotations = function (_a) {
|
|
286
|
-
var x = _a.x, y
|
|
287
|
-
var IconComponents = annotationIDs.map(function (id, i) { return y("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y
|
|
288
|
-
y("use", { href: "#" + id })); });
|
|
289
|
-
return y(g
|
|
286
|
+
var x = _a.x, y = _a.y, _b = _a.annotationIDs, annotationIDs = _b === void 0 ? [] : _b, _c = _a.stepSize, stepSize = _c === void 0 ? -16 : _c;
|
|
287
|
+
var IconComponents = annotationIDs.map(function (id, i) { return y$1("g", { key: id, transform: "translate(".concat(x + i * stepSize, " ").concat(y, ")") },
|
|
288
|
+
y$1("use", { href: "#" + id })); });
|
|
289
|
+
return y$1(g, null, IconComponents);
|
|
290
290
|
};
|
|
291
291
|
var Vertex = function (_a) {
|
|
292
292
|
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;
|
|
293
|
-
var _l =
|
|
294
|
-
var _m =
|
|
295
|
-
|
|
293
|
+
var _l = p(0), textBoxWidth = _l[0], setTextBoxWidthUpdate = _l[1];
|
|
294
|
+
var _m = p(0), textBoxHeight = _m[0], setTextBoxHeightUpdate = _m[1];
|
|
295
|
+
_(function () {
|
|
296
296
|
onSizeUpdate && onSizeUpdate({ width: 0, height: 0 });
|
|
297
297
|
}, [textBoxWidth, textBoxHeight, onSizeUpdate]);
|
|
298
298
|
icon = __assign({ imageChar: "fa-question", height: 32, fill: "transparent" }, icon);
|
|
@@ -305,19 +305,19 @@ var Vertex = function (_a) {
|
|
|
305
305
|
offsetY += (textHeight + 8) / 2;
|
|
306
306
|
annotationOffsetY -= textBoxHeight + textPadding;
|
|
307
307
|
}
|
|
308
|
-
var onTextBoxSizeUpdate =
|
|
308
|
+
var onTextBoxSizeUpdate = x(function (size) {
|
|
309
309
|
setTextBoxWidthUpdate(size.width);
|
|
310
310
|
setTextBoxHeightUpdate(size.height);
|
|
311
311
|
}, []);
|
|
312
|
-
var label = showLabel ? y("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
|
|
313
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
|
|
312
|
+
var label = showLabel ? y$1("g", { transform: "translate(0 ".concat(textboxOffsetY, ")") },
|
|
313
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, onSizeUpdate: onTextBoxSizeUpdate, textFill: textFill, fill: textboxFill, stroke: textboxStroke, fontFamily: textFontFamily })) : undefined;
|
|
314
314
|
return categoryID ?
|
|
315
|
-
y("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
316
|
-
y("use", { href: "#" + categoryID }),
|
|
315
|
+
y$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
316
|
+
y$1("use", { href: "#" + categoryID }),
|
|
317
317
|
label,
|
|
318
|
-
y(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
|
|
319
|
-
y("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
320
|
-
y(Icon, __assign({}, icon)),
|
|
318
|
+
y$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs: annotationIDs })) :
|
|
319
|
+
y$1("g", { transform: "translate(0 ".concat(offsetY, ") scale(").concat(scale, ")") },
|
|
320
|
+
y$1(Icon, __assign({}, icon)),
|
|
321
321
|
label);
|
|
322
322
|
};
|
|
323
323
|
|
|
@@ -325,7 +325,7 @@ var Vertex2 = function (_a) {
|
|
|
325
325
|
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;
|
|
326
326
|
icon = __assign({ imageChar: "fa-question", imageCharFill: "white", height: 32, fill: "black", shape: "square" }, icon);
|
|
327
327
|
var textBoxHeight = textHeight + textPadding * 2;
|
|
328
|
-
var width =
|
|
328
|
+
var width = q(function () {
|
|
329
329
|
return Utility.textSize(text, textFontFamily, textHeight, false);
|
|
330
330
|
}, [text, textFontFamily, textHeight]).width;
|
|
331
331
|
var stepSize = annotationsHeight;
|
|
@@ -340,18 +340,18 @@ var Vertex2 = function (_a) {
|
|
|
340
340
|
var annotationOffsetX = stepSize / 2;
|
|
341
341
|
var annotationOffsetY = halfTextboxHeight;
|
|
342
342
|
return categoryID ?
|
|
343
|
-
y("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
|
|
344
|
-
y("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
345
|
-
y("use", { href: "#" + categoryID })),
|
|
346
|
-
y("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
|
|
347
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
|
|
348
|
-
y(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
|
|
343
|
+
y$1("g", { transform: "translate(".concat(offsetX, " ").concat(offsetY, ")") },
|
|
344
|
+
y$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
345
|
+
y$1("use", { href: "#" + categoryID })),
|
|
346
|
+
y$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")") },
|
|
347
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, strokeWidth: textboxStrokeWidth, stroke: textboxStroke, fill: textboxFill, textFill: textFill, fontFamily: textFontFamily })),
|
|
348
|
+
y$1(Annotations, { x: annotationOffsetX, y: annotationOffsetY, annotationIDs: annotationIDs, stepSize: stepSize }))
|
|
349
349
|
:
|
|
350
|
-
y(g
|
|
351
|
-
y("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
|
|
352
|
-
y(Icon, __assign({}, icon, { shape: "square" }))),
|
|
353
|
-
y("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
|
|
354
|
-
y(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
|
|
350
|
+
y$1(g, null,
|
|
351
|
+
y$1("g", { transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")scale(1.0002)") },
|
|
352
|
+
y$1(Icon, __assign({}, icon, { shape: "square" }))),
|
|
353
|
+
y$1("g", { transform: "translate(".concat(textboxOffsetX, " ").concat(textboxOffsetY, ")scale(1.0002)") },
|
|
354
|
+
y$1(TextBox, { text: text, height: textHeight, padding: textPadding, stroke: textboxStroke, fill: textboxFill })));
|
|
355
355
|
};
|
|
356
356
|
|
|
357
357
|
var Vertex3 = function (_a) {
|
|
@@ -361,7 +361,7 @@ var Vertex3 = function (_a) {
|
|
|
361
361
|
expansionIcon = expansionIcon ? __assign({ height: 16, shape: "circle", padding: 6, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "black", fill: "whitesmoke", stroke: "whitesmoke", strokeWidth: 0 }, expansionIcon) : undefined;
|
|
362
362
|
var fullAnnotationWidth = 0;
|
|
363
363
|
var annoOffsetY = 0;
|
|
364
|
-
var labelWidth =
|
|
364
|
+
var labelWidth = q(function () {
|
|
365
365
|
return Utility.textSize(text, textFontFamily, textHeight, false).width;
|
|
366
366
|
}, [text, textFontFamily, textHeight]);
|
|
367
367
|
var labelShapeWidth = 0;
|
|
@@ -377,13 +377,13 @@ var Vertex3 = function (_a) {
|
|
|
377
377
|
var annoShapeWidth = textShapeHeight;
|
|
378
378
|
fullAnnotationWidth += annoShapeWidth + annotationGutter;
|
|
379
379
|
var annoOffsetX = fullAnnotationWidth - (annoShapeWidth / 2);
|
|
380
|
-
annotationArr.push(y("g", { key: idx, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
381
|
-
y(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
380
|
+
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, ")") },
|
|
381
|
+
y$1(Icon, __assign({}, anno, { shape: "square", height: textShapeHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
382
382
|
});
|
|
383
383
|
if (annotations.length > 0) {
|
|
384
384
|
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
|
|
385
385
|
}
|
|
386
|
-
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 }));
|
|
386
|
+
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 }));
|
|
387
387
|
var iconHeight = icon.height || 20;
|
|
388
388
|
var iconStrokeWidth = icon.strokeWidth || 0;
|
|
389
389
|
var iconOffsetX = 0;
|
|
@@ -396,15 +396,15 @@ var Vertex3 = function (_a) {
|
|
|
396
396
|
else if (subText.text !== "") {
|
|
397
397
|
subTextOffsetY = (iconHeight / 2) + iconStrokeWidth + (annotationGutter * 2);
|
|
398
398
|
}
|
|
399
|
-
var subtextElement = subText.text === "" ? null : y("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
400
|
-
y(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
401
|
-
return y("g", { transform: "scale(".concat(scale, ")") },
|
|
402
|
-
y("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
403
|
-
y(Icon, __assign({}, icon)),
|
|
399
|
+
var subtextElement = subText.text === "" ? null : y$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
400
|
+
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 })));
|
|
401
|
+
return y$1("g", { transform: "scale(".concat(scale, ")") },
|
|
402
|
+
y$1("g", { "data-click": "icon", transform: "translate(".concat(iconOffsetX, " ").concat(iconOffsetY, ")") },
|
|
403
|
+
y$1(Icon, __assign({}, icon)),
|
|
404
404
|
expansionIcon &&
|
|
405
|
-
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, ")") },
|
|
406
|
-
y(Icon, __assign({}, expansionIcon)))),
|
|
407
|
-
y("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
405
|
+
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, ")") },
|
|
406
|
+
y$1(Icon, __assign({}, expansionIcon)))),
|
|
407
|
+
y$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
408
408
|
textElement,
|
|
409
409
|
annotationArr),
|
|
410
410
|
subtextElement);
|
|
@@ -432,7 +432,7 @@ var CentroidVertex3 = function (_a) {
|
|
|
432
432
|
expansionIcon: expansionIcon,
|
|
433
433
|
scale: scale
|
|
434
434
|
};
|
|
435
|
-
return y(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
|
|
435
|
+
return y$1(Vertex3, __assign({}, props, { icon: icon, subText: subText }));
|
|
436
436
|
};
|
|
437
437
|
|
|
438
438
|
var Vertex4 = function (_a) {
|
|
@@ -440,7 +440,7 @@ var Vertex4 = function (_a) {
|
|
|
440
440
|
icon = __assign({ height: 50, imageChar: "?", imageFontFamily: "FontAwesome", imageCharFill: "#555555", fill: "transparent", strokeWidth: 0 }, icon);
|
|
441
441
|
subText = __assign({ text: "", fill: "white", textFill: "#555555" }, subText);
|
|
442
442
|
var annoOffsetY = 0;
|
|
443
|
-
var labelWidth =
|
|
443
|
+
var labelWidth = q(function () {
|
|
444
444
|
return Utility.textSize(text, textFontFamily, textHeight, false).width;
|
|
445
445
|
}, [text, textFontFamily, textHeight]);
|
|
446
446
|
var labelShapeWidth = 0;
|
|
@@ -461,8 +461,8 @@ var Vertex4 = function (_a) {
|
|
|
461
461
|
var annoTextHeight = (_a = anno.height) !== null && _a !== void 0 ? _a : textShapeHeight;
|
|
462
462
|
_labelAnnoOffsetX += annoWidthArr[i] + annotationGutter;
|
|
463
463
|
var annoOffsetX = _labelAnnoOffsetX - (annoWidthArr[i] / 2);
|
|
464
|
-
annotationArr.push(y("g", { key: i, class: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: "translate(".concat(annoOffsetX, " ").concat(annoOffsetY, ")") },
|
|
465
|
-
y(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
464
|
+
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, ")") },
|
|
465
|
+
y$1(Icon, __assign({}, anno, { shape: "rectangle", width: annoWidthArr[i], height: annoTextHeight, imageChar: annoText, imageFontFamily: anno.imageFontFamily, cornerRadius: cornerRadius, strokeWidth: 0 }))));
|
|
466
466
|
});
|
|
467
467
|
if (annotations.length > 0) {
|
|
468
468
|
fullAnnotationWidth += annotationGutter * (annotations.length - 1);
|
|
@@ -471,20 +471,20 @@ var Vertex4 = function (_a) {
|
|
|
471
471
|
iconAnnotations.forEach(function (anno, i) {
|
|
472
472
|
var _a;
|
|
473
473
|
var x = anno.shapeOffsetX;
|
|
474
|
-
var y
|
|
475
|
-
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
|
|
476
|
-
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 }))));
|
|
474
|
+
var y = anno.shapeOffsetY;
|
|
475
|
+
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, ")") },
|
|
476
|
+
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 }))));
|
|
477
477
|
});
|
|
478
|
-
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 }));
|
|
478
|
+
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 }));
|
|
479
479
|
var subTextOffsetX = 0;
|
|
480
480
|
var subTextOffsetY = textShapeHeight + (annotationGutter * 2);
|
|
481
|
-
var subtextElement = subText.text === "" ? null : y("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
482
|
-
y(TextBox, __assign({ fill: subText.fill || "#FFFFFF", textFill: subText.textFill || textFill }, subText, { height: textHeight, padding: textPadding, strokeWidth: 0, stroke: textboxStroke, fontFamily: textFontFamily, cornerRadius: cornerRadius })));
|
|
483
|
-
return y("g", null,
|
|
484
|
-
y("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
|
|
485
|
-
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 })),
|
|
481
|
+
var subtextElement = subText.text === "" ? null : y$1("g", { "data-click": "subtext", transform: "translate(".concat(subTextOffsetX, " ").concat(subTextOffsetY, ")") },
|
|
482
|
+
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 })));
|
|
483
|
+
return y$1("g", null,
|
|
484
|
+
y$1("g", { "data-click": "icon", transform: "translate(".concat(shapeOffsetX, " ").concat(shapeOffsetY, ")") },
|
|
485
|
+
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 })),
|
|
486
486
|
iconAnnotationArr),
|
|
487
|
-
y("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
487
|
+
y$1("g", { transform: "translate(".concat(-fullAnnotationWidth / 2, " ").concat(annoOffsetY, ")") },
|
|
488
488
|
textElement,
|
|
489
489
|
annotationArr),
|
|
490
490
|
subtextElement);
|
|
@@ -526,16 +526,16 @@ var CentroidVertex4 = function (_a) {
|
|
|
526
526
|
iconText: iconText,
|
|
527
527
|
shapeRendering: shapeRendering
|
|
528
528
|
};
|
|
529
|
-
return y(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
|
|
529
|
+
return y$1(Vertex4, __assign({}, props, { icon: icon, subText: subText }));
|
|
530
530
|
};
|
|
531
531
|
|
|
532
532
|
var Subgraph = function (_a) {
|
|
533
533
|
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;
|
|
534
534
|
var tSize = Utility.textSize(text, fontFamily, fontHeight, false);
|
|
535
|
-
return y(g
|
|
536
|
-
y(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
|
|
537
|
-
y("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
|
|
538
|
-
y(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
|
|
535
|
+
return y$1(g, null,
|
|
536
|
+
y$1(Rectangle, { width: width, height: height, fill: fill, stroke: stroke }),
|
|
537
|
+
y$1("g", { transform: "translate(".concat((-width + tSize.width) / 2 + 4, " ").concat((-height + tSize.height) / 2 + 4, ")") },
|
|
538
|
+
y$1(Text, { height: fontHeight, text: text, fontFamily: fontFamily })));
|
|
539
539
|
};
|
|
540
540
|
|
|
541
541
|
export { Annotations, BUILD_VERSION$1 as BUILD_VERSION, CentroidVertex3, CentroidVertex4, Circle, Edge, HTMLAdapter, Icon, IconLabelledRect, Icons, ImageChar, LabelledRect, PKG_NAME$1 as PKG_NAME, PKG_VERSION$1 as PKG_VERSION, index_es6 as React, Rectangle, SVGAdapter, Shape, Square, Subgraph, Text, TextBox, TextLine, Vertex, Vertex2, Vertex3, Vertex4, render, svgRender };
|