easy-email-pro-theme 1.19.1 → 1.21.0
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/lib/HTMLEditorEditorContent-7bc95175.mjs +64 -0
- package/lib/VariablesEditorContent-0c1c9654.mjs +64 -0
- package/lib/assets/html.worker-74d0c5ef.js +25432 -0
- package/lib/{cssMode-dde2eda5.mjs → cssMode-9e882a40.mjs} +1 -3
- package/lib/{freemarker2-1cfd60a2.mjs → freemarker2-981a228f.mjs} +1 -3
- package/lib/{handlebars-d1c288d3.mjs → handlebars-f62da3d0.mjs} +1 -3
- package/lib/{html-8abd3319.mjs → html-8cd1319a.mjs} +1 -3
- package/lib/{htmlMode-bab4a440.mjs → htmlMode-39b63047.mjs} +1 -3
- package/lib/index.js +117 -5
- package/lib/{javascript-db88c96f.mjs → javascript-1453e49b.mjs} +2 -4
- package/lib/{jsonMode-86b850a7.mjs → jsonMode-dc57170b.mjs} +1 -3
- package/lib/{liquid-2bc063dc.mjs → liquid-8269f479.mjs} +1 -3
- package/lib/{python-2d23009f.mjs → python-84080ef9.mjs} +1 -3
- package/lib/{razor-80f54605.mjs → razor-d89aea20.mjs} +1 -3
- package/lib/{VariablesEditorContent-1949d97c.mjs → toggleHighContrast-6ac887bb.mjs} +92 -156
- package/lib/{tsMode-3c2db240.mjs → tsMode-9901839a.mjs} +1 -3
- package/lib/{typescript-f42bae27.mjs → typescript-6bff5bf4.mjs} +1 -3
- package/lib/typings/components/ConfigurationPanel/Elements/Code/index.d.ts +5 -0
- package/lib/typings/components/Form/HTMLEditor/HTMLEditorEditorContent.d.ts +7 -0
- package/lib/typings/components/Form/HTMLEditor/index.d.ts +6 -0
- package/lib/{xml-02fced98.mjs → xml-b3feef99.mjs} +1 -3
- package/lib/{yaml-55a866de.mjs → yaml-5f3e8a81.mjs} +1 -3
- package/package.json +1 -1
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React__default, { useRef, useState, useEffect, Suspense } from "react";
|
|
2
|
+
import { e as editor } from "./toggleHighContrast-6ac887bb.mjs";
|
|
3
|
+
import { t } from "easy-email-pro-core";
|
|
4
|
+
const HTMLEditorEditorContent = (props) => {
|
|
5
|
+
const { onChange } = props;
|
|
6
|
+
const valueRef = useRef(props.initialValue);
|
|
7
|
+
const [editor$1, setEditor] = useState(null);
|
|
8
|
+
const monacoEl = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (monacoEl) {
|
|
11
|
+
setEditor((editor2) => {
|
|
12
|
+
if (editor2)
|
|
13
|
+
return editor2;
|
|
14
|
+
const monEditor = editor.create(monacoEl.current, {
|
|
15
|
+
value: valueRef.current,
|
|
16
|
+
language: "html",
|
|
17
|
+
automaticLayout: true,
|
|
18
|
+
minimap: { enabled: false },
|
|
19
|
+
theme: "vs-dark"
|
|
20
|
+
});
|
|
21
|
+
monEditor.onDidChangeModelContent(() => {
|
|
22
|
+
onChange(monEditor.getValue());
|
|
23
|
+
});
|
|
24
|
+
return monEditor;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return () => editor$1 == null ? void 0 : editor$1.dispose();
|
|
28
|
+
}, [editor$1, onChange]);
|
|
29
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
30
|
+
Suspense,
|
|
31
|
+
{
|
|
32
|
+
fallback: /* @__PURE__ */ React__default.createElement(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
height: "100%",
|
|
37
|
+
width: "100%",
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
backgroundColor: "#263238",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
fontSize: 24,
|
|
43
|
+
color: "#fff"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
t(`Editor Loading...`)
|
|
47
|
+
)
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ React__default.createElement(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
style: {
|
|
53
|
+
height: "100%",
|
|
54
|
+
width: "100%",
|
|
55
|
+
position: "relative"
|
|
56
|
+
},
|
|
57
|
+
ref: monacoEl
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
HTMLEditorEditorContent as default
|
|
64
|
+
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import React__default, { useRef, useState, useEffect, Suspense } from "react";
|
|
2
|
+
import { e as editor } from "./toggleHighContrast-6ac887bb.mjs";
|
|
3
|
+
import { t } from "easy-email-pro-core";
|
|
4
|
+
const VariablesEditorContent = (props) => {
|
|
5
|
+
const { onChange } = props;
|
|
6
|
+
const valueRef = useRef(props.initialValue);
|
|
7
|
+
const [editor$1, setEditor] = useState(null);
|
|
8
|
+
const monacoEl = useRef(null);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
if (monacoEl) {
|
|
11
|
+
setEditor((editor2) => {
|
|
12
|
+
if (editor2)
|
|
13
|
+
return editor2;
|
|
14
|
+
const monEditor = editor.create(monacoEl.current, {
|
|
15
|
+
value: valueRef.current,
|
|
16
|
+
language: "json",
|
|
17
|
+
automaticLayout: true,
|
|
18
|
+
minimap: { enabled: false },
|
|
19
|
+
theme: "vs-dark"
|
|
20
|
+
});
|
|
21
|
+
monEditor.onDidChangeModelContent(() => {
|
|
22
|
+
onChange(monEditor.getValue());
|
|
23
|
+
});
|
|
24
|
+
return monEditor;
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return () => editor$1 == null ? void 0 : editor$1.dispose();
|
|
28
|
+
}, [editor$1, onChange]);
|
|
29
|
+
return /* @__PURE__ */ React__default.createElement(
|
|
30
|
+
Suspense,
|
|
31
|
+
{
|
|
32
|
+
fallback: /* @__PURE__ */ React__default.createElement(
|
|
33
|
+
"div",
|
|
34
|
+
{
|
|
35
|
+
style: {
|
|
36
|
+
height: "100%",
|
|
37
|
+
width: "100%",
|
|
38
|
+
display: "flex",
|
|
39
|
+
alignItems: "center",
|
|
40
|
+
backgroundColor: "#263238",
|
|
41
|
+
justifyContent: "center",
|
|
42
|
+
fontSize: 24,
|
|
43
|
+
color: "#fff"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
t(`Editor Loading...`)
|
|
47
|
+
)
|
|
48
|
+
},
|
|
49
|
+
/* @__PURE__ */ React__default.createElement(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
style: {
|
|
53
|
+
height: "100%",
|
|
54
|
+
width: "100%",
|
|
55
|
+
position: "relative"
|
|
56
|
+
},
|
|
57
|
+
ref: monacoEl
|
|
58
|
+
}
|
|
59
|
+
)
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
export {
|
|
63
|
+
VariablesEditorContent as default
|
|
64
|
+
};
|