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

demoup-react

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

demoup-react - npm Package Compare versions

Comparing version 0.1.19 to 0.1.20

distribution/customevent.js

38

distribution/button.js

@@ -11,2 +11,4 @@ "use strict";

var window = require("global/window");
module.exports = function (scope) {

@@ -21,14 +23,10 @@ return createClass({

var t = this;
var props = _extends({}, t.props);
if (window.DemoUpPlaybuttonRenderer) {
console.log('mounting button, using existing renderer');
window.DemoUpPlaybuttonRenderer(t.$container, t.props);
window.DemoUpPlaybuttonRenderer(t.$container, props);
} else {
console.log('mounting button, loading renderer');
scriptLoader(config.stage2Path(scope), function () {
window.DemoUpPlaybuttonRenderer && window.DemoUpPlaybuttonRenderer(t.$container, t.props);
t.forceUpdate(function () {
window.DemoUpPlaybuttonRenderer && window.DemoUpPlaybuttonRenderer(t.$container, props);
});
});

@@ -39,3 +37,4 @@ }

componentWillUnmount: function () {
document.dispatchEvent(new CustomEvent('demoup.unmounted'));
var CrossCustomEvent = require('customevent');
document.dispatchEvent(new CrossCustomEvent('demoup.unmounted'));
},

@@ -48,14 +47,15 @@

render: function () {
console.log('rendering button');
var props = this.props;
return React.createElement("div", _extends({}, props.nodeAttrs, {
className: classNames("demoup-trigger", props.className),
id: "demoup_stage2_script",
ref: this.setRef,
src: config.stage3Path(scope)
}));
return React.createElement(
"div",
_extends({}, props.nodeAttrs, {
className: classNames("demoup-trigger", props.className),
id: "demoup_stage2_script",
ref: this.setRef,
src: config.stage3Path(scope)
}),
window && window.DemoUpPlaybuttonRenderer ? null : props.children
);
}
});
};

@@ -6,2 +6,3 @@ "use strict";

var playerCreator = require("./player");
return {

@@ -8,0 +9,0 @@ button: buttonCreator(scope),

@@ -28,3 +28,4 @@ "use strict";

componentWillUnmount: function () {
document.dispatchEvent(new CustomEvent('demoup.unmounted'));
var CrossCustomEvent = require('customevent');
document.dispatchEvent(new CrossCustomEvent('demoup.unmounted'));
},

@@ -31,0 +32,0 @@

{
"name": "demoup-react",
"version": "0.1.19",
"version": "0.1.20",
"description": "React components for integrating the demoup video player solution in react based websites",
"main": "distribution/index.js",
"scripts": {
"build": "babel src --presets react --out-dir distribution",
"build": "babel src --presets react --plugins transform-object-assign --out-dir distribution",
"prepublish": "npm run build"

@@ -20,2 +20,4 @@ },

"create-react-class": "",
"customevent": "^1.0.0",
"global": "",
"load-script": "",

@@ -26,4 +28,5 @@ "react": ""

"babel-cli": "^6.24.1",
"babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-react": "^6.24.1"
}
}

@@ -9,2 +9,4 @@ "use strict";

var window = require("global/window");
module.exports = function(scope) {

@@ -19,22 +21,18 @@ return createClass({

var t = this;
var props = Object.assign({}, t.props);
if (window.DemoUpPlaybuttonRenderer) {
console.log('mounting button, using existing renderer');
window.DemoUpPlaybuttonRenderer(t.$container, t.props);
window.DemoUpPlaybuttonRenderer(t.$container, props);
}
else {
console.log('mounting button, loading renderer');
scriptLoader(config.stage2Path(scope), function() {
window.DemoUpPlaybuttonRenderer && window.DemoUpPlaybuttonRenderer(t.$container, t.props);
t.forceUpdate(function() {
window.DemoUpPlaybuttonRenderer && window.DemoUpPlaybuttonRenderer(t.$container, props);
});
});
}
},
componentWillUnmount : function() {
document.dispatchEvent(new CustomEvent('demoup.unmounted'));
var CrossCustomEvent = require('customevent');
document.dispatchEvent(new CrossCustomEvent('demoup.unmounted'));
},

@@ -47,5 +45,2 @@

render : function() {
console.log('rendering button');
var props = this.props;

@@ -58,5 +53,9 @@ return <div

src={config.stage3Path(scope)}
/>;
>
{
(window && window.DemoUpPlaybuttonRenderer) ? null : props.children
}
</div>;
}
});
};
"use strict";
module.exports = function(scope) {
var buttonCreator = require("./button");
var playerCreator = require("./player");
return {

@@ -7,0 +9,0 @@ button : buttonCreator(scope),

@@ -28,3 +28,4 @@ "use strict";

componentWillUnmount : function() {
document.dispatchEvent(new CustomEvent('demoup.unmounted'));
var CrossCustomEvent = require('customevent');
document.dispatchEvent(new CrossCustomEvent('demoup.unmounted'));
},

@@ -31,0 +32,0 @@

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