@flozy/editor 9.9.6 → 9.9.8

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 (124) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +16 -116
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +8 -16
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Button/EditorButton.js +9 -25
  8. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  11. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  12. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  13. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -21
  14. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +1 -5
  15. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  16. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  17. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  18. package/dist/Editor/Elements/Embed/Video.js +1 -1
  19. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  20. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +14 -0
  21. package/dist/Editor/Elements/FreeGrid/Options/More.js +7 -7
  22. package/dist/Editor/Elements/FreeGrid/styles.js +0 -6
  23. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  24. package/dist/Editor/Elements/List/CheckList.js +1 -4
  25. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  26. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  27. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  28. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  29. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  30. package/dist/Editor/Elements/Table/Table.js +3 -3
  31. package/dist/Editor/Elements/Title/title.js +6 -6
  32. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  33. package/dist/Editor/MiniEditor.js +1 -2
  34. package/dist/Editor/Styles/EditorStyles.js +5 -5
  35. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  36. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  37. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  38. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  39. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  40. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  41. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  42. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  43. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  44. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  45. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  46. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  47. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  48. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  49. package/dist/Editor/common/ColorPickerButton.js +16 -38
  50. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  51. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  52. package/dist/Editor/common/Icon.js +1 -31
  53. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  54. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  55. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  56. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  57. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  58. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  59. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  60. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  61. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  62. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  63. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  64. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  65. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  66. package/dist/Editor/common/RnD/Utils/gridDropItem.js +2 -1
  67. package/dist/Editor/common/Shorthands/elements.js +0 -54
  68. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  69. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  70. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  71. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  72. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  73. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  74. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  75. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  76. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  77. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  78. package/dist/Editor/common/Uploader.js +0 -8
  79. package/dist/Editor/common/iconslist.js +0 -21
  80. package/dist/Editor/commonStyle.js +61 -96
  81. package/dist/Editor/helper/theme.js +2 -203
  82. package/dist/Editor/hooks/useMouseMove.js +5 -8
  83. package/dist/Editor/plugins/withEmbeds.js +1 -1
  84. package/dist/Editor/plugins/withHTML.js +1 -3
  85. package/dist/Editor/plugins/withTable.js +1 -1
  86. package/dist/Editor/theme/ThemeList.js +173 -50
  87. package/dist/Editor/utils/SlateUtilityFunctions.js +43 -166
  88. package/dist/Editor/utils/button.js +17 -1
  89. package/dist/Editor/utils/draftToSlate.js +2 -3
  90. package/dist/Editor/utils/font.js +37 -40
  91. package/dist/Editor/utils/helper.js +19 -90
  92. package/package.json +4 -4
  93. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  94. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  95. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  96. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  97. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  98. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  99. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  100. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  101. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  102. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  103. package/dist/Editor/common/CustomSelect.js +0 -43
  104. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  105. package/dist/Editor/common/SnackBar/index.js +0 -43
  106. package/dist/Editor/helper/textIndeces.js +0 -58
  107. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  108. package/dist/Editor/hooks/useThemeValues.js +0 -63
  109. package/dist/Editor/theme/index.js +0 -149
  110. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  111. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  112. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  113. package/dist/Editor/themeSettings/colorTheme/index.js +0 -309
  114. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  115. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  116. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  117. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  118. package/dist/Editor/themeSettings/icons.js +0 -60
  119. package/dist/Editor/themeSettings/index.js +0 -361
  120. package/dist/Editor/themeSettings/style.js +0 -292
  121. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  122. package/dist/Editor/themeSettingsAI/index.js +0 -355
  123. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  124. package/dist/Editor/themeSettingsAI/style.js +0 -324
@@ -10,15 +10,12 @@ import { AllColors } from "../../Elements/Color Picker/ColorButtons";
10
10
  import { fontFamilyMap } from "../../utils/font";
11
11
  import { getBorderColor } from "../../utils/helper";
12
12
  import SelectTypography from "./MiniTextFormat/SelectTypography";
13
- import { isTextCustomized, saveToTheme } from "../../helper/theme";
14
- import { useEditorTheme } from "../../hooks/useEditorTheme";
15
13
  import SelectSuperSubscript from "./MiniTextFormat/SelectSuperSubscript";
16
14
  import { ColorResetIcon, TextDefaultStyleIcon } from "../../common/iconListV2";
17
15
  import FontFamilyAutocomplete from "../FormatTools/FontFamilyAutocomplete";
18
16
  import { useEditorContext } from "../../hooks/useMouseMove";
19
- import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
20
- import { getPageSettings } from "../../utils/pageSettings";
21
- import { getDevice } from "../../helper/theme";
17
+ // import LineSpacing from "../../common/StyleBuilder/fieldTypes/lineSpacing";
18
+ // import { getPageSettings } from "../../utils/pageSettings";
22
19
  import { jsx as _jsx } from "react/jsx-runtime";
23
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
24
21
  const allTools = toolbarGroups.flat();
@@ -39,15 +36,15 @@ const TextFormat = props => {
39
36
  const {
40
37
  translation
41
38
  } = customProps;
42
- const {
43
- element: pageSt
44
- } = getPageSettings(editor) || {};
45
- const pageSettingLine = pageSt?.pageProps?.lineHeight;
39
+
40
+ // const { element: pageSt } = getPageSettings(editor) || {};
41
+ // const pageSettingLine = pageSt?.pageProps?.lineHeight;
46
42
  const {
47
43
  fontFamilies,
48
- theme: appTheme
44
+ theme
49
45
  } = useEditorContext();
50
- const breakpoint = getDevice(window.innerWidth);
46
+ // const { activeBreakPoint } = useEditorContext();
47
+ // const breakpoint = activeBreakPoint === "" ? "lg" : activeBreakPoint;
51
48
  const fontWeight = allTools.find(f => f.format === "fontWeight");
52
49
  const fontStyle = allTools.filter(f => f.type === "mark" && f.format !== "strikethrough" && f.format !== "superscript" && f.format !== "subscript");
53
50
  const fontAlign = allTools.filter(f => f.format?.indexOf("align") >= 0);
@@ -64,13 +61,12 @@ const TextFormat = props => {
64
61
  color: "",
65
62
  bgColor: ""
66
63
  };
67
- const {
68
- theme,
69
- updateTheme
70
- } = useEditorTheme();
71
- const customized = isTextCustomized(editor);
72
- let lineSpacingValue = activeMark(editor, "lineHeight");
73
- lineSpacingValue = lineSpacingValue?.[breakpoint] !== undefined ? lineSpacingValue : pageSettingLine;
64
+
65
+ // let lineSpacingValue = activeMark(editor, "lineHeight");
66
+ // lineSpacingValue =
67
+ // lineSpacingValue?.[breakpoint] !== undefined
68
+ // ? lineSpacingValue
69
+ // : pageSettingLine;
74
70
  const handleColorPicker = type => e => {
75
71
  setType(type);
76
72
  setAnchorEl(e.currentTarget);
@@ -111,63 +107,16 @@ const TextFormat = props => {
111
107
  value
112
108
  });
113
109
  };
114
- const handleLineSpacing = data => {
115
- const [[format, value]] = Object.entries(data);
116
- addMarkData(editor, {
117
- format,
118
- value
119
- });
120
- };
110
+
111
+ // const handleLineSpacing = (data) => {
112
+ // const [[format, value]] = Object.entries(data);
113
+ // addMarkData(editor, { format, value });
114
+ // };
121
115
  return /*#__PURE__*/_jsxs(Grid, {
122
116
  container: true,
123
117
  sx: classes.textFormatWrapper,
124
118
  className: "text-formatter-popup",
125
119
  children: [/*#__PURE__*/_jsxs(Grid, {
126
- item: true,
127
- xs: 12,
128
- children: [/*#__PURE__*/_jsxs(Grid, {
129
- container: true,
130
- justifyContent: "space-between",
131
- alignItems: "center",
132
- children: [/*#__PURE__*/_jsx(Grid, {
133
- item: true,
134
- children: /*#__PURE__*/_jsx(Typography, {
135
- variant: "body1",
136
- color: "primary",
137
- sx: classes.typoLabel,
138
- children: "Style"
139
- })
140
- }), /*#__PURE__*/_jsx(Grid, {
141
- item: true,
142
- children: theme?.id ? /*#__PURE__*/_jsx(Button, {
143
- sx: classes.defaultBtn,
144
- onClick: () => {
145
- const {
146
- field,
147
- theme
148
- } = saveToTheme(editor) || {};
149
- updateTheme(theme, {
150
- action: "ELEMENT_PROPS_CHANGE",
151
- fieldName: field
152
- });
153
- },
154
- disabled: !customized,
155
- children: "Save to theme"
156
- }) : null
157
- })]
158
- }), /*#__PURE__*/_jsx(Grid, {
159
- item: true,
160
- xs: 12,
161
- sx: classes.textFormatField,
162
- children: /*#__PURE__*/_jsx(SelectTypography, {
163
- editor: editor,
164
- classes: classes,
165
- closeMainPopup: closeMainPopup,
166
- type: "fullWidth",
167
- customProps: customProps
168
- })
169
- })]
170
- }), /*#__PURE__*/_jsxs(Grid, {
171
120
  item: true,
172
121
  xs: 12,
173
122
  children: [/*#__PURE__*/_jsxs(Grid, {
@@ -294,8 +243,7 @@ const TextFormat = props => {
294
243
  rounded: true,
295
244
  title: translation("textColor"),
296
245
  id: "11_cc",
297
- classes: classes,
298
- type: "textColor"
246
+ classes: classes
299
247
  }, "11_cc")
300
248
  })]
301
249
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -321,7 +269,7 @@ const TextFormat = props => {
321
269
  children: /*#__PURE__*/_jsx(Button, {
322
270
  sx: classes.defaultBtn2,
323
271
  startIcon: /*#__PURE__*/_jsx(ColorResetIcon, {
324
- stroke: appTheme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
272
+ stroke: theme?.palette?.type === "dark" ? "#505359" : "#A2B0B9"
325
273
  }),
326
274
  onClick: handleDefault({
327
275
  format: "bgColor"
@@ -411,7 +359,12 @@ const TextFormat = props => {
411
359
  xs: 12,
412
360
  className: "typo-icons",
413
361
  sx: classes.evenSpace,
414
- children: [fontStyle?.map((m, i) => {
362
+ children: [/*#__PURE__*/_jsx(SelectTypography, {
363
+ classes: classes,
364
+ editor: editor,
365
+ closeMainPopup: closeMainPopup || onClose,
366
+ customProps: customProps
367
+ }), fontStyle?.map((m, i) => {
415
368
  return /*#__PURE__*/_jsx(MarkButton, {
416
369
  editor: editor,
417
370
  ...m,
@@ -433,32 +386,6 @@ const TextFormat = props => {
433
386
  xs: 12,
434
387
  sx: classes.dividerGrid,
435
388
  children: /*#__PURE__*/_jsx(Divider, {})
436
- }), /*#__PURE__*/_jsxs(Grid, {
437
- item: true,
438
- xs: 12,
439
- children: [/*#__PURE__*/_jsx(Typography, {
440
- variant: "body1",
441
- color: "primary",
442
- sx: classes.typoLabel,
443
- children: "Line Spacing"
444
- }), /*#__PURE__*/_jsx(Grid, {
445
- item: true,
446
- xs: 12,
447
- className: "typo-icons",
448
- sx: classes.evenSpace,
449
- children: /*#__PURE__*/_jsx(LineSpacing, {
450
- value: lineSpacingValue,
451
- onChange: handleLineSpacing,
452
- data: {
453
- key: "lineHeight"
454
- }
455
- })
456
- })]
457
- }), /*#__PURE__*/_jsx(Grid, {
458
- item: true,
459
- xs: 12,
460
- sx: classes.dividerGrid,
461
- children: /*#__PURE__*/_jsx(Divider, {})
462
389
  }), /*#__PURE__*/_jsx(Grid, {
463
390
  item: true,
464
391
  xs: 12,
@@ -95,9 +95,9 @@ const PopupTool = props => {
95
95
  const isFreeGridEnabled = enable === 1 && isFreeGridElement;
96
96
  if (!selection || Range.isCollapsed(selection) || Editor.string(editor, selection) === "" || isFreeGridEnabled) {
97
97
  setAnchorEl(null);
98
- hideSlateSelection(); // removes slate selection background, when there is no selection
99
98
  } else {
100
99
  updateAnchorEl();
100
+ hideSlateSelection(); // removes slate selection background, when there is no selection
101
101
  }
102
102
  }, [selection, event, selectedElement?.enable]);
103
103
  const handleClose = () => {
@@ -28,20 +28,16 @@ export const toolbarGroups = [[{
28
28
  type: "dropdown",
29
29
  options: [{
30
30
  text: "Normal",
31
- value: "normal",
32
- numVal: "400"
31
+ value: "normal"
33
32
  }, {
34
33
  text: "Bold",
35
- value: "bold",
36
- numVal: "700"
34
+ value: "bold"
37
35
  }, {
38
36
  text: "Bolder",
39
- value: "bolder",
40
- numVal: "700"
37
+ value: "bolder"
41
38
  }, {
42
39
  text: "Lighter",
43
- value: "lighter",
44
- numVal: "100"
40
+ value: "lighter"
45
41
  }],
46
42
  icon: FormatBoldIcon,
47
43
  width: "100px"
@@ -50,8 +46,7 @@ export const toolbarGroups = [[{
50
46
  format: "bold",
51
47
  type: "mark",
52
48
  title: "Bold",
53
- basic: true,
54
- themeEnabled: true
49
+ basic: true
55
50
  }, {
56
51
  id: 5,
57
52
  format: "underline",
@@ -62,8 +57,7 @@ export const toolbarGroups = [[{
62
57
  format: "italic",
63
58
  type: "mark",
64
59
  title: "Italic",
65
- basic: true,
66
- themeEnabled: true
60
+ basic: true
67
61
  }, {
68
62
  id: 6,
69
63
  format: "strikethrough",
@@ -107,42 +101,6 @@ export const toolbarGroups = [[{
107
101
  type: "block",
108
102
  title: "H3",
109
103
  group: "typography"
110
- }, {
111
- id: 39,
112
- format: "headingFour",
113
- type: "block",
114
- title: "H4",
115
- group: "typography"
116
- }, {
117
- id: 40,
118
- format: "headingFive",
119
- type: "block",
120
- title: "H5",
121
- group: "typography"
122
- }, {
123
- id: 41,
124
- format: "headingSix",
125
- type: "block",
126
- title: "H6",
127
- group: "typography"
128
- }, {
129
- id: 42,
130
- format: "paragraphOne",
131
- type: "block",
132
- title: "Paragraph 1",
133
- group: "typography"
134
- }, {
135
- id: 43,
136
- format: "paragraphTwo",
137
- type: "block",
138
- title: "Paragraph 2",
139
- group: "typography"
140
- }, {
141
- id: 44,
142
- format: "paragraphThree",
143
- type: "block",
144
- title: "Paragraph 3",
145
- group: "typography"
146
104
  }, {
147
105
  id: 14,
148
106
  format: "doublequote",
@@ -1,8 +1,8 @@
1
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
5
  import SwipeableDrawerComponent from "./SwipeableDrawer";
5
- import CustomColorPicker from "./CustomColorPicker";
6
6
  import { jsx as _jsx } from "react/jsx-runtime";
7
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -12,10 +12,7 @@ const ColorPickerToolComponent = ({
12
12
  onSave = () => {},
13
13
  recentColors = [],
14
14
  hideGradient,
15
- handleClose,
16
- closeDrawer,
17
- hideThemeColors,
18
- disableEditTheme
15
+ handleClose
19
16
  }) => {
20
17
  const [color, setColor] = useState(value);
21
18
  const handleSave = () => {
@@ -35,29 +32,26 @@ const ColorPickerToolComponent = ({
35
32
  return /*#__PURE__*/_jsxs(Grid, {
36
33
  item: true,
37
34
  xs: 12,
38
- style: {
39
- position: "relative"
40
- },
41
35
  children: [/*#__PURE__*/_jsx("div", {
42
- children: /*#__PURE__*/_jsx(CustomColorPicker, {
36
+ children: /*#__PURE__*/_jsx(ColorPickerTool, {
43
37
  gradient: hideGradient ? false : true,
44
- color: color,
38
+ value: color,
45
39
  onChange: handleColorChange,
46
- recentColors: recentColors,
47
- defaultColors: initialColors,
48
- closeDrawer: closeDrawer,
49
- hideThemeColors: hideThemeColors,
50
- disableEditTheme: disableEditTheme
40
+ defaultColors: initialColors
51
41
  })
52
42
  }), /*#__PURE__*/_jsxs("div", {
53
- className: "colorPickerActionBtns",
43
+ style: {
44
+ display: "flex",
45
+ justifyContent: "end",
46
+ margin: "8px"
47
+ },
54
48
  children: [/*#__PURE__*/_jsx(Button, {
55
49
  onClick: handleClose,
56
- className: "cancelBtn",
50
+ className: "secondaryBtn",
57
51
  children: "Cancel"
58
52
  }), /*#__PURE__*/_jsx(Button, {
59
53
  onClick: handleSave,
60
- className: "confirmBtn",
54
+ className: "primaryBtn",
61
55
  children: "Save"
62
56
  })]
63
57
  })]
@@ -70,11 +64,7 @@ const ColorPickerButton = props => {
70
64
  defaultColors = [],
71
65
  classes = {},
72
66
  recentColors = [],
73
- hideGradient,
74
- children,
75
- handleClose: closeDrawer,
76
- hideThemeColors,
77
- disableEditTheme
67
+ hideGradient
78
68
  } = props;
79
69
  const [anchorEl, setAnchorEl] = useState(null);
80
70
  const open = Boolean(anchorEl);
@@ -86,13 +76,7 @@ const ColorPickerButton = props => {
86
76
  setAnchorEl(null);
87
77
  };
88
78
  return /*#__PURE__*/_jsxs(_Fragment, {
89
- children: [children ? /*#__PURE__*/_jsx("div", {
90
- onClick: handleColorPicker,
91
- style: {
92
- cursor: "pointer"
93
- },
94
- children: children
95
- }) : /*#__PURE__*/_jsx(Button, {
79
+ children: [/*#__PURE__*/_jsx(Button, {
96
80
  style: {
97
81
  background: value,
98
82
  height: "22px",
@@ -119,10 +103,7 @@ const ColorPickerButton = props => {
119
103
  onSave: onSave,
120
104
  recentColors: recentColors,
121
105
  hideGradient: hideGradient,
122
- handleClose: handleClose,
123
- closeDrawer: closeDrawer,
124
- hideThemeColors: hideThemeColors,
125
- disableEditTheme: disableEditTheme
106
+ handleClose: handleClose
126
107
  })
127
108
  })
128
109
  }) : /*#__PURE__*/_jsx(Popover, {
@@ -148,10 +129,7 @@ const ColorPickerButton = props => {
148
129
  onSave: onSave,
149
130
  recentColors: recentColors,
150
131
  hideGradient: hideGradient,
151
- handleClose: handleClose,
152
- closeDrawer: closeDrawer,
153
- hideThemeColors: hideThemeColors,
154
- disableEditTheme: disableEditTheme
132
+ handleClose: handleClose
155
133
  })
156
134
  })
157
135
  })]
@@ -7,7 +7,7 @@ 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"];
10
+ const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
11
11
  const DragHandleStyle = fromPopper => {
12
12
  const handleDragStyle = fromPopper ? {
13
13
  position: "absolute",
@@ -18,8 +18,6 @@ const FontLoader = props => {
18
18
  const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
19
19
  let currentIndex = 0;
20
20
  let retryCount = 0;
21
- // let hideLoaderOn = 30;
22
-
23
21
  const loadNextBatch = () => {
24
22
  try {
25
23
  if (currentIndex >= families?.length) {
@@ -80,7 +78,6 @@ const FontLoader = props => {
80
78
  // console.log(err);
81
79
  setLoading(false);
82
80
  });
83
- // setLoading(true);
84
81
  } else {
85
82
  function correctFontArray(fontString) {
86
83
  let fontsArray = fontString?.split(",");
@@ -45,19 +45,8 @@ import TrashIcon from "../assets/svg/TrashCanIcon";
45
45
  import DataTableIcon from "../assets/svg/DataTableIcon";
46
46
  import ChervDown from "../assets/svg/ChervDown";
47
47
  import ChervUp from "../assets/svg/ChervUp";
48
- import ResetIconNew from "../assets/svg/ResetIconNew";
49
48
  import { jsx as _jsx } from "react/jsx-runtime";
50
49
  import { jsxs as _jsxs } from "react/jsx-runtime";
51
- const HeadingIcon = ({
52
- variant
53
- }) => {
54
- return /*#__PURE__*/_jsx("div", {
55
- style: {
56
- color: "#64748B"
57
- },
58
- children: variant
59
- });
60
- };
61
50
  const iconList = {
62
51
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
63
52
  size: 20
@@ -90,24 +79,6 @@ const iconList = {
90
79
  size: 18,
91
80
  fill: "#64748B"
92
81
  }),
93
- headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
94
- variant: "H4"
95
- }),
96
- headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
97
- variant: "H5"
98
- }),
99
- headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
100
- variant: "H6"
101
- }),
102
- paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
103
- variant: "P1"
104
- }),
105
- paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
106
- variant: "P2"
107
- }),
108
- paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
109
- variant: "P3"
110
- }),
111
82
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
112
83
  size: 20,
113
84
  fill: "#64748B",
@@ -358,8 +329,7 @@ const iconList = {
358
329
  stroke: "#64748B",
359
330
  color: "#64748B"
360
331
  }
361
- }),
362
- resetIconNew: /*#__PURE__*/_jsx(ResetIconNew, {})
332
+ })
363
333
  };
364
334
  export const icons = {
365
335
  ...iconList
@@ -76,7 +76,7 @@ const ImageSelectorStyles = theme => ({
76
76
  background: theme?.palette?.editor?.deviderBgColor,
77
77
  "@media only screen and (min-width: 899px)": {
78
78
  margin: "0px 24px",
79
- width: "calc(100% - 48px)"
79
+ width: 'calc(100% - 48px)'
80
80
  }
81
81
  },
82
82
  "& .primaryBtn": {
@@ -104,6 +104,12 @@ const ImageSelectorStyles = theme => ({
104
104
  marginRight: "8px !important"
105
105
  },
106
106
  "& .MuiGrid-root": {
107
+ "&::-webkit-scrollbar-thumb": {
108
+ background: `none !important`
109
+ },
110
+ "&::-webkit-scrollbar-track": {
111
+ visibility: "hidden"
112
+ },
107
113
  "&::-webkit-scrollbar-thumb": {
108
114
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
109
115
  },
@@ -112,10 +118,10 @@ const ImageSelectorStyles = theme => ({
112
118
  }
113
119
  },
114
120
  "& .MuiImageList-root": {
115
- margin: "0px"
121
+ margin: '0px'
116
122
  },
117
123
  "& .MuiDialogContent-root": {
118
- padding: "20px 24px 5px 24px"
124
+ padding: '20px 24px 5px 24px'
119
125
  }
120
126
  },
121
127
  titleTypo: {
@@ -68,8 +68,7 @@ const Settings = props => {
68
68
  editor: editor,
69
69
  path: path,
70
70
  customProps: customProps,
71
- theme: theme,
72
- onClose: onClose
71
+ theme: theme
73
72
  }) : null
74
73
  })]
75
74
  })
@@ -8,8 +8,7 @@ const AppHeaderSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const AppHeaderSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const BoxSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path];
@@ -28,7 +27,7 @@ const BoxSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const ButtonSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -29,7 +28,7 @@ const ButtonSettings = props => {
29
28
  });
30
29
  };
31
30
  const handleClose = () => {
32
- onClose();
31
+ console.log("close");
33
32
  };
34
33
  return /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
@@ -8,8 +8,7 @@ const CodeSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const CodeSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -12,8 +12,7 @@ const FormSettings = props => {
12
12
  const {
13
13
  editor,
14
14
  path,
15
- customProps,
16
- onClose
15
+ customProps
17
16
  } = props;
18
17
  const item_path = path?.split("|").map(m => parseInt(m));
19
18
  const element_path = [...item_path];
@@ -57,14 +56,13 @@ const FormSettings = props => {
57
56
  }
58
57
  };
59
58
  const handleClose = () => {
60
- onClose();
59
+ console.log("close");
61
60
  };
62
61
  const muiTheme = createTheme({
63
62
  components: {
64
63
  MuiAccordion: {
65
64
  styleOverrides: {
66
65
  root: {
67
- background: theme?.palette?.editor?.miniToolBarBackground,
68
66
  "& .MuiAccordionSummary-root": {
69
67
  flexDirection: "row-reverse",
70
68
  "& .MuiSvgIcon-root": {
@@ -8,8 +8,7 @@ const ImageSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const ImageSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -9,8 +9,7 @@ const TableSettings = props => {
9
9
  const {
10
10
  editor,
11
11
  path,
12
- customProps,
13
- onClose
12
+ customProps
14
13
  } = props;
15
14
  const item_path = path?.split("|").map(m => parseInt(m));
16
15
  const element_path = [...item_path, 0];
@@ -58,7 +57,7 @@ const TableSettings = props => {
58
57
  }
59
58
  };
60
59
  const handleClose = () => {
61
- onClose();
60
+ console.log("close");
62
61
  };
63
62
  return /*#__PURE__*/_jsx(Box, {
64
63
  component: "div",