@syncfusion/ej2-react-base
Advanced tools
Comparing version 16.2.50 to 16.3.17
@@ -5,10 +5,2 @@ # Changelog | ||
## 16.2.45 (2018-07-17) | ||
### Common | ||
#### New Features | ||
- Provided React 16.4.1 compatibility support | ||
## 16.2.41 (2018-06-25) | ||
@@ -15,0 +7,0 @@ |
/*! | ||
* filename: ej2-react-base.umd.min.js | ||
* version : 16.2.50 | ||
* version : 16.3.17 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","@syncfusion/ej2-base"],e):e(t.ej={},t.React,t.ReactDOM,t.ej2Base)}(this,function(t,e,r,n){"use strict";function o(t,e){return"string"==typeof t?h(t,e):function(e){var o=document.createElement("div");return document.body.appendChild(o),r.render(t(e),o),n.detach(o),o.children}}var i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","onClick","onFocus","onBlur"],p=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e}return i(o,t),o.prototype.componentWillMount=function(){var t=Object.keys(this.props);this.htmlattributes={},this.attrKeys=s.concat(this.controlAttributes||[]);for(var e=0,r=t;e<r.length;e++){var n=r[e];-1===n.indexOf("data-")&&-1===n.indexOf("aria-")&&-1===this.attrKeys.indexOf(n)||(this.htmlattributes[n]=this.props[n])}},o.prototype.componentDidMount=function(){var t=this;this.refreshChild(!0),setTimeout(function(){var e=r.findDOMNode(t);t.appendTo(e)})},o.prototype.componentWillReceiveProps=function(t){for(var e=n.extend({},t),r=0,o=Object.keys(t);r<o.length;r++){var i=o[r];this.props[i]===t[i]?delete e[i]:-1!==this.attrKeys.indexOf(i)&&("className"===i&&(this.element.classList.remove(this.props[i]),this.element.classList.add(e[i])),delete e[i])}e.children&&delete e.children,Object.keys(e).length&&this.setProperties(e),this.refreshChild(!1,t)},o.prototype.getDefaultAttributes=function(){return this.htmlattributes},o.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var i=o[n];-1===r.indexOf(i)&&r.push(i)}this.injectedModules=r}if(this.directivekeys){var s=this.validateChildren({},this.directivekeys,e||this.props);if(s){if(!t&&this.skipRefresh)for(var p=0,c=this.skipRefresh;p<c.length;p++){delete s[c[p]]}this.setProperties(s,t)}}},o.prototype.componentWillUnmount=function(){this.destroy()},o.prototype.validateChildren=function(t,r,n){for(var o=!1,i=0,s=e.Children.toArray(n.children);i<s.length;i++){var p=s[i],c=this.getChildType(p),u=r[c];if(c&&r){var a=this.getChildProps(e.Children.toArray(p.props.children),u);a.length&&(o=!0,t[p.type.propertyName||c]=a)}}return o?t:null},o.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},o.prototype.getChildProps=function(t,e){for(var r=[],o=0,i=t;o<i.length;o++){var s=i[o],p=!1,c=void 0;"string"==typeof e?(p=!0,c=e):c=Object.keys(e)[0];var u=s.props;this.getChildType(s)===c&&(p||!u.children?r.push(n.extend({},u,{},!0)):r.push(this.validateChildren(n.extend({},u),e[c],u)||u))}return r},o.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var n=r[t];if(n.type.isService)return n.props.services}return[]},o}(e.PureComponent),c=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),a=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),h=n.getTemplateEngine();n.setTemplateEngine({compile:o}),t.ComponentBase=p,t.applyMixins=function(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})},t.ComplexBase=u,t.Inject=l,t.compile=o,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","@syncfusion/ej2-base"],e):e(t.ej={},t.React,t.ReactDOM,t.ej2Base)}(this,function(t,e,r,n){"use strict";function o(t,e){return"string"==typeof t?h(t,e):function(e){var o=document.createElement("div");return document.body.appendChild(o),r.render(t(e),o),n.detach(o),o.children}}var i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","onClick","onFocus","onBlur"],p=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e}return i(o,t),o.prototype.componentWillMount=function(){var t=Object.keys(this.props);this.htmlattributes={},this.attrKeys=s.concat(this.controlAttributes||[]);for(var e=0,r=t;e<r.length;e++){var n=r[e];-1===n.indexOf("data-")&&-1===n.indexOf("aria-")&&-1===this.attrKeys.indexOf(n)||(this.htmlattributes[n]=this.props[n])}},o.prototype.componentDidMount=function(){var t=this;this.refreshChild(!0),this.cachedTimeOut=setTimeout(function(){var e=r.findDOMNode(t);e&&(t.isAppendCalled=!0,t.appendTo(e))})},o.prototype.componentWillReceiveProps=function(t){this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var e=n.extend({},t),o=0,i=Object.keys(t);o<i.length;o++){var s=i[o];this.props[s]===t[s]?delete e[s]:-1!==this.attrKeys.indexOf(s)&&("className"===s&&(this.element.classList.remove(this.props[s]),this.element.classList.add(e[s])),delete e[s])}e.children&&delete e.children,Object.keys(e).length&&this.setProperties(e),this.refreshChild(!1,t)},o.prototype.getDefaultAttributes=function(){return this.htmlattributes},o.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var i=o[n];-1===r.indexOf(i)&&r.push(i)}this.injectedModules=r}if(this.directivekeys){var s=this.validateChildren({},this.directivekeys,e||this.props);if(s){if(!t&&this.skipRefresh)for(var p=0,c=this.skipRefresh;p<c.length;p++){delete s[c[p]]}this.setProperties(s,t)}}},o.prototype.componentWillUnmount=function(){this.destroy()},o.prototype.validateChildren=function(t,r,n){for(var o=!1,i=0,s=e.Children.toArray(n.children);i<s.length;i++){var p=s[i],c=this.getChildType(p),u=r[c];if(c&&r){var a=this.getChildProps(e.Children.toArray(p.props.children),u);a.length&&(o=!0,t[p.type.propertyName||c]=a)}}return o?t:null},o.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},o.prototype.getChildProps=function(t,e){for(var r=[],o=0,i=t;o<i.length;o++){var s=i[o],p=!1,c=void 0;"string"==typeof e?(p=!0,c=e):c=Object.keys(e)[0];var u=s.props;this.getChildType(s)===c&&(p||!u.children?r.push(n.extend({},u,{},!0)):r.push(this.validateChildren(n.extend({},u),e[c],u)||u))}return r},o.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var n=r[t];if(n.type.isService)return n.props.services}return[]},o}(e.PureComponent),c=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),a=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),h=n.getTemplateEngine();n.setTemplateEngine({compile:o}),t.ComponentBase=p,t.applyMixins=function(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})},t.ComplexBase=u,t.Inject=l,t.compile=o,Object.defineProperty(t,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ej2-react-base.umd.min.js.map |
@@ -16,2 +16,4 @@ import { Children, PureComponent } from 'react'; | ||
this.attrKeys = []; | ||
this.cachedTimeOut = 0; | ||
this.isAppendCalled = false; | ||
} | ||
@@ -32,5 +34,8 @@ componentWillMount() { | ||
// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235 | ||
setTimeout(() => { | ||
this.cachedTimeOut = setTimeout(() => { | ||
let ele = findDOMNode(this); | ||
this.appendTo(ele); | ||
if (ele) { | ||
this.isAppendCalled = true; | ||
this.appendTo(ele); | ||
} | ||
}); | ||
@@ -40,2 +45,7 @@ } | ||
componentWillReceiveProps(nextProps) { | ||
if (!this.isAppendCalled) { | ||
clearTimeout(this.cachedTimeOut); | ||
this.isAppendCalled = true; | ||
this.appendTo(findDOMNode(this)); | ||
} | ||
let dProps = extend({}, nextProps); | ||
@@ -42,0 +52,0 @@ let keys = Object.keys(nextProps); |
@@ -27,2 +27,4 @@ import { Children, PureComponent } from 'react'; | ||
_this.attrKeys = []; | ||
_this.cachedTimeOut = 0; | ||
_this.isAppendCalled = false; | ||
return _this; | ||
@@ -46,5 +48,8 @@ } | ||
// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235 | ||
setTimeout(function () { | ||
this.cachedTimeOut = setTimeout(function () { | ||
var ele = findDOMNode(_this); | ||
_this.appendTo(ele); | ||
if (ele) { | ||
_this.isAppendCalled = true; | ||
_this.appendTo(ele); | ||
} | ||
}); | ||
@@ -54,2 +59,7 @@ }; | ||
ComponentBase.prototype.componentWillReceiveProps = function (nextProps) { | ||
if (!this.isAppendCalled) { | ||
clearTimeout(this.cachedTimeOut); | ||
this.isAppendCalled = true; | ||
this.appendTo(findDOMNode(this)); | ||
} | ||
var dProps = extend({}, nextProps); | ||
@@ -56,0 +66,0 @@ var keys = Object.keys(nextProps); |
/*! | ||
* filename: index.d.ts | ||
* version : 16.2.50 | ||
* version : 16.3.17 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -11,7 +11,5 @@ * Use of this code is subject to the terms of our license. | ||
import * as _reactbase from '@syncfusion/ej2-react-base'; | ||
import * as _base from '@syncfusion/ej2-base'; | ||
export declare namespace ej { | ||
const reactbase: typeof _reactbase; | ||
const base: typeof _base; | ||
} |
{ | ||
"name": "@syncfusion/ej2-react-base", | ||
"version": "16.2.50", | ||
"version": "16.3.17", | ||
"description": "A common package of Essential JS 2 React base, methods and class definitions", | ||
@@ -28,3 +28,3 @@ "author": "Syncfusion Inc.", | ||
"react-dom": "15.5.4 - 16.4.1", | ||
"@syncfusion/ej2-base": "~16.2.50" | ||
"@syncfusion/ej2-base": "~16.3.17" | ||
}, | ||
@@ -41,4 +41,3 @@ "devDependencies": { | ||
"source-map-loader": "^0.2.1" | ||
}, | ||
"homepage": "https://www.syncfusion.com/products/react" | ||
} | ||
} |
@@ -23,2 +23,4 @@ /// <reference types="react" /> | ||
private attrKeys; | ||
private cachedTimeOut; | ||
private isAppendCalled; | ||
componentWillMount(): void; | ||
@@ -25,0 +27,0 @@ componentDidMount(): void; |
@@ -26,2 +26,4 @@ var __extends = (this && this.__extends) || (function () { | ||
_this.attrKeys = []; | ||
_this.cachedTimeOut = 0; | ||
_this.isAppendCalled = false; | ||
return _this; | ||
@@ -45,5 +47,8 @@ } | ||
// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235 | ||
setTimeout(function () { | ||
this.cachedTimeOut = setTimeout(function () { | ||
var ele = ReactDOM.findDOMNode(_this); | ||
_this.appendTo(ele); | ||
if (ele) { | ||
_this.isAppendCalled = true; | ||
_this.appendTo(ele); | ||
} | ||
}); | ||
@@ -53,2 +58,7 @@ }; | ||
ComponentBase.prototype.componentWillReceiveProps = function (nextProps) { | ||
if (!this.isAppendCalled) { | ||
clearTimeout(this.cachedTimeOut); | ||
this.isAppendCalled = true; | ||
this.appendTo(ReactDOM.findDOMNode(this)); | ||
} | ||
var dProps = extend({}, nextProps); | ||
@@ -55,0 +65,0 @@ var keys = Object.keys(nextProps); |
@@ -1,3 +0,1 @@ | ||
import * as reactbase from './index'; | ||
import * as base from '@syncfusion/ej2-base'; | ||
export { reactbase, base }; | ||
export * from './index'; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116561
929
2
+ Added@syncfusion/ej2-base@16.3.34(transitive)
- Removed@syncfusion/ej2-base@16.2.50(transitive)