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.7 to 1.1.8

10

dist/index.js

@@ -269,2 +269,8 @@ 'use strict';

this.placeholder = document.createComment(' react-mount-point-unstable ');
// we should append the placholder advanced,
// because when a intact component update itself
// the _render will update react element sync
if (this.parentDom) {
this.parentDom.appendChild(this.placeholder);
}
this._render(nextVNode);

@@ -317,3 +323,5 @@

// if (parentComponent && parentComponent._reactInternalFiber !== undefined) {
ReactDOM.unstable_renderSubtreeIntoContainer(parentComponent, vNode, _this.placeholder, function () {
ReactDOM.unstable_renderSubtreeIntoContainer(parentComponent, vNode, _this.placeholder,
// this.parentDom,
function () {
// if the parentVNode is a Intact component, it indicates that

@@ -320,0 +328,0 @@ // the Wrapper node is returned by parent component directly

@@ -271,2 +271,8 @@ (function (global, factory) {

this.placeholder = document.createComment(' react-mount-point-unstable ');
// we should append the placholder advanced,
// because when a intact component update itself
// the _render will update react element sync
if (this.parentDom) {
this.parentDom.appendChild(this.placeholder);
}
this._render(nextVNode);

@@ -319,3 +325,5 @@

// if (parentComponent && parentComponent._reactInternalFiber !== undefined) {
ReactDOM.unstable_renderSubtreeIntoContainer(parentComponent, vNode, _this.placeholder, function () {
ReactDOM.unstable_renderSubtreeIntoContainer(parentComponent, vNode, _this.placeholder,
// this.parentDom,
function () {
// if the parentVNode is a Intact component, it indicates that

@@ -322,0 +330,0 @@ // the Wrapper node is returned by parent component directly

2

dist/intact.react.min.js

@@ -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("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 L){return t.element}return f.call(r,t)};var h=e.utils;var d=h.isStringOrNumber;var v=h.isArray;var _=h.noop;function y(t){function e(e,r){if(r){var n=t(E(e,r,{}),true);if(v(n)){return n.map(function(t){return m(t)})}return m(n)}else{return t(e)}}e.contextTypes={_context:_};return e}function m(t){if(d(t)){return t}else if(t){return l(t.tag,t.props,t.props.children||t.children)}}var g=/_ev[A-Z]/;var b=function(){function t(){i(this,t)}t.prototype.init=function t(e,r){this.destroyed=true;this.placeholder=document.createComment(" react-mount-point-unstable ");this._render(r);return this.placeholder};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(){o.parentNode.removeChild(o)});o._unmount=_};t.prototype._render=function t(e){var n=this;var i=this._addProps(e);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,i,n.placeholder,function(){var n=r.findDOMNode(this);var i=e.parentVNode;while(i&&i.tag&&i.tag.$$cid==="IntactReact"){i.children.element=n;i=i.parentVNode}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(g.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[C[o]]=s}else{i[o]=s}}return n||r.reactVNode};return t}();var C={"ev-click":"onClick","ev-mouseenter":"onMouseEnter","ev-mouseleave":"onMouseLeave"};var x=e.Vdt.miss;var N=x.h;var w=x.VNode;var R=x.Types;var O=e.utils;var M=O.isFunction;var Q=O.isArray;var T=O.isStringOrNumber;var V=O.set;var k=O.get;function I(t,e){if(t==null)return t;if(T(t)){return new w(R.Text,null,null,t)}if(t instanceof w){if(t.tag===b){t.props.parentRef=e}return t}if(t.type&&t.type.$$cid==="IntactReact"){return N(t.type,E(a({},t.props,{parentRef:e}),{_context:t._owner&&t._owner.stateNode},e,t.key),null,null,t.key,P(t.ref))}return N(b,{reactVNode:t,parentRef:e},null,t.props.className)}function j(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(Q(t)){return t.map(function(t){return I(t,e)})}return I(t,e)}function E(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=j(t.children,r)}else if(a=A(s)){i[a]=t[s]}else if(s.substring(0,2)==="b-"){o[s.substring(2)]=$(t[s])}else{i[s]=t[s]}}i._context=S(e);if(n!=null){i.key=n}return i}function P(t){return(typeof t==="undefined"?"undefined":n(t))==="object"&&t!==null?function(e){t.current=e}:t}function S(t){var e=t._context;return{data:{get:function t(r){if(r!=null){return k(e.state||{},r)}else{return e.state||{}}},set:function t(r,n){var i=a({},e.state);V(i,r,n);e.setState(i)}}}}function $(t){if(M(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 j(t.apply(this,n),{instance:this.data})}}else{return function(){return j(t,{instance:this.data})}}}function A(t){var e=t[0],r=t[1],n=t[2];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()}}}var D=e.utils;var G=D.isObject;var F=D.extend;var q=e.Vdt.miss.h;var L=function(e){s(r,e);function r(t,n){i(this,r);if(n){var o={};var a=E(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=q(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))}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(){o.__pushGetChildContext(n);var a=e.prototype.update.call(o,r,n,i);o.__popGetChildContext();return a};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.parentElement;n.replaceChild(r,this._placeholder);this._placeholder._realElement=r;if(!n._hasRewrite){var i=n.removeChild;n.removeChild=function(t){i.call(this,t._realElement||t)};n._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=q(this.constructor,E(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};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);L.functionalWrapper=y;L.normalize=j;L.$$cid="IntactReact";L.prototype.isReactComponent={};L.contextTypes={_context:_,parent:_,promises:_};L.childContextTypes={parent:_,promises:_};if(!Object.setPrototypeOf){F(L,e);if(!L.template){L.template=e.template}}return L});
(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("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 L){return t.element}return f.call(r,t)};var h=e.utils;var d=h.isStringOrNumber;var v=h.isArray;var _=h.noop;function y(t){function e(e,r){if(r){var n=t(E(e,r,{}),true);if(v(n)){return n.map(function(t){return m(t)})}return m(n)}else{return t(e)}}e.contextTypes={_context:_};return e}function m(t){if(d(t)){return t}else if(t){return l(t.tag,t.props,t.props.children||t.children)}}var g=/_ev[A-Z]/;var b=function(){function t(){i(this,t)}t.prototype.init=function t(e,r){this.destroyed=true;this.placeholder=document.createComment(" react-mount-point-unstable ");if(this.parentDom){this.parentDom.appendChild(this.placeholder)}this._render(r);return this.placeholder};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(){o.parentNode.removeChild(o)});o._unmount=_};t.prototype._render=function t(e){var n=this;var i=this._addProps(e);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,i,n.placeholder,function(){var n=r.findDOMNode(this);var i=e.parentVNode;while(i&&i.tag&&i.tag.$$cid==="IntactReact"){i.children.element=n;i=i.parentVNode}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(g.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[C[o]]=s}else{i[o]=s}}return n||r.reactVNode};return t}();var C={"ev-click":"onClick","ev-mouseenter":"onMouseEnter","ev-mouseleave":"onMouseLeave"};var x=e.Vdt.miss;var N=x.h;var w=x.VNode;var R=x.Types;var O=e.utils;var M=O.isFunction;var Q=O.isArray;var T=O.isStringOrNumber;var V=O.set;var k=O.get;function I(t,e){if(t==null)return t;if(T(t)){return new w(R.Text,null,null,t)}if(t instanceof w){if(t.tag===b){t.props.parentRef=e}return t}if(t.type&&t.type.$$cid==="IntactReact"){return N(t.type,E(a({},t.props,{parentRef:e}),{_context:t._owner&&t._owner.stateNode},e,t.key),null,null,t.key,P(t.ref))}return N(b,{reactVNode:t,parentRef:e},null,t.props.className)}function j(t){var e=arguments.length>1&&arguments[1]!==undefined?arguments[1]:{};if(Q(t)){return t.map(function(t){return I(t,e)})}return I(t,e)}function E(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=j(t.children,r)}else if(a=D(s)){i[a]=t[s]}else if(s.substring(0,2)==="b-"){o[s.substring(2)]=$(t[s])}else{i[s]=t[s]}}i._context=S(e);if(n!=null){i.key=n}return i}function P(t){return(typeof t==="undefined"?"undefined":n(t))==="object"&&t!==null?function(e){t.current=e}:t}function S(t){var e=t._context;return{data:{get:function t(r){if(r!=null){return k(e.state||{},r)}else{return e.state||{}}},set:function t(r,n){var i=a({},e.state);V(i,r,n);e.setState(i)}}}}function $(t){if(M(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 j(t.apply(this,n),{instance:this.data})}}else{return function(){return j(t,{instance:this.data})}}}function D(t){var e=t[0],r=t[1],n=t[2];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()}}}var A=e.utils;var G=A.isObject;var F=A.extend;var q=e.Vdt.miss.h;var L=function(e){s(r,e);function r(t,n){i(this,r);if(n){var o={};var a=E(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=q(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))}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(){o.__pushGetChildContext(n);var a=e.prototype.update.call(o,r,n,i);o.__popGetChildContext();return a};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.parentElement;n.replaceChild(r,this._placeholder);this._placeholder._realElement=r;if(!n._hasRewrite){var i=n.removeChild;n.removeChild=function(t){i.call(this,t._realElement||t)};n._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=q(this.constructor,E(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};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);L.functionalWrapper=y;L.normalize=j;L.$$cid="IntactReact";L.prototype.isReactComponent={};L.contextTypes={_context:_,parent:_,promises:_};L.childContextTypes={parent:_,promises:_};if(!Object.setPrototypeOf){F(L,e);if(!L.template){L.template=e.template}}return L});
{
"name": "intact-react",
"version": "1.1.7",
"version": "1.1.8",
"description": "A compatibility layer for running intact component in react v16",

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

@@ -14,2 +14,8 @@ import ReactDOM from 'react-dom';

this.placeholder = document.createComment(' react-mount-point-unstable ');
// we should append the placholder advanced,
// because when a intact component update itself
// the _render will update react element sync
if (this.parentDom) {
this.parentDom.appendChild(this.placeholder);
}
this._render(nextVNode);

@@ -64,2 +70,3 @@

this.placeholder,
// this.parentDom,
function() {

@@ -66,0 +73,0 @@ // if the parentVNode is a Intact component, it indicates that

@@ -380,2 +380,17 @@ import Intact from '../index';

});
it('update intact component itself with react element', () => {
const C = createIntactComponent(`
<div ev-click={self.set.bind(self, 'show', !self.get('show'))}>
<span v-if={self.get('show')}>intact</span>
<div v-else>{self.get('children')}</div>
</div>
`);
const instance = renderApp(function() {
return <C><div>react</div></C>
});
container.firstChild.click();
container.firstChild.click();
expect(container.innerHTML).to.eql('<div><div><div>react</div></div></div>');
});
});

@@ -382,0 +397,0 @@

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