@markopolo_ai_inc/markopolo-email-editor 1.0.3
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/README.md +63 -0
- package/build/asset-manifest.json +12 -0
- package/build/favicon.ico +0 -0
- package/build/index.html +1 -0
- package/build/logo192.png +0 -0
- package/build/logo512.png +0 -0
- package/build/manifest.json +25 -0
- package/build/robots.txt +3 -0
- package/build/static/css/main.588cb535.css +9 -0
- package/build/static/js/206.a4343501.chunk.js +1 -0
- package/build/static/js/main.053d366a.js +2 -0
- package/build/static/js/main.053d366a.js.LICENSE.txt +56 -0
- package/package.json +64 -0
- package/public/favicon.ico +0 -0
- package/public/index.html +50 -0
- package/public/logo192.png +0 -0
- package/public/logo512.png +0 -0
- package/public/manifest.json +25 -0
- package/public/robots.txt +3 -0
- package/src/App.js +15 -0
- package/src/components/EmailEditor/assets/App.css +339 -0
- package/src/components/EmailEditor/assets/Columns.css +309 -0
- package/src/components/EmailEditor/assets/Header.css +174 -0
- package/src/components/EmailEditor/assets/ImageBlock.css +12 -0
- package/src/components/EmailEditor/assets/Preview.css +30 -0
- package/src/components/EmailEditor/assets/RichText.css +199 -0
- package/src/components/EmailEditor/assets/RightSettings.css +520 -0
- package/src/components/EmailEditor/assets/Sidebar.css +195 -0
- package/src/components/EmailEditor/components/BlockItems/ButtonBlock.js +25 -0
- package/src/components/EmailEditor/components/BlockItems/DividerBlock.js +19 -0
- package/src/components/EmailEditor/components/BlockItems/HeadingBlock.js +16 -0
- package/src/components/EmailEditor/components/BlockItems/ImageBlock.js +28 -0
- package/src/components/EmailEditor/components/BlockItems/MenuBlock.js +52 -0
- package/src/components/EmailEditor/components/BlockItems/SocialLinkBlocks.js +26 -0
- package/src/components/EmailEditor/components/BlockItems/SpacerBlock.js +23 -0
- package/src/components/EmailEditor/components/BlockItems/TextBlock.js +16 -0
- package/src/components/EmailEditor/components/BlockItems/index.js +25 -0
- package/src/components/EmailEditor/components/ColorPicker/index.js +26 -0
- package/src/components/EmailEditor/components/Column/index.js +253 -0
- package/src/components/EmailEditor/components/Header/index.js +243 -0
- package/src/components/EmailEditor/components/LeftSideBar/index.js +253 -0
- package/src/components/EmailEditor/components/Main/index.js +281 -0
- package/src/components/EmailEditor/components/Preview/index.js +97 -0
- package/src/components/EmailEditor/components/RichText/Bold.js +37 -0
- package/src/components/EmailEditor/components/RichText/FontColor.js +39 -0
- package/src/components/EmailEditor/components/RichText/InsertOrderedList.js +36 -0
- package/src/components/EmailEditor/components/RichText/InsertUnorderedList.js +36 -0
- package/src/components/EmailEditor/components/RichText/Italic.js +36 -0
- package/src/components/EmailEditor/components/RichText/Link.js +99 -0
- package/src/components/EmailEditor/components/RichText/RichTextLayout.js +53 -0
- package/src/components/EmailEditor/components/RichText/Strikethrough.js +36 -0
- package/src/components/EmailEditor/components/RichText/TextAlign.js +58 -0
- package/src/components/EmailEditor/components/RichText/Underline.js +36 -0
- package/src/components/EmailEditor/components/RichText/index.js +210 -0
- package/src/components/EmailEditor/components/RightSetting/index.js +126 -0
- package/src/components/EmailEditor/components/StyleSettings/ButtonStyleSettings.js +141 -0
- package/src/components/EmailEditor/components/StyleSettings/ColumnStyleSettings.js +241 -0
- package/src/components/EmailEditor/components/StyleSettings/DividerStyleSettings.js +111 -0
- package/src/components/EmailEditor/components/StyleSettings/HeadingStyleSettings.js +162 -0
- package/src/components/EmailEditor/components/StyleSettings/ImageStyleSettings.js +217 -0
- package/src/components/EmailEditor/components/StyleSettings/MenuStyleSettings.js +177 -0
- package/src/components/EmailEditor/components/StyleSettings/PaddingSettings.js +30 -0
- package/src/components/EmailEditor/components/StyleSettings/SocialLinkSettings.js +250 -0
- package/src/components/EmailEditor/components/StyleSettings/SpacerStyleSettings.js +38 -0
- package/src/components/EmailEditor/components/StyleSettings/TextStyleSettings.js +108 -0
- package/src/components/EmailEditor/components/StyleSettings/index.js +32 -0
- package/src/components/EmailEditor/configs/getBlockConfigsList.js +263 -0
- package/src/components/EmailEditor/configs/getColumnConfigFunc.js +59 -0
- package/src/components/EmailEditor/configs/getColumnsSettings.js +246 -0
- package/src/components/EmailEditor/configs/useDataSource.js +19 -0
- package/src/components/EmailEditor/index.js +93 -0
- package/src/components/EmailEditor/reducers/index.js +173 -0
- package/src/components/EmailEditor/translation/en.js +166 -0
- package/src/components/EmailEditor/translation/index.js +39 -0
- package/src/components/EmailEditor/translation/zh.js +166 -0
- package/src/components/EmailEditor/utils/classNames.js +5 -0
- package/src/components/EmailEditor/utils/dataToHTML.js +323 -0
- package/src/components/EmailEditor/utils/exportValidation.js +296 -0
- package/src/components/EmailEditor/utils/helpers.js +48 -0
- package/src/components/EmailEditor/utils/pexels.js +20 -0
- package/src/components/EmailEditor/utils/useSection.js +24 -0
- package/src/components/EmailEditor/utils/useStyleLayout.js +82 -0
- package/src/index.css +99 -0
- package/src/index.js +15 -0
- package/src/logo.svg +1 -0
- package/src/pages/AppPage/index.js +10 -0
- package/src/pages/Dashboard/Header.js +192 -0
- package/src/pages/Dashboard/defaultBlockList.json +1758 -0
- package/src/pages/Dashboard/index.js +48 -0
- package/src/reportWebVitals.js +13 -0
- package/src/setupTests.js +5 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { GlobalContext } from "../../reducers";
|
|
3
|
+
import { InputNumber } from "antd";
|
|
4
|
+
import useLayout from "../../utils/useStyleLayout";
|
|
5
|
+
import useTranslation from "../../translation";
|
|
6
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
7
|
+
import { faArrowsAltV } from "@fortawesome/free-solid-svg-icons";
|
|
8
|
+
|
|
9
|
+
const SpacerStyleSettings = () => {
|
|
10
|
+
const { currentItem } = useContext(GlobalContext);
|
|
11
|
+
const { t } = useTranslation();
|
|
12
|
+
const { findStyleItem, cardItemElement, inputChange } = useLayout();
|
|
13
|
+
|
|
14
|
+
const height = findStyleItem(currentItem.data.styles, "height");
|
|
15
|
+
const heightNum = typeof height === "number" ? height : parseInt(height, 10) || 16;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<div className="margin-y-30">
|
|
19
|
+
<div className="right-setting-block-item-title">{t("spacer_block")}</div>
|
|
20
|
+
{cardItemElement(
|
|
21
|
+
<span className="flex items-center gap-2">
|
|
22
|
+
<FontAwesomeIcon icon={faArrowsAltV} className="tag-style-size" />
|
|
23
|
+
{t("height")}
|
|
24
|
+
</span>,
|
|
25
|
+
<InputNumber
|
|
26
|
+
min={0}
|
|
27
|
+
max={500}
|
|
28
|
+
className="input-width"
|
|
29
|
+
addonAfter="px"
|
|
30
|
+
value={heightNum}
|
|
31
|
+
onChange={(value) => inputChange("height")(value ?? 0)}
|
|
32
|
+
/>
|
|
33
|
+
)}
|
|
34
|
+
</div>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
export default SpacerStyleSettings;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { GlobalContext } from "../../reducers";
|
|
3
|
+
import classNames from "../../utils/classNames";
|
|
4
|
+
import { InputNumber, Select } from "antd";
|
|
5
|
+
|
|
6
|
+
import ColorPicker from "../ColorPicker";
|
|
7
|
+
import PaddingSettings from "./PaddingSettings";
|
|
8
|
+
import useLayout from "../../utils/useStyleLayout";
|
|
9
|
+
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
|
|
10
|
+
import { faAlignCenter, faAlignLeft, faAlignRight, faAlignJustify } from "@fortawesome/free-solid-svg-icons";
|
|
11
|
+
import useTranslation from "../../translation";
|
|
12
|
+
|
|
13
|
+
const TextStyleSettings = () => {
|
|
14
|
+
const { currentItem } = useContext(GlobalContext);
|
|
15
|
+
const { t } = useTranslation();
|
|
16
|
+
const { findStyleItem, cardItemElement, colorChange, paddingChange, otherStylesChange, inputChange } = useLayout();
|
|
17
|
+
|
|
18
|
+
const PaddingStylesElement = () => {
|
|
19
|
+
return (
|
|
20
|
+
<>
|
|
21
|
+
<div className="right-setting-block-item-title">{t("padding_settings")}</div>
|
|
22
|
+
<PaddingSettings
|
|
23
|
+
padding={{
|
|
24
|
+
paddingTop: findStyleItem(currentItem.data.styles, "paddingTop"),
|
|
25
|
+
paddingRight: findStyleItem(currentItem.data.styles, "paddingRight"),
|
|
26
|
+
paddingLeft: findStyleItem(currentItem.data.styles, "paddingLeft"),
|
|
27
|
+
paddingBottom: findStyleItem(currentItem.data.styles, "paddingBottom"),
|
|
28
|
+
}}
|
|
29
|
+
setPadding={paddingChange}
|
|
30
|
+
/>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
const textStylesElement = () => {
|
|
36
|
+
const color = findStyleItem(currentItem.data.styles, "color");
|
|
37
|
+
const textAlign = findStyleItem(currentItem.data.styles, "textAlign");
|
|
38
|
+
const fontFamily = findStyleItem(currentItem.data.styles, "fontFamily");
|
|
39
|
+
const fontSize = findStyleItem(currentItem.data.styles, "fontSize");
|
|
40
|
+
const lineHeight = findStyleItem(currentItem.data.styles, "lineHeight");
|
|
41
|
+
const fontFamilyList = ["sans-serif", "Arial", "Verdana", "Times New Roman", "Garamond", "Georgia", "Courier New", "cursive"];
|
|
42
|
+
|
|
43
|
+
return (
|
|
44
|
+
<>
|
|
45
|
+
<div className="right-setting-block-item-title">{t("text_styles")}</div>
|
|
46
|
+
{cardItemElement(t("font_color"), <ColorPicker color={color} setColor={colorChange("color")} />)}
|
|
47
|
+
{cardItemElement(
|
|
48
|
+
t("text_align"),
|
|
49
|
+
<div className="flex justify-center items-center">
|
|
50
|
+
{[
|
|
51
|
+
{ icon: faAlignLeft, value: "left" },
|
|
52
|
+
{ icon: faAlignCenter, value: "center" },
|
|
53
|
+
{ icon: faAlignRight, value: "right" },
|
|
54
|
+
{ icon: faAlignJustify, value: "justify" },
|
|
55
|
+
].map(({ icon, value }) => {
|
|
56
|
+
return (
|
|
57
|
+
<div
|
|
58
|
+
key={value}
|
|
59
|
+
className={classNames(textAlign === value ? "align-style-item-active" : "align-style-item-un_active", "align-style-item")}
|
|
60
|
+
onClick={() => otherStylesChange("textAlign", value)}
|
|
61
|
+
>
|
|
62
|
+
<FontAwesomeIcon icon={icon} className="tag-style-size" />
|
|
63
|
+
</div>
|
|
64
|
+
);
|
|
65
|
+
})}
|
|
66
|
+
</div>
|
|
67
|
+
)}
|
|
68
|
+
{cardItemElement(
|
|
69
|
+
t("font_family"),
|
|
70
|
+
<Select
|
|
71
|
+
className="input-width"
|
|
72
|
+
value={fontFamily}
|
|
73
|
+
onChange={inputChange("fontFamily")}
|
|
74
|
+
getPopupContainer={() => document.querySelector(".right-settings") || document.body}
|
|
75
|
+
>
|
|
76
|
+
{fontFamilyList.map((item) => (
|
|
77
|
+
<Select.Option key={item} value={item}>
|
|
78
|
+
{item}
|
|
79
|
+
</Select.Option>
|
|
80
|
+
))}
|
|
81
|
+
</Select>
|
|
82
|
+
)}
|
|
83
|
+
{cardItemElement(
|
|
84
|
+
t("font_size"),
|
|
85
|
+
<InputNumber min={0} className="input-width" addonAfter="px" value={fontSize} onChange={inputChange("fontSize")} />
|
|
86
|
+
)}
|
|
87
|
+
{cardItemElement(
|
|
88
|
+
t("line_height"),
|
|
89
|
+
<InputNumber
|
|
90
|
+
className="input-width"
|
|
91
|
+
addonAfter="%"
|
|
92
|
+
min={0}
|
|
93
|
+
value={Number(lineHeight.replace("%", ""))}
|
|
94
|
+
onChange={(value) => inputChange("lineHeight")(value + "%")}
|
|
95
|
+
/>
|
|
96
|
+
)}
|
|
97
|
+
</>
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
return (
|
|
101
|
+
<div className="margin-y-30">
|
|
102
|
+
{textStylesElement()}
|
|
103
|
+
{PaddingStylesElement()}
|
|
104
|
+
</div>
|
|
105
|
+
);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
export default TextStyleSettings;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { useContext } from "react";
|
|
2
|
+
import { GlobalContext } from "../../reducers";
|
|
3
|
+
|
|
4
|
+
import ColumnStyleSettings from "./ColumnStyleSettings";
|
|
5
|
+
import TextStyleSettings from "./TextStyleSettings";
|
|
6
|
+
import HeadingStyleSettings from "./HeadingStyleSettings";
|
|
7
|
+
import ButtonStyleSettings from "./ButtonStyleSettings";
|
|
8
|
+
import DividerStyleSettings from "./DividerStyleSettings";
|
|
9
|
+
import SpacerStyleSettings from "./SpacerStyleSettings";
|
|
10
|
+
import MenuStyleSettings from "./MenuStyleSettings";
|
|
11
|
+
import ImageStyleSettings from "./ImageStyleSettings";
|
|
12
|
+
import SocialLinkSettings from "./SocialLinkSettings";
|
|
13
|
+
|
|
14
|
+
const StyleSettings = () => {
|
|
15
|
+
const { currentItem } = useContext(GlobalContext);
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<>
|
|
19
|
+
{currentItem?.data.key === "column" && <ColumnStyleSettings />}
|
|
20
|
+
{currentItem?.data.key === "text" && <TextStyleSettings />}
|
|
21
|
+
{currentItem?.data.key === "heading" && <HeadingStyleSettings />}
|
|
22
|
+
{currentItem?.data.key === "button" && <ButtonStyleSettings />}
|
|
23
|
+
{currentItem?.data.key === "divider" && <DividerStyleSettings />}
|
|
24
|
+
{currentItem?.data.key === "spacer" && <SpacerStyleSettings />}
|
|
25
|
+
{currentItem?.data.key === "menu" && <MenuStyleSettings />}
|
|
26
|
+
{currentItem?.data.key === "image" && <ImageStyleSettings />}
|
|
27
|
+
{currentItem?.data.key === "social_link" && <SocialLinkSettings />}
|
|
28
|
+
</>
|
|
29
|
+
);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
export default StyleSettings;
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
const getBlockConfigsList = (t) => {
|
|
2
|
+
return [
|
|
3
|
+
{
|
|
4
|
+
name: t("column"),
|
|
5
|
+
key: "column",
|
|
6
|
+
type: "full",
|
|
7
|
+
styles: {
|
|
8
|
+
key: "column",
|
|
9
|
+
desktop: {
|
|
10
|
+
backgroundColor: "transparent",
|
|
11
|
+
paddingTop: 0,
|
|
12
|
+
paddingLeft: 0,
|
|
13
|
+
paddingRight: 0,
|
|
14
|
+
paddingBottom: 0,
|
|
15
|
+
contentBackground: "#fff",
|
|
16
|
+
},
|
|
17
|
+
mobile: {},
|
|
18
|
+
},
|
|
19
|
+
children: [
|
|
20
|
+
{
|
|
21
|
+
name: t("content"),
|
|
22
|
+
key: "content",
|
|
23
|
+
width: "100%",
|
|
24
|
+
styles: {
|
|
25
|
+
key: "column",
|
|
26
|
+
desktop: {
|
|
27
|
+
backgroundColor: "transparent",
|
|
28
|
+
paddingTop: 0,
|
|
29
|
+
paddingLeft: 0,
|
|
30
|
+
paddingRight: 0,
|
|
31
|
+
paddingBottom: 0,
|
|
32
|
+
contentBackground: "transparent",
|
|
33
|
+
},
|
|
34
|
+
mobile: {},
|
|
35
|
+
},
|
|
36
|
+
children: [
|
|
37
|
+
{
|
|
38
|
+
name: t("drag_block_here"),
|
|
39
|
+
key: "empty",
|
|
40
|
+
width: "100%",
|
|
41
|
+
styles: {
|
|
42
|
+
desktop: {
|
|
43
|
+
backgroundColor: "transparent",
|
|
44
|
+
paddingTop: 0,
|
|
45
|
+
paddingLeft: 0,
|
|
46
|
+
paddingRight: 0,
|
|
47
|
+
paddingBottom: 0,
|
|
48
|
+
},
|
|
49
|
+
mobile: {},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: t("text"),
|
|
58
|
+
key: "text",
|
|
59
|
+
text: t("text_content"),
|
|
60
|
+
styles: {
|
|
61
|
+
desktop: {
|
|
62
|
+
fontSize: 14,
|
|
63
|
+
fontFamily: "sans-serif",
|
|
64
|
+
color: undefined,
|
|
65
|
+
lineHeight: "140%",
|
|
66
|
+
paddingTop: 12,
|
|
67
|
+
paddingBottom: 12,
|
|
68
|
+
paddingLeft: 12,
|
|
69
|
+
paddingRight: 12,
|
|
70
|
+
textAlign: "left",
|
|
71
|
+
},
|
|
72
|
+
mobile: {},
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
name: t("heading"),
|
|
77
|
+
key: "heading",
|
|
78
|
+
text: t("heading_content"),
|
|
79
|
+
type: "h1",
|
|
80
|
+
styles: {
|
|
81
|
+
desktop: {
|
|
82
|
+
fontSize: 22,
|
|
83
|
+
lineHeight: "140%",
|
|
84
|
+
fontFamily: "sans-serif",
|
|
85
|
+
color: undefined,
|
|
86
|
+
paddingTop: 12,
|
|
87
|
+
paddingBottom: 12,
|
|
88
|
+
paddingLeft: 12,
|
|
89
|
+
paddingRight: 12,
|
|
90
|
+
textAlign: "left",
|
|
91
|
+
fontWeight: "bold",
|
|
92
|
+
},
|
|
93
|
+
mobile: {},
|
|
94
|
+
},
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
name: t("button"),
|
|
98
|
+
key: "button",
|
|
99
|
+
text: t("button"),
|
|
100
|
+
type: "link",
|
|
101
|
+
linkURL: "",
|
|
102
|
+
contentStyles: {
|
|
103
|
+
desktop: {
|
|
104
|
+
textAlign: "center",
|
|
105
|
+
paddingTop: 12,
|
|
106
|
+
paddingBottom: 12,
|
|
107
|
+
paddingLeft: 12,
|
|
108
|
+
paddingRight: 12,
|
|
109
|
+
},
|
|
110
|
+
mobile: {},
|
|
111
|
+
},
|
|
112
|
+
styles: {
|
|
113
|
+
desktop: {
|
|
114
|
+
width: "auto",
|
|
115
|
+
fontSize: 12,
|
|
116
|
+
lineHeight: "140%",
|
|
117
|
+
borderRadius: 4,
|
|
118
|
+
fontFamily: "sans-serif",
|
|
119
|
+
paddingTop: 10,
|
|
120
|
+
paddingBottom: 10,
|
|
121
|
+
paddingLeft: 20,
|
|
122
|
+
paddingRight: 20,
|
|
123
|
+
backgroundColor: "#2faade",
|
|
124
|
+
color: "#fff",
|
|
125
|
+
display: "inline-block",
|
|
126
|
+
},
|
|
127
|
+
mobile: {},
|
|
128
|
+
},
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
name: t("spacer"),
|
|
132
|
+
key: "spacer",
|
|
133
|
+
contentStyles: {
|
|
134
|
+
desktop: {
|
|
135
|
+
paddingTop: 0,
|
|
136
|
+
paddingBottom: 0,
|
|
137
|
+
paddingLeft: 0,
|
|
138
|
+
paddingRight: 0,
|
|
139
|
+
},
|
|
140
|
+
mobile: {},
|
|
141
|
+
},
|
|
142
|
+
styles: {
|
|
143
|
+
desktop: {
|
|
144
|
+
height: 16,
|
|
145
|
+
width: "100%",
|
|
146
|
+
display: "block",
|
|
147
|
+
},
|
|
148
|
+
mobile: {},
|
|
149
|
+
},
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
name: t("divider"),
|
|
153
|
+
key: "divider",
|
|
154
|
+
contentStyles: {
|
|
155
|
+
desktop: {
|
|
156
|
+
paddingTop: 12,
|
|
157
|
+
paddingBottom: 12,
|
|
158
|
+
paddingLeft: 12,
|
|
159
|
+
paddingRight: 12,
|
|
160
|
+
textAlign: "center",
|
|
161
|
+
},
|
|
162
|
+
mobile: {},
|
|
163
|
+
},
|
|
164
|
+
styles: {
|
|
165
|
+
desktop: {
|
|
166
|
+
width: "100%",
|
|
167
|
+
borderTopStyle: "solid",
|
|
168
|
+
borderTopColor: "#ccc",
|
|
169
|
+
borderTopWidth: 1,
|
|
170
|
+
display: "inline-block",
|
|
171
|
+
verticalAlign: "middle",
|
|
172
|
+
},
|
|
173
|
+
mobile: {},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
name: t("image"),
|
|
178
|
+
key: "image",
|
|
179
|
+
src: "",
|
|
180
|
+
alt: "Image",
|
|
181
|
+
type: "link",
|
|
182
|
+
linkURL: "",
|
|
183
|
+
contentStyles: {
|
|
184
|
+
desktop: {
|
|
185
|
+
paddingTop: 12,
|
|
186
|
+
paddingBottom: 12,
|
|
187
|
+
paddingLeft: 12,
|
|
188
|
+
paddingRight: 12,
|
|
189
|
+
textAlign: "center",
|
|
190
|
+
},
|
|
191
|
+
mobile: {},
|
|
192
|
+
},
|
|
193
|
+
styles: {
|
|
194
|
+
desktop: {
|
|
195
|
+
width: "auto",
|
|
196
|
+
},
|
|
197
|
+
mobile: {},
|
|
198
|
+
},
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
name: t("menu"),
|
|
202
|
+
key: "menu",
|
|
203
|
+
list: [
|
|
204
|
+
{ label: "Page", url: "", target: "_self" },
|
|
205
|
+
{ label: "Page", url: "", target: "_self" },
|
|
206
|
+
],
|
|
207
|
+
separator: " | ",
|
|
208
|
+
contentStyles: {
|
|
209
|
+
desktop: {
|
|
210
|
+
paddingTop: 12,
|
|
211
|
+
paddingBottom: 12,
|
|
212
|
+
paddingLeft: 12,
|
|
213
|
+
paddingRight: 12,
|
|
214
|
+
textAlign: "center",
|
|
215
|
+
},
|
|
216
|
+
mobile: {},
|
|
217
|
+
},
|
|
218
|
+
styles: {
|
|
219
|
+
desktop: {
|
|
220
|
+
fontSize: 14,
|
|
221
|
+
fontFamily: "sans-serif",
|
|
222
|
+
color: "#333333",
|
|
223
|
+
linkColor: "#2faade",
|
|
224
|
+
paddingTop: 5,
|
|
225
|
+
paddingBottom: 5,
|
|
226
|
+
paddingLeft: 15,
|
|
227
|
+
paddingRight: 15,
|
|
228
|
+
textAlign: "center",
|
|
229
|
+
letterSpacing: 0,
|
|
230
|
+
fontWeight: "normal",
|
|
231
|
+
},
|
|
232
|
+
mobile: {},
|
|
233
|
+
},
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: t("social_link"),
|
|
237
|
+
key: "social_link",
|
|
238
|
+
list: [
|
|
239
|
+
{ image: "https://s.magecdn.com/social/tc-facebook.svg", title: "Facebook", linkURL: "" },
|
|
240
|
+
{ image: "https://s.magecdn.com/social/tc-instagram.svg", title: "Instagram", linkURL: "" },
|
|
241
|
+
{ image: "https://s.magecdn.com/social/tc-tiktok.svg", title: "TikTok", linkURL: "" },
|
|
242
|
+
{ image: "https://s.magecdn.com/social/tc-x.svg", title: "Twitter", linkURL: "" },
|
|
243
|
+
],
|
|
244
|
+
imageWidth: 32,
|
|
245
|
+
contentStyles: {
|
|
246
|
+
desktop: {
|
|
247
|
+
paddingTop: 12,
|
|
248
|
+
paddingBottom: 12,
|
|
249
|
+
paddingLeft: 12,
|
|
250
|
+
paddingRight: 12,
|
|
251
|
+
textAlign: "left",
|
|
252
|
+
},
|
|
253
|
+
mobile: {},
|
|
254
|
+
},
|
|
255
|
+
styles: {
|
|
256
|
+
desktop: { paddingTop: 4, paddingBottom: 4, paddingLeft: 6, paddingRight: 6 },
|
|
257
|
+
mobile: {},
|
|
258
|
+
},
|
|
259
|
+
},
|
|
260
|
+
];
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
export default getBlockConfigsList;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
const getColumnConfigFunc = (t) => {
|
|
2
|
+
return (item) => {
|
|
3
|
+
const contentConfig = {
|
|
4
|
+
name: t("drag_block_here"),
|
|
5
|
+
key: "empty",
|
|
6
|
+
width: "100%",
|
|
7
|
+
styles: {
|
|
8
|
+
desktop: {
|
|
9
|
+
backgroundColor: "transparent",
|
|
10
|
+
paddingTop: 0,
|
|
11
|
+
paddingLeft: 0,
|
|
12
|
+
paddingRight: 0,
|
|
13
|
+
paddingBottom: 0,
|
|
14
|
+
},
|
|
15
|
+
mobile: {},
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
name: t("column"),
|
|
21
|
+
key: "column",
|
|
22
|
+
type: "full",
|
|
23
|
+
styles: {
|
|
24
|
+
key: "column",
|
|
25
|
+
desktop: {
|
|
26
|
+
backgroundColor: "transparent",
|
|
27
|
+
paddingTop: 0,
|
|
28
|
+
paddingLeft: 0,
|
|
29
|
+
paddingRight: 0,
|
|
30
|
+
paddingBottom: 0,
|
|
31
|
+
contentBackground: "#fff",
|
|
32
|
+
},
|
|
33
|
+
mobile: {},
|
|
34
|
+
},
|
|
35
|
+
children: [
|
|
36
|
+
{
|
|
37
|
+
name: t("content"),
|
|
38
|
+
key: "content",
|
|
39
|
+
width: "100%",
|
|
40
|
+
styles: {
|
|
41
|
+
key: "column",
|
|
42
|
+
desktop: {
|
|
43
|
+
backgroundColor: "transparent",
|
|
44
|
+
paddingTop: 0,
|
|
45
|
+
paddingLeft: 0,
|
|
46
|
+
paddingRight: 0,
|
|
47
|
+
paddingBottom: 0,
|
|
48
|
+
contentBackground: "transparent",
|
|
49
|
+
},
|
|
50
|
+
mobile: {},
|
|
51
|
+
},
|
|
52
|
+
children: [item ? item : contentConfig],
|
|
53
|
+
},
|
|
54
|
+
],
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
export default getColumnConfigFunc;
|