Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

react-notifier-system

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-notifier-system - npm Package Compare versions

Comparing version
0.0.1
to
0.0.2
+7
lib/config.js
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var ENV_PRODUCTION = exports.ENV_PRODUCTION = process.env.NODE_ENV === 'production';
var WDS_PORT = exports.WDS_PORT = 7000;
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _notifier = require('./react/component/notifier');
var _notifier2 = _interopRequireDefault(_notifier);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
exports.default = _notifier2.default;
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNotificationSystem = require('react-notification-system');
var _reactNotificationSystem2 = _interopRequireDefault(_reactNotificationSystem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var notificationDefaults = {
position: 'tr',
autoDismiss: 5,
dismissible: 'both',
level: 'info'
// eslint-disable-next-line
};
_reactNotificationSystem2.default.prototype.showNotification = function (notification) {
this.uid += 1;
var preparedNotification = Object.assign({}, notificationDefaults, notification);
preparedNotification.position = preparedNotification.position.toLowerCase();
preparedNotification.dismissible = preparedNotification.dismissible.toLowerCase();
preparedNotification.level = preparedNotification.level.toLowerCase();
preparedNotification.uid = preparedNotification.uid || this.uid;
preparedNotification.id = preparedNotification.id || this.uid;
preparedNotification.ref = 'notification-' + preparedNotification.uid;
// update notification if already created
var foundNotification = this.state.notifications.find(function (val) {
return val.id === preparedNotification.id;
});
if (foundNotification) {
Object.assign(foundNotification, preparedNotification);
} else {
this.state.notifications.push(preparedNotification);
if (typeof notification.onAdd === 'function') {
preparedNotification.onAdd(preparedNotification);
}
}
this.setState({
notifications: this.state.notifications
});
};
exports.default = _reactNotificationSystem2.default;
+11
-7
{
"name": "react-notifier-system",
"version": "0.0.1",
"repository": "sheikhg1900/react-notifier-system",
"author": "Sheikh Abdul Wahid Ahmed",
"version": "0.0.2",
"repository": "sheikhG1900/react-notifier-system",
"author": "Sheikh Abdul Wahid Ahmed @sheikhG1900",
"license": "MIT",
"main": "notifier.js",
"keywords": [
"react",
"notification",
"notification system",
"react-notification-system",
"react-component"
],
"scripts": {

@@ -23,5 +29,3 @@ "start": "yarn dev:start",

"react-dom": "^16.2.0",
"react-notification-system": "^0.2.17",
"react-redux": "^5.0.6",
"redux": "^3.7.2"
"react-notification-system": "^0.2.17"
},

@@ -28,0 +32,0 @@ "devDependencies": {

'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
var _reactNotificationSystem = require('react-notification-system');
var _reactNotificationSystem2 = _interopRequireDefault(_reactNotificationSystem);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var notificationDefaults = {
position: 'tr',
autoDismiss: 5,
dismissible: 'both',
level: 'info'
// eslint-disable-next-line
};
_reactNotificationSystem2.default.prototype.showNotification = function (notification) {
this.uid += 1;
var preparedNotification = Object.assign({}, notificationDefaults, notification);
preparedNotification.position = preparedNotification.position.toLowerCase();
preparedNotification.dismissible = preparedNotification.dismissible.toLowerCase();
preparedNotification.level = preparedNotification.level.toLowerCase();
preparedNotification.uid = preparedNotification.uid || this.uid;
preparedNotification.id = preparedNotification.id || this.uid;
preparedNotification.ref = 'notification-' + preparedNotification.uid;
// update notification if already created
var foundNotification = this.state.notifications.find(function (val) {
return val.id === preparedNotification.id;
});
if (foundNotification) {
Object.assign(foundNotification, preparedNotification);
} else {
this.state.notifications.push(preparedNotification);
if (typeof notification.onAdd === 'function') {
preparedNotification.onAdd(preparedNotification);
}
}
this.setState({
notifications: this.state.notifications
});
};
exports.default = _reactNotificationSystem2.default;