@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.
@@ -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
- prevArrow: /*#__PURE__*/_jsx(PrevArrow, {})
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
- }, `slider_${children.length}_${new Date().getTime()}`), !readOnly && /*#__PURE__*/_jsx(ToolBar, {})]
145
+ }, `carousel_${path.join("|")}_${refresh}`), !readOnly && /*#__PURE__*/_jsx(ToolBar, {})]
138
146
  });
139
147
  };
140
148
  export default Carousel;
@@ -82,7 +82,7 @@
82
82
  margin-bottom: 30px;
83
83
  }
84
84
  .slick-dots {
85
- bottom: -25px;
85
+ bottom: 0px;
86
86
  width: 100%;
87
87
  margin: 0;
88
88
  list-style: none;
@@ -43,6 +43,8 @@
43
43
  .slick-track {
44
44
  top: 0;
45
45
  left: 0;
46
+ display: flex;
47
+ align-items: center;
46
48
  }
47
49
  .slick-track:after,
48
50
  .slick-track:before {
@@ -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: "0px",
61
- top: "16px",
60
+ right: "12px",
61
+ top: "24px",
62
62
  bottom: 0,
63
63
  margin: "auto",
64
64
  height: "42px",
@@ -54,7 +54,7 @@ const carousel_item = itemNo => ({
54
54
  right: "16",
55
55
  bottom: "16"
56
56
  },
57
- bgColor: "rgb(102, 102, 102)"
57
+ bgColor: "#ECF4FF"
58
58
  }]
59
59
  });
60
60
  export default carousel_item;
@@ -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
  });
@@ -117,7 +117,7 @@ export const toolbarGroups = [[{
117
117
  id: 16,
118
118
  format: "unorderedList",
119
119
  type: "block",
120
- title: "Un-ordered List",
120
+ title: "Bulleted List",
121
121
  group: "list"
122
122
  }, {
123
123
  id: 43,
@@ -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: "blockquote"
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: "Un-Ordered List",
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",
@@ -11,6 +11,8 @@ export const insertCarousel = editor => {
11
11
  ...carouselItem(2)
12
12
  }]
13
13
  };
14
- Transforms.insertNodes(editor, grid);
14
+ Transforms.insertNodes(editor, grid, {
15
+ select: true
16
+ });
15
17
  insertNewLine(editor);
16
18
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.8.0",
3
+ "version": "1.8.2",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"