New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

intact-react

Package Overview
Dependencies
Maintainers
4
Versions
93
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

intact-react - npm Package Compare versions

Comparing version 1.1.11 to 1.1.12

3

dist/index.js

@@ -851,3 +851,4 @@ 'use strict';

__parent: noop,
__promises: noop
__promises: noop,
router: noop
};

@@ -854,0 +855,0 @@ IntactReact.childContextTypes = {

@@ -853,3 +853,4 @@ (function (global, factory) {

__parent: noop,
__promises: noop
__promises: noop,
router: noop
};

@@ -856,0 +857,0 @@ IntactReact.childContextTypes = {

@@ -1,1 +0,1 @@

(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?module.exports=e(require("react"),require("intact/dist"),require("react-dom")):typeof define==="function"&&define.amd?define(["react","intact/dist","react-dom"],e):t.Intact=e(t.React,t.Intact,t.ReactDOM)})(this,function(t,e,r){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;e=e&&e.hasOwnProperty("default")?e["default"]:e;r=r&&r.hasOwnProperty("default")?r["default"]:r;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var i=function(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}};var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(t,n.key,n)}}return function(e,r,n){if(r)t(e.prototype,r);if(n)t(e,n);return e}}();var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){t[n]=r[n]}}}return t};var s=function(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e};var u=function(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t};var p=function(){function t(e){var r=this;i(this,t);this.resolved=false;this.callbacks=[];e.call(this,function(){return r.resolve()})}t.prototype.resolve=function t(){this.resolved=true;var e=void 0;while(e=this.callbacks.shift()){e()}};t.prototype.then=function t(e){this.callbacks.push(e);if(this.resolved){this.resolve()}};return t}();p.all=function(t){var e=0;var r=void 0;var n=false;var i=false;t.forEach(function(t){return t.then(s)});if(t._hasRewrite){console.error("last promises has not been done")}var o=t.push;t.push=function(e){e.then(s);o.call(t,e)};t._hasRewrite=true;function a(){t.length=0;t.push=o;t._hasRewrite=false;r()}function s(){e++;if(t.length===e){n=true;if(i){return console.error("promise has done")}if(r){i=true;a()}}}return{then:function e(i){r=i;if(!t.length||n){a()}}}};var c=t.createElement;function l(t,e,r){var n=t.$$cid==="IntactReact";var i=t.propTypes;if(n&&i){t.propTypes=undefined}var o=c.apply(this,arguments);if(n&&i){t.propTypes=i}return o}t.createElement=l;var f=r.findDOMNode;r.findDOMNode=function(t){if(t instanceof B){return t.element}return f.call(r,t)};var h=e.Vdt.miss;var d=h.h;h.h=function t(e){if(e&&e.$$cid==="IntactFunction"){e=e.$$type}for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return d.call.apply(d,[this,e].concat(n))};var v=e.utils;var _=v.isStringOrNumber;var y=v.isArray;var m=v.noop;function g(e){function r(t,r){if(r){var n=e(S(t,r,{instance:r.__parent}),true);if(y(n)){return n.map(function(t){return b(t)})}return b(n)}else{return e(t)}}r.contextTypes={_context:m,__parent:m};var n=t.forwardRef(function(t,e){if(e)t=a({},t,{forwardRef:e});return l(r,t)});n.$$cid="IntactFunction";n.$$type=r;return n}function b(t){if(_(t)){return t}else if(t){return l(t.tag,t.props,t.props.children||t.children)}}var C=/_ev[A-Z]/;var N=" react-mount-point-unstable ";var x=function(){function t(){i(this,t)}t.prototype.init=function t(e,r){this.destroyed=true;var n=this.placeholder=document.createComment(N);var i=this.parentDom||this.parentVNode&&this.parentVNode.dom;if(i){i.appendChild(n)}this._render(r);return n};t.prototype.update=function t(e,r){this._render(r);return this.placeholder};t.prototype.destroy=function t(e,n,i){var o=this.placeholder;r.render(null,o,function(){var t=o.parentNode;Object.defineProperty(o,"parentNode",{value:t});t.removeChild(o)});o._unmount=m;if(o._realElement){o._realElement._unmount=m}};t.prototype._render=function t(e){var n=this._addProps(e);var i=this.placeholder;var o=e.props._parentRef.instance;if(o){if(!o._reactInternalFiber){o=o.get("_parentRef").instance}}else{var a=e.parentVNode;while(a){var s=a.children;if(s&&s._reactInternalFiber!==undefined){o=s;break}a=a.parentVNode}}var u=new p(function(t){r.unstable_renderSubtreeIntoContainer(o,n,i,function(){var e=this&&this.nodeType===3?this:r.findDOMNode(this);i._realElement=e;t()})});o.__promises.push(u)};t.prototype._addProps=function t(e){this.vdt={vNode:e};var r=e.props;var n=void 0;var i=void 0;for(var o in r){if(o==="reactVNode"||o==="_parentRef")continue;if(C.test(o))continue;if(!n){n=a({},r.reactVNode);i=n.props=a({},n.props)}var s=r[o];if(o.substr(0,3)==="ev-"){i[w[o]]=s}else{i[o]=s}}return n||r.reactVNode};return t}();var w={"ev-click":"onClick","ev-mouseenter":"onMouseEnter","ev-mouseleave":"onMouseLeave"};var R=e.Vdt.miss;var O=R.h;var T=R.VNode;var M=R.Types;var Q=e.utils;var V=Q.isFunction;var E=Q.isArray;var $=Q.isStringOrNumber;var j=Q.set;var I=Q.get;function k(e,r){if(e==null)return e;if($(e)){return new T(M.Text,null,null,e)}if(e instanceof T){if(V(e.tag)){e.props._parentRef=r}return e}var n=void 0;if((n=e.type)&&(n=n.$$cid)&&(n==="IntactReact"||n==="IntactFunction")){return O(e.type,S(a({},e.props,{_parentRef:r}),{_context:e._owner&&e._owner.stateNode},r,e.key),null,null,e.key,F(e.ref))}if(e.type===t.Fragment){return P(e.props.children,r)}return O(x,{reactVNode:e,_parentRef:r},null,e.props.className)}function P(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(E(t)){var r=[];t.forEach(function(t){if(E(t)){r.push.apply(r,P(t,e))}else{r.push(k(t,e))}});return r}return k(t,e)}function S(t,e,r,n){if(!t)return;var i={};var o=i._blocks={};var a=void 0;for(var s in t){if(s==="children"){i.children=P(t.children,r)}else if(a=G(s)){i[a]=t[s]}else if(s.substring(0,2)==="b-"){o[s.substring(2)]=D(t[s])}else if(s==="forwardRef"){i.ref=t[s]}else{i[s]=t[s]}}i._context=A(e);if(n!=null){i.key=n}return i}function F(t){return(typeof t==="undefined"?"undefined":n(t))==="object"&&t!==null?function(e){t.current=e}:t}function A(t){var e=t._context;return{data:{get:function t(r){if(r!=null){return I(e.state||{},r)}else{return e.state||{}}},set:function t(r,n){var i=a({},e.state);j(i,r,n);e.setState(i)}}}}function D(t){if(V(t)){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return P(t.apply(this,n),{instance:this.data})}}else{return function(){return P(t,{instance:this.data})}}}function G(t){var e=t[0],r=t[1],n=t[2];if(!n)return;var i=void 0;if(e==="o"&&r==="n"){if(n==="$"){return"ev-$"+t.substring(3).replace(/\-/g,":")}else if((i=n.charCodeAt(0))&&i>=65&&i<=90){return"ev-"+t.substring(2).toLowerCase().replace(/\-/g,":")}}}var U=e.utils;var q=U.isObject;var L=U.extend;var W=e.Vdt.miss.h;var z=void 0;var Z=void 0;var B=function(e){s(r,e);function r(t,n){i(this,r);if(n){var o={};var a=S(t,n,o);var s=u(this,e.call(this,a));o.instance=s;s.__promises=n.__promises||[];s.mountedQueue=n.__parent&&n.__parent.mountedQueue;s.vNode=W(s.constructor,a);s.vNode.children=s;s._props=s.props;delete s.props;s._isReact=true}else{var s=u(this,e.call(this,t))}var p=void 0;Object.defineProperty(s,"element",{get:function t(){if(!this.__isUpdating&&p&&p.nodeType===8&&p.nodeValue===N){return p._realElement||p}return p},set:function t(e){p=e},configurable:true,enumerable:true});return u(s)}r.prototype.getChildContext=function t(){return{__parent:this,__promises:this.__promises}};r.prototype.get=function t(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++){n[i]=arguments[i]}if(this._isReact){var o;var a=this.props;this.props=this._props;var s=(o=e.prototype.get).call.apply(o,[this].concat(n));this.props=a;return s}else{var u;return(u=e.prototype.get).call.apply(u,[this].concat(n))}};r.prototype.set=function t(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++){n[i]=arguments[i]}if(this._isReact){var o;var a=this.props;this.props=this._props;var s=(o=e.prototype.set).call.apply(o,[this].concat(n));this.props=a;return s}else{var u;return(u=e.prototype.set).call.apply(u,[this].concat(n))}};r.prototype.init=function t(r,n){this.refs=this.vdt.widgets||{};this.__pushGetChildContext(n);var i=e.prototype.init.call(this,r,n);this.__popGetChildContext();return i};r.prototype.update=function t(r,n,i){var o=this;var t=function t(){var a=o.__isUpdating;o.__isUpdating=true;if(!a){o.__pushGetChildContext(n||o.vNode)}var s=e.prototype.update.call(o,r,n,i);if(!a){o.__popGetChildContext()}o.__isUpdating=a;return s};if(!this._isReact)return t();this.__initMountedQueue();var a=t();this.__triggerMountedQueue();return a};r.prototype.__pushGetChildContext=function t(e){var r=e&&e.props._parentRef;var n=r&&r.instance;if(n){var i=this;this.__getChildContext=n.getChildContext;n.getChildContext=function(){var t=i.__getChildContext.call(this);return a({},t,{__parent:i})}}this.__parentInstance=n};r.prototype.__popGetChildContext=function t(){if(this.__parentInstance){this.__parentInstance.getChildContext=this.__getChildContext}};r.prototype.componentDidMount=function t(){var e=this;this.__initMountedQueue();this.inited=true;this.parentVNode=this.vNode.parentVNode=this.context.__parent&&this.context.__parent.vNode;var r=this.init(null,this.vNode);var n=this._placeholder;var i=n.parentElement;this.parentDom=i;r[z]=n[z];r[Z]=n[Z];Object.defineProperty(n,"parentNode",{value:i});i.replaceChild(r,n);n._realElement=r;if(!i._hasRewrite){var o=i.removeChild;i.removeChild=function(t){o.call(this,t._realElement||t)};i._hasRewrite=true}this.mountedQueue.push(function(){e.mount()});this.__triggerMountedQueue()};r.prototype.componentWillUnmount=function t(){this.destroy()};r.prototype.componentDidUpdate=function t(){this.__initMountedQueue();var e=W(this.constructor,S(this.props,this.context,{instance:this}));var r=this.vNode;e.children=this;this.vNode=e;this.parentVNode=e.parentVNode=this.context.__parent&&this.context.__parent.vNode;this.update(r,e);this.__triggerMountedQueue()};r.prototype.__ref=function t(e){this._placeholder=e;if(!z){var r=Object.keys(e);z=r[0];Z=r[1]}};r.prototype.render=function e(){return t.createElement("i",{ref:this.__ref})};r.prototype.__initMountedQueue=function t(){this.__oldTriggerFlag=this._shouldTrigger;this._shouldTrigger=false;if(!this.mountedQueue||this.mountedQueue.done){var e=void 0;if((e=this.context)&&(e=e.__parent)&&(e=e.mountedQueue)){if(!e.done){this.mountedQueue=e;return}}this._shouldTrigger=true;this._initMountedQueue()}};r.prototype.__triggerMountedQueue=function t(){var e=this;if(this._shouldTrigger){p.all(this.__promises).then(function(){e._triggerMountedQueue()})}this._shouldTrigger=this.__oldTriggerFlag};o(r,[{key:"isMounted",get:function t(){return this.mounted}}]);return r}(e);B.functionalWrapper=g;B.normalize=P;B.$$cid="IntactReact";B.prototype.isReactComponent={};B.contextTypes={_context:m,__parent:m,__promises:m};B.childContextTypes={__parent:m,__promises:m};if(!Object.setPrototypeOf){L(B,e);if(!B.template){B.template=e.template}}return B});
(function(t,e){typeof exports==="object"&&typeof module!=="undefined"?module.exports=e(require("react"),require("intact/dist"),require("react-dom")):typeof define==="function"&&define.amd?define(["react","intact/dist","react-dom"],e):t.Intact=e(t.React,t.Intact,t.ReactDOM)})(this,function(t,e,r){"use strict";t=t&&t.hasOwnProperty("default")?t["default"]:t;e=e&&e.hasOwnProperty("default")?e["default"]:e;r=r&&r.hasOwnProperty("default")?r["default"]:r;var n=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol==="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t};var i=function(t,e){if(!(t instanceof e)){throw new TypeError("Cannot call a class as a function")}};var o=function(){function t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||false;n.configurable=true;if("value"in n)n.writable=true;Object.defineProperty(t,n.key,n)}}return function(e,r,n){if(r)t(e.prototype,r);if(n)t(e,n);return e}}();var a=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var n in r){if(Object.prototype.hasOwnProperty.call(r,n)){t[n]=r[n]}}}return t};var s=function(t,e){if(typeof e!=="function"&&e!==null){throw new TypeError("Super expression must either be null or a function, not "+typeof e)}t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:false,writable:true,configurable:true}});if(e)Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e};var u=function(t,e){if(!t){throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}return e&&(typeof e==="object"||typeof e==="function")?e:t};var p=function(){function t(e){var r=this;i(this,t);this.resolved=false;this.callbacks=[];e.call(this,function(){return r.resolve()})}t.prototype.resolve=function t(){this.resolved=true;var e=void 0;while(e=this.callbacks.shift()){e()}};t.prototype.then=function t(e){this.callbacks.push(e);if(this.resolved){this.resolve()}};return t}();p.all=function(t){var e=0;var r=void 0;var n=false;var i=false;t.forEach(function(t){return t.then(s)});if(t._hasRewrite){console.error("last promises has not been done")}var o=t.push;t.push=function(e){e.then(s);o.call(t,e)};t._hasRewrite=true;function a(){t.length=0;t.push=o;t._hasRewrite=false;r()}function s(){e++;if(t.length===e){n=true;if(i){return console.error("promise has done")}if(r){i=true;a()}}}return{then:function e(i){r=i;if(!t.length||n){a()}}}};var c=t.createElement;function l(t,e,r){var n=t.$$cid==="IntactReact";var i=t.propTypes;if(n&&i){t.propTypes=undefined}var o=c.apply(this,arguments);if(n&&i){t.propTypes=i}return o}t.createElement=l;var f=r.findDOMNode;r.findDOMNode=function(t){if(t instanceof B){return t.element}return f.call(r,t)};var h=e.Vdt.miss;var d=h.h;h.h=function t(e){if(e&&e.$$cid==="IntactFunction"){e=e.$$type}for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return d.call.apply(d,[this,e].concat(n))};var v=e.utils;var _=v.isStringOrNumber;var y=v.isArray;var m=v.noop;function g(e){function r(t,r){if(r){var n=e(S(t,r,{instance:r.__parent}),true);if(y(n)){return n.map(function(t){return b(t)})}return b(n)}else{return e(t)}}r.contextTypes={_context:m,__parent:m};var n=t.forwardRef(function(t,e){if(e)t=a({},t,{forwardRef:e});return l(r,t)});n.$$cid="IntactFunction";n.$$type=r;return n}function b(t){if(_(t)){return t}else if(t){return l(t.tag,t.props,t.props.children||t.children)}}var C=/_ev[A-Z]/;var N=" react-mount-point-unstable ";var x=function(){function t(){i(this,t)}t.prototype.init=function t(e,r){this.destroyed=true;var n=this.placeholder=document.createComment(N);var i=this.parentDom||this.parentVNode&&this.parentVNode.dom;if(i){i.appendChild(n)}this._render(r);return n};t.prototype.update=function t(e,r){this._render(r);return this.placeholder};t.prototype.destroy=function t(e,n,i){var o=this.placeholder;r.render(null,o,function(){var t=o.parentNode;Object.defineProperty(o,"parentNode",{value:t});t.removeChild(o)});o._unmount=m;if(o._realElement){o._realElement._unmount=m}};t.prototype._render=function t(e){var n=this._addProps(e);var i=this.placeholder;var o=e.props._parentRef.instance;if(o){if(!o._reactInternalFiber){o=o.get("_parentRef").instance}}else{var a=e.parentVNode;while(a){var s=a.children;if(s&&s._reactInternalFiber!==undefined){o=s;break}a=a.parentVNode}}var u=new p(function(t){r.unstable_renderSubtreeIntoContainer(o,n,i,function(){var e=this&&this.nodeType===3?this:r.findDOMNode(this);i._realElement=e;t()})});o.__promises.push(u)};t.prototype._addProps=function t(e){this.vdt={vNode:e};var r=e.props;var n=void 0;var i=void 0;for(var o in r){if(o==="reactVNode"||o==="_parentRef")continue;if(C.test(o))continue;if(!n){n=a({},r.reactVNode);i=n.props=a({},n.props)}var s=r[o];if(o.substr(0,3)==="ev-"){i[w[o]]=s}else{i[o]=s}}return n||r.reactVNode};return t}();var w={"ev-click":"onClick","ev-mouseenter":"onMouseEnter","ev-mouseleave":"onMouseLeave"};var R=e.Vdt.miss;var O=R.h;var T=R.VNode;var M=R.Types;var Q=e.utils;var V=Q.isFunction;var E=Q.isArray;var $=Q.isStringOrNumber;var j=Q.set;var I=Q.get;function k(e,r){if(e==null)return e;if($(e)){return new T(M.Text,null,null,e)}if(e instanceof T){if(V(e.tag)){e.props._parentRef=r}return e}var n=void 0;if((n=e.type)&&(n=n.$$cid)&&(n==="IntactReact"||n==="IntactFunction")){return O(e.type,S(a({},e.props,{_parentRef:r}),{_context:e._owner&&e._owner.stateNode},r,e.key),null,null,e.key,F(e.ref))}if(e.type===t.Fragment){return P(e.props.children,r)}return O(x,{reactVNode:e,_parentRef:r},null,e.props.className)}function P(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(E(t)){var r=[];t.forEach(function(t){if(E(t)){r.push.apply(r,P(t,e))}else{r.push(k(t,e))}});return r}return k(t,e)}function S(t,e,r,n){if(!t)return;var i={};var o=i._blocks={};var a=void 0;for(var s in t){if(s==="children"){i.children=P(t.children,r)}else if(a=G(s)){i[a]=t[s]}else if(s.substring(0,2)==="b-"){o[s.substring(2)]=D(t[s])}else if(s==="forwardRef"){i.ref=t[s]}else{i[s]=t[s]}}i._context=A(e);if(n!=null){i.key=n}return i}function F(t){return(typeof t==="undefined"?"undefined":n(t))==="object"&&t!==null?function(e){t.current=e}:t}function A(t){var e=t._context;return{data:{get:function t(r){if(r!=null){return I(e.state||{},r)}else{return e.state||{}}},set:function t(r,n){var i=a({},e.state);j(i,r,n);e.setState(i)}}}}function D(t){if(V(t)){return function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++){n[i-1]=arguments[i]}return P(t.apply(this,n),{instance:this.data})}}else{return function(){return P(t,{instance:this.data})}}}function G(t){var e=t[0],r=t[1],n=t[2];if(!n)return;var i=void 0;if(e==="o"&&r==="n"){if(n==="$"){return"ev-$"+t.substring(3).replace(/\-/g,":")}else if((i=n.charCodeAt(0))&&i>=65&&i<=90){return"ev-"+t.substring(2).toLowerCase().replace(/\-/g,":")}}}var U=e.utils;var q=U.isObject;var L=U.extend;var W=e.Vdt.miss.h;var z=void 0;var Z=void 0;var B=function(e){s(r,e);function r(t,n){i(this,r);if(n){var o={};var a=S(t,n,o);var s=u(this,e.call(this,a));o.instance=s;s.__promises=n.__promises||[];s.mountedQueue=n.__parent&&n.__parent.mountedQueue;s.vNode=W(s.constructor,a);s.vNode.children=s;s._props=s.props;delete s.props;s._isReact=true}else{var s=u(this,e.call(this,t))}var p=void 0;Object.defineProperty(s,"element",{get:function t(){if(!this.__isUpdating&&p&&p.nodeType===8&&p.nodeValue===N){return p._realElement||p}return p},set:function t(e){p=e},configurable:true,enumerable:true});return u(s)}r.prototype.getChildContext=function t(){return{__parent:this,__promises:this.__promises}};r.prototype.get=function t(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++){n[i]=arguments[i]}if(this._isReact){var o;var a=this.props;this.props=this._props;var s=(o=e.prototype.get).call.apply(o,[this].concat(n));this.props=a;return s}else{var u;return(u=e.prototype.get).call.apply(u,[this].concat(n))}};r.prototype.set=function t(){for(var r=arguments.length,n=Array(r),i=0;i<r;i++){n[i]=arguments[i]}if(this._isReact){var o;var a=this.props;this.props=this._props;var s=(o=e.prototype.set).call.apply(o,[this].concat(n));this.props=a;return s}else{var u;return(u=e.prototype.set).call.apply(u,[this].concat(n))}};r.prototype.init=function t(r,n){this.refs=this.vdt.widgets||{};this.__pushGetChildContext(n);var i=e.prototype.init.call(this,r,n);this.__popGetChildContext();return i};r.prototype.update=function t(r,n,i){var o=this;var t=function t(){var a=o.__isUpdating;o.__isUpdating=true;if(!a){o.__pushGetChildContext(n||o.vNode)}var s=e.prototype.update.call(o,r,n,i);if(!a){o.__popGetChildContext()}o.__isUpdating=a;return s};if(!this._isReact)return t();this.__initMountedQueue();var a=t();this.__triggerMountedQueue();return a};r.prototype.__pushGetChildContext=function t(e){var r=e&&e.props._parentRef;var n=r&&r.instance;if(n){var i=this;this.__getChildContext=n.getChildContext;n.getChildContext=function(){var t=i.__getChildContext.call(this);return a({},t,{__parent:i})}}this.__parentInstance=n};r.prototype.__popGetChildContext=function t(){if(this.__parentInstance){this.__parentInstance.getChildContext=this.__getChildContext}};r.prototype.componentDidMount=function t(){var e=this;this.__initMountedQueue();this.inited=true;this.parentVNode=this.vNode.parentVNode=this.context.__parent&&this.context.__parent.vNode;var r=this.init(null,this.vNode);var n=this._placeholder;var i=n.parentElement;this.parentDom=i;r[z]=n[z];r[Z]=n[Z];Object.defineProperty(n,"parentNode",{value:i});i.replaceChild(r,n);n._realElement=r;if(!i._hasRewrite){var o=i.removeChild;i.removeChild=function(t){o.call(this,t._realElement||t)};i._hasRewrite=true}this.mountedQueue.push(function(){e.mount()});this.__triggerMountedQueue()};r.prototype.componentWillUnmount=function t(){this.destroy()};r.prototype.componentDidUpdate=function t(){this.__initMountedQueue();var e=W(this.constructor,S(this.props,this.context,{instance:this}));var r=this.vNode;e.children=this;this.vNode=e;this.parentVNode=e.parentVNode=this.context.__parent&&this.context.__parent.vNode;this.update(r,e);this.__triggerMountedQueue()};r.prototype.__ref=function t(e){this._placeholder=e;if(!z){var r=Object.keys(e);z=r[0];Z=r[1]}};r.prototype.render=function e(){return t.createElement("i",{ref:this.__ref})};r.prototype.__initMountedQueue=function t(){this.__oldTriggerFlag=this._shouldTrigger;this._shouldTrigger=false;if(!this.mountedQueue||this.mountedQueue.done){var e=void 0;if((e=this.context)&&(e=e.__parent)&&(e=e.mountedQueue)){if(!e.done){this.mountedQueue=e;return}}this._shouldTrigger=true;this._initMountedQueue()}};r.prototype.__triggerMountedQueue=function t(){var e=this;if(this._shouldTrigger){p.all(this.__promises).then(function(){e._triggerMountedQueue()})}this._shouldTrigger=this.__oldTriggerFlag};o(r,[{key:"isMounted",get:function t(){return this.mounted}}]);return r}(e);B.functionalWrapper=g;B.normalize=P;B.$$cid="IntactReact";B.prototype.isReactComponent={};B.contextTypes={_context:m,__parent:m,__promises:m,router:m};B.childContextTypes={__parent:m,__promises:m};if(!Object.setPrototypeOf){L(B,e);if(!B.template){B.template=e.template}}return B});
{
"name": "intact-react",
"version": "1.1.11",
"version": "1.1.12",
"description": "A compatibility layer for running intact component in react v16",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -268,2 +268,3 @@ import React from 'react';

__promises: noop,
router: noop,
};

@@ -270,0 +271,0 @@ IntactReact.childContextTypes = {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc