clappr-create-portal
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ClapprCreatePortal=t():e.ClapprCreatePortal=t()}("undefined"!=typeof self?self:this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var l=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),a=Clappr,u=(a.CorePlugin,function(){function e(){i(this,e),this.counter=1}return l(e,[{key:"next",value:function(){var e="__portalIdPlugin-"+this.counter;return this.counter+=1,e}}]),e}()),s=new u,c=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.panels=["lower","middle","upper"],n.positions=["left","center","right"],n.mediaControlBlock={},n}return r(t,e),l(t,[{key:"getExternalInterface",value:function(){return{addMediaControlPortal:this.addMediaControlPortal,addVideoContainerPortal:this.addVideoContainerPortal,addPluginPortal:this.addPluginPortal}}},{key:"isValidPosition",value:function(e,t){return-1===this.positions.indexOf(e)?(console.error('position should be one of these: ["left", "center", "right"]'),!1):-1!==this.panels.indexOf(t)||(console.error('panel should be one of these: ["lower", "middle", "upper"]'),!1)}},{key:"getMediaControlBlock",value:function(e,t){var n=e+t;if(!this.mediaControlBlock[n]){var o=this.mediaControl.$el.find(".media-control-panel__"+e+" .media-control-position__"+t);this.mediaControlBlock[n]=o}return this.mediaControlBlock[n]}},{key:"addVideoContainerPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.next();if("Object"==typeof t.style)return void console.error("You must pass style as a string");var o=$("<"+e+" />",Object.assign({},{id:n},t));return this.core.getCurrentContainer().$el.append(o[0]),{id:n,element:o[0]}}},{key:"addMediaControlPortal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"middle";if(this.isValidPosition(e,t)){var n=s.next(),o=$("<div />",{id:n,"data-controls":""});return this.getMediaControlBlock(t,e).append(o[0]),{id:n,element:o[0]}}}},{key:"addPluginPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.next();if("Object"==typeof t.style)return void console.error("You must pass style as a string");var o=$("<"+e+" />",Object.assign({},{id:n},t));return this.core.$el.append(o[0]),{id:n,element:o[0]}}},{key:"render",value:function(){return this}},{key:"name",get:function(){return"clapprCreatePortal"}},{key:"mediaControl",get:function(){return this.core.getPlugin("globo_media_control")}}]),t}(Clappr.CorePlugin);t.default=c,e.exports=t.default}])}); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("Clappr")):"function"==typeof define&&define.amd?define(["Clappr"],t):"object"==typeof exports?exports.ClapprCreatePortal=t(require("Clappr")):e.ClapprCreatePortal=t(e.Clappr)}("undefined"!=typeof self?self:this,function(e){return function(e){function t(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,t),r.l=!0,r.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=0)}([function(e,t,n){"use strict";function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function r(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}return function(t,n,o){return n&&e(t.prototype,n),o&&e(t,o),t}}(),l=n(1),u=function(){function e(){i(this,e),this.counter=1}return a(e,[{key:"next",value:function(){var e="__portalIdPlugin-"+this.counter;return this.counter+=1,e}}]),e}(),s=new u,c=function(e){function t(e){i(this,t);var n=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.panels=["front-layer","lower","middle","upper","back-layer"],n.positions=["left","center","right"],n.mediaControlBlock={},n}return r(t,e),a(t,[{key:"getExternalInterface",value:function(){return{addMediaControlPortal:this.addMediaControlPortal,addVideoContainerPortal:this.addVideoContainerPortal,addPluginPortal:this.addPluginPortal}}},{key:"isValidPosition",value:function(e,t){return-1===this.positions.indexOf(e)?(console.error('position should be one of these: ["left", "center", "right"]'),!1):-1!==this.panels.indexOf(t)||(console.error('panel should be one of these: ["lower", "middle", "upper"]'),!1)}},{key:"getMediaControlBlock",value:function(e,t){var n=e+t;if(!this.mediaControlBlock[n]){var o=this.mediaControl.$el.find(".media-control-panel__"+e+" .media-control-position__"+t);this.mediaControlBlock[n]=o}return this.mediaControlBlock[n]}},{key:"addVideoContainerPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.next();if("Object"==typeof t.style)return void console.error("You must pass style as a string");var o=$("<"+e+" />",Object.assign({},{id:n},t));return this.core.getCurrentContainer().$el.append(o[0]),{id:n,element:o[0]}}},{key:"addMediaControlPortal",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"middle";if(this.isValidPosition(e,t)){var n=s.next(),o=$("<div />",{id:n,"data-controls":""});return this.getMediaControlBlock(t,e).append(o[0]),{id:n,element:o[0]}}}},{key:"addPluginPortal",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"div",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s.next();if("Object"==typeof t.style)return void console.error("You must pass style as a string");var o=$("<"+e+" />",Object.assign({},{id:n},t));return this.core.$el.append(o[0]),{id:n,element:o[0]}}},{key:"render",value:function(){return this}},{key:"name",get:function(){return"clapprCreatePortal"}},{key:"mediaControl",get:function(){return this.core.getPlugin("globo_media_control")}}]),t}(l.CorePlugin);t.default=c,e.exports=t.default},function(t,n){t.exports=e}])}); |
{ | ||
"name": "clappr-create-portal", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "dist/clappr-create-portal", | ||
@@ -10,9 +10,15 @@ "repository": "git@github.com:tacnoman/clappr-create-portal.git", | ||
"build": "node_modules/.bin/webpack", | ||
"serve": "webpack-dev-server --content-base ./dist/ --host 0.0.0.0 --watch" | ||
"serve": "webpack-dev-server --content-base ./dist/ --host 0.0.0.0 --watch", | ||
"test": "jest --verbose=true" | ||
}, | ||
"dependencies": { | ||
"clappr": "latest" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-core": "^6.26.3", | ||
"babel-jest": "^23.6.0", | ||
"babel-loader": "^7.1.2", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-es2015": "^6.24.1", | ||
"jest-cli": "^23.6.0", | ||
"webpack": "^3.10.0", | ||
@@ -19,0 +25,0 @@ "webpack-dev-server": "^2.11.0" |
@@ -1,2 +0,2 @@ | ||
const { CorePlugin } = Clappr | ||
import { CorePlugin } from 'clappr' | ||
@@ -17,6 +17,6 @@ class IdGenerator { | ||
class ClapprCreatePortal extends Clappr.CorePlugin { | ||
class ClapprCreatePortal extends CorePlugin { | ||
constructor(core) { | ||
super(core) | ||
this.panels = ['lower', 'middle', 'upper'] | ||
this.panels = ['front-layer', 'lower', 'middle', 'upper', 'back-layer'] | ||
this.positions = ['left', 'center', 'right'] | ||
@@ -23,0 +23,0 @@ this.mediaControlBlock = {} |
@@ -7,3 +7,3 @@ const path = require('path') | ||
externals: { | ||
Clappr: 'Clappr' | ||
clappr: 'Clappr' | ||
}, | ||
@@ -10,0 +10,0 @@ output: { |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
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
204211
11
259
1
8
3
1
+ Addedclappr@latest
+ Addedclappr@0.3.13(transitive)