@depay/widgets 3.0.3 → 3.0.4
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/cjs/index.bundle.js +2 -11
- package/dist/es/index.bundle.js +2 -11
- package/dist/umd/index.bundle.js +2 -11
- package/package.json +2 -2
package/dist/cjs/index.bundle.js
CHANGED
|
@@ -49440,15 +49440,9 @@ function createInsideContainer({ document, shadow, style }) {
|
|
|
49440
49440
|
}
|
|
49441
49441
|
|
|
49442
49442
|
const outsideContainerClass = 'ReactShadowDOMOutsideContainer';
|
|
49443
|
-
let currentContainer;
|
|
49444
|
-
|
|
49445
|
-
function getOutsideContainer(element) {
|
|
49446
|
-
return currentContainer
|
|
49447
|
-
}
|
|
49448
49443
|
|
|
49449
49444
|
function createOutsideContainer({ document, element, style }) {
|
|
49450
49445
|
const container = document.createElement('div');
|
|
49451
|
-
currentContainer = container;
|
|
49452
49446
|
container.setAttribute('class', outsideContainerClass);
|
|
49453
49447
|
container.setAttribute('style', style);
|
|
49454
49448
|
element.appendChild(container);
|
|
@@ -49471,8 +49465,7 @@ function trimStyle(style) {
|
|
|
49471
49465
|
return style.replace(/\s*[\r\n]\s*/g, '')
|
|
49472
49466
|
}
|
|
49473
49467
|
|
|
49474
|
-
function unmount(
|
|
49475
|
-
const outsideContainer = getOutsideContainer();
|
|
49468
|
+
function unmount(outsideContainer) {
|
|
49476
49469
|
|
|
49477
49470
|
if (outsideContainer && outsideContainer.shadowRoot) {
|
|
49478
49471
|
const shadowRoot = outsideContainer.shadowRoot;
|
|
@@ -49489,8 +49482,6 @@ function unmount(element) {
|
|
|
49489
49482
|
}
|
|
49490
49483
|
|
|
49491
49484
|
function ReactShadowDOM({ document, element, content, outsideStyle = '', insideStyle = '' }) {
|
|
49492
|
-
unmount();
|
|
49493
|
-
|
|
49494
49485
|
const outsideContainer = createOutsideContainer({
|
|
49495
49486
|
document,
|
|
49496
49487
|
element,
|
|
@@ -49507,7 +49498,7 @@ function ReactShadowDOM({ document, element, content, outsideStyle = '', insideS
|
|
|
49507
49498
|
|
|
49508
49499
|
ReactDOM__default['default'].render(content, insideContainer);
|
|
49509
49500
|
|
|
49510
|
-
return { content, unmount: () => unmount() }
|
|
49501
|
+
return { content, unmount: () => unmount(outsideContainer) }
|
|
49511
49502
|
}
|
|
49512
49503
|
|
|
49513
49504
|
var ReactShadowDOM_1 = ReactShadowDOM;
|
package/dist/es/index.bundle.js
CHANGED
|
@@ -49438,15 +49438,9 @@ function createInsideContainer({ document, shadow, style }) {
|
|
|
49438
49438
|
}
|
|
49439
49439
|
|
|
49440
49440
|
const outsideContainerClass = 'ReactShadowDOMOutsideContainer';
|
|
49441
|
-
let currentContainer;
|
|
49442
|
-
|
|
49443
|
-
function getOutsideContainer(element) {
|
|
49444
|
-
return currentContainer
|
|
49445
|
-
}
|
|
49446
49441
|
|
|
49447
49442
|
function createOutsideContainer({ document, element, style }) {
|
|
49448
49443
|
const container = document.createElement('div');
|
|
49449
|
-
currentContainer = container;
|
|
49450
49444
|
container.setAttribute('class', outsideContainerClass);
|
|
49451
49445
|
container.setAttribute('style', style);
|
|
49452
49446
|
element.appendChild(container);
|
|
@@ -49469,8 +49463,7 @@ function trimStyle(style) {
|
|
|
49469
49463
|
return style.replace(/\s*[\r\n]\s*/g, '')
|
|
49470
49464
|
}
|
|
49471
49465
|
|
|
49472
|
-
function unmount(
|
|
49473
|
-
const outsideContainer = getOutsideContainer();
|
|
49466
|
+
function unmount(outsideContainer) {
|
|
49474
49467
|
|
|
49475
49468
|
if (outsideContainer && outsideContainer.shadowRoot) {
|
|
49476
49469
|
const shadowRoot = outsideContainer.shadowRoot;
|
|
@@ -49487,8 +49480,6 @@ function unmount(element) {
|
|
|
49487
49480
|
}
|
|
49488
49481
|
|
|
49489
49482
|
function ReactShadowDOM({ document, element, content, outsideStyle = '', insideStyle = '' }) {
|
|
49490
|
-
unmount();
|
|
49491
|
-
|
|
49492
49483
|
const outsideContainer = createOutsideContainer({
|
|
49493
49484
|
document,
|
|
49494
49485
|
element,
|
|
@@ -49505,7 +49496,7 @@ function ReactShadowDOM({ document, element, content, outsideStyle = '', insideS
|
|
|
49505
49496
|
|
|
49506
49497
|
ReactDOM__default['default'].render(content, insideContainer);
|
|
49507
49498
|
|
|
49508
|
-
return { content, unmount: () => unmount() }
|
|
49499
|
+
return { content, unmount: () => unmount(outsideContainer) }
|
|
49509
49500
|
}
|
|
49510
49501
|
|
|
49511
49502
|
var ReactShadowDOM_1 = ReactShadowDOM;
|
package/dist/umd/index.bundle.js
CHANGED
|
@@ -49444,15 +49444,9 @@
|
|
|
49444
49444
|
}
|
|
49445
49445
|
|
|
49446
49446
|
const outsideContainerClass = 'ReactShadowDOMOutsideContainer';
|
|
49447
|
-
let currentContainer;
|
|
49448
|
-
|
|
49449
|
-
function getOutsideContainer(element) {
|
|
49450
|
-
return currentContainer
|
|
49451
|
-
}
|
|
49452
49447
|
|
|
49453
49448
|
function createOutsideContainer({ document, element, style }) {
|
|
49454
49449
|
const container = document.createElement('div');
|
|
49455
|
-
currentContainer = container;
|
|
49456
49450
|
container.setAttribute('class', outsideContainerClass);
|
|
49457
49451
|
container.setAttribute('style', style);
|
|
49458
49452
|
element.appendChild(container);
|
|
@@ -49475,8 +49469,7 @@
|
|
|
49475
49469
|
return style.replace(/\s*[\r\n]\s*/g, '')
|
|
49476
49470
|
}
|
|
49477
49471
|
|
|
49478
|
-
function unmount(
|
|
49479
|
-
const outsideContainer = getOutsideContainer();
|
|
49472
|
+
function unmount(outsideContainer) {
|
|
49480
49473
|
|
|
49481
49474
|
if (outsideContainer && outsideContainer.shadowRoot) {
|
|
49482
49475
|
const shadowRoot = outsideContainer.shadowRoot;
|
|
@@ -49493,8 +49486,6 @@
|
|
|
49493
49486
|
}
|
|
49494
49487
|
|
|
49495
49488
|
function ReactShadowDOM({ document, element, content, outsideStyle = '', insideStyle = '' }) {
|
|
49496
|
-
unmount();
|
|
49497
|
-
|
|
49498
49489
|
const outsideContainer = createOutsideContainer({
|
|
49499
49490
|
document,
|
|
49500
49491
|
element,
|
|
@@ -49511,7 +49502,7 @@
|
|
|
49511
49502
|
|
|
49512
49503
|
ReactDOM__default['default'].render(content, insideContainer);
|
|
49513
49504
|
|
|
49514
|
-
return { content, unmount: () => unmount() }
|
|
49505
|
+
return { content, unmount: () => unmount(outsideContainer) }
|
|
49515
49506
|
}
|
|
49516
49507
|
|
|
49517
49508
|
var ReactShadowDOM_1 = ReactShadowDOM;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@depay/widgets",
|
|
3
3
|
"moduleName": "DePayWidgets",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.4",
|
|
5
5
|
"description": "Web3 Payments with any token. DePay simplifies and improves Web3 Payments with the power of DeFi. Accept any token with on-the-fly conversion.",
|
|
6
6
|
"main": "./dist/cjs/index.js",
|
|
7
7
|
"files": [
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@depay/walletconnect": "^1.0.2",
|
|
36
36
|
"depay-local-currency": "^1.1.0",
|
|
37
37
|
"depay-react-dialog-stack": "^2.1.0",
|
|
38
|
-
"depay-react-shadow-dom": "^2.0.
|
|
38
|
+
"depay-react-shadow-dom": "^2.0.4",
|
|
39
39
|
"depay-react-token-image": "^1.1.3",
|
|
40
40
|
"depay-web3-assets": "^2.2.0",
|
|
41
41
|
"depay-web3-blockchains": "^2.6.0",
|