react-svg
Advanced tools
Comparing version 15.1.3 to 15.1.4
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactSVG={},e.React)}(this,(function(e,t){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(t);function i(){return(i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var s=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,l=/\\([\u000b\u0020-\u00ff])/g,u=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,c=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!u.test(n))throw new TypeError("invalid media type");var i=new f(n.toLowerCase());if(-1!==r){var o,a,c;for(s.lastIndex=r;a=s.exec(t);){if(a.index!==r)throw new TypeError("invalid parameter format");r+=a[0].length,o=a[1].toLowerCase(),'"'===(c=a[2])[0]&&(c=c.substr(1,c.length-2).replace(l,"$1")),i.parameters[o]=c}if(r!==t.length)throw new TypeError("invalid parameter format")}return i};function f(e){this.parameters=Object.create(null),this.type=e}var p=new Map,d=function(e){return e.cloneNode(!0)},h=function(){return"file:"===window.location.protocol},v=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===n.readyState){var t=n.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var i=c(t).type;if("image/svg+xml"!==i&&"text/plain"!==i)throw new Error("Invalid content type: ".concat(i))}if(4===n.readyState){if(404===n.status||null===n.responseXML)throw new Error(h()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===n.status||h()&&0===n.status))throw new Error("There was a problem injecting the SVG: "+n.status+" "+n.statusText);r(null,n)}}catch(e){if(n.abort(),!(e instanceof Error))throw e;r(e,n)}},n.open("GET",e),n.withCredentials=t,n.overrideMimeType&&n.overrideMimeType("text/xml"),n.send()},m={},g=function(e,t){m[e]=m[e]||[],m[e].push(t)},b=function(e,t,r){if(p.has(e)){var n=p.get(e);if(void 0===n)return void g(e,r);if(n instanceof SVGSVGElement)return void r(null,d(n))}p.set(e,void 0),g(e,r),v(e,t,(function(t,r){t?p.set(e,t):r.responseXML instanceof Document&&r.responseXML.documentElement&&r.responseXML.documentElement instanceof SVGSVGElement&&p.set(e,r.responseXML.documentElement),function(e){for(var t=function(t,r){setTimeout((function(){if(Array.isArray(m[e])){var r=p.get(e),n=m[e][t];r instanceof SVGSVGElement&&n(null,d(r)),r instanceof Error&&n(r),t===m[e].length-1&&delete m[e]}}),0)},r=0,n=m[e].length;r<n;r++)t(r)}(e)}))},y=function(e,t,r){v(e,t,(function(e,t){e?r(e):t.responseXML instanceof Document&&t.responseXML.documentElement&&t.responseXML.documentElement instanceof SVGSVGElement&&r(null,t.responseXML.documentElement)}))},w=0,E=[],A={},S="http://www.w3.org/1999/xlink",x=function(e,t,r,n,i,o,s){var l=e.getAttribute("data-src")||e.getAttribute("src");if(l){if(-1!==E.indexOf(e))return E.splice(E.indexOf(e),1),void(e=null);E.push(e),e.setAttribute("src",""),(n?b:y)(l,i,(function(n,i){if(!i)return E.splice(E.indexOf(e),1),e=null,void s(n);var u=e.getAttribute("id");u&&i.setAttribute("id",u);var c=e.getAttribute("title");c&&i.setAttribute("title",c);var f=e.getAttribute("width");f&&i.setAttribute("width",f);var p=e.getAttribute("height");p&&i.setAttribute("height",p);var d=Array.from(new Set(a(a(a([],(i.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();i.setAttribute("class",d);var h=e.getAttribute("style");h&&i.setAttribute("style",h),i.setAttribute("data-src",l);var v=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(v,(function(e){e.name&&e.value&&i.setAttribute(e.name,e.value)})),r){var m,g,b,y,x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(x).forEach((function(e){g=x[e];for(var t=function(e,t){var r;y=(b=m[e].id)+"-"+ ++w,Array.prototype.forEach.call(g,(function(e){for(var t=0,n=(r=i.querySelectorAll("["+e+'*="'+b+'"]')).length;t<n;t++){var o=r[t].getAttribute(e);o&&!o.match(new RegExp('url\\("?#'+b+'"?\\)'))||r[t].setAttribute(e,"url(#"+y+")")}}));for(var n=i.querySelectorAll("[*|href]"),o=[],a=0,s=n.length;a<s;a++){var l=n[a].getAttributeNS(S,"href");l&&l.toString()==="#"+m[e].id&&o.push(n[a])}for(var u=0,c=o.length;u<c;u++)o[u].setAttributeNS(S,"href","#"+y);m[e].id=y},r=0,n=(m=i.querySelectorAll(e+"[id]")).length;r<n;r++)t(r)}))}i.removeAttribute("xmlns:a");for(var j,O,R=i.querySelectorAll("script"),k=[],C=0,G=R.length;C<G;C++)(O=R[C].getAttribute("type"))&&"application/ecmascript"!==O&&"application/javascript"!==O&&"text/javascript"!==O||((j=R[C].innerText||R[C].textContent)&&k.push(j),i.removeChild(R[C]));if(k.length>0&&("always"===t||"once"===t&&!A[l])){for(var M=0,V=k.length;M<V;M++)new Function(k[M])(window);A[l]=!0}var q=i.querySelectorAll("style");if(Array.prototype.forEach.call(q,(function(e){e.textContent+=""})),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink",S),o(i),!e.parentNode)return E.splice(E.indexOf(e),1),e=null,void s(new Error("Parent node is null"));e.parentNode.replaceChild(i,e),E.splice(E.indexOf(e),1),e=null,s(null,i)}))}else s(new Error("Invalid data-src or src attribute"))},j=["afterInjection","beforeInjection","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","useRequestCache","wrapper"],O="http://www.w3.org/2000/svg",R="http://www.w3.org/1999/xlink",k=function(e){var t,r;function a(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r);var s=a.prototype;return s.renderSVG=function(){var e=this;if(this.reactWrapper instanceof Node){var t,r,n=this.props,i=n.beforeInjection,o=n.evalScripts,a=n.httpRequestWithCredentials,s=n.renumerateIRIElements,l=n.src,u=n.useRequestCache,c=this.props.afterInjection,f=this.props.wrapper;"svg"===f?((t=document.createElementNS(O,f)).setAttribute("xmlns",O),t.setAttribute("xmlns:xlink",R),r=document.createElementNS(O,f)):(t=document.createElement(f),r=document.createElement(f)),t.appendChild(r),r.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);!function(e,t){var r=void 0===t?{}:t,n=r.afterAll,i=void 0===n?function(){}:n,o=r.afterEach,a=void 0===o?function(){}:o,s=r.beforeEach,l=void 0===s?function(){}:s,u=r.cacheRequests,c=void 0===u||u,f=r.evalScripts,p=void 0===f?"never":f,d=r.httpRequestWithCredentials,h=void 0!==d&&d,v=r.renumerateIRIElements,m=void 0===v||v;if(e&&"length"in e)for(var g=0,b=0,y=e.length;b<y;b++)x(e[b],p,m,c,h,l,(function(t,r){a(t,r),e&&"length"in e&&e.length===++g&&i(g)}));else e?x(e,p,m,c,h,l,(function(t,r){a(t,r),i(1),e=null})):i(0)}(r,{afterEach:function(t,r){!t||(e.removeSVG(),e._isMounted)?e._isMounted&&e.setState((function(){return{hasError:!!t,isLoading:!1}}),(function(){c(t,r)})):c(t)},beforeEach:i,cacheRequests:u,evalScripts:o,httpRequestWithCredentials:a,renumerateIRIElements:s})}},s.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},s.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},s.componentDidUpdate=function(e){var t=this;(function(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1})(e,this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},s.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},s.render=function(){var e=this.props,t=e.fallback,r=e.loading,o=e.wrapper,a=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,j);return n.createElement(o,i({},a,{ref:this.refCallback},"svg"===o?{xmlns:O,xmlnsXlink:R}:{}),this.state.isLoading&&r&&n.createElement(r,null),this.state.hasError&&t&&n.createElement(t,null))},a}(n.Component);k.defaultProps={afterInjection:function(){},beforeInjection:function(){},evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,renumerateIRIElements:!0,useRequestCache:!0,wrapper:"div"},e.ReactSVG=k,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactSVG={},e.React)}(this,(function(e,t){"use strict";function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var n=r(t);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},i.apply(this,arguments)}function o(e,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},o(e,t)}function a(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}var s=/; *([!#$%&'*+.^_`|~0-9A-Za-z-]+) *= *("(?:[\u000b\u0020\u0021\u0023-\u005b\u005d-\u007e\u0080-\u00ff]|\\[\u000b\u0020-\u00ff])*"|[!#$%&'*+.^_`|~0-9A-Za-z-]+) */g,l=/\\([\u000b\u0020-\u00ff])/g,u=/^[!#$%&'*+.^_`|~0-9A-Za-z-]+\/[!#$%&'*+.^_`|~0-9A-Za-z-]+$/,c=function(e){if(!e)throw new TypeError("argument string is required");var t="object"==typeof e?function(e){var t;"function"==typeof e.getHeader?t=e.getHeader("content-type"):"object"==typeof e.headers&&(t=e.headers&&e.headers["content-type"]);if("string"!=typeof t)throw new TypeError("content-type header is missing from object");return t}(e):e;if("string"!=typeof t)throw new TypeError("argument string is required to be a string");var r=t.indexOf(";"),n=-1!==r?t.substr(0,r).trim():t.trim();if(!u.test(n))throw new TypeError("invalid media type");var i=new f(n.toLowerCase());if(-1!==r){var o,a,c;for(s.lastIndex=r;a=s.exec(t);){if(a.index!==r)throw new TypeError("invalid parameter format");r+=a[0].length,o=a[1].toLowerCase(),'"'===(c=a[2])[0]&&(c=c.substr(1,c.length-2).replace(l,"$1")),i.parameters[o]=c}if(r!==t.length)throw new TypeError("invalid parameter format")}return i};function f(e){this.parameters=Object.create(null),this.type=e}var p=new Map,d=function(e){return e.cloneNode(!0)},h=function(){return"file:"===window.location.protocol},v=function(e,t,r){var n=new XMLHttpRequest;n.onreadystatechange=function(){try{if(!/\.svg/i.test(e)&&2===n.readyState){var t=n.getResponseHeader("Content-Type");if(!t)throw new Error("Content type not found");var i=c(t).type;if("image/svg+xml"!==i&&"text/plain"!==i)throw new Error("Invalid content type: ".concat(i))}if(4===n.readyState){if(404===n.status||null===n.responseXML)throw new Error(h()?"Note: SVG injection ajax calls do not work locally without adjusting security settings in your browser. Or consider using a local webserver.":"Unable to load SVG file: "+e);if(!(200===n.status||h()&&0===n.status))throw new Error("There was a problem injecting the SVG: "+n.status+" "+n.statusText);r(null,n)}}catch(e){if(n.abort(),!(e instanceof Error))throw e;r(e,n)}},n.open("GET",e),n.withCredentials=t,n.overrideMimeType&&n.overrideMimeType("text/xml"),n.send()},m={},g=function(e,t){m[e]=m[e]||[],m[e].push(t)},b=function(e,t,r){if(p.has(e)){var n=p.get(e);if(void 0===n)return void g(e,r);if(n instanceof SVGSVGElement)return void r(null,d(n))}p.set(e,void 0),g(e,r),v(e,t,(function(t,r){t?p.set(e,t):r.responseXML instanceof Document&&r.responseXML.documentElement&&r.responseXML.documentElement instanceof SVGSVGElement&&p.set(e,r.responseXML.documentElement),function(e){for(var t=function(t,r){setTimeout((function(){if(Array.isArray(m[e])){var r=p.get(e),n=m[e][t];r instanceof SVGSVGElement&&n(null,d(r)),r instanceof Error&&n(r),t===m[e].length-1&&delete m[e]}}),0)},r=0,n=m[e].length;r<n;r++)t(r)}(e)}))},y=function(e,t,r){v(e,t,(function(e,t){e?r(e):t.responseXML instanceof Document&&t.responseXML.documentElement&&t.responseXML.documentElement instanceof SVGSVGElement&&r(null,t.responseXML.documentElement)}))},w=0,E=[],A={},S="http://www.w3.org/1999/xlink",x=function(e,t,r,n,i,o,s){var l=e.getAttribute("data-src")||e.getAttribute("src");if(l){if(-1!==E.indexOf(e))return E.splice(E.indexOf(e),1),void(e=null);E.push(e),e.setAttribute("src",""),(n?b:y)(l,i,(function(n,i){if(!i)return E.splice(E.indexOf(e),1),e=null,void s(n);var u=e.getAttribute("id");u&&i.setAttribute("id",u);var c=e.getAttribute("title");c&&i.setAttribute("title",c);var f=e.getAttribute("width");f&&i.setAttribute("width",f);var p=e.getAttribute("height");p&&i.setAttribute("height",p);var d=Array.from(new Set(a(a(a([],(i.getAttribute("class")||"").split(" "),!0),["injected-svg"],!1),(e.getAttribute("class")||"").split(" "),!0))).join(" ").trim();i.setAttribute("class",d);var h=e.getAttribute("style");h&&i.setAttribute("style",h),i.setAttribute("data-src",l);var v=[].filter.call(e.attributes,(function(e){return/^data-\w[\w-]*$/.test(e.name)}));if(Array.prototype.forEach.call(v,(function(e){e.name&&e.value&&i.setAttribute(e.name,e.value)})),r){var m,g,b,y,x={clipPath:["clip-path"],"color-profile":["color-profile"],cursor:["cursor"],filter:["filter"],linearGradient:["fill","stroke"],marker:["marker","marker-start","marker-mid","marker-end"],mask:["mask"],path:[],pattern:["fill","stroke"],radialGradient:["fill","stroke"]};Object.keys(x).forEach((function(e){g=x[e];for(var t=function(e,t){var r;y=(b=m[e].id)+"-"+ ++w,Array.prototype.forEach.call(g,(function(e){for(var t=0,n=(r=i.querySelectorAll("["+e+'*="'+b+'"]')).length;t<n;t++){var o=r[t].getAttribute(e);o&&!o.match(new RegExp('url\\("?#'+b+'"?\\)'))||r[t].setAttribute(e,"url(#"+y+")")}}));for(var n=i.querySelectorAll("[*|href]"),o=[],a=0,s=n.length;a<s;a++){var l=n[a].getAttributeNS(S,"href");l&&l.toString()==="#"+m[e].id&&o.push(n[a])}for(var u=0,c=o.length;u<c;u++)o[u].setAttributeNS(S,"href","#"+y);m[e].id=y},r=0,n=(m=i.querySelectorAll(e+"[id]")).length;r<n;r++)t(r)}))}i.removeAttribute("xmlns:a");for(var j,O,R=i.querySelectorAll("script"),k=[],C=0,G=R.length;C<G;C++)(O=R[C].getAttribute("type"))&&"application/ecmascript"!==O&&"application/javascript"!==O&&"text/javascript"!==O||((j=R[C].innerText||R[C].textContent)&&k.push(j),i.removeChild(R[C]));if(k.length>0&&("always"===t||"once"===t&&!A[l])){for(var M=0,V=k.length;M<V;M++)new Function(k[M])(window);A[l]=!0}var q=i.querySelectorAll("style");if(Array.prototype.forEach.call(q,(function(e){e.textContent+=""})),i.setAttribute("xmlns","http://www.w3.org/2000/svg"),i.setAttribute("xmlns:xlink",S),o(i),!e.parentNode)return E.splice(E.indexOf(e),1),e=null,void s(new Error("Parent node is null"));e.parentNode.replaceChild(i,e),E.splice(E.indexOf(e),1),e=null,s(null,i)}))}else s(new Error("Invalid data-src or src attribute"))},j=["afterInjection","beforeInjection","evalScripts","fallback","httpRequestWithCredentials","loading","renumerateIRIElements","src","useRequestCache","wrapper"],O="http://www.w3.org/2000/svg",R="http://www.w3.org/1999/xlink",k=function(e){var t,r;function a(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).initialState={hasError:!1,isLoading:!0},t.state=t.initialState,t._isMounted=!1,t.reactWrapper=void 0,t.nonReactWrapper=void 0,t.refCallback=function(e){t.reactWrapper=e},t}r=e,(t=a).prototype=Object.create(r.prototype),t.prototype.constructor=t,o(t,r);var s=a.prototype;return s.renderSVG=function(){var e=this;if(this.reactWrapper instanceof Node){var t,r,n=this.props,i=n.beforeInjection,o=n.evalScripts,a=n.httpRequestWithCredentials,s=n.renumerateIRIElements,l=n.src,u=n.useRequestCache,c=this.props.afterInjection,f=this.props.wrapper;"svg"===f?((t=document.createElementNS(O,f)).setAttribute("xmlns",O),t.setAttribute("xmlns:xlink",R),r=document.createElementNS(O,f)):(t=document.createElement(f),r=document.createElement(f)),t.appendChild(r),r.dataset.src=l,this.nonReactWrapper=this.reactWrapper.appendChild(t);!function(e,t){var r=void 0===t?{}:t,n=r.afterAll,i=void 0===n?function(){}:n,o=r.afterEach,a=void 0===o?function(){}:o,s=r.beforeEach,l=void 0===s?function(){}:s,u=r.cacheRequests,c=void 0===u||u,f=r.evalScripts,p=void 0===f?"never":f,d=r.httpRequestWithCredentials,h=void 0!==d&&d,v=r.renumerateIRIElements,m=void 0===v||v;if(e&&"length"in e)for(var g=0,b=0,y=e.length;b<y;b++)x(e[b],p,m,c,h,l,(function(t,r){a(t,r),e&&"length"in e&&e.length===++g&&i(g)}));else e?x(e,p,m,c,h,l,(function(t,r){a(t,r),i(1),e=null})):i(0)}(r,{afterEach:function(t,r){!t||(e.removeSVG(),e._isMounted)?e._isMounted&&e.setState((function(){return{hasError:!!t,isLoading:!1}}),(function(){c(t,r)})):c(t)},beforeEach:i,cacheRequests:u,evalScripts:o,httpRequestWithCredentials:a,renumerateIRIElements:s})}},s.removeSVG=function(){var e;null!=(e=this.nonReactWrapper)&&e.parentNode&&(this.nonReactWrapper.parentNode.removeChild(this.nonReactWrapper),this.nonReactWrapper=null)},s.componentDidMount=function(){this._isMounted=!0,this.renderSVG()},s.componentDidUpdate=function(e){var t=this;(function(e,t){for(var r in e)if(!(r in t))return!0;for(var n in t)if(e[n]!==t[n])return!0;return!1})(e,this.props)&&this.setState((function(){return t.initialState}),(function(){t.removeSVG(),t.renderSVG()}))},s.componentWillUnmount=function(){this._isMounted=!1,this.removeSVG()},s.render=function(){var e=this.props,t=e.fallback,r=e.loading,o=e.wrapper,a=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n<o.length;n++)t.indexOf(r=o[n])>=0||(i[r]=e[r]);return i}(e,j);return n.createElement(o,i({},a,{ref:this.refCallback},"svg"===o?{xmlns:O,xmlnsXlink:R}:{}),this.state.isLoading&&r&&n.createElement(r,null),this.state.hasError&&t&&n.createElement(t,null))},a}(n.Component);k.defaultProps={afterInjection:function(){},beforeInjection:function(){},evalScripts:"never",fallback:null,httpRequestWithCredentials:!1,loading:null,renumerateIRIElements:!0,useRequestCache:!0,wrapper:"div"},e.ReactSVG=k,Object.defineProperty(e,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=react-svg.umd.production.js.map |
{ | ||
"name": "react-svg", | ||
"version": "15.1.3", | ||
"version": "15.1.4", | ||
"description": "A React component that injects SVG into the DOM.", | ||
@@ -58,4 +58,4 @@ "main": "dist/index.js", | ||
"dependencies": { | ||
"@babel/runtime": "^7.18.6", | ||
"@tanem/svg-injector": "^10.1.27", | ||
"@babel/runtime": "^7.18.9", | ||
"@tanem/svg-injector": "^10.1.28", | ||
"@types/prop-types": "^15.7.5", | ||
@@ -65,5 +65,5 @@ "prop-types": "^15.8.1" | ||
"devDependencies": { | ||
"@babel/core": "7.18.6", | ||
"@babel/plugin-transform-runtime": "7.18.6", | ||
"@babel/preset-env": "7.18.6", | ||
"@babel/core": "7.18.9", | ||
"@babel/plugin-transform-runtime": "7.18.9", | ||
"@babel/preset-env": "7.18.9", | ||
"@babel/preset-react": "7.18.6", | ||
@@ -76,12 +76,12 @@ "@rollup/plugin-babel": "5.3.1", | ||
"@types/faker": "5.5.9", | ||
"@types/jest": "28.1.4", | ||
"@types/jsdom": "16.2.14", | ||
"@types/jest": "28.1.6", | ||
"@types/jsdom": "20.0.0", | ||
"@types/react": "18.0.15", | ||
"@types/react-dom": "18.0.6", | ||
"@types/shelljs": "0.8.11", | ||
"@typescript-eslint/eslint-plugin": "5.30.6", | ||
"@typescript-eslint/parser": "5.30.6", | ||
"@typescript-eslint/eslint-plugin": "5.31.0", | ||
"@typescript-eslint/parser": "5.31.0", | ||
"babel-core": "6.26.3", | ||
"babel-plugin-transform-react-remove-prop-types": "0.4.24", | ||
"eslint": "8.19.0", | ||
"eslint": "8.20.0", | ||
"eslint-config-prettier": "8.5.0", | ||
@@ -92,6 +92,6 @@ "eslint-plugin-react": "7.30.1", | ||
"faker": "5.5.3", | ||
"jest": "28.1.2", | ||
"jest-environment-jsdom": "28.1.2", | ||
"jest-prettyhtml-matchers": "1.11.6", | ||
"nock": "13.2.8", | ||
"jest": "28.1.3", | ||
"jest-environment-jsdom": "28.1.3", | ||
"jest-prettyhtml-matchers": "1.11.7", | ||
"nock": "13.2.9", | ||
"npm-run-all": "4.1.5", | ||
@@ -101,3 +101,3 @@ "prettier": "2.7.1", | ||
"react-dom": "18.2.0", | ||
"rollup": "2.76.0", | ||
"rollup": "2.77.0", | ||
"rollup-plugin-sourcemaps": "0.6.3", | ||
@@ -107,7 +107,7 @@ "rollup-plugin-terser": "7.0.2", | ||
"shx": "0.3.4", | ||
"tanem-scripts": "6.0.53", | ||
"ts-jest": "28.0.5", | ||
"ts-node": "10.8.2", | ||
"tanem-scripts": "6.0.54", | ||
"ts-jest": "28.0.7", | ||
"ts-node": "10.9.1", | ||
"typescript": "4.7.4" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
230785
111933
Updated@babel/runtime@^7.18.9
Updated@tanem/svg-injector@^10.1.28