@flozy/editor 4.9.3 → 4.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (34) hide show
  1. package/dist/Editor/Editor.css +21 -11
  2. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -3
  3. package/dist/Editor/Elements/AI/Styles.js +7 -7
  4. package/dist/Editor/Elements/Carousel/Carousel.js +3 -0
  5. package/dist/Editor/Elements/Divider/Divider.js +4 -2
  6. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  7. package/dist/Editor/Elements/Search/SearchAttachment.js +6 -9
  8. package/dist/Editor/Elements/Search/SearchButton.js +4 -4
  9. package/dist/Editor/Elements/Search/SearchList.js +7 -5
  10. package/dist/Editor/Elements/Signature/SignaturePopup.js +2 -1
  11. package/dist/Editor/Elements/Table/AddRowCol.js +3 -2
  12. package/dist/Editor/Elements/Table/DragButton.js +6 -2
  13. package/dist/Editor/Elements/Table/DragStyles.js +62 -36
  14. package/dist/Editor/Elements/Table/Styles.js +1 -1
  15. package/dist/Editor/Elements/Table/Table.js +8 -3
  16. package/dist/Editor/Elements/Table/TableCell.js +24 -10
  17. package/dist/Editor/Elements/Table/tableHelper.js +83 -0
  18. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  19. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +26 -22
  20. package/dist/Editor/Toolbar/PopupTool/index.js +13 -11
  21. package/dist/Editor/common/MentionsPopup/Styles.js +1 -1
  22. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +10 -35
  23. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
  24. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  25. package/dist/Editor/common/StyleBuilder/formStyle.js +101 -69
  26. package/dist/Editor/common/StyleBuilder/index.js +8 -34
  27. package/dist/Editor/common/Uploader.js +8 -0
  28. package/dist/Editor/common/iconListV2.js +2 -0
  29. package/dist/Editor/common/iconslist.js +1 -0
  30. package/dist/Editor/helper/deserialize/index.js +5 -11
  31. package/dist/Editor/hooks/useEditorScroll.js +1 -1
  32. package/dist/Editor/hooks/useTable.js +37 -30
  33. package/dist/Editor/utils/helper.js +11 -0
  34. package/package.json +1 -1
@@ -19,8 +19,7 @@ const usePopupStyle = theme => ({
19
19
  },
20
20
  "& .MuiPaper-root": {
21
21
  backgroundColor: `${theme?.palette?.editor?.textFormatBgColor} !important`,
22
- borderRadius: "19px !important",
23
- paddingBottom: "10px !important"
22
+ borderRadius: "19px !important"
24
23
  },
25
24
  "& .MuiDialog-paperFullScreen": {
26
25
  borderRadius: "0px !important"
@@ -127,34 +126,34 @@ const usePopupStyle = theme => ({
127
126
  backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
128
127
  "& .signatureElementIcon": {
129
128
  "& path": {
130
- fill: `${theme?.palette?.editor?.menuOptionTextColor} !important`
129
+ fill: `${theme?.palette?.editor?.menuOptionTextColor}`
131
130
  }
132
131
  },
133
132
  "& .commonSvgStyle": {
134
133
  "& path": {
135
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`
134
+ stroke: `${theme?.palette?.editor?.menuOptionTextColor}`
136
135
  }
137
136
  },
138
137
  "& .commonSvgStyle2": {
139
138
  "& path": {
140
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`
139
+ stroke: `${theme?.palette?.editor?.menuOptionTextColor}`
141
140
  }
142
141
  },
143
142
  "& .colorBoxElementIcon": {
144
143
  "& path": {
145
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`,
144
+ stroke: `${theme?.palette?.editor?.menuOptionTextColor}`,
146
145
  fill: "none"
147
146
  }
148
147
  },
149
148
  "& .gridElementIcon": {
150
149
  "& path": {
151
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`,
152
- fill: `${theme?.palette?.editor?.menuOptionTextColor} !important`
150
+ stroke: `${theme?.palette?.editor?.menuOptionTextColor}`,
151
+ fill: `${theme?.palette?.editor?.menuOptionTextColor}`
153
152
  }
154
153
  },
155
154
  "& .newLineElementIcon": {
156
155
  "& path": {
157
- fill: `${theme?.palette?.editor?.menuOptionTextColor} !important`
156
+ fill: `${theme?.palette?.editor?.menuOptionTextColor}`
158
157
  }
159
158
  }
160
159
  },
@@ -245,46 +244,46 @@ const usePopupStyle = theme => ({
245
244
  textAlignButtons: {
246
245
  "& .justifyIcon": {
247
246
  "& path": {
248
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
249
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
247
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
248
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
250
249
  }
251
250
  },
252
251
  "& .textAlignIconSameStyles": {
253
252
  "& path": {
254
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
253
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
255
254
  }
256
255
  },
257
256
  "& .orderedListIcon": {
258
257
  "& path": {
259
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
258
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
260
259
  },
261
260
  "& text": {
262
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
261
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
263
262
  }
264
263
  },
265
264
  "& .bulletedListTextIcon": {
266
265
  "& path": {
267
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
268
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
266
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
267
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
269
268
  },
270
269
  "& circle": {
271
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
270
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
272
271
  }
273
272
  },
274
273
  "& .checkedListTextIcon": {
275
274
  "& path": {
276
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
275
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
277
276
  }
278
277
  },
279
278
  "& .accordianListTextIcon": {
280
279
  // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
281
280
  "& svg": {
282
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
283
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
281
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
282
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
284
283
  },
285
284
  "& path": {
286
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
287
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
285
+ fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
286
+ stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
288
287
  }
289
288
  }
290
289
  },
@@ -297,6 +296,11 @@ const usePopupStyle = theme => ({
297
296
  },
298
297
  "& .MuiOutlinedInput-notchedOutline": {
299
298
  border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`
299
+ },
300
+ '& .MuiInputBase-root': {
301
+ '& input': {
302
+ border: "none !important"
303
+ }
300
304
  }
301
305
  },
302
306
  textFormatSelect: {
@@ -1,7 +1,7 @@
1
- import React, { useEffect, useState } from "react";
1
+ import React, { useCallback, useEffect, useState } from "react";
2
2
  import { Popper, Fade, Paper, ClickAwayListener } from "@mui/material";
3
3
  import { Editor, Range } from "slate";
4
- import { useSlate } from "slate-react";
4
+ import { ReactEditor, useSlate } from "slate-react";
5
5
  import useDrag from "../../hooks/useDrag";
6
6
  import useWindowResize from "../../hooks/useWindowResize";
7
7
  import MiniTextFormat from "./MiniTextFormat";
@@ -33,16 +33,18 @@ const PopupTool = props => {
33
33
  const {
34
34
  selectedElement
35
35
  } = useEditorContext();
36
- const updateAnchorEl = () => {
36
+ const updateAnchorEl = useCallback(() => {
37
37
  try {
38
- const domSelection = window.getSelection();
39
- const domRange = domSelection?.getRangeAt(0);
40
- const {
41
- startOffset,
42
- endOffset
43
- } = domRange || {};
44
- if (startOffset !== endOffset) {
38
+ const isHavingSelection = selection && !Range.isCollapsed(selection);
39
+ if (isHavingSelection) {
40
+ const domRange = ReactEditor.toDOMRange(editor, editor.selection);
41
+ const editorContainer = document.querySelector("#slate-wrapper-scroll-container")?.getBoundingClientRect();
45
42
  const rect = domRange.getBoundingClientRect();
43
+ const isOutside = rect.bottom < editorContainer.top || rect.top > editorContainer.bottom;
44
+ if (isOutside) {
45
+ rect.y = -500; // hide the popper
46
+ }
47
+
46
48
  setAnchorEl({
47
49
  clientWidth: rect.width,
48
50
  clientHeight: rect.height,
@@ -52,7 +54,7 @@ const PopupTool = props => {
52
54
  } catch (err) {
53
55
  console.log(err);
54
56
  }
55
- };
57
+ }, [selection]);
56
58
  useEditorScroll(editorWrapper, updateAnchorEl);
57
59
  useEffect(() => {
58
60
  const userStoppedSelection = size?.device === "xs" ? true : event === "end"; // for mobile, when user starts the selection, we are gonna show the popup tool
@@ -12,7 +12,7 @@ const usePopupStyles = theme => ({
12
12
  background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
13
13
  "& .MuiBox-root": {
14
14
  "& .renderComp": {
15
- padding: "2px 0px",
15
+ padding: "2px 0px 2px 1px",
16
16
  background: "transparent !important"
17
17
  },
18
18
  "& button": {
@@ -62,6 +62,7 @@ const FormSettings = props => {
62
62
  MuiAccordion: {
63
63
  styleOverrides: {
64
64
  root: {
65
+ background: theme?.palette?.editor?.miniToolBarBackground,
65
66
  "& .MuiAccordionSummary-root": {
66
67
  flexDirection: "row-reverse",
67
68
  "& .MuiSvgIcon-root": {
@@ -128,41 +129,15 @@ const FormSettings = props => {
128
129
  }, `accordion_${i}`)
129
130
  }, i);
130
131
  } else {
131
- return /*#__PURE__*/_jsx(ThemeProvider, {
132
- theme: muiTheme,
133
- children: /*#__PURE__*/_jsxs(Accordion, {
134
- defaultExpanded: true,
135
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
136
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
137
- sx: {
138
- padding: "5px"
139
- },
140
- children: /*#__PURE__*/_jsx(Typography, {
141
- variant: "body1",
142
- className: "settingsHeader",
143
- color: "primary",
144
- style: {
145
- fontSize: "14px !important",
146
- fontWeight: "400"
147
- },
148
- children: m?.tab
149
- })
150
- }), /*#__PURE__*/_jsx(AccordionDetails, {
151
- sx: {
152
- padding: "0px"
153
- },
154
- children: /*#__PURE__*/_jsx(StyleContent, {
155
- renderTabs: styleMaps,
156
- value: m.value,
157
- element: element,
158
- customElement: element?.children?.[0] || null,
159
- onChange: onChange,
160
- customProps: customProps,
161
- handleClose: handleClose
162
- }, `tab_${m.value}_$${i}`)
163
- })]
164
- }, `accordion_${i}`)
165
- }, i);
132
+ return /*#__PURE__*/_jsx(StyleContent, {
133
+ renderTabs: styleMaps,
134
+ value: m.value,
135
+ element: element,
136
+ customElement: element?.children?.[0] || null,
137
+ onChange: onChange,
138
+ customProps: customProps,
139
+ handleClose: handleClose
140
+ }, `tab_${m.value}_$${i}`);
166
141
  }
167
142
  })
168
143
  });
@@ -72,6 +72,11 @@ const BackgroundImage = props => {
72
72
  children: "REMOVE"
73
73
  }) : /*#__PURE__*/_jsx(Grid, {
74
74
  className: "uploadImageText",
75
+ sx: {
76
+ padding: 0,
77
+ background: `${theme?.palette?.editor?.inputFieldBgColor}`,
78
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
79
+ },
75
80
  children: /*#__PURE__*/_jsxs(Button, {
76
81
  component: "label",
77
82
  variant: "text",
@@ -1,6 +1,7 @@
1
1
  import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import Icon from "../../Icon";
4
+ import { useEditorContext } from "../../../hooks/useMouseMove";
4
5
  import { jsx as _jsx } from "react/jsx-runtime";
5
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
6
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -15,7 +16,10 @@ const RenderCard = ({
15
16
  return /*#__PURE__*/_jsx(Card, {
16
17
  sx: {
17
18
  position: 'relative',
18
- padding: "10px"
19
+ padding: "10px",
20
+ '& .MuiCheckbox-root svg': {
21
+ fill: 'unset !important'
22
+ }
19
23
  },
20
24
  children: /*#__PURE__*/_jsx(FormControlLabel, {
21
25
  control: /*#__PURE__*/_jsx(Checkbox, {
@@ -81,6 +85,9 @@ const CardsMapping = props => {
81
85
  selectedCard,
82
86
  infoIcon
83
87
  } = data;
88
+ const {
89
+ theme
90
+ } = useEditorContext();
84
91
  const activeCard = value === selectedCard;
85
92
  const handleChange = e => {
86
93
  if (selectedCard === data?.value) {
@@ -99,7 +106,8 @@ const CardsMapping = props => {
99
106
  sx: {
100
107
  marginBottom: "12px",
101
108
  "& .MuiPaper-root": {
102
- border: activeCard ? "1px solid #2563EB" : "1px solid #C8D8FA",
109
+ background: theme?.palette?.editor?.miniToolBarBackground,
110
+ border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
103
111
  borderRadius: "8px",
104
112
  boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
105
113
  }
@@ -174,82 +174,114 @@ export const formStyle = [{
174
174
  }, {
175
175
  tab: "Field Settings",
176
176
  value: "FieldSetting",
177
- hasChildrenTabs: false,
177
+ hasChildrenTabs: true,
178
178
  fields: [{
179
- label: "Font Family",
180
- key: "fieldFontFamily",
181
- type: "textOptions",
182
- hideMetaDataOptions: true,
183
- options: fontOptions,
184
- webFont: true,
185
- renderOption: option => {
186
- return /*#__PURE__*/_jsx("span", {
187
- style: {
188
- fontFamily: option.value
189
- },
190
- children: option.text
191
- });
192
- }
179
+ tab: "Font Family",
180
+ value: "FontFamily",
181
+ fields: [{
182
+ label: "Font Family",
183
+ key: "fieldFontFamily",
184
+ type: "textOptions",
185
+ hideMetaDataOptions: true,
186
+ options: fontOptions,
187
+ webFont: true,
188
+ renderOption: option => {
189
+ return /*#__PURE__*/_jsx("span", {
190
+ style: {
191
+ fontFamily: option.value
192
+ },
193
+ children: option.text
194
+ });
195
+ }
196
+ }]
193
197
  }, {
194
- label: "Font Weight",
195
- key: "fieldFontWeight",
196
- type: "textOptions",
197
- width: 5,
198
- options: fontWeightOptions,
199
- hideMetaDataOptions: true,
200
- renderOption: option => {
201
- return /*#__PURE__*/_jsx("span", {
202
- style: {
203
- fontWeight: option.value
204
- },
205
- children: option.text
206
- });
207
- }
198
+ tab: "Font Weight",
199
+ value: "FontWeight",
200
+ fields: [{
201
+ label: "Font Weight",
202
+ key: "fieldFontWeight",
203
+ type: "textOptions",
204
+ width: 5,
205
+ options: fontWeightOptions,
206
+ hideMetaDataOptions: true,
207
+ renderOption: option => {
208
+ return /*#__PURE__*/_jsx("span", {
209
+ style: {
210
+ fontWeight: option.value
211
+ },
212
+ children: option.text
213
+ });
214
+ }
215
+ }]
208
216
  }, {
209
- label: "Font Size",
210
- key: "fieldTextSize",
211
- type: "fontSize",
212
- width: 5,
213
- placeholder: "16px"
217
+ tab: "Font Size",
218
+ value: "FontSize",
219
+ fields: [{
220
+ label: "Font Size",
221
+ key: "fieldTextSize",
222
+ type: "fontSize",
223
+ width: 5,
224
+ placeholder: "16px"
225
+ }]
214
226
  }, {
215
- label: "Text Color",
216
- key: "fieldTextColor",
217
- type: "color",
218
- needPreview: true
227
+ tab: "Text Color",
228
+ value: "TextColor",
229
+ fields: [{
230
+ label: "Text Color",
231
+ key: "fieldTextColor",
232
+ type: "color",
233
+ needPreview: true
234
+ }]
219
235
  }, {
220
- label: "Background Color",
221
- key: "fieldBgColor",
222
- type: "color"
236
+ tab: "Background Color",
237
+ value: "BackgroundColor",
238
+ fields: [{
239
+ label: "Background Color",
240
+ key: "fieldBgColor",
241
+ type: "color"
242
+ }]
223
243
  }, {
224
- label: "Border Color",
225
- key: "fieldBorderColor",
226
- type: "color"
244
+ tab: "Border Color",
245
+ value: "BorderColor",
246
+ fields: [{
247
+ label: "Border Color",
248
+ key: "fieldBorderColor",
249
+ type: "color"
250
+ }]
227
251
  }, {
228
- label: "Border Width",
229
- key: "fieldBorderWidth",
230
- type: "text",
231
- width: 5,
232
- placeholder: "1px"
252
+ tab: "Border Width",
253
+ value: "BorderWidth",
254
+ fields: [{
255
+ label: "Border Width",
256
+ key: "fieldBorderWidth",
257
+ type: "text",
258
+ width: 5,
259
+ placeholder: "1px"
260
+ }]
233
261
  }, {
234
- label: "Border Style",
235
- key: "fieldBorderStyle",
236
- type: "textOptions",
237
- hideMetaDataOptions: true,
238
- width: 5,
239
- options: [{
240
- text: "Solid",
241
- value: "solid"
242
- }, {
243
- text: "Dotted",
244
- value: "dotted"
245
- }, {
246
- text: "Dashed",
247
- value: "dashed"
248
- }],
249
- renderOption: option => {
250
- return /*#__PURE__*/_jsx("span", {
251
- children: option.text
252
- });
253
- }
262
+ tab: "Border Style",
263
+ value: "BorderStyle",
264
+ fields: [{
265
+ label: "Border Style",
266
+ key: "fieldBorderStyle",
267
+ type: "textOptions",
268
+ hideMetaDataOptions: true,
269
+ width: 5,
270
+ options: [{
271
+ text: "Solid",
272
+ value: "solid"
273
+ }, {
274
+ text: "Dotted",
275
+ value: "dotted"
276
+ }, {
277
+ text: "Dashed",
278
+ value: "dashed"
279
+ }],
280
+ renderOption: option => {
281
+ return /*#__PURE__*/_jsx("span", {
282
+ children: option.text
283
+ });
284
+ }
285
+ }]
254
286
  }]
255
287
  }];
@@ -214,40 +214,14 @@ const StyleBuilder = props => {
214
214
  }, `accordion_${i}`)
215
215
  }, i);
216
216
  } else {
217
- return /*#__PURE__*/_jsx(ThemeProvider, {
218
- theme: muiTheme,
219
- children: /*#__PURE__*/_jsxs(Accordion, {
220
- defaultExpanded: true,
221
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
222
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
223
- sx: {
224
- padding: "0px"
225
- },
226
- children: /*#__PURE__*/_jsx(Typography, {
227
- variant: "body1",
228
- className: "settingsHeader",
229
- color: "primary",
230
- style: {
231
- fontSize: "14px !important",
232
- fontWeight: "400"
233
- },
234
- children: m?.tab
235
- })
236
- }), /*#__PURE__*/_jsx(AccordionDetails, {
237
- sx: {
238
- padding: "5px"
239
- },
240
- children: /*#__PURE__*/_jsx(StyleContent, {
241
- renderTabs: renderTabs,
242
- value: m.value,
243
- element: elementProps,
244
- onChange: onElementPropsChange,
245
- customProps: customProps,
246
- handleClose: handleClose
247
- }, `tab_${m.value}_$${i}`)
248
- })]
249
- }, `accordion_${i}`)
250
- }, i);
217
+ return /*#__PURE__*/_jsx(StyleContent, {
218
+ renderTabs: renderTabs,
219
+ value: m.value,
220
+ element: elementProps,
221
+ onChange: onElementPropsChange,
222
+ customProps: customProps,
223
+ handleClose: handleClose
224
+ }, `tab_${m.value}_$${i}`);
251
225
  }
252
226
  })
253
227
  }), needActions ? /*#__PURE__*/_jsxs(DialogActions, {
@@ -4,6 +4,7 @@ import { convertBase64 } from "../utils/helper";
4
4
  import { uploadFile } from "../service/fileupload";
5
5
  import Icon from "./Icon";
6
6
  import UploadStyles from "../common/ImageSelector/UploadStyles";
7
+ import { useEditorContext } from "../hooks/useMouseMove";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
8
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -18,6 +19,9 @@ const Uploader = props => {
18
19
  const [base64, setBase64] = useState(value?.url);
19
20
  const [fileName, setFileName] = useState("");
20
21
  const [uploading, setUploading] = useState(false);
22
+ const {
23
+ theme
24
+ } = useEditorContext();
21
25
  const handleChange = async e => {
22
26
  const uFile = e.target.files[0];
23
27
  const strImage = await convertBase64(uFile);
@@ -98,6 +102,10 @@ const Uploader = props => {
98
102
  className: "uploadImageSection",
99
103
  children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
100
104
  className: "uploadImageText",
105
+ sx: {
106
+ background: `${theme?.palette?.editor?.inputFieldBgColor}`,
107
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
108
+ },
101
109
  children: /*#__PURE__*/_jsxs(Button, {
102
110
  component: "label",
103
111
  variant: "text",
@@ -628,6 +628,7 @@ export const BoldTextFormatIcon = props => /*#__PURE__*/_jsx("svg", {
628
628
  viewBox: "0 0 12 16",
629
629
  fill: "none",
630
630
  xmlns: "http://www.w3.org/2000/svg",
631
+ className: "fill-path",
631
632
  children: /*#__PURE__*/_jsx("path", {
632
633
  d: "M0.598011 15.3564V0.81099H5.92472C6.95691 0.81099 7.81155 0.981445 8.48864 1.32235C9.16572 1.65853 9.67235 2.11544 10.0085 2.69309C10.3447 3.26601 10.5128 3.91232 10.5128 4.63201C10.5128 5.23807 10.4015 5.74944 10.179 6.1661C9.95644 6.57804 9.65814 6.90948 9.28409 7.16042C8.91477 7.40663 8.50758 7.58656 8.0625 7.7002V7.84224C8.54545 7.86591 9.01657 8.02216 9.47585 8.31099C9.93987 8.59508 10.3234 8.99991 10.6264 9.52548C10.9295 10.051 11.081 10.6903 11.081 11.4431C11.081 12.1865 10.9058 12.8541 10.5554 13.4459C10.2098 14.0331 9.67472 14.4994 8.95028 14.8451C8.22585 15.186 7.30019 15.3564 6.1733 15.3564H0.598011ZM2.79261 13.4743H5.96023C7.01136 13.4743 7.7642 13.2707 8.21875 12.8635C8.6733 12.4564 8.90057 11.9474 8.90057 11.3366C8.90057 10.8773 8.78456 10.4559 8.55256 10.0724C8.32055 9.68883 7.98911 9.38343 7.55824 9.15616C7.1321 8.92889 6.62547 8.81525 6.03835 8.81525H2.79261V13.4743ZM2.79261 7.1036H5.73295C6.22538 7.1036 6.66809 7.00891 7.06108 6.81951C7.45881 6.63012 7.77367 6.36497 8.00568 6.02406C8.24242 5.67841 8.3608 5.27122 8.3608 4.80247C8.3608 4.20114 8.15009 3.69688 7.72869 3.28968C7.30729 2.88249 6.66099 2.67889 5.78977 2.67889H2.79261V7.1036Z",
633
634
  fill: "#64748B"
@@ -1200,6 +1201,7 @@ export function DragIcon() {
1200
1201
  viewBox: "0 0 10 6",
1201
1202
  fill: "none",
1202
1203
  xmlns: "http://www.w3.org/2000/svg",
1204
+ className: "dragIcon",
1203
1205
  children: [/*#__PURE__*/_jsx("ellipse", {
1204
1206
  cx: "1.49462",
1205
1207
  cy: "4.42384",
@@ -135,6 +135,7 @@ export const StrikethroughIcon = props => /*#__PURE__*/_jsx("svg", {
135
135
  height: "15",
136
136
  viewBox: "0 0 15 15",
137
137
  fill: "none",
138
+ className: "fill-path",
138
139
  children: /*#__PURE__*/_jsx("path", {
139
140
  className: "strokeFillPath",
140
141
  d: "M2.7607 11.125C2.7607 13.0718 4.33885 14.65 6.28568 14.65H8.21432C10.1611 14.65 11.7393 13.0718 11.7393 11.125V10.6429C11.7393 9.78254 11.4309 8.99403 10.9189 8.38214H13.5179C13.867 8.38214 14.15 8.0991 14.15 7.75C14.15 7.4009 13.867 7.11786 13.5179 7.11786H8.21597H8.21435H6.28579C5.03727 7.11786 4.02509 6.10568 4.02509 4.85714V4.375C4.02509 3.12647 5.03727 2.11429 6.28579 2.11429H8.21435C9.46288 2.11429 10.4751 3.12647 10.4751 4.375V4.84874C10.4751 5.19784 10.7581 5.48088 11.1072 5.48088C11.4563 5.48088 11.7393 5.19784 11.7393 4.84874V4.375C11.7393 2.42817 10.1612 0.85 8.21435 0.85H6.28579C4.33897 0.85 2.76081 2.42817 2.76081 4.375V4.85714C2.76081 5.71746 3.06916 6.50597 3.58108 7.11786H0.982141C0.633044 7.11786 0.35 7.4009 0.35 7.75C0.35 8.0991 0.633044 8.38214 0.982141 8.38214H8.21424L8.21556 8.38214C8.21559 8.38214 8.21562 8.38214 8.21564 8.38214C9.46353 8.38289 10.4749 9.39474 10.4749 10.6429V11.125C10.4749 12.3735 9.46276 13.3857 8.21424 13.3857H6.28568C5.03715 13.3857 4.02498 12.3735 4.02498 11.125V10.6429C4.02498 10.2938 3.74193 10.0107 3.39284 10.0107C3.04374 10.0107 2.7607 10.2938 2.7607 10.6429V11.125Z",
@@ -76,13 +76,11 @@ const ELEMENT_TAGS = {
76
76
  }),
77
77
  TABLE: (el, children = []) => {
78
78
  try {
79
- const tableBody = (children || [])?.find(f => f?.type === "table-body");
80
- const bodyChild = tableBody?.children || [];
81
- const firstRowChildren = tableBody[0]?.children || [];
79
+ const bodyChild = children || [];
80
+ const firstRowChildren = bodyChild[0]?.children || [];
82
81
  return {
83
82
  type: "table",
84
- overwriteChild: bodyChild,
85
- // we are not having table-body in our json format, just we are wrapping table-row's inside the table
83
+ children: bodyChild,
86
84
  rows: bodyChild?.length,
87
85
  columns: firstRowChildren?.length
88
86
  };
@@ -90,12 +88,8 @@ const ELEMENT_TAGS = {
90
88
  console.log(err);
91
89
  }
92
90
  },
93
- THEAD: () => ({
94
- type: "table-head"
95
- }),
96
- TBODY: () => ({
97
- type: "table-body"
98
- }),
91
+ // THEAD: () => ({ type: "table-head" }),
92
+ // TBODY: () => ({ type: "table-body" }),
99
93
  TH: handleTableCell,
100
94
  TR: () => ({
101
95
  type: "table-row"
@@ -19,6 +19,6 @@ function useEditorScroll(editorWrapper = {
19
19
  currentEditorWrapper.removeEventListener("scroll", handleScroll);
20
20
  }
21
21
  };
22
- }, [editorWrapper.current]);
22
+ }, [editorWrapper.current, callback]);
23
23
  }
24
24
  export default useEditorScroll;