New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

react2angularjs

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react2angularjs - npm Package Compare versions

Comparing version
1.0.1
to
1.0.2
react2angularjs-1.0.2.tgz

Sorry, the diff of this file is not supported yet

+10
-18

@@ -53,7 +53,5 @@ (function (global, factory) {

key: "getProps",
value: function getProps() {
var _this = this;
value: function getProps(elementScope) {
return this.propNames.reduce(function (props, propName) {
props[propName] = _this.elementScope[propName];
props[propName] = elementScope[propName];
return props;

@@ -65,21 +63,15 @@ }, {});

value: function link(scope, element, attrs, ctrl, transclude) {
this.$container = element[0];
this.$children = transclude();
this.elementScope = scope;
this.render();
var $container = element[0];
var $children = transclude(function () {});
var children = (0, _createReactElements["default"])($children);
this.render(scope, $container, children);
this.$compile(element.contents())(scope.$parent); //re render on scope changes
this.elementScope.$watchGroup(Object.keys(this.elementScope.$$isolateBindings), this.render.bind(this));
scope.$watchGroup(Object.keys(scope.$$isolateBindings), this.render.bind(this, scope, $container, children));
}
}, {
key: "render",
value: function render() {
var props = this.getProps();
if (!this.memoized) {
var children = (0, _createReactElements["default"])(this.$children);
this.memoized = children;
}
(0, _reactDom.render)( /*#__PURE__*/_react["default"].createElement(this.ReactComponent, props, this.memoized), this.$container);
value: function render(elementScope, $container, children) {
var props = this.getProps(elementScope);
(0, _reactDom.render)( /*#__PURE__*/_react["default"].createElement(this.ReactComponent, props, children), $container);
}

@@ -86,0 +78,0 @@ }]);

{
"name": "react2angularjs",
"version": "1.0.1",
"version": "1.0.2",
"description": "A fully functional way to integrate React components in Angular 1 apps!",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -24,5 +24,5 @@ import React from 'react';

getProps() {
getProps(elementScope) {
return this.propNames.reduce((props, propName) => {
props[propName] = this.elementScope[propName];
props[propName] = elementScope[propName];
return props;

@@ -33,26 +33,24 @@ }, {});

link(scope, element, attrs, ctrl, transclude) {
this.$container = element[0];
this.$children = transclude();
this.elementScope = scope;
const $container = element[0];
const $children = transclude(function() {});
const children = createReactElements($children);
this.render();
this.render(scope, $container, children);
this.$compile(element.contents())(scope.$parent);
//re render on scope changes
this.elementScope.$watchGroup(Object.keys(this.elementScope.$$isolateBindings), this.render.bind(this));
scope.$watchGroup(
Object.keys(scope.$$isolateBindings),
this.render.bind(this, scope, $container, children)
);
}
render() {
let props = this.getProps();
render(elementScope, $container, children) {
let props = this.getProps(elementScope);
if (!this.memoized) {
let children = createReactElements(this.$children);
this.memoized = children;
}
render(
<this.ReactComponent {...props}>{this.memoized}</this.ReactComponent>,
this.$container
<this.ReactComponent {...props}>{children}</this.ReactComponent>,
$container
);
}
}