@flozy/editor 3.9.9 → 4.0.1

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.
Files changed (120) hide show
  1. package/dist/Editor/ChatEditor.js +28 -17
  2. package/dist/Editor/CommonEditor.js +109 -177
  3. package/dist/Editor/Editor.css +12 -8
  4. package/dist/Editor/Elements/AI/AIInput.js +24 -18
  5. package/dist/Editor/Elements/AI/CustomSelect.js +12 -19
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +89 -66
  7. package/dist/Editor/Elements/AI/Styles.js +1 -2
  8. package/dist/Editor/Elements/AI/helper.js +3 -5
  9. package/dist/Editor/Elements/Accordion/Accordion.js +1 -1
  10. package/dist/Editor/Elements/Accordion/AccordionSummary.js +21 -5
  11. package/dist/Editor/Elements/AppHeader/AppHeader.js +4 -26
  12. package/dist/Editor/Elements/Button/EditorButton.js +16 -28
  13. package/dist/Editor/Elements/Color Picker/ColorButtons.js +17 -60
  14. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  15. package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
  16. package/dist/Editor/Elements/Color Picker/Styles.js +1 -2
  17. package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
  18. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
  19. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
  20. package/dist/Editor/Elements/Grid/Grid.js +3 -27
  21. package/dist/Editor/Elements/Grid/GridItem.js +1 -3
  22. package/dist/Editor/Elements/Link/Link.js +1 -6
  23. package/dist/Editor/Elements/Link/LinkButton.js +2 -4
  24. package/dist/Editor/Elements/Link/LinkPopup.js +3 -10
  25. package/dist/Editor/Elements/List/CheckList.js +2 -1
  26. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +3 -3
  27. package/dist/Editor/Elements/Signature/SignaturePopup.js +5 -20
  28. package/dist/Editor/Elements/Table/Styles.js +1 -23
  29. package/dist/Editor/Elements/Table/Table.js +1 -2
  30. package/dist/Editor/Elements/Table/TableCell.js +7 -69
  31. package/dist/Editor/Elements/TableContextMenu/TableContextMenu.js +0 -1
  32. package/dist/Editor/MiniEditor.js +1 -3
  33. package/dist/Editor/Styles/EditorStyles.js +1 -1
  34. package/dist/Editor/Toolbar/Basic/index.js +2 -4
  35. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +2 -26
  36. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  37. package/dist/Editor/Toolbar/FormatTools/TextSize.js +18 -29
  38. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -4
  39. package/dist/Editor/Toolbar/Mini/Options/Options.js +0 -10
  40. package/dist/Editor/Toolbar/Mini/Styles.js +0 -7
  41. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +13 -12
  42. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +13 -12
  43. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +11 -4
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +86 -213
  45. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -2
  46. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +33 -40
  47. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +7 -52
  48. package/dist/Editor/Toolbar/PopupTool/index.js +5 -4
  49. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  50. package/dist/Editor/assets/svg/AIIcons.js +1 -153
  51. package/dist/Editor/assets/svg/AddTemplateIcon.js +10 -13
  52. package/dist/Editor/assets/svg/TextIcon.js +5 -8
  53. package/dist/Editor/common/ColorPickerButton.js +18 -26
  54. package/dist/Editor/common/DnD/DragHandleButton.js +47 -56
  55. package/dist/Editor/common/Icon.js +3 -43
  56. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -5
  57. package/dist/Editor/common/LinkSettings/index.js +2 -4
  58. package/dist/Editor/common/LinkSettings/navOptions.js +2 -7
  59. package/dist/Editor/common/LinkSettings/style.js +8 -11
  60. package/dist/Editor/common/Section/index.js +7 -57
  61. package/dist/Editor/common/Section/styles.js +0 -11
  62. package/dist/Editor/common/Shorthands/elements.js +0 -54
  63. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -1
  64. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  65. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +29 -33
  66. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +25 -31
  67. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
  68. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -29
  69. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  70. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
  71. package/dist/Editor/common/StyleBuilder/index.js +1 -1
  72. package/dist/Editor/common/iconslist.js +31 -0
  73. package/dist/Editor/helper/index.js +22 -0
  74. package/dist/Editor/helper/theme.js +4 -189
  75. package/dist/Editor/hooks/useMouseMove.js +1 -4
  76. package/dist/Editor/hooks/useWindowMessage.js +7 -10
  77. package/dist/Editor/plugins/withEmbeds.js +1 -1
  78. package/dist/Editor/plugins/withHTML.js +1 -1
  79. package/dist/Editor/plugins/withTable.js +1 -1
  80. package/dist/Editor/theme/ThemeList.js +173 -50
  81. package/dist/Editor/utils/SlateUtilityFunctions.js +27 -169
  82. package/dist/Editor/utils/button.js +17 -1
  83. package/dist/Editor/utils/events.js +2 -54
  84. package/dist/Editor/utils/font.js +37 -40
  85. package/dist/Editor/utils/helper.js +2 -31
  86. package/dist/Editor/utils/table.js +43 -51
  87. package/package.json +3 -4
  88. package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +0 -73
  89. package/dist/Editor/Elements/AI/VoiceToText/index.js +0 -184
  90. package/dist/Editor/Elements/AI/VoiceToText/style.js +0 -40
  91. package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
  92. package/dist/Editor/Elements/Redo/RedoButton.js +0 -14
  93. package/dist/Editor/Elements/Undo/UndoButton.js +0 -14
  94. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
  95. package/dist/Editor/assets/svg/RedoIcon.js +0 -27
  96. package/dist/Editor/assets/svg/SettingsIcon.js +0 -28
  97. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  98. package/dist/Editor/assets/svg/UndoIcon.js +0 -27
  99. package/dist/Editor/common/CustomColorPicker/index.js +0 -106
  100. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  101. package/dist/Editor/common/CustomDialog/index.js +0 -94
  102. package/dist/Editor/common/CustomDialog/style.js +0 -67
  103. package/dist/Editor/common/CustomSelect.js +0 -33
  104. package/dist/Editor/hooks/useEditorTheme.js +0 -139
  105. package/dist/Editor/theme/index.js +0 -144
  106. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  107. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  108. package/dist/Editor/themeSettings/buttons/style.js +0 -21
  109. package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
  110. package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
  111. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
  112. package/dist/Editor/themeSettings/fonts/index.js +0 -213
  113. package/dist/Editor/themeSettings/fonts/style.js +0 -44
  114. package/dist/Editor/themeSettings/icons.js +0 -60
  115. package/dist/Editor/themeSettings/index.js +0 -320
  116. package/dist/Editor/themeSettings/style.js +0 -152
  117. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  118. package/dist/Editor/themeSettingsAI/index.js +0 -356
  119. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
  120. package/dist/Editor/themeSettingsAI/style.js +0 -247
@@ -1,7 +1,7 @@
1
- import React, { useState } from "react";
1
+ import React, { useMemo, useState } from "react";
2
2
  import { Grid, Button, Popover } from "@mui/material";
3
+ import ColorPickerTool from "react-gcolor-picker";
3
4
  import { colors } from "../Elements/Color Picker/defaultColors";
4
- import CustomColorPicker from "./CustomColorPicker";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -9,12 +9,10 @@ const ColorPickerButton = props => {
9
9
  const {
10
10
  value,
11
11
  onSave,
12
+ defaultColors = [],
12
13
  classes = {},
13
14
  recentColors = [],
14
- children,
15
- handleClose: closeDrawer,
16
- hideThemeColors,
17
- disableEditTheme
15
+ hideGradient
18
16
  } = props;
19
17
  const [anchorEl, setAnchorEl] = useState(null);
20
18
  const [color, setColor] = useState(value);
@@ -32,14 +30,15 @@ const ColorPickerButton = props => {
32
30
  const handleColorChange = color => {
33
31
  setColor(color);
34
32
  };
33
+ const initialColors = useMemo(() => {
34
+ let colors = [...recentColors, ...defaultColors];
35
+ if (hideGradient) {
36
+ colors = colors.filter(c => c && !c.includes("gradient"));
37
+ }
38
+ return colors;
39
+ }, [recentColors, defaultColors, hideGradient]);
35
40
  return /*#__PURE__*/_jsxs(_Fragment, {
36
- children: [children ? /*#__PURE__*/_jsx("div", {
37
- onClick: handleColorPicker,
38
- style: {
39
- cursor: "pointer"
40
- },
41
- children: children
42
- }) : /*#__PURE__*/_jsx(Button, {
41
+ children: [/*#__PURE__*/_jsx(Button, {
43
42
  style: {
44
43
  background: value,
45
44
  height: "22px",
@@ -69,24 +68,17 @@ const ColorPickerButton = props => {
69
68
  item: true,
70
69
  xs: 12,
71
70
  children: [/*#__PURE__*/_jsx("div", {
72
- children: /*#__PURE__*/_jsx(CustomColorPicker, {
73
- gradient: true,
74
- color: color,
71
+ children: /*#__PURE__*/_jsx(ColorPickerTool, {
72
+ gradient: hideGradient ? false : true,
73
+ value: color,
75
74
  onChange: handleColorChange,
76
- recentColors: recentColors,
77
- closeDrawer: closeDrawer,
78
- hideThemeColors: hideThemeColors,
79
- disableEditTheme: disableEditTheme
75
+ defaultColors: initialColors
80
76
  })
81
77
  }), /*#__PURE__*/_jsxs("div", {
82
78
  style: {
83
79
  display: "flex",
84
- justifyContent: "flex-end",
85
- padding: "8px",
86
- background: "white",
87
- position: "sticky",
88
- bottom: 0,
89
- boxShadow: "0 -1px 5px rgba(0,0,0,0.1)"
80
+ justifyContent: "end",
81
+ margin: "8px"
90
82
  },
91
83
  children: [/*#__PURE__*/_jsx(Button, {
92
84
  onClick: handleClose,
@@ -7,68 +7,59 @@ import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { Transforms } from "slate";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix", "paragraphOne", "paragraphTwo", "paragraphThree", "grid"];
11
- const DragHandleStyle = fromPopper => {
12
- const handleDragStyle = fromPopper ? {
13
- position: "absolute",
14
- top: "6px",
15
- left: "4px"
16
- } : {
10
+ const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
11
+ const DragHandleStyle = () => ({
12
+ dragHandle: {
13
+ opacity: 0,
14
+ content: '" "',
17
15
  position: "absolute",
18
16
  top: "3px",
19
- left: "-52px"
20
- };
21
- return {
22
- dragHandle: {
23
- opacity: 0,
24
- content: '" "',
25
- ...handleDragStyle,
26
- borderRadius: "0px",
27
- padding: "0px",
28
- width: "20px",
29
- height: "20px",
30
- border: 0,
31
- display: "flex",
32
- alignItems: "center",
33
- justifyContent: "center",
34
- cursor: "grab",
35
- color: "#D7D7D6",
36
- background: "rgb(221, 221, 221, 0.1)",
37
- "& svg": {
38
- width: "20px"
39
- },
40
- "&:hover": {
41
- opacity: 1,
42
- background: "rgb(221, 221, 221, 0.8)"
43
- },
44
- "&.active": {
45
- opacity: 1,
46
- cursor: "grabbing"
47
- }
17
+ left: "-52px",
18
+ borderRadius: "0px",
19
+ padding: "0px",
20
+ width: "20px",
21
+ height: "20px",
22
+ border: 0,
23
+ display: "flex",
24
+ alignItems: "center",
25
+ justifyContent: "center",
26
+ cursor: "grab",
27
+ color: "#D7D7D6",
28
+ background: "rgb(221, 221, 221, 0.1)",
29
+ "& svg": {
30
+ width: "20px"
48
31
  },
49
- dropArea: {
50
- position: "absolute",
51
- left: 0,
52
- top: 0,
53
- width: "100%",
54
- height: "100%",
55
- pointerEvents: "none",
56
- zIndex: -1,
57
- "&.dragging": {
58
- backgroundColor: "#def4ff"
59
- }
32
+ "&:hover": {
33
+ opacity: 1,
34
+ background: "rgb(221, 221, 221, 0.8)"
60
35
  },
61
- dropAreaOver: {
62
- position: "absolute",
63
- left: 0,
64
- top: 0,
65
- width: "100%",
66
- height: "4px"
36
+ "&.active": {
37
+ opacity: 1,
38
+ cursor: "grabbing"
67
39
  }
68
- };
69
- };
40
+ },
41
+ dropArea: {
42
+ position: "absolute",
43
+ left: 0,
44
+ top: 0,
45
+ width: "100%",
46
+ height: "100%",
47
+ pointerEvents: "none",
48
+ zIndex: -1,
49
+ "&.dragging": {
50
+ backgroundColor: "#def4ff"
51
+ }
52
+ },
53
+ dropAreaOver: {
54
+ position: "absolute",
55
+ left: 0,
56
+ top: 0,
57
+ width: "100%",
58
+ height: "4px"
59
+ }
60
+ });
70
61
  const DragHandle = props => {
71
- const classes = DragHandleStyle(props.fromPopper);
62
+ const classes = DragHandleStyle();
72
63
  const editor = useSlateStatic();
73
64
  const [dragging, setDragging] = useState(false);
74
65
  const {
@@ -10,26 +10,10 @@ import { IoIosImage } from "react-icons/io";
10
10
  import { GridIcon, AccordionIcon, SignatureIcon, ButtonIcon, Carousal, FormIcon, BoldIcon, FontFamilyIcon, FontSizeIcon, ImageIcon, ItalicIcon, LinkIcon, StrikethroughIcon, TableIcon, UnderLineIcon, VideoIcon, CheckboxIcon, AppHeader, MoreHorizontal, UploadImage, DocsUpload, LeftArrow, RightArrow, CheckListButton, CheckListButtonActive, ExcelIcon, CsvIcon, DividerIcon, CloseIcon, SearchIcon, ExpandIcon, CalendarIconNew, Text, TextAreaIcon, Phone, BriefCase, Bank, CalendarTick, DollarSquare, Checkbox, Description, RadioButtonIcon, CheckedIcon, UncheckedIcon, InfinityIcon, ResetIcon } from "./iconslist";
11
11
  import ArrowRightIcon from "@mui/icons-material/ArrowRight";
12
12
  import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
13
- import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
14
- import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
15
- import SettingsIcon from "../assets/svg/SettingsIcon";
16
- import UndoIcon from "../assets/svg/UndoIcon";
17
- import RedoIcon from "../assets/svg/RedoIcon";
18
- import TextIcon from "../assets/svg/TextIcon";
19
- import AddElementIcon from "../assets/svg/AddElementIcon";
20
- import AddTemplateIcon from "../assets/svg/AddTemplateIcon";
13
+ import EmailRoundedIcon from '@mui/icons-material/EmailRounded';
14
+ import InfoOutlinedIcon from '@mui/icons-material/InfoOutlined';
21
15
  import { jsx as _jsx } from "react/jsx-runtime";
22
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
23
- const HeadingIcon = ({
24
- variant
25
- }) => {
26
- return /*#__PURE__*/_jsx("div", {
27
- style: {
28
- color: "#64748B"
29
- },
30
- children: variant
31
- });
32
- };
33
17
  const iconList = {
34
18
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
35
19
  size: 20
@@ -65,24 +49,6 @@ const iconList = {
65
49
  size: 18,
66
50
  fill: "#64748B"
67
51
  }),
68
- headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
69
- variant: "H4"
70
- }),
71
- headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
72
- variant: "H5"
73
- }),
74
- headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
75
- variant: "H6"
76
- }),
77
- paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
78
- variant: "P1"
79
- }),
80
- paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
81
- variant: "P2"
82
- }),
83
- paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
84
- variant: "P3"
85
- }),
86
52
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
87
53
  size: 20,
88
54
  fill: "#64748B"
@@ -278,13 +244,7 @@ const iconList = {
278
244
  checkedIcon: /*#__PURE__*/_jsx(CheckedIcon, {}),
279
245
  uncheckedIcon: /*#__PURE__*/_jsx(UncheckedIcon, {}),
280
246
  infinityIcon: /*#__PURE__*/_jsx(InfinityIcon, {}),
281
- resetIcon: /*#__PURE__*/_jsx(ResetIcon, {}),
282
- pagesSettings: /*#__PURE__*/_jsx(SettingsIcon, {}),
283
- undoIcon: /*#__PURE__*/_jsx(UndoIcon, {}),
284
- redoIcon: /*#__PURE__*/_jsx(RedoIcon, {}),
285
- textIcon: /*#__PURE__*/_jsx(TextIcon, {}),
286
- addElement: /*#__PURE__*/_jsx(AddElementIcon, {}),
287
- addTemplate: /*#__PURE__*/_jsx(AddTemplateIcon, {})
247
+ resetIcon: /*#__PURE__*/_jsx(ResetIcon, {})
288
248
  };
289
249
  const Icon = props => {
290
250
  const {
@@ -134,13 +134,10 @@ export const SelectPage = props => {
134
134
  });
135
135
  };
136
136
  export const Trigger = props => {
137
- const {
138
- nav
139
- } = props;
140
- return /*#__PURE__*/_jsxs(Typography, {
137
+ return /*#__PURE__*/_jsx(Typography, {
141
138
  variant: "subtitle1",
142
139
  gutterBottom: true,
143
- children: ["Choosing this will trigger the ", nav.type, " step"]
140
+ children: "Choosing this will trigger the next step"
144
141
  });
145
142
  };
146
143
  const scrollToOptions = [{
@@ -18,8 +18,7 @@ const MAP_COMPONENT = {
18
18
  webAddress: TextInput,
19
19
  email: TextInput,
20
20
  phone: TextInput,
21
- nextTrigger: Trigger,
22
- prevTrigger: Trigger,
21
+ actionTrigger: Trigger,
23
22
  scrollTopOrBottom: ScrollTopBottom,
24
23
  page: SelectPage
25
24
  };
@@ -36,12 +35,11 @@ export default function LinkSettings(props) {
36
35
  customProps,
37
36
  navType
38
37
  } = props;
39
- const themeType = localStorage.getItem("themeType");
40
38
  const {
41
39
  isMobile
42
40
  } = customProps;
43
41
  const navOptions = getNavOptions(customProps.hideTools);
44
- const classes = LinkSettingsStyles(themeType);
42
+ const classes = LinkSettingsStyles();
45
43
  const [nav, setNav] = useState(getNav(navType, navOptions));
46
44
  const [navValue, setNavValue] = useState(props?.navValue || "");
47
45
  const [openInNewTab, setOpenInNewTab] = useState(props.openInNewTab || false);
@@ -3,13 +3,8 @@ export const getNavOptions = (hideTools = []) => {
3
3
  label: "None",
4
4
  value: ""
5
5
  }, {
6
- label: "Next Trigger",
7
- value: "nextTrigger",
8
- type: "next"
9
- }, {
10
- label: "Previous Trigger",
11
- value: "prevTrigger",
12
- type: "previous"
6
+ label: "Trigger",
7
+ value: "actionTrigger"
13
8
  }, {
14
9
  label: "Web Address",
15
10
  value: "webAddress",
@@ -1,35 +1,32 @@
1
- const ButtonNavSettingsStyles = themeType => ({
1
+ const ButtonNavSettingsStyles = () => ({
2
2
  dialogContainer: {
3
- "& .MuiPaper-root": {
4
- background: themeType === "dark" ? "#141720 !important" : "#ffffff !important"
5
- },
6
- "& .MuiDialogContent-root": {
3
+ '& .MuiDialogContent-root': {
7
4
  padding: "0px 20px"
8
5
  },
9
- "& .MuiDialogActions-root": {
6
+ '& .MuiDialogActions-root': {
10
7
  padding: "10px"
11
8
  },
12
- "& .MuiTypography-h6": {
9
+ '& .MuiTypography-h6': {
13
10
  fontWeight: 600,
14
11
  fontSize: "16px",
15
12
  paddingRight: "20px"
16
13
  },
17
14
  "& .MuiGrid-container": {
18
- marginTop: "0px"
15
+ marginTop: '0px'
19
16
  },
20
17
  "& .MuiGrid-item": {
21
18
  padding: "14px"
22
19
  }
23
20
  },
24
21
  saveBtn: {
25
- color: "#fff",
22
+ color: '#fff',
26
23
  background: "#2563EB",
27
24
  fontSize: "14px",
28
25
  fontWeight: 500,
29
26
  padding: "4px 24px",
30
27
  textTransform: "none",
31
28
  "&:hover": {
32
- color: "#fff",
29
+ color: '#fff',
33
30
  background: "#2563EB"
34
31
  }
35
32
  },
@@ -46,7 +43,7 @@ const ButtonNavSettingsStyles = themeType => ({
46
43
  }
47
44
  },
48
45
  closeIcon: {
49
- position: "absolute",
46
+ position: 'absolute',
50
47
  right: 8,
51
48
  top: 8,
52
49
  color: theme => theme.palette.grey[500]
@@ -1,17 +1,15 @@
1
- import React, { useRef, useState } from "react";
1
+ import React, { useState } from "react";
2
2
  import { Transforms } from "slate";
3
3
  import { ReactEditor, useSlateStatic } from "slate-react";
4
- import { Box, IconButton, Popper, Tooltip } from "@mui/material";
4
+ import { Box, IconButton, Tooltip } from "@mui/material";
5
5
  import TuneIcon from "@mui/icons-material/Tune";
6
6
  import SectionPopup from "../../Elements/Grid/SectionPopup";
7
7
  import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
8
8
  import DragHandle from "../DnD/DragHandleButton";
9
9
  import { useEditorSelection } from "../../hooks/useMouseMove";
10
10
  import SectionStyle from "./styles";
11
- import useWindowResize from "../../hooks/useWindowResize";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Fragment as _Fragment } from "react/jsx-runtime";
15
13
  const list_types = ["orderedList", "unorderedList"];
16
14
  const Section = props => {
17
15
  const classes = SectionStyle();
@@ -40,33 +38,14 @@ const Section = props => {
40
38
  flexDirection
41
39
  } = sectionAlignment || {};
42
40
  const path = ReactEditor.findPath(editor, element);
43
- const anchorEl = useRef(null);
44
- const popperEl = useRef(null);
45
- const [size] = useWindowResize();
46
- const isSectionFullWidth = sectionGridSize && sectionGridSize[size?.device] >= 12;
47
- const [isHovering, setIsHovering] = useState(false);
48
- const onMouseEnter = () => {
49
- setIsHovering(true);
50
- };
51
- const onMouseLeave = () => {
52
- setIsHovering(false);
53
- };
54
41
  const onSettings = () => {
55
42
  setOpenSettings(true);
56
43
  };
57
- const Toolbar = ({
58
- fromPopper
59
- }) => {
44
+ const Toolbar = () => {
60
45
  return !readOnly && !showTool ? /*#__PURE__*/_jsx(Box, {
61
46
  component: "div",
62
47
  className: `element-toolbar no-border-button hr section-tw sectionIcon`,
63
- style: fromPopper ? {
64
- position: "unset",
65
- marginLeft: "28px",
66
- paddingTop: "4px",
67
- marginRight: "10px",
68
- height: "100%"
69
- } : {
48
+ style: {
70
49
  left: "-28px",
71
50
  top: "3px"
72
51
  },
@@ -120,8 +99,6 @@ const Section = props => {
120
99
  alignItems: horizantal,
121
100
  justifyContent: vertical
122
101
  },
123
- onMouseEnter: onMouseEnter,
124
- onMouseLeave: onMouseLeave,
125
102
  children: [/*#__PURE__*/_jsxs(Box, {
126
103
  className: "ed-section-inner",
127
104
  sx: {
@@ -130,36 +107,9 @@ const Section = props => {
130
107
  ...getBreakPointsValue(sectionGridSize || 8, null, "overrideGridSize", true)
131
108
  }
132
109
  },
133
- ref: anchorEl,
134
- children: [isHovering && isSectionFullWidth ? /*#__PURE__*/_jsx(Popper, {
135
- open: isHovering && isSectionFullWidth,
136
- anchorEl: anchorEl?.current,
137
- placement: "top-start",
138
- sx: {
139
- zIndex: 9999
140
- },
141
- disablePortal: true,
142
- ref: popperEl,
143
- className: "sectionPopper",
144
- children: /*#__PURE__*/_jsxs(Box, {
145
- sx: {
146
- bgcolor: "background.paper",
147
- background: "#F6F6F6",
148
- height: "30px",
149
- position: "relative"
150
- },
151
- children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
152
- ...props,
153
- fromPopper: true
154
- }) : null, /*#__PURE__*/_jsx(Toolbar, {
155
- fromPopper: true
156
- })]
157
- })
158
- }) : /*#__PURE__*/_jsxs(_Fragment, {
159
- children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
160
- ...props
161
- }) : null, /*#__PURE__*/_jsx(Toolbar, {})]
162
- }), children]
110
+ children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
111
+ ...props
112
+ }) : null, children, /*#__PURE__*/_jsx(Toolbar, {})]
163
113
  }), openSetttings ? /*#__PURE__*/_jsx(SectionPopup, {
164
114
  element: {
165
115
  ...element,
@@ -6,9 +6,6 @@ const SectionStyle = () => ({
6
6
  },
7
7
  "& .sectionIcon": {
8
8
  opacity: 1
9
- },
10
- "& .sectionPopper": {
11
- opacity: 1
12
9
  }
13
10
  },
14
11
  "& .element-toolbar": {
@@ -16,14 +13,6 @@ const SectionStyle = () => ({
16
13
  display: "block"
17
14
  }
18
15
  },
19
- "& .sectionPopper": {
20
- "&:hover": {
21
- opacity: 1
22
- }
23
- },
24
- "& .sectionPopper": {
25
- opacity: 0
26
- },
27
16
  "& .sectionIcon": {
28
17
  opacity: 0,
29
18
  padding: "0px",
@@ -40,60 +40,6 @@ const ELEMENTS_LIST = [{
40
40
  icon: "headingThree"
41
41
  }),
42
42
  onInsert: editor => toggleBlock(editor, "headingThree", false)
43
- }, {
44
- name: "Heading 4",
45
- desc: "",
46
- group: "Text",
47
- type: "headingFour",
48
- icon: /*#__PURE__*/_jsx(Icon, {
49
- icon: "headingFour"
50
- }),
51
- onInsert: editor => toggleBlock(editor, "headingFour", false)
52
- }, {
53
- name: "Heading 5",
54
- desc: "",
55
- group: "Text",
56
- type: "headingFive",
57
- icon: /*#__PURE__*/_jsx(Icon, {
58
- icon: "headingFive"
59
- }),
60
- onInsert: editor => toggleBlock(editor, "headingFive", false)
61
- }, {
62
- name: "Heading 6",
63
- desc: "",
64
- group: "Text",
65
- type: "headingSix",
66
- icon: /*#__PURE__*/_jsx(Icon, {
67
- icon: "headingSix"
68
- }),
69
- onInsert: editor => toggleBlock(editor, "headingSix", false)
70
- }, {
71
- name: "Paragraph 1",
72
- desc: "",
73
- group: "Text",
74
- type: "paragraphOne",
75
- icon: /*#__PURE__*/_jsx(Icon, {
76
- icon: "paragraphOne"
77
- }),
78
- onInsert: editor => toggleBlock(editor, "paragraphOne", false)
79
- }, {
80
- name: "Paragraph 2",
81
- desc: "",
82
- group: "Text",
83
- type: "paragraphTwo",
84
- icon: /*#__PURE__*/_jsx(Icon, {
85
- icon: "paragraphTwo"
86
- }),
87
- onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
88
- }, {
89
- name: "Paragraph 3",
90
- desc: "",
91
- group: "Text",
92
- type: "paragraphThree",
93
- icon: /*#__PURE__*/_jsx(Icon, {
94
- icon: "paragraphThree"
95
- }),
96
- onInsert: editor => toggleBlock(editor, "paragraphThree", false)
97
43
  }, {
98
44
  name: "Quote",
99
45
  desc: "",
@@ -5,7 +5,8 @@ const accordionTitleBtnStyle = [{
5
5
  label: "Accordion Color",
6
6
  key: "accordionTextColor",
7
7
  type: "color",
8
- needPreview: true
8
+ needPreview: true,
9
+ hideGradient: true
9
10
  }, {
10
11
  label: "Accordion Background Color",
11
12
  key: "accordionBgColor",
@@ -20,8 +20,7 @@ const buttonStyle = [{
20
20
  },
21
21
  children: option.text
22
22
  });
23
- },
24
- themeEnabled: true
23
+ }
25
24
  }, {
26
25
  label: "Font Size",
27
26
  key: "textSize",
@@ -45,8 +44,7 @@ const buttonStyle = [{
45
44
  }, {
46
45
  label: "Button Color",
47
46
  key: "bgColor",
48
- type: "color",
49
- themeEnabled: true
47
+ type: "color"
50
48
  }, {
51
49
  label: "Border Color",
52
50
  key: "borderColor",