@xaypay/tui 0.2.5 → 0.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +8 -5
- package/dist/index.js +8 -5
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -5268,7 +5268,7 @@ Toast.propTypes = {
|
|
|
5268
5268
|
type: PropTypes.oneOf(Object.values(ToasterType)).isRequired
|
|
5269
5269
|
};
|
|
5270
5270
|
|
|
5271
|
-
let toastify;
|
|
5271
|
+
let toastify = document.getElementById('toastify');
|
|
5272
5272
|
let path = window.location.href;
|
|
5273
5273
|
let wWidth = window.innerWidth;
|
|
5274
5274
|
const removeToast = ref => {
|
|
@@ -5297,7 +5297,9 @@ const createToast = ({
|
|
|
5297
5297
|
}) => {
|
|
5298
5298
|
let toastParentBlock;
|
|
5299
5299
|
if (!toastify) {
|
|
5300
|
-
toastify = document.
|
|
5300
|
+
toastify = document.createElement('div');
|
|
5301
|
+
toastify.setAttribute('id', 'toastify');
|
|
5302
|
+
document.body.appendChild(toastify);
|
|
5301
5303
|
}
|
|
5302
5304
|
const toastBlock = document.createElement('div');
|
|
5303
5305
|
toastBlock.style.position = 'relative';
|
|
@@ -5324,8 +5326,8 @@ const createToast = ({
|
|
|
5324
5326
|
toastParentBlock.style.zIndex = 999999999999;
|
|
5325
5327
|
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
5326
5328
|
toastParentBlock.setAttribute('id', styles$5[position]);
|
|
5327
|
-
toastParentBlock
|
|
5328
|
-
toastify
|
|
5329
|
+
toastParentBlock.appendChild(toastBlock);
|
|
5330
|
+
toastify.appendChild(toastParentBlock);
|
|
5329
5331
|
} else {
|
|
5330
5332
|
document.getElementById(styles$5[position]).appendChild(toastBlock);
|
|
5331
5333
|
}
|
|
@@ -5408,7 +5410,8 @@ const Toaster = ({
|
|
|
5408
5410
|
window.addEventListener('popstate', () => {
|
|
5409
5411
|
if (path !== window.location.href) {
|
|
5410
5412
|
if (!toastify) {
|
|
5411
|
-
toastify = document.
|
|
5413
|
+
toastify = document.createElement('div');
|
|
5414
|
+
toastify.setAttribute('id', 'toastify');
|
|
5412
5415
|
}
|
|
5413
5416
|
if (toastify.hasChildNodes()) {
|
|
5414
5417
|
toastify.innerHTML = '';
|
package/dist/index.js
CHANGED
|
@@ -5299,7 +5299,7 @@ Toast.propTypes = {
|
|
|
5299
5299
|
type: PropTypes__default["default"].oneOf(Object.values(ToasterType)).isRequired
|
|
5300
5300
|
};
|
|
5301
5301
|
|
|
5302
|
-
let toastify;
|
|
5302
|
+
let toastify = document.getElementById('toastify');
|
|
5303
5303
|
let path = window.location.href;
|
|
5304
5304
|
let wWidth = window.innerWidth;
|
|
5305
5305
|
const removeToast = ref => {
|
|
@@ -5328,7 +5328,9 @@ const createToast = ({
|
|
|
5328
5328
|
}) => {
|
|
5329
5329
|
let toastParentBlock;
|
|
5330
5330
|
if (!toastify) {
|
|
5331
|
-
toastify = document.
|
|
5331
|
+
toastify = document.createElement('div');
|
|
5332
|
+
toastify.setAttribute('id', 'toastify');
|
|
5333
|
+
document.body.appendChild(toastify);
|
|
5332
5334
|
}
|
|
5333
5335
|
const toastBlock = document.createElement('div');
|
|
5334
5336
|
toastBlock.style.position = 'relative';
|
|
@@ -5355,8 +5357,8 @@ const createToast = ({
|
|
|
5355
5357
|
toastParentBlock.style.zIndex = 999999999999;
|
|
5356
5358
|
toastParentBlock.style.flexDirection = position === 'top-left' || position === 'top-right' || position === 'top-center' ? 'column-reverse' : 'column';
|
|
5357
5359
|
toastParentBlock.setAttribute('id', styles$5[position]);
|
|
5358
|
-
toastParentBlock
|
|
5359
|
-
toastify
|
|
5360
|
+
toastParentBlock.appendChild(toastBlock);
|
|
5361
|
+
toastify.appendChild(toastParentBlock);
|
|
5360
5362
|
} else {
|
|
5361
5363
|
document.getElementById(styles$5[position]).appendChild(toastBlock);
|
|
5362
5364
|
}
|
|
@@ -5439,7 +5441,8 @@ const Toaster = ({
|
|
|
5439
5441
|
window.addEventListener('popstate', () => {
|
|
5440
5442
|
if (path !== window.location.href) {
|
|
5441
5443
|
if (!toastify) {
|
|
5442
|
-
toastify = document.
|
|
5444
|
+
toastify = document.createElement('div');
|
|
5445
|
+
toastify.setAttribute('id', 'toastify');
|
|
5443
5446
|
}
|
|
5444
5447
|
if (toastify.hasChildNodes()) {
|
|
5445
5448
|
toastify.innerHTML = '';
|