Socket
Socket
Sign inDemoInstall

@syncfusion/ej2-react-base

Package Overview
Dependencies
Maintainers
3
Versions
164
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syncfusion/ej2-react-base - npm Package Compare versions

Comparing version 17.4.39 to 17.4.41

14

CHANGELOG.md

@@ -5,2 +5,16 @@ # Changelog

### Common
#### Bug Fixes
- Resolved the React `Lifecycle` warnings in the console.
## 17.4.39 (2019-12-17)
### Common
#### Bug Fixes
- Resolved the `delayUpdate` property type issue.
## 17.2.48-beta (2019-08-28)

@@ -7,0 +21,0 @@

4

dist/ej2-react-base.umd.min.js
/*!
* filename: ej2-react-base.umd.min.js
* version : 17.4.39
* version : 17.4.41
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","@syncfusion/ej2-base"],t):t(e.ej={},e.React,e.ReactDOM,e.ej2Base)}(this,function(e,t,r,i){"use strict";function n(e,t){return"string"==typeof e?d(e,t):function(t){var n=document.createElement("div");document.body.appendChild(n);var o=e,s=t;return"object"==typeof o&&(o=e.template,s=i.extend({},t,e.data||{})),r.render(o(s),n),i.detach(n),n.children}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),s=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],p=["accordion","tab","splitter"],a=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.isReact=!0,t}return o(n,e),n.prototype.componentWillMount=function(){this.isReact=!0;var e=Object.keys(this.props);this.htmlattributes={},this.attrKeys=s.concat(this.controlAttributes||[]);for(var t=0,r=e;t<r.length;t++){var i=r[t];-1===i.indexOf("data-")&&-1===i.indexOf("aria-")&&-1===this.attrKeys.indexOf(i)||(this.htmlattributes[i]=this.props[i])}},n.prototype.componentDidMount=function(){var e=this;this.refreshChild(!0),this.canDelayUpdate=-1!==p.indexOf(this.getModuleName()),this.props.immediateRender?this.renderReactComponent():this.cachedTimeOut=setTimeout(function(){e.renderReactComponent()})},n.prototype.renderReactComponent=function(){var e=r.findDOMNode(this);e&&(this.isAppendCalled=!0,this.appendTo(e))},n.prototype.componentWillReceiveProps=function(e){var t=this;this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var n=i.extend({},e),o=0,s=Object.keys(e);o<s.length;o++){var p=s[o],a="className"===p;a||i.isNullOrUndefined(this.htmlattributes[p])||this.htmlattributes[p]===n[p]||(this.htmlattributes[p]=n[p]),this.props[p]===e[p]?delete n[p]:-1!==this.attrKeys.indexOf(p)&&(a?(this.element.classList.remove(this.props[p]),this.element.classList.add(n[p])):"disabled"!==p&&delete n[p])}n.children&&delete n.children,this.canDelayUpdate||this.props.delayUpdate?setTimeout(function(){t.refreshProperties(n,e)}):this.refreshProperties(n,e)},n.prototype.refreshProperties=function(e,t){Object.keys(e).length&&(this.processComplexTemplate(e,this),this.setProperties(e)),this.refreshChild(!1,t)},n.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var n in r){var o=r[n];e[n]&&i.setValue(o,i.getValue(n,e),e)}},n.prototype.getDefaultAttributes=function(){return this.htmlattributes},n.prototype.trigger=function(e,t,r){if(!0!==this.isDestroyed){"change"!==e&&"input"!==e||this.props.onChange&&t.event&&this.props.onChange.call(void 0,{syntheticEvent:t.event,nativeEvent:{text:t.value},value:t.value,target:this});var i=this.isProtectedOnChange;this.isProtectedOnChange=!1,this.modelObserver.notify(e,t,r),this.isProtectedOnChange=i}},n.prototype.compareObjects=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},n.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var s=o[n];-1===r.indexOf(s)&&r.push(s)}this.injectedModules=r}if(this.directivekeys){var p=this.validateChildren({},this.directivekeys,t||this.props);if(p){if(!e&&this.skipRefresh)for(var a=0,c=this.skipRefresh;a<c.length;a++){delete p[c[a]]}if(this.prevProperties)for(var h=Object.keys(this.prevProperties),l=0;l<h.length;l++){var u=h[l];if(this.compareObjects(this.prevProperties[u],p[u]))delete p[u];else{var d={};d[u]=p[u],this.prevProperties=i.extend(this.prevProperties,d)}}else this.prevProperties=i.extend({},p,{},!0);this.setProperties(p,e)}}},n.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut),this.destroy()},n.prototype.validateChildren=function(e,r,i){for(var n=!1,o=0,s=t.Children.toArray(i.children);o<s.length;o++){var p=s[o],a=this.getChildType(p),c=r[a];if(a&&r){var h=this.getChildProps(t.Children.toArray(p.props.children),c);h.length&&(n=!0,e[p.type.propertyName||a]=h)}}return n?e:null},n.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},n.prototype.getChildProps=function(e,t){for(var r=[],n=0,o=e;n<o.length;n++){var s=o[n],p=!1,a=void 0;"string"==typeof t?(p=!0,a=t):a=Object.keys(t)[0];var c=s.props;if(this.getChildType(s)===a)if(p||!c.children){var h=i.extend({},c,{},!0);this.processComplexTemplate(h,s.type),r.push(h)}else{var l=this.validateChildren(i.extend({},c),t[a],c)||c;l.children&&delete l.children,this.processComplexTemplate(l,s.type),r.push(l)}}return r},n.prototype.getInjectedServices=function(){for(var e=0,r=t.Children.toArray(this.props.children);e<r.length;e++){var i=r[e];if(i.type.isService)return i.props.services}return[]},n}(t.PureComponent),c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){return null},t.isDirective=!0,t}(t.PureComponent),l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),d=i.getTemplateEngine();i.setTemplateEngine({compile:n}),e.ComponentBase=a,e.applyMixins=function(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){e.prototype[r]=t.prototype[r]})})},e.ComplexBase=h,e.Inject=u,e.compile=n,Object.defineProperty(e,"__esModule",{value:!0})});
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-dom"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","@syncfusion/ej2-base"],t):t(e.ej={},e.React,e.ReactDOM,e.ej2Base)}(this,function(e,t,r,i){"use strict";function n(e,t){return"string"==typeof e?d(e,t):function(t){var n=document.createElement("div");document.body.appendChild(n);var o=e,s=t;return"object"==typeof o&&(o=e.template,s=i.extend({},t,e.data||{})),r.render(o(s),n),i.detach(n),n.children}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),s=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],p=["accordion","tab","splitter"],a=function(e){function n(){var t=null!==e&&e.apply(this,arguments)||this;return t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.isReact=!0,t}return o(n,e),n.prototype.UNSAFE_componentWillMount=function(){this.isReact=!0;var e=Object.keys(this.props);this.htmlattributes={},this.attrKeys=s.concat(this.controlAttributes||[]);for(var t=0,r=e;t<r.length;t++){var i=r[t];-1===i.indexOf("data-")&&-1===i.indexOf("aria-")&&-1===this.attrKeys.indexOf(i)||(this.htmlattributes[i]=this.props[i])}},n.prototype.componentDidMount=function(){var e=this;this.refreshChild(!0),this.canDelayUpdate=-1!==p.indexOf(this.getModuleName()),this.props.immediateRender?this.renderReactComponent():this.cachedTimeOut=setTimeout(function(){e.renderReactComponent()})},n.prototype.renderReactComponent=function(){var e=r.findDOMNode(this);e&&(this.isAppendCalled=!0,this.appendTo(e))},n.prototype.UNSAFE_componentWillReceiveProps=function(e){var t=this;this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var n=i.extend({},e),o=0,s=Object.keys(e);o<s.length;o++){var p=s[o],a="className"===p;a||i.isNullOrUndefined(this.htmlattributes[p])||this.htmlattributes[p]===n[p]||(this.htmlattributes[p]=n[p]),this.props[p]===e[p]?delete n[p]:-1!==this.attrKeys.indexOf(p)&&(a?(this.element.classList.remove(this.props[p]),this.element.classList.add(n[p])):"disabled"!==p&&delete n[p])}n.children&&delete n.children,this.canDelayUpdate||this.props.delayUpdate?setTimeout(function(){t.refreshProperties(n,e)}):this.refreshProperties(n,e)},n.prototype.refreshProperties=function(e,t){Object.keys(e).length&&(this.processComplexTemplate(e,this),this.setProperties(e)),this.refreshChild(!1,t)},n.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var n in r){var o=r[n];e[n]&&i.setValue(o,i.getValue(n,e),e)}},n.prototype.getDefaultAttributes=function(){return this.htmlattributes},n.prototype.trigger=function(e,t,r){if(!0!==this.isDestroyed){"change"!==e&&"input"!==e||this.props.onChange&&t.event&&this.props.onChange.call(void 0,{syntheticEvent:t.event,nativeEvent:{text:t.value},value:t.value,target:this});var i=this.isProtectedOnChange;this.isProtectedOnChange=!1,this.modelObserver.notify(e,t,r),this.isProtectedOnChange=i}},n.prototype.compareObjects=function(e,t){return JSON.stringify(e)===JSON.stringify(t)},n.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var s=o[n];-1===r.indexOf(s)&&r.push(s)}this.injectedModules=r}if(this.directivekeys){var p=this.validateChildren({},this.directivekeys,t||this.props);if(p){if(!e&&this.skipRefresh)for(var a=0,c=this.skipRefresh;a<c.length;a++){delete p[c[a]]}if(this.prevProperties)for(var h=Object.keys(this.prevProperties),l=0;l<h.length;l++){var u=h[l];if(this.compareObjects(this.prevProperties[u],p[u]))delete p[u];else{var d={};d[u]=p[u],this.prevProperties=i.extend(this.prevProperties,d)}}else this.prevProperties=i.extend({},p,{},!0);this.setProperties(p,e)}}},n.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut),this.destroy()},n.prototype.validateChildren=function(e,r,i){for(var n=!1,o=0,s=t.Children.toArray(i.children);o<s.length;o++){var p=s[o],a=this.getChildType(p),c=r[a];if(a&&r){var h=this.getChildProps(t.Children.toArray(p.props.children),c);h.length&&(n=!0,e[p.type.propertyName||a]=h)}}return n?e:null},n.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},n.prototype.getChildProps=function(e,t){for(var r=[],n=0,o=e;n<o.length;n++){var s=o[n],p=!1,a=void 0;"string"==typeof t?(p=!0,a=t):a=Object.keys(t)[0];var c=s.props;if(this.getChildType(s)===a)if(p||!c.children){var h=i.extend({},c,{},!0);this.processComplexTemplate(h,s.type),r.push(h)}else{var l=this.validateChildren(i.extend({},c),t[a],c)||c;l.children&&delete l.children,this.processComplexTemplate(l,s.type),r.push(l)}}return r},n.prototype.getInjectedServices=function(){for(var e=0,r=t.Children.toArray(this.props.children);e<r.length;e++){var i=r[e];if(i.type.isService)return i.props.services}return[]},n}(t.PureComponent),c=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),h=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){return null},t.isDirective=!0,t}(t.PureComponent),l=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(t,r)};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),u=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),d=i.getTemplateEngine();i.setTemplateEngine({compile:n}),e.ComponentBase=a,e.applyMixins=function(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){e.prototype[r]=t.prototype[r]})})},e.ComplexBase=h,e.Inject=u,e.compile=n,Object.defineProperty(e,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-react-base.umd.min.js.map

@@ -21,3 +21,9 @@ import { Children, PureComponent } from 'react';

}
componentWillMount() {
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentWillMount
// tslint:disable-next-line:no-any
/**
* @private
*/
UNSAFE_componentWillMount() {
this.isReact = true;

@@ -38,2 +44,3 @@ let propKeys = Object.keys(this.props);

// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235
// tslint:disable-next-line:no-any
if (this.props.immediateRender) {

@@ -55,4 +62,9 @@ this.renderReactComponent();

}
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
// tslint:disable-next-line:no-any
componentWillReceiveProps(nextProps) {
/**
* @private
*/
UNSAFE_componentWillReceiveProps(nextProps) {
if (!this.isAppendCalled) {

@@ -59,0 +71,0 @@ clearTimeout(this.cachedTimeOut);

@@ -36,3 +36,9 @@ import { Children, PureComponent } from 'react';

}
ComponentBase.prototype.componentWillMount = function () {
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentWillMount
// tslint:disable-next-line:no-any
/**
* @private
*/
ComponentBase.prototype.UNSAFE_componentWillMount = function () {
this.isReact = true;

@@ -55,2 +61,3 @@ var propKeys = Object.keys(this.props);

// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235
// tslint:disable-next-line:no-any
if (this.props.immediateRender) {

@@ -72,4 +79,9 @@ this.renderReactComponent();

};
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
// tslint:disable-next-line:no-any
ComponentBase.prototype.componentWillReceiveProps = function (nextProps) {
/**
* @private
*/
ComponentBase.prototype.UNSAFE_componentWillReceiveProps = function (nextProps) {
var _this = this;

@@ -76,0 +88,0 @@ if (!this.isAppendCalled) {

/*!
* filename: ej2-react-base.min.js
* version : 17.4.39
* version : 17.4.41
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -10,3 +10,3 @@ * Use of this code is subject to the terms of our license.

*/
this.ej=this.ej||{},this.ej.reactbase=function(t,e,r,i){"use strict";function n(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})}function o(t,e){return"string"==typeof t?f(t,e):function(e){var n=document.createElement("div");document.body.appendChild(n);var o=t,s=e;return"object"==typeof o&&(o=t.template,s=i.extend({},e,t.data||{})),r.render(o(s),n),i.detach(n),n.children}}var s=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],a=["accordion","tab","splitter"],c=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e.isReact=!0,e}return s(n,t),n.prototype.componentWillMount=function(){this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes={},this.attrKeys=p.concat(this.controlAttributes||[]);for(var e=0,r=t;e<r.length;e++){var i=r[e];-1===i.indexOf("data-")&&-1===i.indexOf("aria-")&&-1===this.attrKeys.indexOf(i)||(this.htmlattributes[i]=this.props[i])}},n.prototype.componentDidMount=function(){var t=this;this.refreshChild(!0),this.canDelayUpdate=-1!==a.indexOf(this.getModuleName()),this.props.immediateRender?this.renderReactComponent():this.cachedTimeOut=setTimeout(function(){t.renderReactComponent()})},n.prototype.renderReactComponent=function(){var t=r.findDOMNode(this);t&&(this.isAppendCalled=!0,this.appendTo(t))},n.prototype.componentWillReceiveProps=function(t){var e=this;this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var n=i.extend({},t),o=0,s=Object.keys(t);o<s.length;o++){var p=s[o],a="className"===p;a||i.isNullOrUndefined(this.htmlattributes[p])||this.htmlattributes[p]===n[p]||(this.htmlattributes[p]=n[p]),this.props[p]===t[p]?delete n[p]:-1!==this.attrKeys.indexOf(p)&&(a?(this.element.classList.remove(this.props[p]),this.element.classList.add(n[p])):"disabled"!==p&&delete n[p])}n.children&&delete n.children,this.canDelayUpdate||this.props.delayUpdate?setTimeout(function(){e.refreshProperties(n,t)}):this.refreshProperties(n,t)},n.prototype.refreshProperties=function(t,e){Object.keys(t).length&&(this.processComplexTemplate(t,this),this.setProperties(t)),this.refreshChild(!1,e)},n.prototype.processComplexTemplate=function(t,e){var r=e.complexTemplate;if(r)for(var n in r){var o=r[n];t[n]&&i.setValue(o,i.getValue(n,t),t)}},n.prototype.getDefaultAttributes=function(){return this.htmlattributes},n.prototype.trigger=function(t,e,r){if(!0!==this.isDestroyed){"change"!==t&&"input"!==t||this.props.onChange&&e.event&&this.props.onChange.call(void 0,{syntheticEvent:e.event,nativeEvent:{text:e.value},value:e.value,target:this});var i=this.isProtectedOnChange;this.isProtectedOnChange=!1,this.modelObserver.notify(t,e,r),this.isProtectedOnChange=i}},n.prototype.compareObjects=function(t,e){return JSON.stringify(t)===JSON.stringify(e)},n.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var s=o[n];-1===r.indexOf(s)&&r.push(s)}this.injectedModules=r}if(this.directivekeys){var p=this.validateChildren({},this.directivekeys,e||this.props);if(p){if(!t&&this.skipRefresh)for(var a=0,c=this.skipRefresh;a<c.length;a++)delete p[c[a]];if(this.prevProperties)for(var h=Object.keys(this.prevProperties),l=0;l<h.length;l++){var u=h[l];if(this.compareObjects(this.prevProperties[u],p[u]))delete p[u];else{var d={};d[u]=p[u],this.prevProperties=i.extend(this.prevProperties,d)}}else this.prevProperties=i.extend({},p,{},!0);this.setProperties(p,t)}}},n.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut),this.destroy()},n.prototype.validateChildren=function(t,r,i){for(var n=!1,o=0,s=e.Children.toArray(i.children);o<s.length;o++){var p=s[o],a=this.getChildType(p),c=r[a];if(a&&r){var h=this.getChildProps(e.Children.toArray(p.props.children),c);h.length&&(n=!0,t[p.type.propertyName||a]=h)}}return n?t:null},n.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},n.prototype.getChildProps=function(t,e){for(var r=[],n=0,o=t;n<o.length;n++){var s=o[n],p=!1,a=void 0;"string"==typeof e?(p=!0,a=e):a=Object.keys(e)[0];var c=s.props;if(this.getChildType(s)===a)if(p||!c.children){var h=i.extend({},c,{},!0);this.processComplexTemplate(h,s.type),r.push(h)}else{var l=this.validateChildren(i.extend({},c),e[a],c)||c;l.children&&delete l.children,this.processComplexTemplate(l,s.type),r.push(l)}}return r},n.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var i=r[t];if(i.type.isService)return i.props.services}return[]},n}(e.PureComponent),h=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),u=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),f=i.getTemplateEngine();return i.setTemplateEngine({compile:o}),t.ComponentBase=c,t.applyMixins=n,t.ComplexBase=l,t.Inject=d,t.compile=o,t}({},React,ReactDOM,ej.base),this.ejs=ej;
this.ej=this.ej||{},this.ej.reactbase=function(t,e,r,i){"use strict";function n(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})}function o(t,e){return"string"==typeof t?f(t,e):function(e){var n=document.createElement("div");document.body.appendChild(n);var o=t,s=e;return"object"==typeof o&&(o=t.template,s=i.extend({},e,t.data||{})),r.render(o(s),n),i.detach(n),n.children}}var s=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),p=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],a=["accordion","tab","splitter"],c=function(t){function n(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e.isReact=!0,e}return s(n,t),n.prototype.UNSAFE_componentWillMount=function(){this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes={},this.attrKeys=p.concat(this.controlAttributes||[]);for(var e=0,r=t;e<r.length;e++){var i=r[e];-1===i.indexOf("data-")&&-1===i.indexOf("aria-")&&-1===this.attrKeys.indexOf(i)||(this.htmlattributes[i]=this.props[i])}},n.prototype.componentDidMount=function(){var t=this;this.refreshChild(!0),this.canDelayUpdate=-1!==a.indexOf(this.getModuleName()),this.props.immediateRender?this.renderReactComponent():this.cachedTimeOut=setTimeout(function(){t.renderReactComponent()})},n.prototype.renderReactComponent=function(){var t=r.findDOMNode(this);t&&(this.isAppendCalled=!0,this.appendTo(t))},n.prototype.UNSAFE_componentWillReceiveProps=function(t){var e=this;this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var n=i.extend({},t),o=0,s=Object.keys(t);o<s.length;o++){var p=s[o],a="className"===p;a||i.isNullOrUndefined(this.htmlattributes[p])||this.htmlattributes[p]===n[p]||(this.htmlattributes[p]=n[p]),this.props[p]===t[p]?delete n[p]:-1!==this.attrKeys.indexOf(p)&&(a?(this.element.classList.remove(this.props[p]),this.element.classList.add(n[p])):"disabled"!==p&&delete n[p])}n.children&&delete n.children,this.canDelayUpdate||this.props.delayUpdate?setTimeout(function(){e.refreshProperties(n,t)}):this.refreshProperties(n,t)},n.prototype.refreshProperties=function(t,e){Object.keys(t).length&&(this.processComplexTemplate(t,this),this.setProperties(t)),this.refreshChild(!1,e)},n.prototype.processComplexTemplate=function(t,e){var r=e.complexTemplate;if(r)for(var n in r){var o=r[n];t[n]&&i.setValue(o,i.getValue(n,t),t)}},n.prototype.getDefaultAttributes=function(){return this.htmlattributes},n.prototype.trigger=function(t,e,r){if(!0!==this.isDestroyed){"change"!==t&&"input"!==t||this.props.onChange&&e.event&&this.props.onChange.call(void 0,{syntheticEvent:e.event,nativeEvent:{text:e.value},value:e.value,target:this});var i=this.isProtectedOnChange;this.isProtectedOnChange=!1,this.modelObserver.notify(t,e,r),this.isProtectedOnChange=i}},n.prototype.compareObjects=function(t,e){return JSON.stringify(t)===JSON.stringify(e)},n.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var s=o[n];-1===r.indexOf(s)&&r.push(s)}this.injectedModules=r}if(this.directivekeys){var p=this.validateChildren({},this.directivekeys,e||this.props);if(p){if(!t&&this.skipRefresh)for(var a=0,c=this.skipRefresh;a<c.length;a++)delete p[c[a]];if(this.prevProperties)for(var h=Object.keys(this.prevProperties),l=0;l<h.length;l++){var u=h[l];if(this.compareObjects(this.prevProperties[u],p[u]))delete p[u];else{var d={};d[u]=p[u],this.prevProperties=i.extend(this.prevProperties,d)}}else this.prevProperties=i.extend({},p,{},!0);this.setProperties(p,t)}}},n.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut),this.destroy()},n.prototype.validateChildren=function(t,r,i){for(var n=!1,o=0,s=e.Children.toArray(i.children);o<s.length;o++){var p=s[o],a=this.getChildType(p),c=r[a];if(a&&r){var h=this.getChildProps(e.Children.toArray(p.props.children),c);h.length&&(n=!0,t[p.type.propertyName||a]=h)}}return n?t:null},n.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},n.prototype.getChildProps=function(t,e){for(var r=[],n=0,o=t;n<o.length;n++){var s=o[n],p=!1,a=void 0;"string"==typeof e?(p=!0,a=e):a=Object.keys(e)[0];var c=s.props;if(this.getChildType(s)===a)if(p||!c.children){var h=i.extend({},c,{},!0);this.processComplexTemplate(h,s.type),r.push(h)}else{var l=this.validateChildren(i.extend({},c),e[a],c)||c;l.children&&delete l.children,this.processComplexTemplate(l,s.type),r.push(l)}}return r},n.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var i=r[t];if(i.type.isService)return i.props.services}return[]},n}(e.PureComponent),h=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),u=function(){var t=function(e,r){return(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])})(e,r)};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),d=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),f=i.getTemplateEngine();return i.setTemplateEngine({compile:o}),t.ComponentBase=c,t.applyMixins=n,t.ComplexBase=l,t.Inject=d,t.compile=o,t}({},React,ReactDOM,ej.base),this.ejs=ej;
//# sourceMappingURL=ej2-react-base.min.js.map
/*!
* filename: index.d.ts
* version : 17.4.39
* version : 17.4.41
* Copyright Syncfusion Inc. 2001 - 2019. All rights reserved.

@@ -5,0 +5,0 @@ * Use of this code is subject to the terms of our license.

{
"_from": "@syncfusion/ej2-react-base@*",
"_id": "@syncfusion/ej2-react-base@17.2.48",
"_id": "@syncfusion/ej2-react-base@17.4.39",
"_inBundle": false,
"_integrity": "sha512-DLsE8r97j9jLwO8PmOuHxG69avDj7a1t0oXWbBQEwudEnXjVXIIpNDIvyBVIbCWXdYuOB94yGEMqtze4/M1P8w==",
"_integrity": "sha512-3WtkzhznKo+46zGHgJ4bpUVxf1GzIjbAFqOyszTynkttW9PRl/194jFUvQPCU0/tcZ7bZoQAugxQuKgWk+bxOw==",
"_location": "/@syncfusion/ej2-react-base",

@@ -21,3 +21,2 @@ "_phantomChildren": {},

"/",
"/@syncfusion/ej2-react-barcode-generator",
"/@syncfusion/ej2-react-buttons",

@@ -33,24 +32,15 @@ "/@syncfusion/ej2-react-calendars",

"/@syncfusion/ej2-react-grids",
"/@syncfusion/ej2-react-heatmap",
"/@syncfusion/ej2-react-inplace-editor",
"/@syncfusion/ej2-react-inputs",
"/@syncfusion/ej2-react-layouts",
"/@syncfusion/ej2-react-lineargauge",
"/@syncfusion/ej2-react-lists",
"/@syncfusion/ej2-react-maps",
"/@syncfusion/ej2-react-navigations",
"/@syncfusion/ej2-react-notifications",
"/@syncfusion/ej2-react-pdfviewer",
"/@syncfusion/ej2-react-pivotview",
"/@syncfusion/ej2-react-popups",
"/@syncfusion/ej2-react-querybuilder",
"/@syncfusion/ej2-react-richtexteditor",
"/@syncfusion/ej2-react-schedule",
"/@syncfusion/ej2-react-splitbuttons",
"/@syncfusion/ej2-react-spreadsheet",
"/@syncfusion/ej2-react-treegrid",
"/@syncfusion/ej2-react-treemap"
"/@syncfusion/ej2-react-treegrid"
],
"_resolved": "http://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-react-base/-/ej2-react-base-17.2.48.tgz",
"_shasum": "8c0cea1a311bf8f93c09c34f7ba3af04ebbaa8a9",
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix/@syncfusion/ej2-react-base/-/ej2-react-base-17.4.39.tgz",
"_shasum": "e93dd8cf3ff627f922487e204f0dbacddef4af72",
"_spec": "@syncfusion/ej2-react-base@*",

@@ -66,3 +56,3 @@ "_where": "/jenkins/workspace/ation_hotfix_17.2.0.34_Vol2-DDPJ6C2YEWTWLLKKNA7AG2JBE6DYTCTNGMHGORWGAYAVCL6L7OLQ/packages/included",

"dependencies": {
"@syncfusion/ej2-base": "~17.4.39"
"@syncfusion/ej2-base": "~17.4.41"
},

@@ -76,3 +66,3 @@ "deprecated": false,

"syncfusion",
"web-components",
"web-component",
"react",

@@ -90,4 +80,4 @@ "react-base",

"peerDependencies": {
"react": "15.5.4 - 16.9.0",
"react-dom": "15.5.4 - 16.9.0"
"react": "15.5.4 - 16.12.0",
"react-dom": "15.5.4 - 16.12.0"
},

@@ -99,4 +89,4 @@ "repository": {

"typings": "index.d.ts",
"version": "17.4.39",
"version": "17.4.41",
"sideEffects": true
}

@@ -32,6 +32,12 @@ /**

private canDelayUpdate;
componentWillMount(): void;
/**
* @private
*/
UNSAFE_componentWillMount(): void;
componentDidMount(): void;
private renderReactComponent;
componentWillReceiveProps(nextProps: any): void;
/**
* @private
*/
UNSAFE_componentWillReceiveProps(nextProps: Object): void;
refreshProperties(dProps: Object, nextProps: Object): void;

@@ -38,0 +44,0 @@ private processComplexTemplate;

@@ -35,3 +35,9 @@ var __extends = (this && this.__extends) || (function () {

}
ComponentBase.prototype.componentWillMount = function () {
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentWillMount
// tslint:disable-next-line:no-any
/**
* @private
*/
ComponentBase.prototype.UNSAFE_componentWillMount = function () {
this.isReact = true;

@@ -54,2 +60,3 @@ var propKeys = Object.keys(this.props);

// Reference link: https://github.com/facebook/react/issues/10309#issuecomment-318433235
// tslint:disable-next-line:no-any
if (this.props.immediateRender) {

@@ -71,4 +78,9 @@ this.renderReactComponent();

};
// Lifecycle methods are changed by React team and so we can deprecate this method and use
// Reference link:https://reactjs.org/docs/react-component.html#unsafe_componentwillreceiveprops
// tslint:disable-next-line:no-any
ComponentBase.prototype.componentWillReceiveProps = function (nextProps) {
/**
* @private
*/
ComponentBase.prototype.UNSAFE_componentWillReceiveProps = function (nextProps) {
var _this = this;

@@ -75,0 +87,0 @@ if (!this.isAppendCalled) {

@@ -24,4 +24,4 @@ /**

immediateRender?: boolean;
delayUpdate?: string;
delayUpdate?: string | boolean;
}
export {};

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 not supported yet

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