Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@syncfusion/ej2-react-base

Package Overview
Dependencies
Maintainers
2
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 16.1.48 to 16.2.41

16

CHANGELOG.md

@@ -7,14 +7,10 @@ # Changelog

### Bug Fixes
#### New Features
- Fixed the react compatibility issue with redux and state changes triggers multiple callback.
- Provided template support for Essential JS 2 React components.
## 16.1.32 (2018-03-29)
#### Bug Fixes
### Common
- Fixed the element class name not changed on state or property changes.
### New Features
- Provided template support for Essential JS 2 React components.
## 15.4.23-preview (2017-12-27)

@@ -42,4 +38,6 @@

### Bug Fixes
### Common
#### Bug Fixes
- Removed duplicate injected modules on component refresh.

@@ -46,0 +44,0 @@

@@ -1,11 +0,2 @@

/*!
* filename: ej2-react-base.umd.min.js
* version : 16.1.48
* 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?a(t,e):function(e){var n=document.createElement("div");return r.render(t(e),n),n.children}}var i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),p=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","onClick","onFocus","onBlur"],s=function(t){function o(){return null!==t&&t.apply(this,arguments)||this}return i(o,t),o.prototype.componentWillMount=function(){var t=Object.keys(this.props);this.htmlattributes={};for(var e=p.concat(this.controlAttributes||[]),r=0,n=t;r<n.length;r++){var o=n[r];-1===o.indexOf("data-")&&-1===o.indexOf("aria-")&&-1===e.indexOf(o)||(this.htmlattributes[o]=this.props[o])}},o.prototype.componentDidMount=function(){this.refreshChild(!0);var t=r.findDOMNode(this);this.appendTo(t)},o.prototype.componentWillReceiveProps=function(t){for(var e=n.extend({},t),r=0,o=Object.keys(t);r<o.length;r++){var i=o[r];this.props[i]===t[i]&&delete e[i]}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 p=this.validateChildren({},this.directivekeys,e||this.props);if(p){if(!t&&this.skipRefresh)for(var s=0,c=this.skipRefresh;s<c.length;s++){delete p[c[s]]}this.setProperties(p,t)}}},o.prototype.componentWillUnmount=function(){this.destroy()},o.prototype.validateChildren=function(t,r,n){for(var o=!1,i=0,p=e.Children.toArray(n.children);i<p.length;i++){var s=p[i],c=this.getChildType(s),u=r[c];if(c&&r){var l=this.getChildProps(e.Children.toArray(s.props.children),u);l.length&&(o=!0,t[s.type.propertyName||c]=l)}}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 p=i[o],s=!1,c=void 0;"string"==typeof e?(s=!0,c=e):c=Object.keys(e)[0];var u=p.props;this.getChildType(p)===c&&(s||!u.children?r.push(n.extend({},u,{},!0)):r.push(this.validateChildren(n.extend({},u),e[c],u)||u))}return r},o.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var n=r[t];if(n.type.isService)return n.props.services}return[]},o}(e.PureComponent),c=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),l=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),f=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),a=n.getTemplateEngine();n.setTemplateEngine({compile:o}),t.ComponentBase=s,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=f,t.compile=o,Object.defineProperty(t,"__esModule",{value:!0})});
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react"),require("react-dom"),require("@syncfusion/ej2-base")):"function"==typeof define&&define.amd?define(["exports","react","react-dom","@syncfusion/ej2-base"],e):e(t.ej={},t.React,t.ReactDOM,t.ej2Base)}(this,function(t,e,r,n){"use strict";function o(t,e){return"string"==typeof t?h(t,e):function(e){var o=document.createElement("div");return document.body.appendChild(o),r.render(t(e),o),n.detach(o),o.children}}var i=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),s=["alt","className","disabled","form","id","readOnly","style","tabIndex","title","type","onClick","onFocus","onBlur"],p=function(t){function o(){var e=null!==t&&t.apply(this,arguments)||this;return e.attrKeys=[],e}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(){this.refreshChild(!0);var t=r.findDOMNode(this);this.appendTo(t)},o.prototype.componentWillReceiveProps=function(t){for(var e=n.extend({},t),r=0,o=Object.keys(t);r<o.length;r++){var i=o[r];this.props[i]===t[i]?delete e[i]:-1!==this.attrKeys.indexOf(i)&&("className"===i&&(this.element.classList.remove(this.props[i]),this.element.classList.add(e[i])),delete e[i])}e.children&&delete e.children,Object.keys(e).length&&this.setProperties(e),this.refreshChild(!1,t)},o.prototype.getDefaultAttributes=function(){return this.htmlattributes},o.prototype.refreshChild=function(t,e){if(this.checkInjectedModules){for(var r=this.getInjectedModules()||[],n=0,o=this.getInjectedServices()||[];n<o.length;n++){var i=o[n];-1===r.indexOf(i)&&r.push(i)}this.injectedModules=r}if(this.directivekeys){var s=this.validateChildren({},this.directivekeys,e||this.props);if(s){if(!t&&this.skipRefresh)for(var p=0,c=this.skipRefresh;p<c.length;p++){delete s[c[p]]}this.setProperties(s,t)}}},o.prototype.componentWillUnmount=function(){this.destroy()},o.prototype.validateChildren=function(t,r,n){for(var o=!1,i=0,s=e.Children.toArray(n.children);i<s.length;i++){var p=s[i],c=this.getChildType(p),u=r[c];if(c&&r){var a=this.getChildProps(e.Children.toArray(p.props.children),u);a.length&&(o=!0,t[p.type.propertyName||c]=a)}}return o?t:null},o.prototype.getChildType=function(t){return t.type&&t.type.isDirective?t.type.moduleName||"":""},o.prototype.getChildProps=function(t,e){for(var r=[],o=0,i=t;o<i.length;o++){var s=i[o],p=!1,c=void 0;"string"==typeof e?(p=!0,c=e):c=Object.keys(e)[0];var u=s.props;this.getChildType(s)===c&&(p||!u.children?r.push(n.extend({},u,{},!0)):r.push(this.validateChildren(n.extend({},u),e[c],u)||u))}return r},o.prototype.getInjectedServices=function(){for(var t=0,r=e.Children.toArray(this.props.children);t<r.length;t++){var n=r[t];if(n.type.isService)return n.props.services}return[]},o}(e.PureComponent),c=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.render=function(){return null},e.isDirective=!0,e}(e.PureComponent),a=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),l=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a(e,t),e.prototype.render=function(){return null},e.isService=!0,e}(e.PureComponent),h=n.getTemplateEngine();n.setTemplateEngine({compile:o}),t.ComponentBase=p,t.applyMixins=function(t,e){e.forEach(function(e){Object.getOwnPropertyNames(e.prototype).forEach(function(r){t.prototype[r]=e.prototype[r]})})},t.ComplexBase=u,t.Inject=l,t.compile=o,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ej2-react-base.umd.min.js.map
import { Children, PureComponent } from 'react';
import { findDOMNode, render } from 'react-dom';
import { extend, getTemplateEngine, setTemplateEngine } from '@syncfusion/ej2-base';
import { detach, extend, getTemplateEngine, setTemplateEngine } from '@syncfusion/ej2-base';

@@ -13,8 +13,12 @@ /**

class ComponentBase extends PureComponent {
constructor() {
super(...arguments);
this.attrKeys = [];
}
componentWillMount() {
let propKeys = Object.keys(this.props);
this.htmlattributes = {};
let attrMatch = defaulthtmlkeys.concat(this.controlAttributes || []);
this.attrKeys = defaulthtmlkeys.concat(this.controlAttributes || []);
for (let prop of propKeys) {
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || attrMatch.indexOf(prop) !== -1) {
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || this.attrKeys.indexOf(prop) !== -1) {
this.htmlattributes[prop] = this.props[prop];

@@ -37,2 +41,9 @@ }

}
else if (this.attrKeys.indexOf(propkey) !== -1) {
if (propkey === 'className') {
this.element.classList.remove(this.props[propkey]);
this.element.classList.add(dProps[propkey]);
}
delete dProps[propkey];
}
}

@@ -187,3 +198,5 @@ if (dProps['children']) {

let ele = document.createElement('div');
document.body.appendChild(ele);
render(templateElement(data), ele);
detach(ele);
return ele.children;

@@ -190,0 +203,0 @@ };

import { Children, PureComponent } from 'react';
import { findDOMNode, render } from 'react-dom';
import { extend, getTemplateEngine, setTemplateEngine } from '@syncfusion/ej2-base';
import { detach, extend, getTemplateEngine, setTemplateEngine } from '@syncfusion/ej2-base';

@@ -25,3 +25,5 @@ var __extends = (undefined && undefined.__extends) || (function () {

function ComponentBase() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.attrKeys = [];
return _this;
}

@@ -31,6 +33,6 @@ ComponentBase.prototype.componentWillMount = function () {

this.htmlattributes = {};
var attrMatch = defaulthtmlkeys.concat(this.controlAttributes || []);
this.attrKeys = defaulthtmlkeys.concat(this.controlAttributes || []);
for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
var prop = propKeys_1[_i];
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || attrMatch.indexOf(prop) !== -1) {
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || this.attrKeys.indexOf(prop) !== -1) {
this.htmlattributes[prop] = this.props[prop];

@@ -54,2 +56,9 @@ }

}
else if (this.attrKeys.indexOf(propkey) !== -1) {
if (propkey === 'className') {
this.element.classList.remove(this.props[propkey]);
this.element.classList.add(dProps[propkey]);
}
delete dProps[propkey];
}
}

@@ -240,3 +249,5 @@ if (dProps['children']) {

var ele = document.createElement('div');
document.body.appendChild(ele);
render(templateElement(data), ele);
detach(ele);
return ele.children;

@@ -243,0 +254,0 @@ };

@@ -1,10 +0,1 @@

/*!
* filename: index.d.ts
* version : 16.1.48
* 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';

@@ -11,0 +2,0 @@ import * as _base from '@syncfusion/ej2-base';

{
"name": "@syncfusion/ej2-react-base",
"version": "16.1.48",
"version": "16.2.41",
"description": "Essential JS 2 React Base",

@@ -24,7 +24,5 @@ "author": "Syncfusion Inc.",

"dependencies": {
"awesome-typescript-loader": "^3.1.3",
"react": "15.5.4 - 16.0.0",
"react-dom": "15.5.4 - 16.0.0",
"source-map-loader": "^0.2.1",
"@syncfusion/ej2-base": "~16.1.38"
"@syncfusion/ej2-base": "~16.2.41"
},

@@ -38,4 +36,6 @@ "devDependencies": {

"@types/react-dom": "^15.5.0",
"@types/requirejs": "^2.1.26"
"@types/requirejs": "^2.1.26",
"awesome-typescript-loader": "^3.1.3",
"source-map-loader": "^0.2.1"
}
}

@@ -8,2 +8,3 @@ /// <reference types="react" />

private setProperties;
private element;
private appendTo;

@@ -22,2 +23,3 @@ private destroy;

};
private attrKeys;
componentWillMount(): void;

@@ -24,0 +26,0 @@ componentDidMount(): void;

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

function ComponentBase() {
return _super !== null && _super.apply(this, arguments) || this;
var _this = _super !== null && _super.apply(this, arguments) || this;
_this.attrKeys = [];
return _this;
}

@@ -26,6 +28,6 @@ ComponentBase.prototype.componentWillMount = function () {

this.htmlattributes = {};
var attrMatch = defaulthtmlkeys.concat(this.controlAttributes || []);
this.attrKeys = defaulthtmlkeys.concat(this.controlAttributes || []);
for (var _i = 0, propKeys_1 = propKeys; _i < propKeys_1.length; _i++) {
var prop = propKeys_1[_i];
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || attrMatch.indexOf(prop) !== -1) {
if (prop.indexOf('data-') !== -1 || prop.indexOf('aria-') !== -1 || this.attrKeys.indexOf(prop) !== -1) {
this.htmlattributes[prop] = this.props[prop];

@@ -48,2 +50,9 @@ }

}
else if (this.attrKeys.indexOf(propkey) !== -1) {
if (propkey === 'className') {
this.element.classList.remove(this.props[propkey]);
this.element.classList.add(dProps[propkey]);
}
delete dProps[propkey];
}
}

@@ -50,0 +59,0 @@ if (dProps['children']) {

@@ -12,3 +12,5 @@ define(["require", "exports", "@syncfusion/ej2-base", "react-dom"], function (require, exports, ej2_base_1, ReactDOM) {

var ele = document.createElement('div');
document.body.appendChild(ele);
ReactDOM.render(templateElement(data), ele);
ej2_base_1.detach(ele);
return ele.children;

@@ -15,0 +17,0 @@ };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

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