@syncfusion/ej2-react-base
Advanced tools
Comparing version 20.2.45 to 20.2.50
@@ -5,2 +5,8 @@ # Changelog | ||
### Common | ||
#### Bug Fixes | ||
- `#I398870` , `#I405154`, `#I406330` - The issue with the "React components are not mounting while using `useEffect` react hooks in the strict mode" has been resolved. | ||
## 20.2.36 (2022-06-30) | ||
@@ -7,0 +13,0 @@ |
@@ -1,11 +0,2 @@ | ||
/*! | ||
* filename: ej2-react-base.umd.min.js | ||
* version : 20.2.45 | ||
* Copyright Syncfusion Inc. 2001 - 2020. 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(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 s(e,s){return"string"==typeof e?f(e,s):function(s,o,n,a){var p=e,l=s;"object"==typeof p&&(p=e.template,l=i.extend({},s,e.data||{}));var h;h=a||document.createElement("div");var c=t.createElement(p,l),u=r.createPortal(c,h);if(u.propName=n,o.portals?o.portals.push(u):o.portals=[u],!a)return[h]}}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)}}(),n=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],a=["accordion","tab","splitter"],p=new RegExp("]"),l=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t.mountingState=!1,t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.initRenderCalled=!1,t.isReactForeceUpdate=!1,t.isReact=!0,t.isshouldComponentUpdateCalled=!1,t.isCreated=!1,t}return o(s,e),s.prototype.componentDidMount=function(){this.refreshChild(!0),this.canDelayUpdate=-1!==a.indexOf(this.getModuleName()),this.renderReactComponent(),this.portals&&this.portals.length&&(this.mountingState=!0,this.renderReactTemplates(),this.mountingState=!1)},s.prototype.componentDidUpdate=function(e){this.isshouldComponentUpdateCalled||!this.initRenderCalled||this.isReactForeceUpdate||(this.isshouldComponentUpdateCalled=!0,e!==this.props&&this.refreshProperties(this.props,!0))},s.prototype.renderReactComponent=function(){var e=this.reactElement;e&&!this.isAppendCalled&&(this.isAppendCalled=!0,this.appendTo(e))},s.prototype.shouldComponentUpdate=function(e){return this.isshouldComponentUpdateCalled=!0,this.initRenderCalled?(this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(this.reactElement)),this.updateProperties(e),!0):(this.updateProperties(e,!0),!0)},s.prototype.updateProperties=function(e,t){for(var r=this,s=i.extend({},e),o=0,n=Object.keys(e);o<n.length;o++){var a=n[o],p="className"===a;if("children"!==a)if(p||i.isNullOrUndefined(this.htmlattributes[a])||this.htmlattributes[a]===s[a]||(this.htmlattributes[a]=s[a]),this.compareValues(this.props[a],e[a]))delete s[a];else if(-1!==this.attrKeys.indexOf(a))if(p){this.clsName=!0;for(var l=this.props[a].split(" "),h=0;h<l.length;h++)this.element.classList.remove(l[h]);for(var c=s[a].split(" "),u=0;u<c.length;u++)this.element.classList.add(c[u])}else"disabled"!==a&&delete s[a];else"value"===a&&e[a]===this[a]?delete s[a]:"valueTemplate"!==a&&"itemTemplate"!==a&&"headerTemplate"!==a||e[a].toString()!==this[a].toString()?"content"===a&&"function"==typeof s[a]&&delete s[a]:delete s[a]}s.children&&delete s.children,this.initRenderCalled&&(this.canDelayUpdate||this.props.delayUpdate)?setTimeout(function(){r.refreshProperties(s,e,t)}):this.refreshProperties(s,e,t)},s.prototype.refreshProperties=function(e,t,r){Object.keys(e).length&&(r||this.processComplexTemplate(e,this),this.setProperties(e,r)),this.refreshChild(r,t)},s.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var s in r){var o=r[s];e[s]&&i.setValue(o,i.getValue(s,e),e)}},s.prototype.getDefaultAttributes=function(){var e=this;this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes||(this.htmlattributes={}),this.attrKeys=n.concat(this.controlAttributes||[]);for(var r=0,i=t;r<i.length;r++){var o=i[r];-1===o.indexOf("data-")&&-1===o.indexOf("aria-")&&-1===this.attrKeys.indexOf(o)||this.htmlattributes[o]!==this.props[o]&&(this.htmlattributes[o]=this.props[o])}if(!this.htmlattributes.ref){this.htmlattributes.ref=function(t){e.reactElement=t};-1!==["autocomplete","combobox","dropdownlist","dropdowntree","multiselect","listbox","colorpicker","numerictextbox","textbox","uploader","maskedtextbox","slider","datepicker","datetimepicker","daterangepicker","timepicker","checkbox","switch","radio"].indexOf(this.getModuleName())&&(this.htmlattributes.key=""+s.reactUid,s.reactUid++)}if(this.clsName){for(var a=this.element.classList,p=this.htmlattributes.className,l=0;l<a.length;l++)-1==p.indexOf(a[l])&&(this.htmlattributes.className=this.htmlattributes.className+" "+a[l]);this.clsName=!1}return this.htmlattributes},s.prototype.trigger=function(e,t,r){var s=this;if(!0!==this.isDestroyed&&this.modelObserver){if(p.test(e)){var o=i.getValue(e,this);o?(o.call(this,t),r&&r.call(this,t)):r&&r.call(this,t)}"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 n=this.isProtectedOnChange;this.isProtectedOnChange=!1,"created"===e?setTimeout(function(){s.isCreated=!0,s.isDestroyed||s.modelObserver.notify(e,t,r)}):this.modelObserver.notify(e,t,r),this.isProtectedOnChange=n}},s.prototype.compareValues=function(e,t){if(typeof e===typeof t){if(e===t)return!0;if((!i.isNullOrUndefined(e)&&e.constructor)!==(!i.isNullOrUndefined(t)&&t.constructor))return!1;if(e instanceof Date||e instanceof RegExp||e instanceof String||e instanceof Number)return e.toString()===t.toString();if(i.isObject(e)||Array.isArray(e)){var r=e,s=t;return i.isObject(r)&&(r=[e],s=[t]),this.compareObjects(r,s).status}}return!1},s.prototype.compareObjects=function(e,t,r){var i=!0,s=[];if(e.length===t.length)for(var o=0,n=t.length;o<n;o++){var a={},p=e[o],l=t[o],h=Object.keys(l);if(0!==h.length)for(var c=0,u=h;c<u.length;c++){var d=u[c],f=p[d],m=l[d];if("items"===d)for(var y=0;y<m.length;y++)if("richtexteditor"===this.getModuleName()&&"object"==typeof m[y])return{status:!0};if("grid"===this.getModuleName()&&"field"===d&&(a[d]=m),!p.hasOwnProperty(d)||!this.compareValues(f,m)){if(!r)return{status:!1};i=!1,a[d]=m}}else if(l[o]===p[o])i=!0;else{if(!r)return{status:!1};i=!1}Object.keys(a).length&&s.push({index:o,value:a,key:r})}else i=!1;return{status:i,changedProperties:s}},s.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],s=0,o=this.getInjectedServices()||[];s<o.length;s++){var n=o[s];-1===r.indexOf(n)&&r.push(n)}this.injectedModules=r}if(this.directivekeys){var a=[],p=this.validateChildren({},this.directivekeys,t||this.props);if(p&&Object.keys(p).length){if(!e&&this.skipRefresh)for(var l=0,h=this.skipRefresh;l<h.length;l++){delete p[h[l]]}if(this.prevProperties)for(var c=Object.keys(this.prevProperties),u=0;u<c.length;u++){var d=c[u];if(p.hasOwnProperty(d)){var f=this.compareObjects(this.prevProperties[d],p[d],d);if(f.status)delete p[d];else{f.changedProperties.length&&(a=a.concat(f.changedProperties));var m={};m[d]=p[d],this.prevProperties=i.extend(this.prevProperties,m)}}}else this.prevProperties=i.extend({},p,{},!0);if(a.length)if("grid"===this.getModuleName()&&"columns"===d)for(var y=0,v=this.columns;y<v.length;y++){if(i.getValue("field",v[y])===i.getValue(y+".value.field",a)){var g=i.getValue(a[y].key+"."+a[y].index,this);g&&g.setProperties?g.setProperties(a[y].value):i.extend(g,a[y].value)}else this.setProperties(p,e)}else for(var b=0,C=a;b<C.length;b++){var O=C[b],x=i.getValue(O.key+"."+O.index,this);x&&x.setProperties?x.setProperties(O.value):i.extend(x,O.value)}else this.setProperties(p,e)}}},s.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut);this.initRenderCalled&&this.isAppendCalled&&this.element&&(["dropdowntree","checkbox"].indexOf(this.getModuleName())||document.body.contains(this.element))&&!this.isDestroyed&&this.isCreated&&this.destroy()},s.prototype.appendReactElement=function(e,t){var i=r.createPortal(e,t);this.portals?this.portals.push(i):this.portals=[i]},s.prototype.renderReactTemplates=function(e){this.isReactForeceUpdate=!0,e?this.forceUpdate(e):this.forceUpdate(),this.isReactForeceUpdate=!1},s.prototype.clearTemplate=function(e,t,r){var i=this,s=[];e&&e.length?Array.prototype.forEach.call(e,function(e){var r=0,o=0;if(i.portals.forEach(function(t){t.propName===e&&(s.push(o),o++)}),t&&i.portals[s[t[r]]].propName==e)i.portals.splice(t,1),r++;else for(var n=0;n<i.portals.length;n++)i.portals[n].propName==e&&(i.portals.splice(n,1),n--)}):this.portals=[],this.renderReactTemplates(r)},s.prototype.validateChildren=function(e,r,i){for(var s=!1,o=0,n=t.Children.toArray(i.children);o<n.length;o++){var a=n[o],p=this.getChildType(a),l=r[p];if(p&&r){var h=this.getChildProps(t.Children.toArray(a.props.children),l);h.length&&(s=!0,e[a.type.propertyName||p]=h)}}return s?e:null},s.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},s.prototype.getChildProps=function(e,t){for(var r=[],s=0,o=e;s<o.length;s++){var n=o[s],a=!1,p=void 0;"string"==typeof t?(a=!0,p=t):p=Object.keys(t)[0];var l=n.props;if(this.getChildType(n)===p)if(a||!l.children){var h=i.extend({},l,{},!0);this.processComplexTemplate(h,n.type),r.push(h)}else{var c=this.validateChildren(i.extend({},l),t[p],l)||l;c.children&&delete c.children,this.processComplexTemplate(c,n.type),r.push(c)}}return r},s.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[]},s.reactUid=1,s}(t.Component),h=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)}}(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return null},t.isDirective=!0,t}(t.PureComponent),u=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)}}(),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),f=i.getTemplateEngine();i.setTemplateEngine({compile:s}),e.ComponentBase=l,e.applyMixins=function(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){"isMounted"!==r&&"replaceState"!==r&&(e.prototype[r]=t.prototype[r])})})},e.ComplexBase=c,e.Inject=d,e.compile=s,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 s(e,s){return"string"==typeof e?f(e,s):function(s,o,n,a){var p=e,l=s;"object"==typeof p&&(p=e.template,l=i.extend({},s,e.data||{}));var h;h=a||document.createElement("div");var c=t.createElement(p,l),u=r.createPortal(c,h);if(u.propName=n,o.portals?o.portals.push(u):o.portals=[u],!a)return[h]}}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)}}(),n=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],a=["accordion","tab","splitter"],p=new RegExp("]"),l=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t.mountingState=!1,t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.initRenderCalled=!1,t.isReactForeceUpdate=!1,t.isReact=!0,t.isshouldComponentUpdateCalled=!1,t.isCreated=!1,t}return o(s,e),s.prototype.componentDidMount=function(){this.refreshChild(!0),this.canDelayUpdate=-1!==a.indexOf(this.getModuleName()),this.renderReactComponent(),this.portals&&this.portals.length&&(this.mountingState=!0,this.renderReactTemplates(),this.mountingState=!1)},s.prototype.componentDidUpdate=function(e){this.isshouldComponentUpdateCalled||!this.initRenderCalled||this.isReactForeceUpdate||(this.isshouldComponentUpdateCalled=!0,e!==this.props&&this.refreshProperties(this.props,!0))},s.prototype.renderReactComponent=function(){var e=this.reactElement;e&&!this.isAppendCalled&&(this.isAppendCalled=!0,this.appendTo(e))},s.prototype.shouldComponentUpdate=function(e){return this.isshouldComponentUpdateCalled=!0,this.initRenderCalled?(this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(this.reactElement)),this.updateProperties(e),!0):(this.updateProperties(e,!0),!0)},s.prototype.updateProperties=function(e,t){for(var r=this,s=i.extend({},e),o=0,n=Object.keys(e);o<n.length;o++){var a=n[o],p="className"===a;if("children"!==a)if(p||i.isNullOrUndefined(this.htmlattributes[a])||this.htmlattributes[a]===s[a]||(this.htmlattributes[a]=s[a]),this.compareValues(this.props[a],e[a]))delete s[a];else if(-1!==this.attrKeys.indexOf(a))if(p){this.clsName=!0;for(var l=this.props[a].split(" "),h=0;h<l.length;h++)this.element.classList.remove(l[h]);for(var c=s[a].split(" "),u=0;u<c.length;u++)this.element.classList.add(c[u])}else"disabled"!==a&&delete s[a];else"value"===a&&e[a]===this[a]?delete s[a]:"valueTemplate"!==a&&"itemTemplate"!==a&&"headerTemplate"!==a||e[a].toString()!==this[a].toString()?"content"===a&&"function"==typeof s[a]&&delete s[a]:delete s[a]}s.children&&delete s.children,this.initRenderCalled&&(this.canDelayUpdate||this.props.delayUpdate)?setTimeout(function(){r.refreshProperties(s,e,t)}):this.refreshProperties(s,e,t)},s.prototype.refreshProperties=function(e,t,r){Object.keys(e).length&&(r||this.processComplexTemplate(e,this),this.setProperties(e,r)),this.refreshChild(r,t)},s.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var s in r){var o=r[s];e[s]&&i.setValue(o,i.getValue(s,e),e)}},s.prototype.getDefaultAttributes=function(){var e=this;this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes||(this.htmlattributes={}),this.attrKeys=n.concat(this.controlAttributes||[]);for(var r=0,i=t;r<i.length;r++){var o=i[r];-1===o.indexOf("data-")&&-1===o.indexOf("aria-")&&-1===this.attrKeys.indexOf(o)||this.htmlattributes[o]!==this.props[o]&&(this.htmlattributes[o]=this.props[o])}if(!this.htmlattributes.ref){this.htmlattributes.ref=function(t){e.reactElement=t};-1!==["autocomplete","combobox","dropdownlist","dropdowntree","multiselect","listbox","colorpicker","numerictextbox","textbox","uploader","maskedtextbox","slider","datepicker","datetimepicker","daterangepicker","timepicker","checkbox","switch","radio"].indexOf(this.getModuleName())&&(this.htmlattributes.key=""+s.reactUid,s.reactUid++)}if(this.clsName){for(var a=this.element.classList,p=this.htmlattributes.className,l=0;l<a.length;l++)-1==p.indexOf(a[l])&&(this.htmlattributes.className=this.htmlattributes.className+" "+a[l]);this.clsName=!1}return this.htmlattributes},s.prototype.trigger=function(e,t,r){var s=this;if(!0!==this.isDestroyed&&this.modelObserver){if(p.test(e)){var o=i.getValue(e,this);o?(o.call(this,t),r&&r.call(this,t)):r&&r.call(this,t)}"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 n=this.isProtectedOnChange;this.isProtectedOnChange=!1,"created"===e?setTimeout(function(){s.isCreated=!0,s.isDestroyed||s.modelObserver.notify(e,t,r)},10):this.modelObserver.notify(e,t,r),this.isProtectedOnChange=n}},s.prototype.compareValues=function(e,t){if(typeof e===typeof t){if(e===t)return!0;if((!i.isNullOrUndefined(e)&&e.constructor)!==(!i.isNullOrUndefined(t)&&t.constructor))return!1;if(e instanceof Date||e instanceof RegExp||e instanceof String||e instanceof Number)return e.toString()===t.toString();if(i.isObject(e)||Array.isArray(e)){var r=e,s=t;return i.isObject(r)&&(r=[e],s=[t]),this.compareObjects(r,s).status}}return!1},s.prototype.compareObjects=function(e,t,r){var i=!0,s=[];if(e.length===t.length)for(var o=0,n=t.length;o<n;o++){var a={},p=e[o],l=t[o],h=Object.keys(l);if(0!==h.length)for(var c=0,u=h;c<u.length;c++){var d=u[c],f=p[d],m=l[d];if("items"===d)for(var y=0;y<m.length;y++)if("richtexteditor"===this.getModuleName()&&"object"==typeof m[y])return{status:!0};if("grid"===this.getModuleName()&&"field"===d&&(a[d]=m),!p.hasOwnProperty(d)||!this.compareValues(f,m)){if(!r)return{status:!1};i=!1,a[d]=m}}else if(l[o]===p[o])i=!0;else{if(!r)return{status:!1};i=!1}Object.keys(a).length&&s.push({index:o,value:a,key:r})}else i=!1;return{status:i,changedProperties:s}},s.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],s=0,o=this.getInjectedServices()||[];s<o.length;s++){var n=o[s];-1===r.indexOf(n)&&r.push(n)}this.injectedModules=r}if(this.directivekeys){var a=[],p=this.validateChildren({},this.directivekeys,t||this.props);if(p&&Object.keys(p).length){if(!e&&this.skipRefresh)for(var l=0,h=this.skipRefresh;l<h.length;l++){delete p[h[l]]}if(this.prevProperties)for(var c=Object.keys(this.prevProperties),u=0;u<c.length;u++){var d=c[u];if(p.hasOwnProperty(d)){var f=this.compareObjects(this.prevProperties[d],p[d],d);if(f.status)delete p[d];else{f.changedProperties.length&&(a=a.concat(f.changedProperties));var m={};m[d]=p[d],this.prevProperties=i.extend(this.prevProperties,m)}}}else this.prevProperties=i.extend({},p,{},!0);if(a.length)if("grid"===this.getModuleName()&&"columns"===d)for(var y=0,v=this.columns;y<v.length;y++){if(i.getValue("field",v[y])===i.getValue(y+".value.field",a)){var g=i.getValue(a[y].key+"."+a[y].index,this);g&&g.setProperties?g.setProperties(a[y].value):i.extend(g,a[y].value)}else this.setProperties(p,e)}else for(var b=0,C=a;b<C.length;b++){var O=C[b],x=i.getValue(O.key+"."+O.index,this);x&&x.setProperties?x.setProperties(O.value):i.extend(x,O.value)}else this.setProperties(p,e)}}},s.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut);this.initRenderCalled&&this.isAppendCalled&&this.element&&(["dropdowntree","checkbox"].indexOf(this.getModuleName())||document.body.contains(this.element))&&!this.isDestroyed&&this.isCreated&&this.destroy()},s.prototype.appendReactElement=function(e,t){var i=r.createPortal(e,t);this.portals?this.portals.push(i):this.portals=[i]},s.prototype.renderReactTemplates=function(e){this.isReactForeceUpdate=!0,e?this.forceUpdate(e):this.forceUpdate(),this.isReactForeceUpdate=!1},s.prototype.clearTemplate=function(e,t,r){var i=this,s=[];e&&e.length?Array.prototype.forEach.call(e,function(e){var r=0,o=0;if(i.portals.forEach(function(t){t.propName===e&&(s.push(o),o++)}),t&&i.portals[s[t[r]]].propName==e)i.portals.splice(t,1),r++;else for(var n=0;n<i.portals.length;n++)i.portals[n].propName==e&&(i.portals.splice(n,1),n--)}):this.portals=[],this.renderReactTemplates(r)},s.prototype.validateChildren=function(e,r,i){for(var s=!1,o=0,n=t.Children.toArray(i.children);o<n.length;o++){var a=n[o],p=this.getChildType(a),l=r[p];if(p&&r){var h=this.getChildProps(t.Children.toArray(a.props.children),l);h.length&&(s=!0,e[a.type.propertyName||p]=h)}}return s?e:null},s.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},s.prototype.getChildProps=function(e,t){for(var r=[],s=0,o=e;s<o.length;s++){var n=o[s],a=!1,p=void 0;"string"==typeof t?(a=!0,p=t):p=Object.keys(t)[0];var l=n.props;if(this.getChildType(n)===p)if(a||!l.children){var h=i.extend({},l,{},!0);this.processComplexTemplate(h,n.type),r.push(h)}else{var c=this.validateChildren(i.extend({},l),t[p],l)||l;c.children&&delete c.children,this.processComplexTemplate(c,n.type),r.push(c)}}return r},s.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[]},s.reactUid=1,s}(t.Component),h=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)}}(),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return h(t,e),t.prototype.render=function(){return null},t.isDirective=!0,t}(t.PureComponent),u=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)}}(),d=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return u(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),f=i.getTemplateEngine();i.setTemplateEngine({compile:s}),e.ComponentBase=l,e.applyMixins=function(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){"isMounted"!==r&&"replaceState"!==r&&(e.prototype[r]=t.prototype[r])})})},e.ComplexBase=c,e.Inject=d,e.compile=s,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=ej2-react-base.umd.min.js.map |
@@ -228,3 +228,3 @@ import { Children, Component, PureComponent, createElement } from 'react'; | ||
} | ||
}); | ||
}, 10); | ||
} | ||
@@ -231,0 +231,0 @@ else { |
@@ -248,3 +248,3 @@ import { Children, Component, PureComponent, createElement } from 'react'; | ||
} | ||
}); | ||
}, 10); | ||
} | ||
@@ -251,0 +251,0 @@ else { |
@@ -1,11 +0,2 @@ | ||
/*! | ||
* filename: ej2-react-base.min.js | ||
* version : 20.2.45 | ||
* Copyright Syncfusion Inc. 2001 - 2020. 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(e,t,r,i){"use strict";function s(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){"isMounted"!==r&&"replaceState"!==r&&(e.prototype[r]=t.prototype[r])})})}function o(e,s){return"string"==typeof e?m(e,s):function(s,o,n,a){var p=e,l=s;"object"==typeof p&&(p=e.template,l=i.extend({},s,e.data||{}));var h;h=a||document.createElement("div");var c=t.createElement(p,l),u=r.createPortal(c,h);if(u.propName=n,o.portals?o.portals.push(u):o.portals=[u],!a)return[h]}}var n=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)}}(),a=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],p=["accordion","tab","splitter"],l=new RegExp("]"),h=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t.mountingState=!1,t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.initRenderCalled=!1,t.isReactForeceUpdate=!1,t.isReact=!0,t.isshouldComponentUpdateCalled=!1,t.isCreated=!1,t}return n(s,e),s.prototype.componentDidMount=function(){this.refreshChild(!0),this.canDelayUpdate=-1!==p.indexOf(this.getModuleName()),this.renderReactComponent(),this.portals&&this.portals.length&&(this.mountingState=!0,this.renderReactTemplates(),this.mountingState=!1)},s.prototype.componentDidUpdate=function(e){this.isshouldComponentUpdateCalled||!this.initRenderCalled||this.isReactForeceUpdate||(this.isshouldComponentUpdateCalled=!0,e!==this.props&&this.refreshProperties(this.props,!0))},s.prototype.renderReactComponent=function(){var e=this.reactElement;e&&!this.isAppendCalled&&(this.isAppendCalled=!0,this.appendTo(e))},s.prototype.shouldComponentUpdate=function(e){return this.isshouldComponentUpdateCalled=!0,this.initRenderCalled?(this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(this.reactElement)),this.updateProperties(e),!0):(this.updateProperties(e,!0),!0)},s.prototype.updateProperties=function(e,t){for(var r=this,s=i.extend({},e),o=0,n=Object.keys(e);o<n.length;o++){var a=n[o],p="className"===a;if("children"!==a)if(p||i.isNullOrUndefined(this.htmlattributes[a])||this.htmlattributes[a]===s[a]||(this.htmlattributes[a]=s[a]),this.compareValues(this.props[a],e[a]))delete s[a];else if(-1!==this.attrKeys.indexOf(a))if(p){this.clsName=!0;for(var l=this.props[a].split(" "),h=0;h<l.length;h++)this.element.classList.remove(l[h]);for(var c=s[a].split(" "),u=0;u<c.length;u++)this.element.classList.add(c[u])}else"disabled"!==a&&delete s[a];else"value"===a&&e[a]===this[a]?delete s[a]:"valueTemplate"!==a&&"itemTemplate"!==a&&"headerTemplate"!==a||e[a].toString()!==this[a].toString()?"content"===a&&"function"==typeof s[a]&&delete s[a]:delete s[a]}s.children&&delete s.children,this.initRenderCalled&&(this.canDelayUpdate||this.props.delayUpdate)?setTimeout(function(){r.refreshProperties(s,e,t)}):this.refreshProperties(s,e,t)},s.prototype.refreshProperties=function(e,t,r){Object.keys(e).length&&(r||this.processComplexTemplate(e,this),this.setProperties(e,r)),this.refreshChild(r,t)},s.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var s in r){var o=r[s];e[s]&&i.setValue(o,i.getValue(s,e),e)}},s.prototype.getDefaultAttributes=function(){var e=this;this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes||(this.htmlattributes={}),this.attrKeys=a.concat(this.controlAttributes||[]);for(var r=0,i=t;r<i.length;r++){var o=i[r];-1===o.indexOf("data-")&&-1===o.indexOf("aria-")&&-1===this.attrKeys.indexOf(o)||this.htmlattributes[o]!==this.props[o]&&(this.htmlattributes[o]=this.props[o])}if(this.htmlattributes.ref||(this.htmlattributes.ref=function(t){e.reactElement=t},-1!==["autocomplete","combobox","dropdownlist","dropdowntree","multiselect","listbox","colorpicker","numerictextbox","textbox","uploader","maskedtextbox","slider","datepicker","datetimepicker","daterangepicker","timepicker","checkbox","switch","radio"].indexOf(this.getModuleName())&&(this.htmlattributes.key=""+s.reactUid,s.reactUid++)),this.clsName){for(var n=this.element.classList,p=this.htmlattributes.className,l=0;l<n.length;l++)-1==p.indexOf(n[l])&&(this.htmlattributes.className=this.htmlattributes.className+" "+n[l]);this.clsName=!1}return this.htmlattributes},s.prototype.trigger=function(e,t,r){var s=this;if(!0!==this.isDestroyed&&this.modelObserver){if(l.test(e)){var o=i.getValue(e,this);o?(o.call(this,t),r&&r.call(this,t)):r&&r.call(this,t)}"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 n=this.isProtectedOnChange;this.isProtectedOnChange=!1,"created"===e?setTimeout(function(){s.isCreated=!0,s.isDestroyed||s.modelObserver.notify(e,t,r)}):this.modelObserver.notify(e,t,r),this.isProtectedOnChange=n}},s.prototype.compareValues=function(e,t){if(typeof e===typeof t){if(e===t)return!0;if((!i.isNullOrUndefined(e)&&e.constructor)!==(!i.isNullOrUndefined(t)&&t.constructor))return!1;if(e instanceof Date||e instanceof RegExp||e instanceof String||e instanceof Number)return e.toString()===t.toString();if(i.isObject(e)||Array.isArray(e)){var r=e,s=t;return i.isObject(r)&&(r=[e],s=[t]),this.compareObjects(r,s).status}}return!1},s.prototype.compareObjects=function(e,t,r){var i=!0,s=[];if(e.length===t.length)for(var o=0,n=t.length;o<n;o++){var a={},p=e[o],l=t[o],h=Object.keys(l);if(0!==h.length)for(var c=0,u=h;c<u.length;c++){var d=u[c],f=p[d],m=l[d];if("items"===d)for(var y=0;y<m.length;y++)if("richtexteditor"===this.getModuleName()&&"object"==typeof m[y])return{status:!0};if("grid"===this.getModuleName()&&"field"===d&&(a[d]=m),!p.hasOwnProperty(d)||!this.compareValues(f,m)){if(!r)return{status:!1};i=!1,a[d]=m}}else if(l[o]===p[o])i=!0;else{if(!r)return{status:!1};i=!1}Object.keys(a).length&&s.push({index:o,value:a,key:r})}else i=!1;return{status:i,changedProperties:s}},s.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],s=0,o=this.getInjectedServices()||[];s<o.length;s++){var n=o[s];-1===r.indexOf(n)&&r.push(n)}this.injectedModules=r}if(this.directivekeys){var a=[],p=this.validateChildren({},this.directivekeys,t||this.props);if(p&&Object.keys(p).length){if(!e&&this.skipRefresh)for(var l=0,h=this.skipRefresh;l<h.length;l++)delete p[h[l]];if(this.prevProperties)for(var c=Object.keys(this.prevProperties),u=0;u<c.length;u++){var d=c[u];if(p.hasOwnProperty(d)){var f=this.compareObjects(this.prevProperties[d],p[d],d);if(f.status)delete p[d];else{f.changedProperties.length&&(a=a.concat(f.changedProperties));var m={};m[d]=p[d],this.prevProperties=i.extend(this.prevProperties,m)}}}else this.prevProperties=i.extend({},p,{},!0);if(a.length)if("grid"===this.getModuleName()&&"columns"===d)for(var y=0,v=this.columns;y<v.length;y++)if(i.getValue("field",v[y])===i.getValue(y+".value.field",a)){var g=i.getValue(a[y].key+"."+a[y].index,this);g&&g.setProperties?g.setProperties(a[y].value):i.extend(g,a[y].value)}else this.setProperties(p,e);else for(var b=0,C=a;b<C.length;b++){var O=C[b],x=i.getValue(O.key+"."+O.index,this);x&&x.setProperties?x.setProperties(O.value):i.extend(x,O.value)}else this.setProperties(p,e)}}},s.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut);var e=["dropdowntree","checkbox"];this.initRenderCalled&&this.isAppendCalled&&this.element&&(e.indexOf(this.getModuleName())||document.body.contains(this.element))&&!this.isDestroyed&&this.isCreated&&this.destroy()},s.prototype.appendReactElement=function(e,t){var i=r.createPortal(e,t);this.portals?this.portals.push(i):this.portals=[i]},s.prototype.renderReactTemplates=function(e){this.isReactForeceUpdate=!0,e?this.forceUpdate(e):this.forceUpdate(),this.isReactForeceUpdate=!1},s.prototype.clearTemplate=function(e,t,r){var i=this,s=[];e&&e.length?Array.prototype.forEach.call(e,function(e){var r=0,o=0;if(i.portals.forEach(function(t){t.propName===e&&(s.push(o),o++)}),t&&i.portals[s[t[r]]].propName==e)i.portals.splice(t,1),r++;else for(var n=0;n<i.portals.length;n++)i.portals[n].propName==e&&(i.portals.splice(n,1),n--)}):this.portals=[],this.renderReactTemplates(r)},s.prototype.validateChildren=function(e,r,i){for(var s=!1,o=0,n=t.Children.toArray(i.children);o<n.length;o++){var a=n[o],p=this.getChildType(a),l=r[p];if(p&&r){var h=this.getChildProps(t.Children.toArray(a.props.children),l);h.length&&(s=!0,e[a.type.propertyName||p]=h)}}return s?e:null},s.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},s.prototype.getChildProps=function(e,t){for(var r=[],s=0,o=e;s<o.length;s++){var n=o[s],a=!1,p=void 0;"string"==typeof t?(a=!0,p=t):p=Object.keys(t)[0];var l=n.props;if(this.getChildType(n)===p)if(a||!l.children){var h=i.extend({},l,{},!0);this.processComplexTemplate(h,n.type),r.push(h)}else{var c=this.validateChildren(i.extend({},l),t[p],l)||l;c.children&&delete c.children,this.processComplexTemplate(c,n.type),r.push(c)}}return r},s.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[]},s.reactUid=1,s}(t.Component),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)}}(),u=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),d=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)}}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),m=i.getTemplateEngine();return i.setTemplateEngine({compile:o}),e.ComponentBase=h,e.applyMixins=s,e.ComplexBase=u,e.Inject=f,e.compile=o,e}({},React,ReactDOM,ej.base),this.ejs=ej; | ||
this.ej=this.ej||{},this.ej.reactbase=function(e,t,r,i){"use strict";function s(e,t){t.forEach(function(t){Object.getOwnPropertyNames(t.prototype).forEach(function(r){"isMounted"!==r&&"replaceState"!==r&&(e.prototype[r]=t.prototype[r])})})}function o(e,s){return"string"==typeof e?m(e,s):function(s,o,n,a){var p=e,l=s;"object"==typeof p&&(p=e.template,l=i.extend({},s,e.data||{}));var h;h=a||document.createElement("div");var c=t.createElement(p,l),u=r.createPortal(c,h);if(u.propName=n,o.portals?o.portals.push(u):o.portals=[u],!a)return[h]}}var n=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)}}(),a=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","name","onClick","onFocus","onBlur"],p=["accordion","tab","splitter"],l=new RegExp("]"),h=function(e){function s(){var t=null!==e&&e.apply(this,arguments)||this;return t.mountingState=!1,t.attrKeys=[],t.cachedTimeOut=0,t.isAppendCalled=!1,t.initRenderCalled=!1,t.isReactForeceUpdate=!1,t.isReact=!0,t.isshouldComponentUpdateCalled=!1,t.isCreated=!1,t}return n(s,e),s.prototype.componentDidMount=function(){this.refreshChild(!0),this.canDelayUpdate=-1!==p.indexOf(this.getModuleName()),this.renderReactComponent(),this.portals&&this.portals.length&&(this.mountingState=!0,this.renderReactTemplates(),this.mountingState=!1)},s.prototype.componentDidUpdate=function(e){this.isshouldComponentUpdateCalled||!this.initRenderCalled||this.isReactForeceUpdate||(this.isshouldComponentUpdateCalled=!0,e!==this.props&&this.refreshProperties(this.props,!0))},s.prototype.renderReactComponent=function(){var e=this.reactElement;e&&!this.isAppendCalled&&(this.isAppendCalled=!0,this.appendTo(e))},s.prototype.shouldComponentUpdate=function(e){return this.isshouldComponentUpdateCalled=!0,this.initRenderCalled?(this.isAppendCalled||(clearTimeout(this.cachedTimeOut),this.isAppendCalled=!0,this.appendTo(this.reactElement)),this.updateProperties(e),!0):(this.updateProperties(e,!0),!0)},s.prototype.updateProperties=function(e,t){for(var r=this,s=i.extend({},e),o=0,n=Object.keys(e);o<n.length;o++){var a=n[o],p="className"===a;if("children"!==a)if(p||i.isNullOrUndefined(this.htmlattributes[a])||this.htmlattributes[a]===s[a]||(this.htmlattributes[a]=s[a]),this.compareValues(this.props[a],e[a]))delete s[a];else if(-1!==this.attrKeys.indexOf(a))if(p){this.clsName=!0;for(var l=this.props[a].split(" "),h=0;h<l.length;h++)this.element.classList.remove(l[h]);for(var c=s[a].split(" "),u=0;u<c.length;u++)this.element.classList.add(c[u])}else"disabled"!==a&&delete s[a];else"value"===a&&e[a]===this[a]?delete s[a]:"valueTemplate"!==a&&"itemTemplate"!==a&&"headerTemplate"!==a||e[a].toString()!==this[a].toString()?"content"===a&&"function"==typeof s[a]&&delete s[a]:delete s[a]}s.children&&delete s.children,this.initRenderCalled&&(this.canDelayUpdate||this.props.delayUpdate)?setTimeout(function(){r.refreshProperties(s,e,t)}):this.refreshProperties(s,e,t)},s.prototype.refreshProperties=function(e,t,r){Object.keys(e).length&&(r||this.processComplexTemplate(e,this),this.setProperties(e,r)),this.refreshChild(r,t)},s.prototype.processComplexTemplate=function(e,t){var r=t.complexTemplate;if(r)for(var s in r){var o=r[s];e[s]&&i.setValue(o,i.getValue(s,e),e)}},s.prototype.getDefaultAttributes=function(){var e=this;this.isReact=!0;var t=Object.keys(this.props);this.htmlattributes||(this.htmlattributes={}),this.attrKeys=a.concat(this.controlAttributes||[]);for(var r=0,i=t;r<i.length;r++){var o=i[r];-1===o.indexOf("data-")&&-1===o.indexOf("aria-")&&-1===this.attrKeys.indexOf(o)||this.htmlattributes[o]!==this.props[o]&&(this.htmlattributes[o]=this.props[o])}if(this.htmlattributes.ref||(this.htmlattributes.ref=function(t){e.reactElement=t},-1!==["autocomplete","combobox","dropdownlist","dropdowntree","multiselect","listbox","colorpicker","numerictextbox","textbox","uploader","maskedtextbox","slider","datepicker","datetimepicker","daterangepicker","timepicker","checkbox","switch","radio"].indexOf(this.getModuleName())&&(this.htmlattributes.key=""+s.reactUid,s.reactUid++)),this.clsName){for(var n=this.element.classList,p=this.htmlattributes.className,l=0;l<n.length;l++)-1==p.indexOf(n[l])&&(this.htmlattributes.className=this.htmlattributes.className+" "+n[l]);this.clsName=!1}return this.htmlattributes},s.prototype.trigger=function(e,t,r){var s=this;if(!0!==this.isDestroyed&&this.modelObserver){if(l.test(e)){var o=i.getValue(e,this);o?(o.call(this,t),r&&r.call(this,t)):r&&r.call(this,t)}"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 n=this.isProtectedOnChange;this.isProtectedOnChange=!1,"created"===e?setTimeout(function(){s.isCreated=!0,s.isDestroyed||s.modelObserver.notify(e,t,r)},10):this.modelObserver.notify(e,t,r),this.isProtectedOnChange=n}},s.prototype.compareValues=function(e,t){if(typeof e===typeof t){if(e===t)return!0;if((!i.isNullOrUndefined(e)&&e.constructor)!==(!i.isNullOrUndefined(t)&&t.constructor))return!1;if(e instanceof Date||e instanceof RegExp||e instanceof String||e instanceof Number)return e.toString()===t.toString();if(i.isObject(e)||Array.isArray(e)){var r=e,s=t;return i.isObject(r)&&(r=[e],s=[t]),this.compareObjects(r,s).status}}return!1},s.prototype.compareObjects=function(e,t,r){var i=!0,s=[];if(e.length===t.length)for(var o=0,n=t.length;o<n;o++){var a={},p=e[o],l=t[o],h=Object.keys(l);if(0!==h.length)for(var c=0,u=h;c<u.length;c++){var d=u[c],f=p[d],m=l[d];if("items"===d)for(var y=0;y<m.length;y++)if("richtexteditor"===this.getModuleName()&&"object"==typeof m[y])return{status:!0};if("grid"===this.getModuleName()&&"field"===d&&(a[d]=m),!p.hasOwnProperty(d)||!this.compareValues(f,m)){if(!r)return{status:!1};i=!1,a[d]=m}}else if(l[o]===p[o])i=!0;else{if(!r)return{status:!1};i=!1}Object.keys(a).length&&s.push({index:o,value:a,key:r})}else i=!1;return{status:i,changedProperties:s}},s.prototype.refreshChild=function(e,t){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],s=0,o=this.getInjectedServices()||[];s<o.length;s++){var n=o[s];-1===r.indexOf(n)&&r.push(n)}this.injectedModules=r}if(this.directivekeys){var a=[],p=this.validateChildren({},this.directivekeys,t||this.props);if(p&&Object.keys(p).length){if(!e&&this.skipRefresh)for(var l=0,h=this.skipRefresh;l<h.length;l++)delete p[h[l]];if(this.prevProperties)for(var c=Object.keys(this.prevProperties),u=0;u<c.length;u++){var d=c[u];if(p.hasOwnProperty(d)){var f=this.compareObjects(this.prevProperties[d],p[d],d);if(f.status)delete p[d];else{f.changedProperties.length&&(a=a.concat(f.changedProperties));var m={};m[d]=p[d],this.prevProperties=i.extend(this.prevProperties,m)}}}else this.prevProperties=i.extend({},p,{},!0);if(a.length)if("grid"===this.getModuleName()&&"columns"===d)for(var y=0,v=this.columns;y<v.length;y++)if(i.getValue("field",v[y])===i.getValue(y+".value.field",a)){var g=i.getValue(a[y].key+"."+a[y].index,this);g&&g.setProperties?g.setProperties(a[y].value):i.extend(g,a[y].value)}else this.setProperties(p,e);else for(var b=0,C=a;b<C.length;b++){var O=C[b],x=i.getValue(O.key+"."+O.index,this);x&&x.setProperties?x.setProperties(O.value):i.extend(x,O.value)}else this.setProperties(p,e)}}},s.prototype.componentWillUnmount=function(){clearTimeout(this.cachedTimeOut);var e=["dropdowntree","checkbox"];this.initRenderCalled&&this.isAppendCalled&&this.element&&(e.indexOf(this.getModuleName())||document.body.contains(this.element))&&!this.isDestroyed&&this.isCreated&&this.destroy()},s.prototype.appendReactElement=function(e,t){var i=r.createPortal(e,t);this.portals?this.portals.push(i):this.portals=[i]},s.prototype.renderReactTemplates=function(e){this.isReactForeceUpdate=!0,e?this.forceUpdate(e):this.forceUpdate(),this.isReactForeceUpdate=!1},s.prototype.clearTemplate=function(e,t,r){var i=this,s=[];e&&e.length?Array.prototype.forEach.call(e,function(e){var r=0,o=0;if(i.portals.forEach(function(t){t.propName===e&&(s.push(o),o++)}),t&&i.portals[s[t[r]]].propName==e)i.portals.splice(t,1),r++;else for(var n=0;n<i.portals.length;n++)i.portals[n].propName==e&&(i.portals.splice(n,1),n--)}):this.portals=[],this.renderReactTemplates(r)},s.prototype.validateChildren=function(e,r,i){for(var s=!1,o=0,n=t.Children.toArray(i.children);o<n.length;o++){var a=n[o],p=this.getChildType(a),l=r[p];if(p&&r){var h=this.getChildProps(t.Children.toArray(a.props.children),l);h.length&&(s=!0,e[a.type.propertyName||p]=h)}}return s?e:null},s.prototype.getChildType=function(e){return e.type&&e.type.isDirective?e.type.moduleName||"":""},s.prototype.getChildProps=function(e,t){for(var r=[],s=0,o=e;s<o.length;s++){var n=o[s],a=!1,p=void 0;"string"==typeof t?(a=!0,p=t):p=Object.keys(t)[0];var l=n.props;if(this.getChildType(n)===p)if(a||!l.children){var h=i.extend({},l,{},!0);this.processComplexTemplate(h,n.type),r.push(h)}else{var c=this.validateChildren(i.extend({},l),t[p],l)||l;c.children&&delete c.children,this.processComplexTemplate(c,n.type),r.push(c)}}return r},s.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[]},s.reactUid=1,s}(t.Component),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)}}(),u=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),d=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)}}(),f=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return d(t,e),t.prototype.render=function(){return null},t.isService=!0,t}(t.PureComponent),m=i.getTemplateEngine();return i.setTemplateEngine({compile:o}),e.ComponentBase=h,e.applyMixins=s,e.ComplexBase=u,e.Inject=f,e.compile=o,e}({},React,ReactDOM,ej.base),this.ejs=ej; | ||
//# sourceMappingURL=ej2-react-base.min.js.map |
@@ -1,10 +0,1 @@ | ||
/*! | ||
* filename: index.d.ts | ||
* version : 20.2.45 | ||
* Copyright Syncfusion Inc. 2001 - 2020. 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'; | ||
@@ -11,0 +2,0 @@ |
186
package.json
{ | ||
"_from": "@syncfusion/ej2-react-base@*", | ||
"_id": "@syncfusion/ej2-react-base@20.2.36", | ||
"_inBundle": false, | ||
"_integrity": "sha512-o2yG81QbtRa1QYlmIhgxhVZr37yIZFH2muyhEU4BnTUHF39QV7x8/3PHXokJOaf3ZIC1R/86jG2OEGip/Dy3mg==", | ||
"_location": "/@syncfusion/ej2-react-base", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"type": "range", | ||
"registry": true, | ||
"raw": "@syncfusion/ej2-react-base@*", | ||
"name": "@syncfusion/ej2-react-base", | ||
"escapedName": "@syncfusion%2fej2-react-base", | ||
"scope": "@syncfusion", | ||
"rawSpec": "*", | ||
"saveSpec": null, | ||
"fetchSpec": "*" | ||
}, | ||
"_requiredBy": [ | ||
"/", | ||
"/@syncfusion/ej2-react-barcode-generator", | ||
"/@syncfusion/ej2-react-buttons", | ||
"/@syncfusion/ej2-react-calendars", | ||
"/@syncfusion/ej2-react-charts", | ||
"/@syncfusion/ej2-react-circulargauge", | ||
"/@syncfusion/ej2-react-diagrams", | ||
"/@syncfusion/ej2-react-documenteditor", | ||
"/@syncfusion/ej2-react-dropdowns", | ||
"/@syncfusion/ej2-react-filemanager", | ||
"/@syncfusion/ej2-react-gantt", | ||
"/@syncfusion/ej2-react-grids", | ||
"/@syncfusion/ej2-react-heatmap", | ||
"/@syncfusion/ej2-react-inplace-editor", | ||
"/@syncfusion/ej2-react-inputs", | ||
"/@syncfusion/ej2-react-kanban", | ||
"/@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-progressbar", | ||
"/@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" | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-react-base/-/ej2-react-base-20.2.36.tgz", | ||
"_shasum": "5f15ea63766ab14d2f322a19599bb392b92cfba8", | ||
"_spec": "@syncfusion/ej2-react-base@*", | ||
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included", | ||
"author": { | ||
"name": "Syncfusion Inc." | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/syncfusion/ej2-react-ui-components/issues" | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~20.2.45" | ||
}, | ||
"deprecated": false, | ||
"description": "A common package of Essential JS 2 React base, methods and class definitions", | ||
"devDependencies": {}, | ||
"homepage": "https://www.syncfusion.com/react-ui-components", | ||
"keywords": [ | ||
"ej2", | ||
"syncfusion", | ||
"web-components", | ||
"react", | ||
"react-base", | ||
"syncfusion react", | ||
"base", | ||
"library", | ||
"ej2-react-base" | ||
], | ||
"license": "SEE LICENSE IN license", | ||
"main": "./dist/ej2-react-base.umd.min.js", | ||
"module": "./index.js", | ||
"name": "@syncfusion/ej2-react-base", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/syncfusion/ej2-react-ui-components.git" | ||
}, | ||
"typings": "index.d.ts", | ||
"version": "20.2.45", | ||
"sideEffects": true | ||
} | ||
"_from": "@syncfusion/ej2-react-base@*", | ||
"_id": "@syncfusion/ej2-react-base@20.2.36", | ||
"_inBundle": false, | ||
"_integrity": "sha512-o2yG81QbtRa1QYlmIhgxhVZr37yIZFH2muyhEU4BnTUHF39QV7x8/3PHXokJOaf3ZIC1R/86jG2OEGip/Dy3mg==", | ||
"_location": "/@syncfusion/ej2-react-base", | ||
"_phantomChildren": {}, | ||
"_requested": { | ||
"type": "range", | ||
"registry": true, | ||
"raw": "@syncfusion/ej2-react-base@*", | ||
"name": "@syncfusion/ej2-react-base", | ||
"escapedName": "@syncfusion%2fej2-react-base", | ||
"scope": "@syncfusion", | ||
"rawSpec": "*", | ||
"saveSpec": null, | ||
"fetchSpec": "*" | ||
}, | ||
"_requiredBy": [ | ||
"/", | ||
"/@syncfusion/ej2-react-barcode-generator", | ||
"/@syncfusion/ej2-react-buttons", | ||
"/@syncfusion/ej2-react-calendars", | ||
"/@syncfusion/ej2-react-charts", | ||
"/@syncfusion/ej2-react-circulargauge", | ||
"/@syncfusion/ej2-react-diagrams", | ||
"/@syncfusion/ej2-react-documenteditor", | ||
"/@syncfusion/ej2-react-dropdowns", | ||
"/@syncfusion/ej2-react-filemanager", | ||
"/@syncfusion/ej2-react-gantt", | ||
"/@syncfusion/ej2-react-grids", | ||
"/@syncfusion/ej2-react-heatmap", | ||
"/@syncfusion/ej2-react-inplace-editor", | ||
"/@syncfusion/ej2-react-inputs", | ||
"/@syncfusion/ej2-react-kanban", | ||
"/@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-progressbar", | ||
"/@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" | ||
], | ||
"_resolved": "http://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-react-base/-/ej2-react-base-20.2.36.tgz", | ||
"_shasum": "5f15ea63766ab14d2f322a19599bb392b92cfba8", | ||
"_spec": "@syncfusion/ej2-react-base@*", | ||
"_where": "/jenkins/workspace/automation_release_19.1.0.1-ZPMUBNQ6AUYH6YGEFBPVYMEQLRRW2SLD4XCZ6GATNZJFYJ3RIAOA/packages/included", | ||
"author": { | ||
"name": "Syncfusion Inc." | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/syncfusion/ej2-react-ui-components/issues" | ||
}, | ||
"bundleDependencies": false, | ||
"dependencies": { | ||
"@syncfusion/ej2-base": "~20.2.48" | ||
}, | ||
"deprecated": false, | ||
"description": "A common package of Essential JS 2 React base, methods and class definitions", | ||
"devDependencies": {}, | ||
"homepage": "https://www.syncfusion.com/react-ui-components", | ||
"keywords": [ | ||
"ej2", | ||
"syncfusion", | ||
"web-components", | ||
"react", | ||
"react-base", | ||
"syncfusion react", | ||
"base", | ||
"library", | ||
"ej2-react-base" | ||
], | ||
"license": "SEE LICENSE IN license", | ||
"main": "./dist/ej2-react-base.umd.min.js", | ||
"module": "./index.js", | ||
"name": "@syncfusion/ej2-react-base", | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/syncfusion/ej2-react-ui-components.git" | ||
}, | ||
"typings": "index.d.ts", | ||
"version": "20.2.50", | ||
"sideEffects": true | ||
} |
@@ -79,3 +79,3 @@ # ej2-react-base | ||
© Copyright 2022 Syncfusion, Inc. All Rights Reserved. The Syncfusion Essential Studio license and copyright applies to this distribution. | ||
© Copyright 2019 Syncfusion, Inc. All Rights Reserved. | ||
The Syncfusion Essential Studio license and copyright applies to this distribution. |
@@ -252,3 +252,3 @@ var __extends = (this && this.__extends) || (function () { | ||
} | ||
}); | ||
}, 10); | ||
} | ||
@@ -255,0 +255,0 @@ else { |
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
314850
2582