@flozy/editor 10.2.0 → 10.2.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 (172) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +16 -120
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +8 -46
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/Accordion/Accordion.js +2 -6
  7. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  8. package/dist/Editor/Elements/Button/EditorButton.js +9 -25
  9. package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  11. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  13. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  14. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -21
  16. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +1 -5
  17. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  18. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  19. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  20. package/dist/Editor/Elements/Embed/Image.js +2 -3
  21. package/dist/Editor/Elements/Embed/Video.js +1 -1
  22. package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
  23. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  24. package/dist/Editor/Elements/Form/Form.js +168 -181
  25. package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
  26. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
  27. package/dist/Editor/Elements/Form/FormField.js +6 -13
  28. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  29. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +31 -36
  30. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  31. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  32. package/dist/Editor/Elements/FreeGrid/styles.js +7 -67
  33. package/dist/Editor/Elements/Grid/Grid.js +2 -14
  34. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  35. package/dist/Editor/Elements/List/CheckList.js +2 -3
  36. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  37. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  38. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  39. package/dist/Editor/Elements/Signature/Signature.css +1 -2
  40. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
  41. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
  42. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  43. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  44. package/dist/Editor/Elements/Table/DragButton.js +1 -0
  45. package/dist/Editor/Elements/Table/Draggable.js +2 -6
  46. package/dist/Editor/Elements/Table/Styles.js +0 -7
  47. package/dist/Editor/Elements/Table/Table.js +3 -3
  48. package/dist/Editor/Elements/Table/TableCell.js +5 -24
  49. package/dist/Editor/Elements/Title/title.js +6 -6
  50. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  51. package/dist/Editor/MiniEditor.js +1 -2
  52. package/dist/Editor/Styles/EditorStyles.js +5 -5
  53. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  54. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  55. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  56. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  57. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  58. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  59. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  60. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  61. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  62. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  63. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  64. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  65. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  66. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  67. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  68. package/dist/Editor/common/ColorPickerButton.js +16 -38
  69. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  70. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  71. package/dist/Editor/common/Icon.js +1 -31
  72. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  73. package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
  74. package/dist/Editor/common/LinkSettings/index.js +68 -84
  75. package/dist/Editor/common/LinkSettings/style.js +30 -245
  76. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
  77. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  78. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  79. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  80. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
  81. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
  82. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  83. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  84. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  85. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  86. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  87. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  88. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  89. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  90. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  91. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
  92. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  93. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
  94. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  95. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  96. package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
  97. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  98. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +54 -48
  99. package/dist/Editor/common/RnD/VirtualElement/helper.js +131 -143
  100. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
  101. package/dist/Editor/common/RnD/index.js +11 -6
  102. package/dist/Editor/common/Select/index.js +0 -2
  103. package/dist/Editor/common/Shorthands/elements.js +11 -65
  104. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  105. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  106. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  107. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  108. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  109. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  110. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  111. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  112. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  113. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  114. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  115. package/dist/Editor/common/Uploader.js +0 -8
  116. package/dist/Editor/common/iconListV2.js +6 -156
  117. package/dist/Editor/common/iconslist.js +0 -24
  118. package/dist/Editor/commonStyle.js +62 -168
  119. package/dist/Editor/helper/index.js +0 -4
  120. package/dist/Editor/helper/theme.js +2 -203
  121. package/dist/Editor/hooks/useMouseMove.js +5 -8
  122. package/dist/Editor/hooks/useTable.js +4 -5
  123. package/dist/Editor/plugins/withEmbeds.js +1 -1
  124. package/dist/Editor/plugins/withHTML.js +1 -3
  125. package/dist/Editor/plugins/withTable.js +1 -1
  126. package/dist/Editor/theme/ThemeList.js +173 -50
  127. package/dist/Editor/utils/SlateUtilityFunctions.js +45 -169
  128. package/dist/Editor/utils/accordion.js +4 -14
  129. package/dist/Editor/utils/button.js +17 -1
  130. package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
  131. package/dist/Editor/utils/draftToSlate.js +2 -3
  132. package/dist/Editor/utils/events.js +6 -50
  133. package/dist/Editor/utils/font.js +37 -40
  134. package/dist/Editor/utils/form.js +4 -4
  135. package/dist/Editor/utils/formfield.js +2 -8
  136. package/dist/Editor/utils/helper.js +19 -109
  137. package/dist/Editor/utils/signature.js +9 -2
  138. package/package.json +4 -4
  139. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  140. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  141. package/dist/Editor/Elements/FreeGrid/helper.js +0 -113
  142. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  143. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  144. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  145. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  146. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  147. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  148. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  149. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  150. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  151. package/dist/Editor/common/CustomSelect.js +0 -43
  152. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  153. package/dist/Editor/common/SnackBar/index.js +0 -43
  154. package/dist/Editor/helper/textIndeces.js +0 -58
  155. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  156. package/dist/Editor/hooks/useThemeValues.js +0 -63
  157. package/dist/Editor/theme/index.js +0 -149
  158. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  159. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  160. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  161. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  162. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  163. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  164. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  165. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  166. package/dist/Editor/themeSettings/icons.js +0 -60
  167. package/dist/Editor/themeSettings/index.js +0 -361
  168. package/dist/Editor/themeSettings/style.js +0 -299
  169. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  170. package/dist/Editor/themeSettingsAI/index.js +0 -355
  171. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  172. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -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",
@@ -7,7 +7,6 @@ const SettingsIcon = props => {
7
7
  viewBox: "0 0 18 18",
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
- className: "settingsIcon",
11
10
  ...props,
12
11
  children: [/*#__PURE__*/_jsx("path", {
13
12
  d: "M9 11.25C10.2426 11.25 11.25 10.2426 11.25 9C11.25 7.75736 10.2426 6.75 9 6.75C7.75736 6.75 6.75 7.75736 6.75 9C6.75 10.2426 7.75736 11.25 9 11.25Z",
@@ -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: {
@@ -1,8 +1,7 @@
1
- import { Autocomplete, Checkbox, FormControlLabel, IconButton, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
1
+ import { Autocomplete, Checkbox, FormControlLabel, MenuItem, TextField, Typography, createFilterOptions } from "@mui/material";
2
2
  import { useEffect, useMemo, useState } from "react";
3
3
  import { useSlate } from "slate-react";
4
4
  import Select from "../Select";
5
- import { CheckedBoxCheckIcon } from "../iconListV2";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { Fragment as _Fragment } from "react/jsx-runtime";
8
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -32,19 +31,11 @@ const OpenInNewTab = props => {
32
31
  className: "ccheckbox-primary",
33
32
  control: /*#__PURE__*/_jsx(Checkbox, {
34
33
  checked: openInNewTab,
35
- onChange: onNewTabChange,
36
- className: "checkBox",
37
- checkedIcon: /*#__PURE__*/_jsx(IconButton, {
38
- className: "checkedIcon",
39
- children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
40
- }),
41
- icon: /*#__PURE__*/_jsx(IconButton, {
42
- className: "unCheckedIcon"
43
- })
34
+ onChange: onNewTabChange
44
35
  }),
45
36
  label: /*#__PURE__*/_jsx(Typography, {
46
37
  variant: "body2",
47
- children: "Open in new tab"
38
+ children: translation("Open in new tab")
48
39
  })
49
40
  }) : null;
50
41
  };
@@ -56,11 +47,6 @@ export const TextInput = props => {
56
47
  ...props,
57
48
  onChange: e => {
58
49
  props.onChange(e.target.value);
59
- },
60
- sx: {
61
- "&::placeholder": {
62
- color: "gray"
63
- }
64
50
  }
65
51
  }), /*#__PURE__*/_jsx(OpenInNewTab, {
66
52
  ...props
@@ -72,8 +58,7 @@ export const SelectPage = props => {
72
58
  value,
73
59
  onChange,
74
60
  services,
75
- translation,
76
- classes
61
+ translation
77
62
  } = props;
78
63
  const [pages, setPages] = useState([]);
79
64
  const editor = useSlate();
@@ -131,8 +116,7 @@ export const SelectPage = props => {
131
116
  setValue: val => onChange(val?.value || ""),
132
117
  placeholder: translation("Select Page"),
133
118
  options: pages,
134
- disabled: isCurrentPage,
135
- classes: classes
119
+ disabled: isCurrentPage
136
120
  }), /*#__PURE__*/_jsx(FreeSoloCreateOption, {
137
121
  label: section?.label,
138
122
  setValue: val => {
@@ -146,8 +130,7 @@ export const SelectPage = props => {
146
130
  options: page?.sections?.map(p => ({
147
131
  label: p,
148
132
  value: p
149
- })),
150
- classes: classes
133
+ }))
151
134
  }), isCurrentPage ? null : /*#__PURE__*/_jsx(OpenInNewTab, {
152
135
  ...props
153
136
  })]
@@ -161,7 +144,6 @@ export const Trigger = props => {
161
144
  return /*#__PURE__*/_jsx(Typography, {
162
145
  variant: "subtitle1",
163
146
  gutterBottom: true,
164
- className: "trigger-text",
165
147
  children: `${translation("Choosing this will trigger the")} ${translation(nav.type)} ${translation("step")}`
166
148
  });
167
149
  };
@@ -212,8 +194,7 @@ export function FreeSoloCreateOption({
212
194
  setValue,
213
195
  options = [],
214
196
  placeholder = "",
215
- disabled = false,
216
- classes
197
+ disabled = false
217
198
  }) {
218
199
  return /*#__PURE__*/_jsx(Autocomplete, {
219
200
  freeSolo: true,
@@ -279,13 +260,6 @@ export function FreeSoloCreateOption({
279
260
  sx: {
280
261
  marginTop: "10px"
281
262
  },
282
- disabled: disabled,
283
- slotProps: {
284
- popper: {
285
- sx: {
286
- ...classes.customAutoComplete
287
- }
288
- }
289
- }
263
+ disabled: disabled
290
264
  });
291
265
  }