@syncfusion/ej2-react-base
Advanced tools
Comparing version 16.4.42 to 16.4.45
@@ -5,2 +5,8 @@ # Changelog | ||
### Common | ||
#### Bug Fixes | ||
- Resolved the unwanted property change called on state changes issue. | ||
## 16.2.41 (2018-06-25) | ||
@@ -7,0 +13,0 @@ |
/*! | ||
* filename: ej2-react-base.umd.min.js | ||
* version : 16.4.42 | ||
* version : 16.4.45 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -10,12 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
/*! | ||
* filename: ej2-react-base.umd.min.js | ||
* version : 16.4.40-beta | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
* Use of this code is subject to the terms of our license. | ||
* A copy of the current license can be obtained at any time by e-mailing | ||
* licensing@syncfusion.com. Any infringement will be prosecuted under | ||
* applicable laws. | ||
*/ | ||
!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=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 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","name","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])):"disabled"!==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=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 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=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 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");document.body.appendChild(o);var i=t,s=e;return"object"==typeof i&&(i=t.template,s=n.extend({},e,t.data||{})),r.render(i(s),o),n.detach(o),o.children}}var i=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 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","name","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])):"disabled"!==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=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 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=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 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 |
@@ -213,3 +213,9 @@ import { Children, PureComponent } from 'react'; | ||
document.body.appendChild(ele); | ||
render(templateElement(data), ele); | ||
let actTemplate = templateElement; | ||
let actData = data; | ||
if (typeof actTemplate === 'object') { | ||
actTemplate = templateElement.template; | ||
actData = extend({}, data, templateElement.data || {}); | ||
} | ||
render(actTemplate(actData), ele); | ||
detach(ele); | ||
@@ -216,0 +222,0 @@ return ele.children; |
@@ -273,3 +273,9 @@ import { Children, PureComponent } from 'react'; | ||
document.body.appendChild(ele); | ||
render(templateElement(data), ele); | ||
var actTemplate = templateElement; | ||
var actData = data; | ||
if (typeof actTemplate === 'object') { | ||
actTemplate = templateElement.template; | ||
actData = extend({}, data, templateElement.data || {}); | ||
} | ||
render(actTemplate(actData), ele); | ||
detach(ele); | ||
@@ -276,0 +282,0 @@ return ele.children; |
/*! | ||
* filename: ej2-react-base.min.js | ||
* version : 16.4.42 | ||
* version : 16.4.45 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -10,12 +10,3 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
/*! | ||
* filename: ej2-react-base.min.js | ||
* version : 16.4.40-beta | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
* Use of this code is subject to the terms of our license. | ||
* A copy of the current license can be obtained at any time by e-mailing | ||
* licensing@syncfusion.com. Any infringement will be prosecuted under | ||
* applicable laws. | ||
*/ | ||
this.ej=this.ej||{},this.ej.reactbase=function(t,e,r,n){"use strict";function i(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?d(t,e):function(e){var i=document.createElement("div");return document.body.appendChild(i),r.render(t(e),i),n.detach(i),i.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 n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],c=function(t){function i(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e}return s(i,t),i.prototype.componentWillMount=function(){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 n=r[e];-1===n.indexOf("data-")&&-1===n.indexOf("aria-")&&-1===this.attrKeys.indexOf(n)||(this.htmlattributes[n]=this.props[n])}},i.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))})},i.prototype.componentWillReceiveProps=function(t){this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(r.findDOMNode(this)));for(var e=n.extend({},t),i=0,o=Object.keys(t);i<o.length;i++){var s=o[i];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])):"disabled"!==s&&delete e[s])}e.children&&delete e.children,Object.keys(e).length&&this.setProperties(e),this.refreshChild(!1,t)},i.prototype.getDefaultAttributes=function(){return this.htmlattributes},i.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,i=this.getInjectedServices()||[];n<i.length;n++){var o=i[n];-1===r.indexOf(o)&&r.push(o)}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)}}},i.prototype.componentWillUnmount=function(){this.destroy()},i.prototype.validateChildren=function(t,r,n){for(var i=!1,o=0,s=e.Children.toArray(n.children);o<s.length;o++){var p=s[o],c=this.getChildType(p),u=r[c];if(c&&r){var a=this.getChildProps(e.Children.toArray(p.props.children),u);a.length&&(i=!0,t[p.type.propertyName||c]=a)}}return i?t:null},i.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},i.prototype.getChildProps=function(t,e){for(var r=[],i=0,o=t;i<o.length;i++){var s=o[i],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},i.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[]},i}(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 n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),a=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(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 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 h(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),d=n.getTemplateEngine();return n.setTemplateEngine({compile:o}),t.ComponentBase=c,t.applyMixins=i,t.ComplexBase=a,t.Inject=l,t.compile=o,t}({},React,ReactDOM,ej.base),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.reactbase=function(t,e,r,n){"use strict";function o(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})}function i(t,e){return"string"==typeof t?d(t,e):function(e){var o=document.createElement("div");document.body.appendChild(o);var i=t,s=e;return"object"==typeof i&&(i=t.template,s=n.extend({},e,t.data||{})),r.render(i(s),o),n.detach(o),o.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 n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],c=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e.cachedTimeOut=0,e.isAppendCalled=!1,e}return s(o,t),o.prototype.componentWillMount=function(){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 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])):"disabled"!==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),a=r[c];if(c&&r){var u=this.getChildProps(e.Children.toArray(p.props.children),a);u.length&&(o=!0,t[p.type.propertyName||c]=u)}}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 a=s.props;this.getChildType(s)===c&&(p||!a.children?r.push(n.extend({},a,{},!0)):r.push(this.validateChildren(n.extend({},a),e[c],a)||a))}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),a=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 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 a(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(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 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 h(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),d=n.getTemplateEngine();return n.setTemplateEngine({compile:i}),t.ComponentBase=c,t.applyMixins=o,t.ComplexBase=u,t.Inject=l,t.compile=i,t}({},React,ReactDOM,ej.base),this.ejs=ej; | ||
//# sourceMappingURL=ej2-react-base.min.js.map |
/*! | ||
* filename: index.d.ts | ||
* version : 16.4.42 | ||
* version : 16.4.45 | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
@@ -10,11 +10,2 @@ * Use of this code is subject to the terms of our license. | ||
*/ | ||
/*! | ||
* filename: index.d.ts | ||
* version : 16.4.40-beta | ||
* Copyright Syncfusion Inc. 2001 - 2018. All rights reserved. | ||
* Use of this code is subject to the terms of our license. | ||
* A copy of the current license can be obtained at any time by e-mailing | ||
* licensing@syncfusion.com. Any infringement will be prosecuted under | ||
* applicable laws. | ||
*/ | ||
import * as _reactbase from '@syncfusion/ej2-react-base'; | ||
@@ -21,0 +12,0 @@ |
{ | ||
"name": "@syncfusion/ej2-react-base", | ||
"version": "16.4.42", | ||
"version": "16.4.45", | ||
"description": "A common package of Essential JS 2 React base, methods and class definitions", | ||
@@ -5,0 +5,0 @@ "author": "Syncfusion Inc.", |
/** | ||
* Template compiler for react | ||
*/ | ||
import { setTemplateEngine, getTemplateEngine, detach } from '@syncfusion/ej2-base'; | ||
import { setTemplateEngine, getTemplateEngine, detach, extend } from '@syncfusion/ej2-base'; | ||
import * as ReactDOM from 'react-dom'; | ||
@@ -16,3 +16,9 @@ // tslint:disable:no-any | ||
document.body.appendChild(ele); | ||
ReactDOM.render(templateElement(data), ele); | ||
var actTemplate = templateElement; | ||
var actData = data; | ||
if (typeof actTemplate === 'object') { | ||
actTemplate = templateElement.template; | ||
actData = extend({}, data, templateElement.data || {}); | ||
} | ||
ReactDOM.render(actTemplate(actData), ele); | ||
detach(ele); | ||
@@ -19,0 +25,0 @@ return ele.children; |
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
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
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
122376
969