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

glud-component

Package Overview
Dependencies
Maintainers
1
Versions
133
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

glud-component - npm Package Compare versions

Comparing version 0.0.24 to 1.0.0

27

lib/AlertMessage/index.js

@@ -97,6 +97,6 @@ 'use strict';

function createElemetReactAlert(properties) {
document.body.children[0].classList.add('react-alert-message');
var divTarget = document.createElement('div');
divTarget.id = 'box-react-alert-message';
document.body.appendChild(divTarget);
(0, _reactDom.render)(_react2.default.createElement(AlertMessage, properties), divTarget);

@@ -106,13 +106,24 @@ }

function openAlertMessage(properties) {
closeAlertMessage();
createElemetReactAlert(properties);
closeAlertMessage().then(function () {
createElemetReactAlert(properties);
});
}
function closeAlertMessage() {
if (document.body.children[0].classList.contains('react-alert-message')) {
return new Promise(function (resolve) {
var target = document.getElementById('box-react-alert-message');
target.parentNode.removeChild(target);
var root = document.body.children[0];
root.classList.remove('react-alert-message');
}
if (!target) resolve();
target.classList.add('alert-fade-out');
var remove = function remove() {
target.removeEventListener('webkitAnimationEnd', remove, false);
target.removeEventListener('animationend', remove, false);
target.parentNode.removeChild(target);
resolve();
};
target.addEventListener('webkitAnimationEnd', remove, false);
target.addEventListener('onclick', remove, false);
});
}

@@ -119,0 +130,0 @@

@@ -62,6 +62,6 @@ 'use strict';

function createElemetReactLoading(properties) {
document.body.children[0].classList.add('react-loading');
var divTarget = document.createElement('div');
divTarget.id = 'box-react-loading';
document.body.appendChild(divTarget);
(0, _reactDom.render)(_react2.default.createElement(Loading, properties), divTarget);

@@ -71,13 +71,28 @@ }

function openLoading(properties) {
closeLoading();
createElemetReactLoading(properties);
closeLoading().then(function () {
createElemetReactLoading(properties);
});
}
function closeLoading() {
if (document.body.children[0].classList.contains('react-loading')) {
return new Promise(function (resolve) {
var target = document.getElementById('box-react-loading');
target.parentNode.removeChild(target);
var root = document.body.children[0];
root.classList.remove('react-loading');
}
if (!target) resolve();
target.classList.add('loading-fade-out');
var remove = function remove() {
// target.removeEventListener('webkitAnimationEnd', remove, false)
// target.removeEventListener('animationend', remove, false)
target.parentNode.removeChild(target);
var targetOther = document.getElementById('box-react-loading');
if (!targetOther) resolve();
closeLoading();
};
remove();
// target.addEventListener('webkitAnimationEnd', remove, false)
// target.addEventListener('onclick', remove, false)
});
}

@@ -84,0 +99,0 @@

{
"name": "glud-component",
"version": "0.0.24",
"version": "1.0.0",
"description": "",

@@ -5,0 +5,0 @@ "repository": {

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