@flozy/editor 1.8.0 → 1.8.2
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/CommonEditor.js +4 -4
- package/dist/Editor/Elements/Carousel/Carousel.js +11 -3
- package/dist/Editor/Elements/Carousel/slick-theme.min.css +1 -1
- package/dist/Editor/Elements/Carousel/slick.min.css +2 -0
- package/dist/Editor/Elements/Form/Form.js +1 -1
- package/dist/Editor/Elements/Form/FormField.js +3 -3
- package/dist/Editor/Elements/Grid/templates/carousel_item.js +1 -1
- package/dist/Editor/Styles/EditorStyles.js +9 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +1 -1
- package/dist/Editor/common/Icon.js +5 -2
- package/dist/Editor/common/Shorthands/elements.js +2 -2
- package/dist/Editor/common/StyleBuilder/appHeaderStyle.js +12 -12
- package/dist/Editor/common/StyleBuilder/formStyle.js +7 -5
- package/dist/Editor/utils/carousel.js +3 -1
- package/package.json +1 -1
|
@@ -374,16 +374,16 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
374
374
|
transition: "all 0.3s",
|
|
375
375
|
minHeight: "87%"
|
|
376
376
|
},
|
|
377
|
-
children: [/*#__PURE__*/_jsx(PopupTool, {
|
|
377
|
+
children: [!readOnly ? /*#__PURE__*/_jsx(PopupTool, {
|
|
378
378
|
onDrawerOpen: onDrawerOpen
|
|
379
|
-
}), /*#__PURE__*/_jsx(Editable, {
|
|
379
|
+
}) : null, /*#__PURE__*/_jsx(Editable, {
|
|
380
380
|
className: "innert-editor-textbox",
|
|
381
381
|
readOnly: isReadOnly,
|
|
382
382
|
renderElement: renderElement,
|
|
383
383
|
renderLeaf: renderLeaf,
|
|
384
384
|
decorate: decorators,
|
|
385
385
|
onKeyDown: onKeyDown
|
|
386
|
-
}), /*#__PURE__*/_jsx(MentionsPopup, {
|
|
386
|
+
}), !readOnly ? /*#__PURE__*/_jsx(MentionsPopup, {
|
|
387
387
|
ref: mentionsRef,
|
|
388
388
|
mentions: mentions,
|
|
389
389
|
setMentions: setMentions,
|
|
@@ -392,7 +392,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
392
392
|
index: index,
|
|
393
393
|
chars: chars,
|
|
394
394
|
type: type
|
|
395
|
-
})]
|
|
395
|
+
}) : null]
|
|
396
396
|
})
|
|
397
397
|
}), !readOnly ? /*#__PURE__*/_jsx(MiniToolbar, {
|
|
398
398
|
customProps: customProps,
|
|
@@ -34,6 +34,7 @@ const Carousel = props => {
|
|
|
34
34
|
const editor = useSlateStatic();
|
|
35
35
|
const [showOptions, setShowOptions] = useState(false);
|
|
36
36
|
const [edit, setEdit] = useState(false);
|
|
37
|
+
const [refresh, setRefresh] = useState(new Date().getTime());
|
|
37
38
|
const path = ReactEditor.findPath(editor, element);
|
|
38
39
|
const settings = {
|
|
39
40
|
dots: true,
|
|
@@ -41,9 +42,16 @@ const Carousel = props => {
|
|
|
41
42
|
speed: 500,
|
|
42
43
|
slidesToShow: 1,
|
|
43
44
|
slidesToScroll: 1,
|
|
44
|
-
nextArrow: /*#__PURE__*/_jsx(NextArrow, {
|
|
45
|
-
|
|
45
|
+
nextArrow: /*#__PURE__*/_jsx(NextArrow, {
|
|
46
|
+
className: "slide-arrow-ei slider-next-ei"
|
|
47
|
+
}),
|
|
48
|
+
prevArrow: /*#__PURE__*/_jsx(PrevArrow, {
|
|
49
|
+
className: "slide-arrow-ei slider-prev-ei"
|
|
50
|
+
})
|
|
46
51
|
};
|
|
52
|
+
useEffect(() => {
|
|
53
|
+
setRefresh(new Date().getTime());
|
|
54
|
+
}, []);
|
|
47
55
|
useEffect(() => {
|
|
48
56
|
if (!edit) {
|
|
49
57
|
ReactEditor.focus(editor);
|
|
@@ -134,7 +142,7 @@ const Carousel = props => {
|
|
|
134
142
|
}, i);
|
|
135
143
|
})
|
|
136
144
|
})
|
|
137
|
-
}, `
|
|
145
|
+
}, `carousel_${path.join("|")}_${refresh}`), !readOnly && /*#__PURE__*/_jsx(ToolBar, {})]
|
|
138
146
|
});
|
|
139
147
|
};
|
|
140
148
|
export default Carousel;
|
|
@@ -263,7 +263,7 @@ const Form = props => {
|
|
|
263
263
|
spacing: 2,
|
|
264
264
|
children: [/*#__PURE__*/_jsx("legend", {
|
|
265
265
|
style: {
|
|
266
|
-
fontSize: textSize || "inherit",
|
|
266
|
+
fontSize: `${textSize}px` || "inherit",
|
|
267
267
|
fontFamily: fontFamily || "PoppinsRegular",
|
|
268
268
|
textAlign: textAlign || "left",
|
|
269
269
|
width: "100%"
|
|
@@ -53,12 +53,12 @@ const FormField = props => {
|
|
|
53
53
|
};
|
|
54
54
|
const FieldToolbar = () => {
|
|
55
55
|
return /*#__PURE__*/_jsxs("div", {
|
|
56
|
-
className: "",
|
|
56
|
+
className: "element-toolbar hr",
|
|
57
57
|
contentEditable: false,
|
|
58
58
|
style: {
|
|
59
59
|
position: "absolute",
|
|
60
|
-
right: "
|
|
61
|
-
top: "
|
|
60
|
+
right: "12px",
|
|
61
|
+
top: "24px",
|
|
62
62
|
bottom: 0,
|
|
63
63
|
margin: "auto",
|
|
64
64
|
height: "42px",
|
|
@@ -167,6 +167,15 @@ const editorStyles = ({
|
|
|
167
167
|
height: "16px"
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
|
+
},
|
|
171
|
+
"& .slick-arrow": {
|
|
172
|
+
borderRadius: "50%",
|
|
173
|
+
backgroundColor: "#FFF",
|
|
174
|
+
textAlign: "center",
|
|
175
|
+
"& svg": {
|
|
176
|
+
width: "16px",
|
|
177
|
+
height: "16px"
|
|
178
|
+
}
|
|
170
179
|
}
|
|
171
180
|
}
|
|
172
181
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { MdFormatQuote, MdFormatAlignLeft, MdFormatAlignCenter, MdFormatAlignRight, MdFormatListNumbered, MdFormatListBulleted, MdAdd, MdArrowForward, MdEmojiEmotions, MdOutlinePermMedia } from "react-icons/md";
|
|
3
|
-
import { BsTypeH1, BsTypeH2, BsTypeH3, BsCameraVideoFill, BsArrowBarRight, BsArrowBarLeft } from "react-icons/bs";
|
|
3
|
+
import { BsTypeH1, BsTypeH2, BsTypeH3, BsCameraVideoFill, BsArrowBarRight, BsArrowBarLeft, BsFillMenuButtonWideFill } from "react-icons/bs";
|
|
4
4
|
import { FaSuperscript, FaSubscript } from "react-icons/fa";
|
|
5
5
|
import { FcAddRow, FcAddColumn } from "react-icons/fc";
|
|
6
6
|
import { AiFillEdit, AiOutlineInsertRowBelow, AiOutlineInsertRowRight, AiOutlineDelete, AiFillTag, AiOutlineUpload, AiOutlineArrowsAlt, AiOutlineInsertRowAbove, AiOutlineInsertRowLeft, AiFillHtml5 } from "react-icons/ai";
|
|
@@ -183,7 +183,10 @@ const iconList = {
|
|
|
183
183
|
}),
|
|
184
184
|
appHeader: /*#__PURE__*/_jsx(AppHeader, {}),
|
|
185
185
|
moreHorizantal: /*#__PURE__*/_jsx(MoreHorizontal, {}),
|
|
186
|
-
docsUpload: /*#__PURE__*/_jsx(DocsUpload, {})
|
|
186
|
+
docsUpload: /*#__PURE__*/_jsx(DocsUpload, {}),
|
|
187
|
+
colorbox: /*#__PURE__*/_jsx(BsFillMenuButtonWideFill, {
|
|
188
|
+
size: 20
|
|
189
|
+
})
|
|
187
190
|
};
|
|
188
191
|
const Icon = props => {
|
|
189
192
|
const {
|
|
@@ -49,7 +49,7 @@ const ELEMENTS_LIST = [{
|
|
|
49
49
|
desc: "",
|
|
50
50
|
group: "Text",
|
|
51
51
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
52
|
-
icon: "
|
|
52
|
+
icon: "colorbox"
|
|
53
53
|
}),
|
|
54
54
|
onInsert: editor => toggleBlock(editor, "blockquote", false, {
|
|
55
55
|
bgColor: "rgb(227, 236, 255)"
|
|
@@ -63,7 +63,7 @@ const ELEMENTS_LIST = [{
|
|
|
63
63
|
}),
|
|
64
64
|
onInsert: editor => toggleBlock(editor, "orderedList", false)
|
|
65
65
|
}, {
|
|
66
|
-
name: "
|
|
66
|
+
name: "Bulleted List",
|
|
67
67
|
desc: "",
|
|
68
68
|
group: "List",
|
|
69
69
|
icon: /*#__PURE__*/_jsx(Icon, {
|
|
@@ -8,12 +8,6 @@ const appHeaderStyle = [{
|
|
|
8
8
|
key: "appTitle",
|
|
9
9
|
type: "text",
|
|
10
10
|
placeholder: "Leave Empty, If only Logo"
|
|
11
|
-
}, {
|
|
12
|
-
label: "Title Font Size",
|
|
13
|
-
key: "logoFontSize",
|
|
14
|
-
type: "fontSize",
|
|
15
|
-
width: 5,
|
|
16
|
-
placeholder: "16px"
|
|
17
11
|
}, {
|
|
18
12
|
label: "Title Font Family",
|
|
19
13
|
key: "titleFontFamily",
|
|
@@ -28,6 +22,12 @@ const appHeaderStyle = [{
|
|
|
28
22
|
children: "LOGO"
|
|
29
23
|
});
|
|
30
24
|
}
|
|
25
|
+
}, {
|
|
26
|
+
label: "Title Font Size",
|
|
27
|
+
key: "logoFontSize",
|
|
28
|
+
type: "fontSize",
|
|
29
|
+
width: 5,
|
|
30
|
+
placeholder: "16px"
|
|
31
31
|
}, {
|
|
32
32
|
label: "Logo Image URL",
|
|
33
33
|
key: "appLogo",
|
|
@@ -46,12 +46,6 @@ const appHeaderStyle = [{
|
|
|
46
46
|
tab: "General",
|
|
47
47
|
value: "general",
|
|
48
48
|
fields: [{
|
|
49
|
-
label: "Menu Font Size",
|
|
50
|
-
key: "fontSize",
|
|
51
|
-
type: "fontSize",
|
|
52
|
-
placeholder: "16px",
|
|
53
|
-
width: 5
|
|
54
|
-
}, {
|
|
55
49
|
label: "Menu Font Family",
|
|
56
50
|
key: "fontFamily",
|
|
57
51
|
type: "textOptions",
|
|
@@ -65,6 +59,12 @@ const appHeaderStyle = [{
|
|
|
65
59
|
children: "Home"
|
|
66
60
|
});
|
|
67
61
|
}
|
|
62
|
+
}, {
|
|
63
|
+
label: "Menu Font Size",
|
|
64
|
+
key: "fontSize",
|
|
65
|
+
type: "fontSize",
|
|
66
|
+
placeholder: "16px",
|
|
67
|
+
width: 5
|
|
68
68
|
}]
|
|
69
69
|
}, {
|
|
70
70
|
tab: "Menus",
|
|
@@ -25,21 +25,23 @@ const formStyle = [{
|
|
|
25
25
|
label: "Title",
|
|
26
26
|
key: "formTitle",
|
|
27
27
|
type: "text"
|
|
28
|
-
}, {
|
|
29
|
-
label: "Font Size",
|
|
30
|
-
key: "textSize",
|
|
31
|
-
type: "text",
|
|
32
|
-
placeholder: "16px or 1em"
|
|
33
28
|
}, {
|
|
34
29
|
label: "Font Family",
|
|
35
30
|
key: "fontFamily",
|
|
36
31
|
type: "textOptions",
|
|
37
32
|
options: fontOptions,
|
|
33
|
+
width: 7,
|
|
38
34
|
renderOption: option => {
|
|
39
35
|
return /*#__PURE__*/_jsx("span", {
|
|
40
36
|
children: option.text
|
|
41
37
|
});
|
|
42
38
|
}
|
|
39
|
+
}, {
|
|
40
|
+
label: "Font Size",
|
|
41
|
+
key: "textSize",
|
|
42
|
+
type: "fontSize",
|
|
43
|
+
width: 5,
|
|
44
|
+
placeholder: "16px"
|
|
43
45
|
}, {
|
|
44
46
|
label: "Text Align",
|
|
45
47
|
key: "textAlign",
|