@flozy/editor 8.0.6 → 8.0.7
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/Editor/ChatEditor.js +1 -2
- package/dist/Editor/CommonEditor.js +33 -112
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +16 -32
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +9 -25
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +12 -57
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +1 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +4 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +1 -6
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +9 -19
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +2 -32
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +29 -126
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +3 -3
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +1 -1
- package/dist/Editor/Elements/DataView/styles.js +8 -8
- package/dist/Editor/Elements/Embed/Image.js +2 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +14 -0
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +1 -2
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -2
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -3
- package/dist/Editor/Elements/Grid/GridItem.js +3 -2
- package/dist/Editor/Elements/Link/Link.js +43 -70
- package/dist/Editor/Elements/SimpleText/index.js +12 -7
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +16 -17
- package/dist/Editor/Elements/Table/TableCell.js +3 -4
- package/dist/Editor/Elements/Title/title.js +1 -13
- package/dist/Editor/Elements/Variables/Style.js +2 -28
- package/dist/Editor/Elements/Variables/VariableButton.js +4 -17
- package/dist/Editor/Styles/EditorStyles.js +291 -287
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +15 -7
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +0 -1
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +8 -9
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +85 -210
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -16
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +9 -56
- package/dist/Editor/Toolbar/PopupTool/index.js +56 -34
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/common/ColorPickerButton.js +9 -35
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/DnD/Draggable.js +1 -0
- package/dist/Editor/common/FontLoader/FontList.js +11 -3
- package/dist/Editor/common/FontLoader/FontLoader.js +42 -74
- package/dist/Editor/common/Icon.js +0 -28
- package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -2
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/ImageSelector/UploadStyles.js +10 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +5 -0
- package/dist/Editor/common/LinkSettings/index.js +5 -0
- package/dist/Editor/common/MentionsPopup/Styles.js +12 -6
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/styles.js +2 -0
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -8
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +4 -5
- package/dist/Editor/common/RnD/Utils/index.js +0 -45
- package/dist/Editor/common/RnD/index.js +3 -23
- package/dist/Editor/common/Section/index.js +89 -60
- package/dist/Editor/common/Shorthands/elements.js +0 -54
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +11 -35
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/Uploader.js +0 -8
- package/dist/Editor/commonStyle.js +69 -114
- package/dist/Editor/helper/deserialize/index.js +1 -1
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +2 -200
- package/dist/Editor/hooks/useDrag.js +11 -17
- package/dist/Editor/hooks/useEditorScroll.js +2 -1
- package/dist/Editor/hooks/useMouseMove.js +3 -9
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +21 -20
- package/dist/Editor/plugins/withLayout.js +1 -1
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +49 -157
- package/dist/Editor/utils/button.js +14 -0
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -23
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/helper.js +19 -59
- package/dist/Editor/utils/link.js +1 -1
- package/package.json +3 -6
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
- package/dist/Editor/common/CustomColorPicker/index.js +0 -106
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog/index.js +0 -90
- package/dist/Editor/common/CustomDialog/style.js +0 -67
- package/dist/Editor/common/CustomDialog/styles.js +0 -80
- package/dist/Editor/common/CustomSelect.js +0 -33
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/hooks/useEditorTheme.js +0 -153
- package/dist/Editor/theme/index.js +0 -144
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -283
- package/dist/Editor/themeSettings/buttons/style.js +0 -21
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -292
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
- package/dist/Editor/themeSettings/fonts/index.js +0 -220
- package/dist/Editor/themeSettings/fonts/style.js +0 -44
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -320
- package/dist/Editor/themeSettings/style.js +0 -152
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -356
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -197
- package/dist/Editor/themeSettingsAI/style.js +0 -250
@@ -1,325 +1,329 @@
|
|
1
1
|
const editorStyles = ({
|
2
2
|
padHeight,
|
3
3
|
placeHolderColor,
|
4
|
-
theme
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
"& .mini-tool-wrpr-ei": {
|
17
|
-
display: "none"
|
18
|
-
}
|
19
|
-
},
|
20
|
-
"& .mobileMiniTextWrapper": {
|
21
|
-
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.16)",
|
22
|
-
position: "fixed",
|
23
|
-
bottom: "env(safe-area-inset-bottom)",
|
24
|
-
left: 0,
|
25
|
-
width: "100%",
|
26
|
-
zIndex: 99999,
|
27
|
-
backgroundColor: theme?.palette?.editor?.background || "#fff",
|
28
|
-
color: theme?.palette?.editor?.textColor || "black",
|
29
|
-
"& .MuiOutlinedInput-input": {
|
30
|
-
color: theme?.palette?.editor?.textColor || "black"
|
31
|
-
}
|
32
|
-
},
|
33
|
-
"&.stimulate-xs": {
|
34
|
-
"& .scrollable-content": {
|
35
|
-
width: "320px"
|
4
|
+
theme,
|
5
|
+
overrideWrapperStyles = {}
|
6
|
+
}) => {
|
7
|
+
return {
|
8
|
+
root: {
|
9
|
+
display: "flex",
|
10
|
+
position: "relative",
|
11
|
+
padding: "0px",
|
12
|
+
alignItems: "center",
|
13
|
+
justifyContent: "center",
|
14
|
+
"*": {
|
15
|
+
boxSizing: "border-box"
|
36
16
|
},
|
37
|
-
"
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
left: 0,
|
42
|
-
width: "calc(50% - 162px)",
|
43
|
-
height: "100%",
|
44
|
-
pointerEvents: "none",
|
45
|
-
backgroundColor: "#FFF",
|
46
|
-
zIndex: 10
|
17
|
+
"&.iframe-editor": {
|
18
|
+
"& .mini-tool-wrpr-ei": {
|
19
|
+
display: "none"
|
20
|
+
}
|
47
21
|
},
|
48
|
-
"
|
49
|
-
|
50
|
-
position: "
|
51
|
-
|
52
|
-
|
53
|
-
width: "
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
},
|
61
|
-
slateWrapper: {
|
62
|
-
paddingTop: "0px",
|
63
|
-
height: `${window.innerHeight - padHeight}px`,
|
64
|
-
width: "100%",
|
65
|
-
overflowY: "auto",
|
66
|
-
overflowX: "hidden",
|
67
|
-
display: "flex",
|
68
|
-
flexDirection: "column",
|
69
|
-
alignItems: "center",
|
70
|
-
color: "#0f172a",
|
71
|
-
"& .has-topbanner": {
|
72
|
-
"& .doc-title-ele-wrpr": {
|
73
|
-
marginTop: "12px"
|
74
|
-
}
|
75
|
-
},
|
76
|
-
"&.no-color": {
|
77
|
-
backgroundColor: theme?.palette?.editor?.background,
|
78
|
-
color: theme?.palette?.editor?.textColor,
|
79
|
-
"&.pc-page-builder": {
|
80
|
-
backgroundColor: "#FFF",
|
81
|
-
color: "#000"
|
22
|
+
"& .mobileMiniTextWrapper": {
|
23
|
+
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.16)",
|
24
|
+
position: "fixed",
|
25
|
+
bottom: "env(safe-area-inset-bottom)",
|
26
|
+
left: 0,
|
27
|
+
width: "100%",
|
28
|
+
zIndex: 99999,
|
29
|
+
backgroundColor: theme?.palette?.editor?.background || "#fff",
|
30
|
+
color: theme?.palette?.editor?.textColor || "black",
|
31
|
+
"& .MuiOutlinedInput-input": {
|
32
|
+
color: theme?.palette?.editor?.textColor || "black"
|
33
|
+
}
|
82
34
|
},
|
83
|
-
"
|
84
|
-
"&
|
85
|
-
|
35
|
+
"&.stimulate-xs": {
|
36
|
+
"& .scrollable-content": {
|
37
|
+
width: "320px"
|
38
|
+
},
|
39
|
+
":before": {
|
40
|
+
content: '" "',
|
41
|
+
position: "absolute",
|
42
|
+
top: 0,
|
43
|
+
left: 0,
|
44
|
+
width: "calc(50% - 162px)",
|
45
|
+
height: "100%",
|
46
|
+
pointerEvents: "none",
|
47
|
+
backgroundColor: "#FFF",
|
48
|
+
zIndex: 10
|
49
|
+
},
|
50
|
+
":after": {
|
51
|
+
content: '" "',
|
52
|
+
position: "absolute",
|
53
|
+
top: 0,
|
54
|
+
right: 0,
|
55
|
+
width: "calc(50% - 160px)",
|
56
|
+
height: "100%",
|
57
|
+
pointerEvents: "none",
|
58
|
+
backgroundColor: "#FFF",
|
59
|
+
zIndex: 10
|
86
60
|
}
|
87
|
-
}
|
61
|
+
},
|
62
|
+
...overrideWrapperStyles
|
88
63
|
},
|
89
|
-
|
64
|
+
slateWrapper: {
|
65
|
+
paddingTop: "0px",
|
66
|
+
height: `${window.innerHeight - padHeight}px`,
|
90
67
|
width: "100%",
|
68
|
+
overflowY: "auto",
|
69
|
+
overflowX: "hidden",
|
91
70
|
display: "flex",
|
92
|
-
flex: 1,
|
93
71
|
flexDirection: "column",
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
flex: 1
|
100
|
-
},
|
101
|
-
"& .editor-wrapper": {
|
102
|
-
maxWidth: "100%",
|
103
|
-
height: "100%",
|
104
|
-
overflow: "visible",
|
105
|
-
"& .section-wrapper-fluid": {
|
106
|
-
"& .grid-container": {
|
107
|
-
maxWidth: "1440px"
|
72
|
+
alignItems: "center",
|
73
|
+
color: "#0f172a",
|
74
|
+
"& .has-topbanner": {
|
75
|
+
"& .doc-title-ele-wrpr": {
|
76
|
+
marginTop: "12px"
|
108
77
|
}
|
109
|
-
}
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
"& button": {
|
117
|
-
border: "1px solid rgba(37, 99, 235, 0.32)",
|
118
|
-
borderRadius: "10px",
|
119
|
-
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.16)",
|
120
|
-
background: "#fff",
|
121
|
-
width: "36px",
|
122
|
-
height: "36px",
|
123
|
-
"&.mr": {
|
124
|
-
marginRight: "2px"
|
78
|
+
},
|
79
|
+
"&.no-color": {
|
80
|
+
backgroundColor: theme?.palette?.editor?.background,
|
81
|
+
color: theme?.palette?.editor?.textColor,
|
82
|
+
"&.pc-page-builder": {
|
83
|
+
backgroundColor: "#FFF",
|
84
|
+
color: "#000"
|
125
85
|
},
|
126
|
-
"&
|
127
|
-
|
128
|
-
|
129
|
-
}
|
130
|
-
},
|
131
|
-
"& .accordion-summary-collapse-btn": {
|
132
|
-
padding: "4px",
|
133
|
-
width: '5px'
|
134
|
-
},
|
135
|
-
"& .workflow-icon-btn": {
|
136
|
-
pointerEvents: "none",
|
137
|
-
position: "absolute",
|
138
|
-
right: "-9px",
|
139
|
-
top: "-9px",
|
140
|
-
border: "2px solid #f3b814",
|
141
|
-
padding: "0px",
|
142
|
-
background: "#FFF",
|
143
|
-
"& svg": {
|
144
|
-
width: "18px",
|
145
|
-
height: "18px"
|
146
|
-
}
|
147
|
-
},
|
148
|
-
"& .svg-big-btn": {
|
149
|
-
padding: "2px !important",
|
150
|
-
"& svg": {
|
151
|
-
width: "24px !important",
|
152
|
-
height: "24px !important"
|
153
|
-
}
|
154
|
-
},
|
155
|
-
"& .ed-section-wrapper": {
|
156
|
-
display: "flex",
|
157
|
-
width: "100%",
|
158
|
-
justifyContent: "center",
|
159
|
-
alignItems: "center",
|
160
|
-
position: "relative",
|
161
|
-
"&:hover": {
|
162
|
-
"& .ed-section-inner": {
|
163
|
-
"& .element-toolbar.ss": {
|
164
|
-
display: "block",
|
165
|
-
left: "8px",
|
166
|
-
top: "8px",
|
167
|
-
width: "fit-content",
|
168
|
-
"& button": {
|
169
|
-
boxShadow: "none",
|
170
|
-
color: "#D7D7D6",
|
171
|
-
background: "rgb(221, 221, 221, 0.1)",
|
172
|
-
"&:hover": {
|
173
|
-
background: "rgb(221, 221, 221, 0.8)"
|
174
|
-
}
|
175
|
-
}
|
86
|
+
"& .signed-btn": {
|
87
|
+
"& img": {
|
88
|
+
backgroundColor: "#FFF"
|
176
89
|
}
|
177
|
-
},
|
178
|
-
"&.hselect:before": {
|
179
|
-
display: "block"
|
180
90
|
}
|
181
91
|
},
|
182
|
-
"& .
|
183
|
-
|
184
|
-
|
185
|
-
|
92
|
+
"& .max-content": {
|
93
|
+
width: "100%",
|
94
|
+
display: "flex",
|
95
|
+
flex: 1,
|
96
|
+
flexDirection: "column",
|
97
|
+
paddingBottom: "25px !important"
|
98
|
+
},
|
99
|
+
"& .scroll-area": {
|
100
|
+
display: "flex",
|
101
|
+
justifyContent: "center",
|
102
|
+
flex: 1
|
103
|
+
},
|
104
|
+
"& .editor-wrapper": {
|
105
|
+
maxWidth: "100%",
|
106
|
+
height: "100%",
|
107
|
+
overflow: "visible",
|
108
|
+
"& .section-wrapper-fluid": {
|
109
|
+
"& .grid-container": {
|
110
|
+
maxWidth: "1440px"
|
111
|
+
}
|
186
112
|
}
|
187
113
|
},
|
188
|
-
"
|
189
|
-
content: '" "',
|
114
|
+
"& .el-toolbar": {
|
190
115
|
position: "absolute",
|
191
|
-
width: "calc(100% - 2px)",
|
192
|
-
height: "calc(100% - 2px)",
|
193
116
|
left: 0,
|
194
117
|
top: 0,
|
195
|
-
|
196
|
-
|
118
|
+
width: "fit-content",
|
119
|
+
"& button": {
|
120
|
+
border: "1px solid rgba(37, 99, 235, 0.32)",
|
121
|
+
borderRadius: "10px",
|
122
|
+
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.16)",
|
123
|
+
background: "#fff",
|
124
|
+
width: "36px",
|
125
|
+
height: "36px",
|
126
|
+
"&.mr": {
|
127
|
+
marginRight: "2px"
|
128
|
+
},
|
129
|
+
"& svg": {
|
130
|
+
stroke: "rgb(100, 116, 139);"
|
131
|
+
}
|
132
|
+
}
|
133
|
+
},
|
134
|
+
"& .accordion-summary-collapse-btn": {
|
135
|
+
padding: "4px",
|
136
|
+
width: '5px'
|
137
|
+
},
|
138
|
+
"& .workflow-icon-btn": {
|
197
139
|
pointerEvents: "none",
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
cursor: "pointer",
|
209
|
-
display: "flex",
|
210
|
-
alignItems: "center",
|
211
|
-
justifyContent: "center",
|
212
|
-
borderRadius: "12px",
|
213
|
-
"& svg": {
|
214
|
-
marginRight: "8px"
|
215
|
-
}
|
216
|
-
},
|
217
|
-
"& .content-editable.empty": {
|
218
|
-
"&:after": {
|
219
|
-
color: theme?.palette?.type === "dark" ? "#99A5B6" : placeHolderColor
|
220
|
-
}
|
221
|
-
},
|
222
|
-
"& .checkbox-edit": {
|
223
|
-
alignSelf: "flex-start",
|
224
|
-
"& .MuiFormControlLabel-root": {
|
225
|
-
marginRight: "0px"
|
140
|
+
position: "absolute",
|
141
|
+
right: "-9px",
|
142
|
+
top: "-9px",
|
143
|
+
border: "2px solid #f3b814",
|
144
|
+
padding: "0px",
|
145
|
+
background: "#FFF",
|
146
|
+
"& svg": {
|
147
|
+
width: "18px",
|
148
|
+
height: "18px"
|
149
|
+
}
|
226
150
|
},
|
227
|
-
"& .
|
228
|
-
padding: "
|
151
|
+
"& .svg-big-btn": {
|
152
|
+
padding: "2px !important",
|
229
153
|
"& svg": {
|
230
|
-
width: "
|
231
|
-
height: "
|
154
|
+
width: "24px !important",
|
155
|
+
height: "24px !important"
|
232
156
|
}
|
233
|
-
}
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
157
|
+
},
|
158
|
+
"& .ed-section-wrapper": {
|
159
|
+
display: "flex",
|
160
|
+
width: "100%",
|
161
|
+
justifyContent: "center",
|
162
|
+
alignItems: "center",
|
163
|
+
position: "relative",
|
164
|
+
"&:hover": {
|
165
|
+
"& .ed-section-inner": {
|
166
|
+
"& .element-toolbar.ss": {
|
167
|
+
display: "block",
|
168
|
+
left: "8px",
|
169
|
+
top: "8px",
|
170
|
+
width: "fit-content",
|
171
|
+
"& button": {
|
172
|
+
boxShadow: "none",
|
173
|
+
color: "#D7D7D6",
|
174
|
+
background: "rgb(221, 221, 221, 0.1)",
|
175
|
+
"&:hover": {
|
176
|
+
background: "rgb(221, 221, 221, 0.8)"
|
177
|
+
}
|
178
|
+
}
|
179
|
+
}
|
180
|
+
},
|
181
|
+
"&.hselect:before": {
|
182
|
+
display: "block"
|
183
|
+
}
|
184
|
+
},
|
185
|
+
"& .ed-section-inner": {
|
186
|
+
maxWidth: "1440px",
|
187
|
+
"& .element-toolbar.ss": {
|
188
|
+
display: "none"
|
189
|
+
}
|
190
|
+
},
|
191
|
+
"&.needHover:before": {
|
192
|
+
content: '" "',
|
193
|
+
position: "absolute",
|
194
|
+
width: "calc(100% - 2px)",
|
195
|
+
height: "calc(100% - 2px)",
|
196
|
+
left: 0,
|
197
|
+
top: 0,
|
198
|
+
border: "1px solid transparent",
|
199
|
+
background: "rgba(0,0,0,0.05)",
|
200
|
+
pointerEvents: "none",
|
201
|
+
display: "none"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
"& .element-empty-btn": {
|
205
|
+
backgroundColor: "rgb(242, 241, 238)",
|
206
|
+
color: "rgba(55, 53, 47, 0.65)",
|
207
|
+
outline: 0,
|
208
|
+
border: 0,
|
209
|
+
padding: "16px 12px",
|
210
|
+
width: "100%",
|
211
|
+
cursor: "pointer",
|
212
|
+
display: "flex",
|
213
|
+
alignItems: "center",
|
214
|
+
justifyContent: "center",
|
215
|
+
borderRadius: "12px",
|
246
216
|
"& svg": {
|
247
|
-
|
248
|
-
height: "18px",
|
249
|
-
marginTop: "-1px"
|
217
|
+
marginRight: "8px"
|
250
218
|
}
|
251
|
-
}
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
"&
|
219
|
+
},
|
220
|
+
"& .content-editable.empty": {
|
221
|
+
"&:after": {
|
222
|
+
color: theme?.palette?.type === "dark" ? "#99A5B6" : placeHolderColor
|
223
|
+
}
|
224
|
+
},
|
225
|
+
"& .checkbox-edit": {
|
226
|
+
alignSelf: "flex-start",
|
227
|
+
"& .MuiFormControlLabel-root": {
|
228
|
+
marginRight: "0px"
|
229
|
+
},
|
230
|
+
"& .MuiCheckbox-root": {
|
231
|
+
padding: "5px",
|
232
|
+
"& svg": {
|
233
|
+
width: "20px",
|
234
|
+
height: "20px"
|
235
|
+
}
|
236
|
+
}
|
237
|
+
},
|
238
|
+
"& .tools-drawer": {
|
239
|
+
zIndex: 1300,
|
240
|
+
"& .MuiDrawer-paper": {
|
241
|
+
backgroundColor: theme?.palette?.editor?.background
|
242
|
+
}
|
243
|
+
},
|
244
|
+
"& .section-tw": {
|
245
|
+
background: 'transparent !important',
|
246
|
+
"& button": {
|
247
|
+
padding: "2px",
|
248
|
+
borderRadius: "0px",
|
249
|
+
"& svg": {
|
250
|
+
width: "17px",
|
251
|
+
height: "18px",
|
252
|
+
marginTop: "-1px"
|
253
|
+
}
|
254
|
+
}
|
255
|
+
},
|
256
|
+
"& .carousel-item": {
|
257
|
+
padding: "12px 32px"
|
258
|
+
},
|
259
|
+
"& .slick-arrow": {
|
260
|
+
borderRadius: "50%",
|
261
|
+
backgroundColor: "#F8FAFF",
|
262
|
+
textAlign: "center",
|
263
|
+
border: "1px solid #CFD8F5"
|
264
|
+
},
|
265
|
+
"& .embed-image-wrpr .image-frame": {
|
266
|
+
position: "absolute",
|
267
|
+
top: 0,
|
268
|
+
left: 0,
|
271
269
|
width: "100%",
|
272
270
|
height: "100%",
|
273
|
-
|
274
|
-
|
271
|
+
padding: "0px",
|
272
|
+
// pointerEvents: "none",
|
273
|
+
"& svg": {
|
274
|
+
width: "100%",
|
275
|
+
height: "100%",
|
276
|
+
"& .op-zero": {
|
277
|
+
fillOpacity: 0
|
278
|
+
}
|
275
279
|
}
|
276
|
-
}
|
277
|
-
},
|
278
|
-
"&.hideScroll": {
|
279
|
-
overflowAnchor: "none",
|
280
|
-
"&::-webkit-scrollbar-track": {
|
281
|
-
background: "none !important"
|
282
280
|
},
|
283
|
-
"
|
284
|
-
|
281
|
+
"&.hideScroll": {
|
282
|
+
overflowAnchor: "none",
|
283
|
+
"&::-webkit-scrollbar-track": {
|
284
|
+
background: "none !important"
|
285
|
+
},
|
286
|
+
"&::-webkit-scrollbar-thumb": {
|
287
|
+
background: "none !important"
|
288
|
+
},
|
289
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
290
|
+
background: "none !important"
|
291
|
+
}
|
285
292
|
},
|
286
|
-
"
|
287
|
-
background:
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
"&.readOnlyContainer": {
|
295
|
-
"& .max-content": {
|
296
|
-
paddingBottom: "0px !important"
|
293
|
+
"& ::selection": {
|
294
|
+
background: 'rgba(35, 131, 226, 0.35)!important',
|
295
|
+
color: 'inherit'
|
296
|
+
},
|
297
|
+
"&.readOnlyContainer": {
|
298
|
+
"& .max-content": {
|
299
|
+
paddingBottom: "0px !important"
|
300
|
+
}
|
297
301
|
}
|
298
|
-
}
|
299
|
-
},
|
300
|
-
fullScreenWrapper: {
|
301
|
-
"& .editor-wrapper": {
|
302
|
-
paddingTop: '20px'
|
303
|
-
},
|
304
|
-
"& .MuiDialog-paper, & .MuiPopover-paper": {
|
305
|
-
background: `${theme?.palette?.editor?.background} !important`
|
306
302
|
},
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
zIndex: 100
|
303
|
+
fullScreenWrapper: {
|
304
|
+
"& .editor-wrapper": {
|
305
|
+
paddingTop: '20px'
|
306
|
+
},
|
307
|
+
"& .MuiDialog-paper, & .MuiPopover-paper": {
|
308
|
+
background: `${theme?.palette?.editor?.background} !important`
|
314
309
|
},
|
315
|
-
"& .
|
316
|
-
|
310
|
+
"& .MuiPaper-root": {
|
311
|
+
borderRadius: "0px !important",
|
312
|
+
"& .MuiDialogTitle-root": {
|
313
|
+
position: "absolute",
|
314
|
+
top: 0,
|
315
|
+
right: "0px",
|
316
|
+
zIndex: 100
|
317
|
+
},
|
318
|
+
"& .MuiDialogContent-root": {
|
319
|
+
padding: "0px"
|
320
|
+
}
|
317
321
|
}
|
322
|
+
},
|
323
|
+
cardsTypo: {
|
324
|
+
color: theme?.palette?.editor?.textColor,
|
325
|
+
fontSize: "14px !important"
|
318
326
|
}
|
319
|
-
}
|
320
|
-
|
321
|
-
color: theme?.palette?.editor?.textColor,
|
322
|
-
fontSize: "14px !important"
|
323
|
-
}
|
324
|
-
});
|
327
|
+
};
|
328
|
+
};
|
325
329
|
export default editorStyles;
|
@@ -1,32 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Select, MenuItem } from "@mui/material";
|
3
|
-
import { addMarkData, activeMark
|
4
|
-
import { toolbarGroups } from "../toolbarGroups.js";
|
3
|
+
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
|
5
4
|
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
6
|
-
import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
-
const allTools = toolbarGroups.flat();
|
9
|
-
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
10
|
-
export const getValue = (editor, format) => {
|
11
|
-
switch (format) {
|
12
|
-
case "fontFamily":
|
13
|
-
{
|
14
|
-
const style = getSelectedElementStyle("font-family", editor);
|
15
|
-
return style || defaultFonts[0];
|
16
|
-
}
|
17
|
-
case "fontWeight":
|
18
|
-
{
|
19
|
-
const {
|
20
|
-
options
|
21
|
-
} = fontWeight || {};
|
22
|
-
const fontWeightStyle = getSelectedElementStyle("font-weight", editor);
|
23
|
-
const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
|
24
|
-
return selected?.value;
|
25
|
-
}
|
26
|
-
default:
|
27
|
-
return activeMark(editor, format);
|
28
|
-
}
|
29
|
-
};
|
30
6
|
const Dropdown = ({
|
31
7
|
classes,
|
32
8
|
editor,
|
@@ -34,7 +10,7 @@ const Dropdown = ({
|
|
34
10
|
options,
|
35
11
|
width
|
36
12
|
}) => {
|
37
|
-
const value =
|
13
|
+
const value = activeMark(editor, format);
|
38
14
|
const changeMarkData = (event, format) => {
|
39
15
|
event.preventDefault();
|
40
16
|
const value = event.target.value;
|
@@ -44,7 +20,7 @@ const Dropdown = ({
|
|
44
20
|
});
|
45
21
|
};
|
46
22
|
return /*#__PURE__*/_jsx(Select, {
|
47
|
-
value: value
|
23
|
+
value: value,
|
48
24
|
className: "editor-dd",
|
49
25
|
onChange: e => changeMarkData(e, format),
|
50
26
|
MenuProps: {
|