paymob-pixel-alpha 1.1.10 → 1.1.11
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/main.js +4 -4
- package/package.json +1 -1
package/main.js
CHANGED
|
@@ -32725,7 +32725,6 @@ i18next.use(initReactI18next).init({
|
|
|
32725
32725
|
|
|
32726
32726
|
const ShadowWrapper = ({
|
|
32727
32727
|
elementId,
|
|
32728
|
-
stylesheets: _stylesheets = ['/main.css', '/styles.css'],
|
|
32729
32728
|
children
|
|
32730
32729
|
}) => {
|
|
32731
32730
|
const [shadowRoot, setShadowRoot] = (0,react.useState)(null);
|
|
@@ -32742,11 +32741,12 @@ const ShadowWrapper = ({
|
|
|
32742
32741
|
shadow = container.attachShadow({
|
|
32743
32742
|
mode: 'open'
|
|
32744
32743
|
});
|
|
32745
|
-
|
|
32744
|
+
const links = Array.from(document.querySelectorAll('link[href*="paymob-pixel"]')).map(link => link.href);
|
|
32745
|
+
links.forEach(href => {
|
|
32746
32746
|
var _shadow;
|
|
32747
32747
|
const link = document.createElement('link');
|
|
32748
32748
|
link.rel = 'stylesheet';
|
|
32749
|
-
link.href =
|
|
32749
|
+
link.href = href;
|
|
32750
32750
|
(_shadow = shadow) == null || _shadow.appendChild(link);
|
|
32751
32751
|
});
|
|
32752
32752
|
}
|
|
@@ -32758,7 +32758,7 @@ const ShadowWrapper = ({
|
|
|
32758
32758
|
return () => {
|
|
32759
32759
|
setShadowRoot(null);
|
|
32760
32760
|
};
|
|
32761
|
-
}, [elementId
|
|
32761
|
+
}, [elementId]);
|
|
32762
32762
|
if (error) {
|
|
32763
32763
|
const container = document.getElementById(elementId);
|
|
32764
32764
|
return /*#__PURE__*/(0,react_dom.createPortal)( /*#__PURE__*/(0,jsx_runtime.jsx)("div", {
|