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

organism-react-popup

Package Overview
Dependencies
Maintainers
1
Versions
196
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

organism-react-popup - npm Package Compare versions

Comparing version 0.15.22 to 0.16.1

33

build/cjs/ui/organisms/AlertsNotifier.js

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

var prevAlerts = (0, _reshowHooks.usePrevious)(props.alerts);
var _useState2 = (0, _react.useState)({}),

@@ -129,5 +131,4 @@ dismissedAlerts = _useState2[0],

(0, _react.useEffect)(function () {
var nextAlertArr = [];
(alerts || []).forEach(function (item, key) {
if (prevAlerts !== props.alerts) {
var nextAlertArr = (alerts || []).map(function (item) {
var thisItem = "string" === typeof item ? {

@@ -145,20 +146,20 @@ message: item

nextAlertArr.push(thisItem);
return thisItem;
});
setAlertArr(nextAlertArr);
}, [props]);
}
var handleDismiss = function handleDismiss(e) {
var isContinue = (0, _callFunc["default"])(onDismiss, [e]);
return (0, _react.useMemo)(function () {
var handleDismiss = function handleDismiss(e) {
var isContinue = (0, _callFunc["default"])(onDismiss, [e]);
if (false !== isContinue) {
// if no callback for dismissal, just update our state
setDismissedAlerts(function (dismissedAlerts) {
dismissedAlerts[e.data.id] = e.data;
return (0, _objectSpread2["default"])({}, dismissedAlerts);
});
}
};
if (false !== isContinue) {
// if no callback for dismissal, just update our state
setDismissedAlerts(function (dismissedAlerts) {
dismissedAlerts[e.data.id] = e.data;
return (0, _objectSpread2["default"])({}, dismissedAlerts);
});
}
};
return (0, _react.useMemo)(function () {
var positionStyle = {};

@@ -165,0 +166,0 @@

{
"version": "0.15.22",
"version": "0.16.1",
"name": "organism-react-popup",

@@ -37,3 +37,2 @@ "repository": {

"set-object-value": "*",
"setimmediate": "*",
"to-percent-js": "*",

@@ -40,0 +39,0 @@ "win-doc": "*"

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 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