@legalplace/wizardx-core 4.42.10-nightly.20251125123510 → 4.42.10-nightly.20251125151716
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/WizardCore.js
CHANGED
package/dist/components/View.js
CHANGED
|
@@ -39,8 +39,7 @@ class ViewComponent extends React.Component {
|
|
|
39
39
|
break;
|
|
40
40
|
default:
|
|
41
41
|
if (false)
|
|
42
|
-
AppStateComponent =
|
|
43
|
-
loadThemeComponent("WizardComponent");
|
|
42
|
+
AppStateComponent = loadThemeComponent("WizardComponent");
|
|
44
43
|
else
|
|
45
44
|
AppStateComponent = () => _jsx(_Fragment, {});
|
|
46
45
|
break;
|
|
@@ -18,6 +18,7 @@ import { updateOptionAction, updateVariableAction } from "../actions/inputs";
|
|
|
18
18
|
import { smartScriptLoadedMessage } from "../../constants/smartscript";
|
|
19
19
|
import { RESET_STATE } from "../constants/app";
|
|
20
20
|
let iframe = null;
|
|
21
|
+
let iframeStyleObserver = null;
|
|
21
22
|
const watchEnableSmartScript = (mpi, next, action) => {
|
|
22
23
|
next(action);
|
|
23
24
|
if (PathReader.isSmartScriptPath()) {
|
|
@@ -27,9 +28,38 @@ const watchEnableSmartScript = (mpi, next, action) => {
|
|
|
27
28
|
if (iframeElement) {
|
|
28
29
|
iframeElement.remove();
|
|
29
30
|
}
|
|
31
|
+
if (iframeStyleObserver) {
|
|
32
|
+
iframeStyleObserver.disconnect();
|
|
33
|
+
iframeStyleObserver = null;
|
|
34
|
+
}
|
|
30
35
|
iframe = document.createElement("iframe");
|
|
31
36
|
iframe.id = "lp-smartscript";
|
|
32
|
-
|
|
37
|
+
const correctStyles = {
|
|
38
|
+
position: "absolute",
|
|
39
|
+
width: "0",
|
|
40
|
+
height: "0",
|
|
41
|
+
border: "0",
|
|
42
|
+
left: "-9999px",
|
|
43
|
+
top: "-9999px",
|
|
44
|
+
visibility: "hidden",
|
|
45
|
+
pointerEvents: "none",
|
|
46
|
+
zIndex: "-1",
|
|
47
|
+
};
|
|
48
|
+
Object.assign(iframe.style, correctStyles);
|
|
49
|
+
iframeStyleObserver = new MutationObserver((mutations) => {
|
|
50
|
+
mutations.forEach((mutation) => {
|
|
51
|
+
if (mutation.type === "attributes" &&
|
|
52
|
+
mutation.attributeName === "style") {
|
|
53
|
+
if (iframe) {
|
|
54
|
+
Object.assign(iframe.style, correctStyles);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
});
|
|
59
|
+
iframeStyleObserver.observe(iframe, {
|
|
60
|
+
attributes: true,
|
|
61
|
+
attributeFilter: ["style"],
|
|
62
|
+
});
|
|
33
63
|
const state = mpi.getState();
|
|
34
64
|
const permalink = getConfig().permalink || state.app.meta.permalink || "";
|
|
35
65
|
const prefix = getConfig().prefix || state.app.meta.prefix || "";
|
|
@@ -64,6 +94,10 @@ const watchEnableSmartScript = (mpi, next, action) => {
|
|
|
64
94
|
};
|
|
65
95
|
const watchResetState = (mpi, next, action) => {
|
|
66
96
|
next(action);
|
|
97
|
+
if (iframeStyleObserver) {
|
|
98
|
+
iframeStyleObserver.disconnect();
|
|
99
|
+
iframeStyleObserver = null;
|
|
100
|
+
}
|
|
67
101
|
if (iframe) {
|
|
68
102
|
document.body.removeChild(iframe);
|
|
69
103
|
iframe = null;
|