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

@uppy/informer

Package Overview
Dependencies
Maintainers
5
Versions
75
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/informer - npm Package Compare versions

Comparing version 1.3.4 to 1.4.0

59

lib/index.js

@@ -5,4 +5,2 @@ var _class, _temp;

function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; subClass.__proto__ = superClass; }

@@ -33,2 +31,38 @@

_this = _Plugin.call(this, uppy, opts) || this;
_this.render = function (state) {
var _state$info = state.info,
isHidden = _state$info.isHidden,
message = _state$info.message,
details = _state$info.details;
function displayErrorAlert() {
var errorMessage = message + " \n\n " + details;
alert(errorMessage);
}
var handleMouseOver = function handleMouseOver() {
clearTimeout(_this.uppy.infoTimeoutID);
};
var handleMouseLeave = function handleMouseLeave() {
_this.uppy.infoTimeoutID = setTimeout(_this.uppy.hideInfo, 2000);
};
return h("div", {
class: "uppy uppy-Informer",
"aria-hidden": isHidden
}, h("p", {
role: "alert"
}, message, ' ', details && h("span", {
"aria-label": details,
"data-microtip-position": "top-left",
"data-microtip-size": "medium",
role: "tooltip",
onclick: displayErrorAlert,
onMouseOver: handleMouseOver,
onMouseLeave: handleMouseLeave
}, "?")));
};
_this.type = 'progressindicator';

@@ -41,3 +75,2 @@ _this.id = _this.opts.id || 'Informer';

_this.opts = _extends({}, defaultOptions, opts);
_this.render = _this.render.bind(_assertThisInitialized(_this));
return _this;

@@ -48,20 +81,2 @@ }

_proto.render = function render(state) {
var _state$info = state.info,
isHidden = _state$info.isHidden,
message = _state$info.message,
details = _state$info.details;
return h("div", {
class: "uppy uppy-Informer",
"aria-hidden": isHidden
}, h("p", {
role: "alert"
}, message, ' ', details && h("span", {
"aria-label": details,
"data-microtip-position": "top-left",
"data-microtip-size": "medium",
role: "tooltip"
}, "?")));
};
_proto.install = function install() {

@@ -76,2 +91,2 @@ var target = this.opts.target;

return Informer;
}(Plugin), _class.VERSION = "1.3.4", _temp);
}(Plugin), _class.VERSION = "1.4.0", _temp);
{
"name": "@uppy/informer",
"description": "A notification and error pop-up bar for Uppy.",
"version": "1.3.4",
"version": "1.4.0",
"license": "MIT",

@@ -26,3 +26,3 @@ "main": "lib/index.js",

"dependencies": {
"@uppy/utils": "^2.1.2",
"@uppy/utils": "file:../utils",
"preact": "8.2.9"

@@ -32,4 +32,3 @@ },

"@uppy/core": "^1.0.0"
},
"gitHead": "2b91a96c95ea1aa32980984904f9877d8a4c4440"
}
}

@@ -22,12 +22,22 @@ const { Plugin } = require('@uppy/core')

const defaultOptions = {}
// merge default options with the ones set by user
this.opts = Object.assign({}, defaultOptions, opts)
this.render = this.render.bind(this)
}
render (state) {
render = (state) => {
const { isHidden, message, details } = state.info
function displayErrorAlert () {
const errorMessage = `${message} \n\n ${details}`
alert(errorMessage)
}
const handleMouseOver = () => {
clearTimeout(this.uppy.infoTimeoutID)
}
const handleMouseLeave = () => {
this.uppy.infoTimeoutID = setTimeout(this.uppy.hideInfo, 2000)
}
return (

@@ -47,2 +57,5 @@ <div

role="tooltip"
onclick={displayErrorAlert}
onMouseOver={handleMouseOver}
onMouseLeave={handleMouseLeave}
>

@@ -49,0 +62,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