@flozy/editor 3.9.1 → 3.9.4

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 (127) hide show
  1. package/dist/Editor/ChatEditor.js +45 -55
  2. package/dist/Editor/CommonEditor.js +111 -180
  3. package/dist/Editor/Editor.css +0 -7
  4. package/dist/Editor/Elements/AI/AIInput.js +18 -17
  5. package/dist/Editor/Elements/AI/CustomSelect.js +12 -19
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +28 -23
  7. package/dist/Editor/Elements/AI/Styles.js +1 -2
  8. package/dist/Editor/Elements/Accordion/Accordion.js +7 -74
  9. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +2 -3
  10. package/dist/Editor/Elements/Accordion/AccordionSummary.js +60 -4
  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/Embed/Image.js +19 -27
  18. package/dist/Editor/Elements/Embed/Video.js +10 -14
  19. package/dist/Editor/Elements/Emoji/EmojiPicker.js +2 -4
  20. package/dist/Editor/Elements/Form/Form.js +1 -1
  21. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
  22. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
  23. package/dist/Editor/Elements/Grid/Grid.js +3 -27
  24. package/dist/Editor/Elements/Grid/GridItem.js +1 -3
  25. package/dist/Editor/Elements/Link/Link.js +1 -6
  26. package/dist/Editor/Elements/Link/LinkButton.js +2 -4
  27. package/dist/Editor/Elements/Link/LinkPopup.js +3 -10
  28. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +4 -8
  29. package/dist/Editor/Elements/Signature/SignaturePopup.js +3 -14
  30. package/dist/Editor/Elements/Table/Styles.js +1 -23
  31. package/dist/Editor/Elements/Table/Table.js +2 -3
  32. package/dist/Editor/Elements/Table/TableCell.js +8 -70
  33. package/dist/Editor/Elements/TableContextMenu/TableContextMenu.js +0 -1
  34. package/dist/Editor/MiniEditor.js +1 -3
  35. package/dist/Editor/Styles/EditorStyles.js +1 -1
  36. package/dist/Editor/Toolbar/Basic/index.js +2 -4
  37. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +2 -26
  38. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  39. package/dist/Editor/Toolbar/FormatTools/TextSize.js +18 -29
  40. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -29
  41. package/dist/Editor/Toolbar/Mini/Options/Options.js +0 -10
  42. package/dist/Editor/Toolbar/Mini/Styles.js +0 -7
  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 +16 -22
  47. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +7 -52
  48. package/dist/Editor/Toolbar/PopupTool/index.js +17 -7
  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 +9 -25
  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/MentionsPopup/MentionsListCard.js +1 -6
  61. package/dist/Editor/common/MentionsPopup/Styles.js +2 -5
  62. package/dist/Editor/common/Section/index.js +7 -57
  63. package/dist/Editor/common/Section/styles.js +0 -11
  64. package/dist/Editor/common/Shorthands/elements.js +0 -54
  65. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +7 -7
  66. package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +16 -16
  67. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  68. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +3 -13
  69. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  70. package/dist/Editor/common/StyleBuilder/fieldTypes/buttonLink.js +1 -1
  71. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -31
  72. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  73. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +3 -14
  74. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
  75. package/dist/Editor/common/StyleBuilder/index.js +1 -1
  76. package/dist/Editor/common/iconslist.js +31 -0
  77. package/dist/Editor/helper/deserialize/index.js +9 -14
  78. package/dist/Editor/helper/theme.js +4 -190
  79. package/dist/Editor/hooks/useMouseMove.js +2 -4
  80. package/dist/Editor/hooks/useWindowMessage.js +7 -10
  81. package/dist/Editor/plugins/withEmbeds.js +1 -1
  82. package/dist/Editor/plugins/withHTML.js +5 -47
  83. package/dist/Editor/plugins/withLayout.js +10 -15
  84. package/dist/Editor/plugins/withTable.js +2 -2
  85. package/dist/Editor/theme/ThemeList.js +173 -50
  86. package/dist/Editor/utils/SlateUtilityFunctions.js +25 -161
  87. package/dist/Editor/utils/button.js +17 -1
  88. package/dist/Editor/utils/draftToSlate.js +1 -1
  89. package/dist/Editor/utils/events.js +6 -65
  90. package/dist/Editor/utils/font.js +37 -40
  91. package/dist/Editor/utils/helper.js +14 -74
  92. package/dist/Editor/utils/table.js +43 -51
  93. package/package.json +3 -4
  94. package/dist/Editor/Elements/AI/VoiceToText/AudioWave.js +0 -73
  95. package/dist/Editor/Elements/AI/VoiceToText/index.js +0 -177
  96. package/dist/Editor/Elements/AI/VoiceToText/style.js +0 -40
  97. package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
  98. package/dist/Editor/Elements/Redo/RedoButton.js +0 -14
  99. package/dist/Editor/Elements/Undo/UndoButton.js +0 -14
  100. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
  101. package/dist/Editor/assets/svg/RedoIcon.js +0 -27
  102. package/dist/Editor/assets/svg/SettingsIcon.js +0 -28
  103. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  104. package/dist/Editor/assets/svg/UndoIcon.js +0 -27
  105. package/dist/Editor/common/CustomColorPicker/index.js +0 -106
  106. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  107. package/dist/Editor/common/CustomDialog/index.js +0 -94
  108. package/dist/Editor/common/CustomDialog/style.js +0 -67
  109. package/dist/Editor/common/CustomSelect.js +0 -33
  110. package/dist/Editor/common/EditorCmds.js +0 -35
  111. package/dist/Editor/hooks/useEditorTheme.js +0 -139
  112. package/dist/Editor/theme/index.js +0 -144
  113. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  114. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  115. package/dist/Editor/themeSettings/buttons/style.js +0 -21
  116. package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
  117. package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
  118. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
  119. package/dist/Editor/themeSettings/fonts/index.js +0 -213
  120. package/dist/Editor/themeSettings/fonts/style.js +0 -44
  121. package/dist/Editor/themeSettings/icons.js +0 -60
  122. package/dist/Editor/themeSettings/index.js +0 -320
  123. package/dist/Editor/themeSettings/style.js +0 -152
  124. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  125. package/dist/Editor/themeSettingsAI/index.js +0 -356
  126. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
  127. package/dist/Editor/themeSettingsAI/style.js +0 -247
@@ -1,15 +1,11 @@
1
- import React, { useContext, useState } from "react";
2
- import { Box, IconButton, Popover, Typography, useTheme } from "@mui/material";
1
+ import React, { useState } from "react";
2
+ import { Box, IconButton, Popover } from "@mui/material";
3
3
  import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
4
4
  import Button from "../../common/Button";
5
5
  import { colors } from "./defaultColors";
6
6
  import ColorPicker from "./colorPicker.svg";
7
- import { ThemeContext } from "../../CommonEditor";
8
- import { useSlateStatic } from "slate-react";
9
- import { Transforms } from "slate";
10
7
  import { jsx as _jsx } from "react/jsx-runtime";
11
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
- import { Fragment as _Fragment } from "react/jsx-runtime";
13
9
  let c = [];
14
10
  const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
15
11
  if (i % 7 === 0) {
@@ -35,7 +31,9 @@ const SingleColorButton = ({
35
31
  style: {
36
32
  width: "100%",
37
33
  display: "flex",
38
- padding: padding || "8px"
34
+ alignItems: "center",
35
+ padding: padding || "8px",
36
+ justifyContent: "center"
39
37
  },
40
38
  children: [crs.map(m => /*#__PURE__*/_jsx(Button, {
41
39
  onClick: handleSelect(m),
@@ -111,17 +109,11 @@ const ColorButtons = props => {
111
109
  forMiniTool,
112
110
  openColorTool,
113
111
  onClose,
114
- onColorPickerClick,
115
- disableEditTheme
112
+ onColorPickerClick
116
113
  } = props;
117
114
  const [row1, ...restRows] = ColorChunks([]);
118
115
  const [anchorEl, setAnchorEl] = useState(null);
119
116
  const open = Boolean(anchorEl);
120
- const theme = useTheme();
121
- const editor = useSlateStatic();
122
- const {
123
- setOpenTheme
124
- } = useContext(ThemeContext);
125
117
  const handleMore = e => {
126
118
  setAnchorEl(e.currentTarget);
127
119
  };
@@ -134,7 +126,6 @@ const ColorButtons = props => {
134
126
  const handleSelect = color => () => {
135
127
  onSelect(color);
136
128
  };
137
- const colorVars = theme?.vars?.colors || {};
138
129
  return /*#__PURE__*/_jsxs(Box, {
139
130
  component: "span",
140
131
  sx: classes.colorButtons,
@@ -151,7 +142,7 @@ const ColorButtons = props => {
151
142
  activeColor: activeColor
152
143
  }, `si_btn_row1_${m}_${i}`);
153
144
  })
154
- }), /*#__PURE__*/_jsx(Popover, {
145
+ }), /*#__PURE__*/_jsxs(Popover, {
155
146
  open: open || openColorTool,
156
147
  anchorEl: anchorEl || openColorTool,
157
148
  onClose: handleClose,
@@ -165,39 +156,9 @@ const ColorButtons = props => {
165
156
  },
166
157
  sx: classes.colorPopper,
167
158
  className: "colorPopper",
168
- children: /*#__PURE__*/_jsxs(Box, {
159
+ children: [/*#__PURE__*/_jsx(Box, {
169
160
  sx: classes.colorButtonsInner,
170
- children: [Object.values(colorVars)?.length ? /*#__PURE__*/_jsxs(_Fragment, {
171
- children: [/*#__PURE__*/_jsxs(Box, {
172
- component: "div",
173
- className: "singleColorTitleWrapper",
174
- children: [/*#__PURE__*/_jsx(Typography, {
175
- variant: "subtitle2",
176
- children: "Theme colour"
177
- }), disableEditTheme ? null : /*#__PURE__*/_jsx("div", {
178
- className: "editBtn",
179
- onClick: () => {
180
- Transforms.deselect(editor, {
181
- at: editor.selection
182
- });
183
- setOpenTheme("editThemeColor");
184
- },
185
- children: "Edit"
186
- })]
187
- }), /*#__PURE__*/_jsx(SingleColorButton, {
188
- crs: Object.values(colorVars),
189
- handleSelect: handleSelect,
190
- classes: classes,
191
- activeColor: activeColor
192
- })]
193
- }) : null, /*#__PURE__*/_jsx(Box, {
194
- component: "div",
195
- className: "singleColorTitleWrapper",
196
- children: /*#__PURE__*/_jsx(Typography, {
197
- variant: "subtitle2",
198
- children: "Custom colour"
199
- })
200
- }), restRows.map((m, i) => {
161
+ children: restRows.map((m, i) => {
201
162
  return /*#__PURE__*/_jsx(SingleColorButton, {
202
163
  id: `p2_${id}`,
203
164
  crs: m,
@@ -206,18 +167,14 @@ const ColorButtons = props => {
206
167
  classes: classes,
207
168
  activeColor: activeColor
208
169
  }, `si_btn_${m}_${i}`);
209
- }), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
210
- onClick: onColorPickerClick,
211
- style: {
212
- alignSelf: "start",
213
- margin: "6px"
214
- },
215
- children: /*#__PURE__*/_jsx("img", {
216
- src: ColorPicker,
217
- alt: "color wheel"
218
- })
219
- }) : null]
220
- })
170
+ })
171
+ }), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
172
+ onClick: onColorPickerClick,
173
+ children: /*#__PURE__*/_jsx("img", {
174
+ src: ColorPicker,
175
+ alt: "color wheel"
176
+ })
177
+ }) : null]
221
178
  })]
222
179
  });
223
180
  };
@@ -60,28 +60,4 @@
60
60
  padding: 0 15px !important;
61
61
  width: 60px !important;
62
62
  flex-shrink: 0;
63
- }
64
-
65
-
66
- .singleColorTitleWrapper {
67
- display: flex;
68
- justify-content: space-between;
69
- align-items: center;
70
- padding: 10px;
71
- width: 100%;
72
- border-bottom: 1px solid #DCE4EC;
73
- }
74
-
75
- .singleColorTitleWrapper .MuiTypography-root {
76
- font-weight: 600;
77
- }
78
-
79
- .singleColorTitleWrapper .editBtn {
80
- text-transform: none;
81
- color: #2563EB;
82
- text-decoration: underline;
83
- padding: 0px;
84
- min-width: unset;
85
- cursor: pointer;
86
- font-size: 14px;
87
- }
63
+ }
@@ -1,6 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { ReactEditor } from "slate-react";
3
3
  import { Transforms } from "slate";
4
+ import ColorPickerTool from "react-gcolor-picker";
4
5
  import { IconButton, Tooltip, Box, Popover } from "@mui/material";
5
6
  import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
6
7
  import ColorButtons from "./ColorButtons";
@@ -8,7 +9,6 @@ import ColorPickerStyles from "./Styles";
8
9
  import colorWheel from "./colorWheel.png";
9
10
  import "./ColorPicker.css";
10
11
  import { useEditorContext } from "../../hooks/useMouseMove";
11
- import CustomColorPicker from "../../common/CustomColorPicker";
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { Fragment as _Fragment } from "react/jsx-runtime";
14
14
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -95,10 +95,10 @@ const ColorPicker = props => {
95
95
  horizontal: "top"
96
96
  },
97
97
  sx: classes.colorPickerPopup,
98
- children: /*#__PURE__*/_jsx(CustomColorPicker, {
98
+ children: /*#__PURE__*/_jsx(ColorPickerTool, {
99
99
  gradient: true,
100
- onChange: handleFormSubmit,
101
- color: activeColor
100
+ value: activeColor,
101
+ onChange: handleFormSubmit
102
102
  })
103
103
  })]
104
104
  });
@@ -15,8 +15,7 @@ const ColorPickerStyles = theme => ({
15
15
  colorPopper: {
16
16
  "& .MuiPaper-root": {
17
17
  backgroundColor: theme?.palette?.editor?.background,
18
- padding: "4px 14px",
19
- "@media only screen and (max-width: 600px)": {
18
+ '@media only screen and (max-width: 600px)': {
20
19
  marginTop: "-40px"
21
20
  }
22
21
  }
@@ -167,19 +167,15 @@ const Image = ({
167
167
  onTouchEnd
168
168
  } = handleLinkType(webAddress, linkType, readOnly, isNewTab);
169
169
  const handleImageClick = () => {
170
- try {
171
- Transforms.select(editor, {
172
- anchor: Editor.start(editor, path),
173
- focus: Editor.end(editor, path)
174
- });
175
- if (onClick) {
176
- onClick();
177
- }
178
- if (onTouchEnd) {
179
- onTouchEnd();
180
- }
181
- } catch (err) {
182
- console.log(err);
170
+ Transforms.select(editor, {
171
+ anchor: Editor.start(editor, path),
172
+ focus: Editor.end(editor, path)
173
+ });
174
+ if (onClick) {
175
+ onClick();
176
+ }
177
+ if (onTouchEnd) {
178
+ onTouchEnd();
183
179
  }
184
180
  };
185
181
  useEffect(() => {
@@ -193,20 +189,16 @@ const Image = ({
193
189
  setOpenSettings(true);
194
190
  };
195
191
  const onSave = data => {
196
- try {
197
- const updateData = {
198
- ...data
199
- };
200
- delete updateData.children;
201
- Transforms.setNodes(editor, {
202
- ...updateData
203
- }, {
204
- at: path
205
- });
206
- onClose();
207
- } catch (err) {
208
- console.log(err);
209
- }
192
+ const updateData = {
193
+ ...data
194
+ };
195
+ delete updateData.children;
196
+ Transforms.setNodes(editor, {
197
+ ...updateData
198
+ }, {
199
+ at: path
200
+ });
201
+ onClose();
210
202
  };
211
203
  const onClose = () => {
212
204
  setOpenSettings(false);
@@ -95,20 +95,16 @@ const Video = ({
95
95
  setOpenSettings(true);
96
96
  };
97
97
  const onSave = data => {
98
- try {
99
- const updateData = {
100
- ...data
101
- };
102
- delete updateData.children;
103
- Transforms.setNodes(editor, {
104
- ...updateData
105
- }, {
106
- at: path
107
- });
108
- onClose();
109
- } catch (err) {
110
- console.log(err);
111
- }
98
+ const updateData = {
99
+ ...data
100
+ };
101
+ delete updateData.children;
102
+ Transforms.setNodes(editor, {
103
+ ...updateData
104
+ }, {
105
+ at: path
106
+ });
107
+ onClose();
112
108
  };
113
109
  const onClose = () => {
114
110
  setOpenSettings(false);
@@ -4,14 +4,12 @@ import { jsx as _jsx } from "react/jsx-runtime";
4
4
  import { Fragment as _Fragment } from "react/jsx-runtime";
5
5
  const EmojiPicker = props => {
6
6
  const {
7
- onEmojiSelect,
8
- onClose
7
+ onEmojiSelect
9
8
  } = props;
10
9
  return /*#__PURE__*/_jsx(_Fragment, {
11
10
  children: /*#__PURE__*/_jsx(Picker, {
12
11
  data: data,
13
- onEmojiSelect: onEmojiSelect,
14
- onClickOutside: onClose
12
+ onEmojiSelect: onEmojiSelect
15
13
  })
16
14
  });
17
15
  };
@@ -119,7 +119,7 @@ const Form = props => {
119
119
  if (fieldData?.element === "email") {
120
120
  rule.push(`isEmail`);
121
121
  }
122
- if (fieldData?.required && fieldData?.element === "email") {
122
+ if (fieldData?.required || fieldData?.element === "email") {
123
123
  validations.push({
124
124
  name: pair[0],
125
125
  value: pair[1],
@@ -71,11 +71,11 @@ const FormWorkflow = props => {
71
71
  children: [/*#__PURE__*/_jsx(Grid, {
72
72
  item: true,
73
73
  sx: classes.radioBtn,
74
- children: /*#__PURE__*/_jsxs(RadioGroup, {
74
+ children: /*#__PURE__*/_jsx(RadioGroup, {
75
75
  name: "set timing",
76
76
  value: schedule,
77
77
  defaultValue: 1,
78
- children: [/*#__PURE__*/_jsx(FormControlLabel, {
78
+ children: /*#__PURE__*/_jsx(FormControlLabel, {
79
79
  value: "immediately",
80
80
  label: "Immediately",
81
81
  onChange: () => {
@@ -84,16 +84,7 @@ const FormWorkflow = props => {
84
84
  control: /*#__PURE__*/_jsx(Radio, {
85
85
  size: "small"
86
86
  })
87
- }), /*#__PURE__*/_jsx(FormControlLabel, {
88
- value: "after",
89
- label: "After",
90
- onChange: () => {
91
- setSchedule("after");
92
- },
93
- control: /*#__PURE__*/_jsx(Radio, {
94
- size: "small"
95
- })
96
- })]
87
+ })
97
88
  })
98
89
  }), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
99
90
  item: true,
@@ -39,8 +39,7 @@ const UserInputs = props => {
39
39
  fontStyleOptions: ['underline'],
40
40
  hideLink: true,
41
41
  hideTextColor: true
42
- },
43
- theme: theme
42
+ }
44
43
  })
45
44
  })
46
45
  });
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import React, { useState } from "react";
3
- import { Transforms, Path, Node } from "slate";
3
+ import { Transforms, Path } from "slate";
4
4
  import { useSlateStatic, ReactEditor } from "slate-react";
5
5
  import { IconButton, Tooltip, Grid as GridContainer } from "@mui/material";
6
6
  import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
@@ -15,7 +15,6 @@ import { gridItem } from "../../utils/gridItem";
15
15
  import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
16
16
  import { getTRBLBreakPoints, getBreakPointsValue } from "../../helper/theme";
17
17
  import useWindowResize from "../../hooks/useWindowResize";
18
- import { useTheme } from "@emotion/react";
19
18
  import { jsx as _jsx } from "react/jsx-runtime";
20
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
21
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -30,16 +29,11 @@ const GridToolBar = ({
30
29
  onAddGridItem,
31
30
  onAddSection,
32
31
  onMoveSection,
33
- path,
34
- isSectionFullWidth
32
+ path
35
33
  }) => {
36
34
  return selected && !showTool ? /*#__PURE__*/_jsxs("div", {
37
35
  className: "grid-container-toolbar",
38
36
  contentEditable: false,
39
- style: isSectionFullWidth ? {
40
- right: "4px",
41
- top: "4px"
42
- } : {},
43
37
  children: [/*#__PURE__*/_jsx(Tooltip, {
44
38
  title: "Grid Settings",
45
39
  arrow: true,
@@ -80,19 +74,7 @@ const GridToolBar = ({
80
74
  }) : null]
81
75
  }) : null;
82
76
  };
83
- const getParentEl = (editor, path) => {
84
- try {
85
- if (path?.length) {
86
- return Node.parent(editor, path);
87
- } else {
88
- return null;
89
- }
90
- } catch (err) {
91
- return null;
92
- }
93
- };
94
77
  const Grid = props => {
95
- const theme = useTheme();
96
78
  const {
97
79
  attributes,
98
80
  children,
@@ -131,11 +113,6 @@ const Grid = props => {
131
113
  const selected = hoverPath === path.join(",");
132
114
  const [showTool] = useEditorSelection(editor);
133
115
  const [size] = useWindowResize();
134
- const parentElement = getParentEl(editor, path);
135
- const {
136
- sectionGridSize
137
- } = parentElement || {};
138
- const isSectionFullWidth = sectionGridSize && sectionGridSize[size?.device] >= 12;
139
116
  const onAddGridItem = () => {
140
117
  const currentPath = editor.selection?.anchor?.path;
141
118
  const ancestorsPath = Path.ancestors(currentPath, {
@@ -350,8 +327,7 @@ const Grid = props => {
350
327
  onAddGridItem: onAddGridItem,
351
328
  onAddSection: onAddSection,
352
329
  onMoveSection: onMoveSection,
353
- path: path,
354
- isSectionFullWidth: isSectionFullWidth
330
+ path: path
355
331
  })]
356
332
  }), openSetttings ? /*#__PURE__*/_jsx(PoupComp, {
357
333
  element: element,
@@ -8,7 +8,6 @@ import { GridSettingsIcon } from "../../common/iconslist";
8
8
  import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
9
9
  import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
10
10
  import { isEmptyNode } from "../../utils/helper";
11
- import { useTheme } from "@emotion/react";
12
11
  import { jsx as _jsx } from "react/jsx-runtime";
13
12
  import { jsxs as _jsxs } from "react/jsx-runtime";
14
13
  const GridItemToolbar = ({
@@ -35,7 +34,6 @@ const GridItemToolbar = ({
35
34
  }) : null;
36
35
  };
37
36
  const GridItem = props => {
38
- const theme = useTheme();
39
37
  const {
40
38
  attributes,
41
39
  children,
@@ -121,7 +119,7 @@ const GridItem = props => {
121
119
  xs: xsHidden ? "none" : "flex"
122
120
  },
123
121
  flexDirection: flexDirection || "column",
124
- background: bgColor,
122
+ background: bgColor || "transparent",
125
123
  borderColor: getBorderColor(),
126
124
  borderWidth: borderWidth || "1px",
127
125
  borderRadius: {
@@ -9,7 +9,6 @@ import { removeLink } from "../../utils/link";
9
9
  import LinkPopup from "./LinkPopup";
10
10
  import "./styles.css";
11
11
  import { absoluteLink } from "../../utils/helper";
12
- import { useEditorContext } from "../../hooks/useMouseMove";
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
14
  const Link = props => {
@@ -30,9 +29,6 @@ const Link = props => {
30
29
  const path = ReactEditor.findPath(editor, element);
31
30
  const urlPath = element.url || element.href;
32
31
  const absLink = absoluteLink(urlPath);
33
- const {
34
- theme
35
- } = useEditorContext();
36
32
  const updateLink = () => {
37
33
  Transforms.setNodes(editor, {
38
34
  href: linkData?.url,
@@ -111,8 +107,7 @@ const Link = props => {
111
107
  linkData: linkData,
112
108
  handleClose: handleClose,
113
109
  handleInputChange: handleInputChange,
114
- handleInsertLink: updateLink,
115
- theme: theme
110
+ handleInsertLink: updateLink
116
111
  })]
117
112
  });
118
113
  };
@@ -9,8 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
10
  const LinkButton = props => {
11
11
  const {
12
- editor,
13
- theme
12
+ editor
14
13
  } = props;
15
14
  const linkInputRef = useRef(null);
16
15
  const [showInput, setShowInput] = useState(false);
@@ -78,8 +77,7 @@ const LinkButton = props => {
78
77
  linkData: linkData,
79
78
  handleClose: handleClose,
80
79
  handleInputChange: handleInputChange,
81
- handleInsertLink: handleInsertLink,
82
- theme: theme
80
+ handleInsertLink: handleInsertLink
83
81
  })]
84
82
  });
85
83
  };
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { Dialog, DialogActions, DialogContent, DialogTitle, FormControl, FormControlLabel, Grid, TextField, Button, IconButton, Typography, Checkbox } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
- import LinkPopupStyles from "./LinkPopupStyles";
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
6
  const LinkPopup = props => {
@@ -10,11 +9,8 @@ const LinkPopup = props => {
10
9
  handleClose,
11
10
  linkData,
12
11
  handleInputChange,
13
- handleInsertLink,
14
- theme
12
+ handleInsertLink
15
13
  } = props;
16
- const themeType = localStorage.getItem("themeType");
17
- const classes = LinkPopupStyles(themeType);
18
14
  return /*#__PURE__*/_jsxs(Dialog, {
19
15
  fullWidth: true,
20
16
  open: open,
@@ -48,15 +44,13 @@ const LinkPopup = props => {
48
44
  style: {
49
45
  paddingTop: "12px"
50
46
  },
51
- className: classes.titleTypo,
52
47
  children: /*#__PURE__*/_jsx(TextField, {
53
48
  size: "small",
54
49
  fullWidth: true,
55
50
  value: linkData?.name,
56
51
  name: "name",
57
52
  placeholder: "Link Title",
58
- onChange: handleInputChange,
59
- sx: classes.addLinkField
53
+ onChange: handleInputChange
60
54
  })
61
55
  }), /*#__PURE__*/_jsx(Grid, {
62
56
  item: true,
@@ -70,8 +64,7 @@ const LinkPopup = props => {
70
64
  name: "url",
71
65
  value: linkData?.url,
72
66
  placeholder: "https://google.com",
73
- onChange: handleInputChange,
74
- sx: classes.addLinkField
67
+ onChange: handleInputChange
75
68
  })
76
69
  }), /*#__PURE__*/_jsx(Grid, {
77
70
  item: true,
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from "react";
2
2
  import { useSlateStatic } from "slate-react";
3
3
  import PageSettingsPopup from "./PageSettingsPopup";
4
+ import { PageSettings } from "../../common/iconslist";
4
5
  import ToolbarIcon from "../../common/ToolbarIcon";
5
6
  import { getPageSettings, updatePageSettings } from "../../utils/pageSettings";
6
- import SettingsIcon from "../../assets/svg/SettingsIcon";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -11,9 +11,7 @@ const PageSettingsButton = props => {
11
11
  const {
12
12
  customProps,
13
13
  icoBtnType,
14
- from,
15
- closePopper,
16
- setToolTip
14
+ from
17
15
  } = props;
18
16
  const [openSetttings, setOpenSettings] = useState(false);
19
17
  const editor = useSlateStatic();
@@ -40,18 +38,16 @@ const PageSettingsButton = props => {
40
38
  }
41
39
  };
42
40
  const onClose = () => {
43
- closePopper(true);
44
- setToolTip(false);
45
41
  setOpenSettings(false);
46
42
  };
47
43
  return /*#__PURE__*/_jsxs(_Fragment, {
48
- children: [from === "miniToolBar" ? /*#__PURE__*/_jsx(SettingsIcon, {
44
+ children: [from === "miniToolBar" ? /*#__PURE__*/_jsx(PageSettings, {
49
45
  onClick: onSettings,
50
46
  className: "removeDefaultSvgCls"
51
47
  }) : /*#__PURE__*/_jsx(ToolbarIcon, {
52
48
  title: "Page Settings",
53
49
  onClick: onSettings,
54
- icon: /*#__PURE__*/_jsx(SettingsIcon, {}),
50
+ icon: /*#__PURE__*/_jsx(PageSettings, {}),
55
51
  icoBtnType: icoBtnType
56
52
  }), openSetttings !== false ? /*#__PURE__*/_jsx(PageSettingsPopup, {
57
53
  element: openSetttings?.element || {},
@@ -263,12 +263,7 @@ const SignaturePopup = props => {
263
263
  name: "signedBy",
264
264
  placeholder: "Enter Name",
265
265
  size: "small",
266
- onChange: onChange,
267
- sx: {
268
- '& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline': {
269
- borderColor: '#ccc'
270
- }
271
- }
266
+ onChange: onChange
272
267
  })
273
268
  })]
274
269
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -316,8 +311,7 @@ const SignaturePopup = props => {
316
311
  },
317
312
  children: [/*#__PURE__*/_jsx(Grid, {
318
313
  style: {
319
- marginRight: "8px",
320
- minWidth: '44px'
314
+ marginRight: "8px"
321
315
  },
322
316
  children: /*#__PURE__*/_jsx("label", {
323
317
  htmlFor: "signedByEmail",
@@ -332,12 +326,7 @@ const SignaturePopup = props => {
332
326
  name: "signedByEmail",
333
327
  placeholder: "Enter Email",
334
328
  size: "small",
335
- onChange: onChange,
336
- sx: {
337
- '& .MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline': {
338
- borderColor: '#ccc'
339
- }
340
- }
329
+ onChange: onChange
341
330
  })
342
331
  })]
343
332
  })]