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

rc-notification

Package Overview
Dependencies
Maintainers
7
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-notification - npm Package Compare versions

Comparing version 5.0.2 to 5.0.3

10

es/Notice.js
import _extends from "@babel/runtime/helpers/esm/extends";
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
import classNames from 'classnames';
import KeyCode from "rc-util/es/KeyCode";
import * as React from 'react';
import classNames from 'classnames';
var Notify = /*#__PURE__*/React.forwardRef(function (props, ref) {

@@ -29,2 +30,7 @@ var prefixCls = props.prefixCls,

};
var onCloseKeyDown = function onCloseKeyDown(e) {
if (e.key === 'Enter' || e.code === 'Enter' || e.keyCode === KeyCode.ENTER) {
onInternalClose();
}
};
// ======================== Effect ========================

@@ -40,2 +46,3 @@ React.useEffect(function () {

}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [duration, hovering, times]);

@@ -60,2 +67,3 @@ // ======================== Render ========================

className: "".concat(noticePrefixCls, "-close"),
onKeyDown: onCloseKeyDown,
onClick: function onClick(e) {

@@ -62,0 +70,0 @@ e.preventDefault();

@@ -12,4 +12,5 @@ "use strict";

var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
var _classnames = _interopRequireDefault(require("classnames"));
var _KeyCode = _interopRequireDefault(require("rc-util/lib/KeyCode"));
var React = _interopRequireWildcard(require("react"));
var _classnames = _interopRequireDefault(require("classnames"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }

@@ -40,2 +41,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

};
var onCloseKeyDown = function onCloseKeyDown(e) {
if (e.key === 'Enter' || e.code === 'Enter' || e.keyCode === _KeyCode.default.ENTER) {
onInternalClose();
}
};
// ======================== Effect ========================

@@ -51,2 +57,3 @@ React.useEffect(function () {

}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [duration, hovering, times]);

@@ -71,2 +78,3 @@ // ======================== Render ========================

className: "".concat(noticePrefixCls, "-close"),
onKeyDown: onCloseKeyDown,
onClick: function onClick(e) {

@@ -73,0 +81,0 @@ e.preventDefault();

4

package.json
{
"name": "rc-notification",
"version": "5.0.2",
"version": "5.0.3",
"description": "notification ui component for react",

@@ -60,3 +60,3 @@ "engines": {

"cross-env": "^7.0.0",
"dumi": "^1.1.7",
"dumi": "^2.1.0",
"enzyme": "^3.3.0",

@@ -63,0 +63,0 @@ "enzyme-to-json": "^3.4.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