@flozy/editor 9.9.7 → 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 (143) 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/EmbedScript/Code.js +2 -14
  20. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  21. package/dist/Editor/Elements/Form/Form.js +168 -179
  22. package/dist/Editor/Elements/Form/FormField.js +4 -10
  23. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  24. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +15 -5
  25. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  26. package/dist/Editor/Elements/FreeGrid/styles.js +7 -64
  27. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  28. package/dist/Editor/Elements/List/CheckList.js +1 -4
  29. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  30. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  31. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  32. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  33. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  34. package/dist/Editor/Elements/Table/Table.js +3 -3
  35. package/dist/Editor/Elements/Title/title.js +6 -6
  36. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  37. package/dist/Editor/MiniEditor.js +1 -2
  38. package/dist/Editor/Styles/EditorStyles.js +5 -5
  39. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  40. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  41. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  42. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  43. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  45. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  46. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  47. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  48. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  49. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  50. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  51. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  52. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  53. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  54. package/dist/Editor/common/ColorPickerButton.js +16 -38
  55. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  56. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  57. package/dist/Editor/common/Icon.js +1 -31
  58. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  59. package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
  60. package/dist/Editor/common/LinkSettings/index.js +68 -84
  61. package/dist/Editor/common/LinkSettings/style.js +30 -245
  62. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
  63. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  64. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  65. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  66. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
  67. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  68. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  69. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  70. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  76. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
  77. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  78. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
  79. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  80. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  81. package/dist/Editor/common/RnD/Utils/gridDropItem.js +2 -1
  82. package/dist/Editor/common/Select/index.js +0 -2
  83. package/dist/Editor/common/Shorthands/elements.js +0 -54
  84. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  85. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  86. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  94. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  95. package/dist/Editor/common/Uploader.js +0 -8
  96. package/dist/Editor/common/iconListV2.js +6 -101
  97. package/dist/Editor/common/iconslist.js +0 -24
  98. package/dist/Editor/commonStyle.js +61 -174
  99. package/dist/Editor/helper/theme.js +2 -203
  100. package/dist/Editor/hooks/useMouseMove.js +5 -8
  101. package/dist/Editor/plugins/withEmbeds.js +1 -1
  102. package/dist/Editor/plugins/withHTML.js +1 -3
  103. package/dist/Editor/plugins/withTable.js +1 -1
  104. package/dist/Editor/theme/ThemeList.js +173 -50
  105. package/dist/Editor/utils/SlateUtilityFunctions.js +43 -166
  106. package/dist/Editor/utils/button.js +17 -1
  107. package/dist/Editor/utils/draftToSlate.js +2 -3
  108. package/dist/Editor/utils/font.js +37 -40
  109. package/dist/Editor/utils/helper.js +19 -90
  110. package/package.json +4 -4
  111. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  112. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  113. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  114. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  115. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  116. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  117. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  118. package/dist/Editor/common/CustomColorPicker/index.js +0 -131
  119. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  120. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  121. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  122. package/dist/Editor/common/CustomSelect.js +0 -43
  123. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  124. package/dist/Editor/common/SnackBar/index.js +0 -43
  125. package/dist/Editor/helper/textIndeces.js +0 -58
  126. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  127. package/dist/Editor/hooks/useThemeValues.js +0 -63
  128. package/dist/Editor/theme/index.js +0 -149
  129. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  130. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  131. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  132. package/dist/Editor/themeSettings/colorTheme/index.js +0 -309
  133. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  134. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  135. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  136. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  137. package/dist/Editor/themeSettings/icons.js +0 -60
  138. package/dist/Editor/themeSettings/index.js +0 -361
  139. package/dist/Editor/themeSettings/style.js +0 -292
  140. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  141. package/dist/Editor/themeSettingsAI/index.js +0 -355
  142. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  143. package/dist/Editor/themeSettingsAI/style.js +0 -324
@@ -1,7 +1,6 @@
1
1
  const useFreeGridStyles = ({
2
2
  theme,
3
- MAX_DEVICE_WIDTH,
4
- appTheme
3
+ MAX_DEVICE_WIDTH
5
4
  }) => ({
6
5
  root: {
7
6
  "&.freegrid-container": {
@@ -48,9 +47,6 @@ const useFreeGridStyles = ({
48
47
  "&.type_text": {
49
48
  // minHeight: "fit-content !important",
50
49
  // wordBreak: "break-all",
51
- "& .placeholder-simple-text": {
52
- display: "none"
53
- }
54
50
  },
55
51
  "&.enable-1, &.enable-2": {
56
52
  "&.type_text": {
@@ -317,42 +313,9 @@ const useFreeGridStyles = ({
317
313
  backgroundColor: "#FFF",
318
314
  overflow: "hidden"
319
315
  },
320
- "& .fgi_type_embedScript:not(:has(.has-code))": {
321
- background: appTheme?.palette?.editor?.sectionSettingIconHover,
322
- color: appTheme?.palette?.editor?.textColor,
323
- fontSize: "14px",
324
- borderRadius: "12px",
325
- display: "flex",
326
- flexDirection: "column",
327
- justifyContent: "center",
328
- alignItems: "center",
329
- height: "100%",
330
- textAlign: "center",
331
- "& svg": {
332
- width: "20px",
333
- height: "20px",
334
- "& path": {
335
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
336
- }
337
- },
338
- "& .code-icon": {
339
- display: "flex",
340
- marginRight: "5px"
341
- },
342
- "& .empty-code": {
343
- display: "flex"
344
- },
345
- "& .code-name": {
346
- display: "flex",
347
- alignItems: "anchor-center"
348
- }
349
- },
350
316
  "& .fgi_type_text": {
351
317
  "& .edt-headings": {
352
318
  margin: "0px"
353
- },
354
- "& .edt-paragraphs": {
355
- margin: "0px"
356
319
  }
357
320
  },
358
321
  /** element toolbar hide */
@@ -387,41 +350,21 @@ const useFreeGridStyles = ({
387
350
  sectionPopper: {
388
351
  zIndex: 1200,
389
352
  width: "40px",
390
- left: "-63px !important",
353
+ left: "-58px !important",
391
354
  borderRadius: "8px",
392
- marginRight: "5px !important",
393
355
  "& .papper-root": {
394
356
  fontFamily: "sans-serif",
395
357
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
396
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
397
- border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
398
- borderRadius: "10px",
358
+ background: "#FFF",
399
359
  "& .MuiIconButton-root": {
400
- padding: "9px",
360
+ padding: "10px",
401
361
  color: "#000",
402
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
362
+ background: "#FFF",
403
363
  "& svg": {
404
364
  width: "20px",
405
- height: "20px",
406
- color: appTheme?.palette?.editor?.closeButtonSvgStroke
365
+ height: "20px"
407
366
  },
408
- "& .settingsIcon": {
409
- "& path": {
410
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
411
- }
412
- },
413
- "&.active": {
414
- "& svg": {
415
- width: "20px",
416
- height: "20px",
417
- color: "#2563EB"
418
- },
419
- "& .settingsIcon": {
420
- "& path": {
421
- stroke: "#2563EB"
422
- }
423
- }
424
- }
367
+ "&.active,&:hover ": {}
425
368
  }
426
369
  }
427
370
  },
@@ -292,7 +292,7 @@ const GridItem = props => {
292
292
  ...getBRProps,
293
293
  display: "flex",
294
294
  flexDirection: flexDirection || "column",
295
- background: bgColor,
295
+ background: bgColor || "transparent",
296
296
  borderColor: getBorderColor(),
297
297
  borderWidth: borderWidth || "1px",
298
298
  borderStyle: borderStyle || "solid",
@@ -27,9 +27,6 @@ const CheckList = props => {
27
27
  checked
28
28
  } = element;
29
29
  const path = ReactEditor.findPath(editor, element);
30
- const {
31
- customLineHeight
32
- } = customProps || {};
33
30
  const handleCheck = e => {
34
31
  Transforms.setNodes(editor, {
35
32
  checked: e.target.checked
@@ -48,7 +45,7 @@ const CheckList = props => {
48
45
  justifyContent: "center",
49
46
  alignItems: "center",
50
47
  ...(style || {}),
51
- lineHeight: `${customLineHeight} !important`
48
+ lineHeight: 1.43
52
49
  },
53
50
  children: [/*#__PURE__*/_jsxs("div", {
54
51
  contentEditable: false,
@@ -1,10 +1,5 @@
1
- import React, { useEffect, useState } from "react";
2
- import Box from "@mui/material/Box";
3
- import Card from "@mui/material/Card";
4
- import CardMedia from "@mui/material/CardMedia";
5
- import CardContent from "@mui/material/CardContent";
6
- import Typography from "@mui/material/Typography";
7
- import Skeleton from "@mui/material/Skeleton";
1
+ import React from "react";
2
+ import { Box, Card, CardMedia, CardContent, Typography } from "@mui/material";
8
3
  import Icon from "../../common/Icon";
9
4
  import { useEditorContext } from "../../hooks/useMouseMove";
10
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -20,26 +15,13 @@ const SearchAttachment = props => {
20
15
  metadata
21
16
  } = customProps;
22
17
  const {
23
- type,
24
- id
18
+ title,
19
+ type
25
20
  } = element;
26
21
  const {
27
22
  theme
28
23
  } = useEditorContext();
29
- const [title, setTitle] = useState("");
30
- const [showSkeleton, setShowSkeleton] = useState(false);
31
24
  const label = Boolean(title?.trim()) ? title : 'Untitled';
32
- useEffect(() => {
33
- const fetchTitle = async id => {
34
- setShowSkeleton(true);
35
- const title = await customProps?.services('getDocTitle', id);
36
- setTitle(title?.data);
37
- setShowSkeleton(false);
38
- };
39
- if (id) {
40
- fetchTitle(id);
41
- }
42
- }, []);
43
25
  const handleClick = () => {
44
26
  if (metadata && metadata?.actionHandler) {
45
27
  metadata?.actionHandler(type, element);
@@ -56,15 +38,15 @@ const SearchAttachment = props => {
56
38
  children: /*#__PURE__*/_jsxs(Card, {
57
39
  sx: {
58
40
  display: "flex",
59
- justifyContent: showSkeleton ? "center" : "flex-start",
60
- alignItems: showSkeleton ? "center" : "flex-end",
41
+ justifyContent: "flex-start",
42
+ alignItems: "flex-end",
61
43
  width: "fit-content",
62
44
  maxWidth: '250px',
63
45
  padding: "0px 10px",
64
46
  boxShadow: "none",
65
47
  border: `1px solid ${theme?.palette?.primary?.slashBrainBorder} !important`,
66
48
  borderRadius: "7px !important",
67
- background: showSkeleton ? `${theme?.palette?.editor?.menuOptionHoverBackground} !important` : `${theme?.palette?.containers?.slashBrainCardBg} !important`,
49
+ background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
68
50
  cursor: 'pointer',
69
51
  margin: '4px 0px',
70
52
  lineHeight: 1.43,
@@ -94,12 +76,7 @@ const SearchAttachment = props => {
94
76
  width: "unset !important"
95
77
  }
96
78
  },
97
- children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
98
- variant: "circular",
99
- width: 14,
100
- height: 14,
101
- animation: "wave"
102
- }) : /*#__PURE__*/_jsx(Icon, {
79
+ children: /*#__PURE__*/_jsx(Icon, {
103
80
  icon: "docsIcon"
104
81
  })
105
82
  }), /*#__PURE__*/_jsx(CardContent, {
@@ -117,15 +94,7 @@ const SearchAttachment = props => {
117
94
  width: "unset !important"
118
95
  }
119
96
  },
120
- children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
121
- variant: "text",
122
- width: 140,
123
- height: 20,
124
- animation: "wave",
125
- sx: {
126
- borderRadius: "4px"
127
- }
128
- }) : /*#__PURE__*/_jsxs(Typography, {
97
+ children: /*#__PURE__*/_jsxs(Typography, {
129
98
  sx: {
130
99
  fontWeight: "500",
131
100
  background: theme?.palette?.text?.slashBrainText,
@@ -30,7 +30,6 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
30
30
  const [skip, setSkip] = useState(0);
31
31
  const [search, setSearch] = useState("");
32
32
  const [isLoading, setIsLoading] = useState(false);
33
- const [total, setTotal] = useState(0);
34
33
  const [debouncedSearch] = useDebounce(search, 300);
35
34
  const limit = 20;
36
35
  const observer = useRef();
@@ -64,24 +63,24 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
64
63
  }
65
64
  };
66
65
  useEffect(() => {
67
- getDocs();
66
+ getDocs({
67
+ debouncedSearch,
68
+ skip,
69
+ limit,
70
+ current_doc_id: currentId
71
+ });
68
72
  }, [skip, debouncedSearch]);
69
73
  const getDocs = async () => {
70
- if (isLoading) return;
71
- if (total > 0 && mapData?.length >= total) return;
72
74
  setIsLoading(true);
73
75
  try {
74
76
  if (otherProps?.services) {
75
77
  const result = await otherProps?.services("getDocs", {
76
78
  skip,
77
79
  limit,
78
- search: debouncedSearch,
80
+ search,
79
81
  current_doc_id: currentId
80
82
  });
81
- const docs = result?.data?.docs || [];
82
- const totalCount = result?.data?.total || 0;
83
- setMapData(prev => skip === 0 ? docs : [...prev, ...docs]);
84
- setTotal(totalCount);
83
+ setMapData(prev => skip === 0 ? result.data : [...prev, ...result.data]);
85
84
  }
86
85
  } catch (error) {
87
86
  console.error("Error fetching documents:", error);
@@ -259,7 +259,7 @@ const SearchAndDocList = ({
259
259
  xs: 12,
260
260
  children: /*#__PURE__*/_jsx(Typography, {
261
261
  sx: {
262
- display: mapData?.length === 0 && !isLoading ? 'flex' : 'none',
262
+ display: mapData?.length === 0 ? 'flex' : 'none',
263
263
  alignItems: "center",
264
264
  justifyContent: "center",
265
265
  color: theme?.palette?.text?.secondary,
@@ -269,17 +269,15 @@ const SearchAndDocList = ({
269
269
  },
270
270
  children: "No docs"
271
271
  })
272
- }), /*#__PURE__*/_jsx(Grid, {
272
+ }), isLoading && /*#__PURE__*/_jsx(Grid, {
273
273
  item: true,
274
- xs: 12,
275
274
  sx: {
276
- display: isLoading ? 'flex' : 'none',
277
- alignItems: "center",
275
+ display: "flex",
278
276
  justifyContent: "center",
279
- color: theme?.palette?.text?.secondary,
280
- fontSize: '12px',
281
- padding: '20px',
282
- fontWeight: 700
277
+ alignItems: 'center',
278
+ minHeight: '400px',
279
+ padding: '0px 16px 8px',
280
+ position: 'absolute'
283
281
  },
284
282
  children: /*#__PURE__*/_jsx(CircularProgress, {})
285
283
  })]
@@ -5,7 +5,6 @@ import { Box } from "@mui/material";
5
5
  import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
- import { getBreakpointLineSpacing, getDevice } from "../../helper/theme";
9
8
  import { jsx as _jsx } from "react/jsx-runtime";
10
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
11
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -30,12 +29,8 @@ const SimpleText = props => {
30
29
  } = customProps;
31
30
  // const { element: pageSt } = getPageSettings(editor) || {};
32
31
  // const { pageColor } = pageSt?.pageProps || {};
33
- const breakpoint = getDevice(window.innerWidth);
34
- const lineH = element?.children[0]?.lineHeight;
35
- const lineHeight = getBreakpointLineSpacing(lineH, breakpoint);
36
32
  const classes = SimpleTextStyle({
37
- pageColor: "#FFFFFF",
38
- lineHeight
33
+ pageColor: "#FFFFFF"
39
34
  });
40
35
  const selected = useSelected();
41
36
  const path = ReactEditor.findPath(editor, element);
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
- display: "inline-flex",
39
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
40
40
  "& .bg-pad-sl": {
41
41
  padding: "2px 4px 2px 4px",
42
42
  background: "transparent",
@@ -307,7 +307,7 @@ const Table = props => {
307
307
  onScroll: handleScroll,
308
308
  onMouseOver: onMouseOver,
309
309
  onMouseLeave: onMouseLeave,
310
- className: "custom-scroll",
310
+ className: !hideTools.includes("add_column") ? "custom-scroll" : '',
311
311
  children: [/*#__PURE__*/_jsx(TableComp, {
312
312
  className: readOnly ? "readOnly" : "",
313
313
  sx: {
@@ -345,8 +345,8 @@ const Table = props => {
345
345
  handleAction: handleAction,
346
346
  exandTools: exandTools,
347
347
  openSetttings: openSetttings,
348
- hideTools: hideTools,
349
- translation: translation
348
+ translation: translation,
349
+ hideTools: hideTools
350
350
  }), /*#__PURE__*/_jsx(MoreTableSettings, {
351
351
  exandTools: exandTools,
352
352
  handleAction: handleAction,
@@ -4,12 +4,6 @@ import { useSlate } from "slate-react";
4
4
  import { getNodeText } from "../../utils/helper";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
- const isEmptyTextNode = node => {
8
- if (Text.isText(node)) {
9
- return !node.text.trim();
10
- }
11
- return false;
12
- };
13
7
  const Title = props => {
14
8
  const {
15
9
  attributes,
@@ -56,4 +50,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
56
50
  }
57
51
  }, [editor.selection]);
58
52
  return null;
53
+ };
54
+ const isEmptyTextNode = node => {
55
+ if (Text.isText(node)) {
56
+ return !node.text.trim();
57
+ }
58
+ return false;
59
59
  };
@@ -34,8 +34,7 @@ const VariableButton = props => {
34
34
  PaperProps: {
35
35
  style: {
36
36
  maxHeight: 300,
37
- overflowY: "auto",
38
- transformOrigin: 'top left'
37
+ overflowY: "auto"
39
38
  },
40
39
  sx: {
41
40
  "&::-webkit-scrollbar-track": {
@@ -45,14 +44,6 @@ const VariableButton = props => {
45
44
  borderRadius: "16px"
46
45
  }
47
46
  }
48
- },
49
- anchorOrigin: {
50
- vertical: 'bottom',
51
- horizontal: 'right'
52
- },
53
- transformOrigin: {
54
- vertical: 'top',
55
- horizontal: 'right'
56
47
  }
57
48
  },
58
49
  children: [/*#__PURE__*/_jsx(MenuItem, {
@@ -45,13 +45,12 @@ const MiniEditor = props => {
45
45
  const {
46
46
  translationMock
47
47
  } = otherProps;
48
- const dummyTranslation = () => {};
49
48
  const customProps = {
50
49
  ...(otherProps || {}),
51
50
  readOnly: isReadOnly,
52
51
  editorPlaceholder: miniEditorPlaceholder,
53
52
  page_id: id,
54
- translation: translation || translationMock || dummyTranslation
53
+ translation: translation || translationMock
55
54
  };
56
55
  const [mentions, setMentions] = useMentions({
57
56
  editor,
@@ -133,7 +133,7 @@ const editorStyles = ({
133
133
  },
134
134
  "& .accordion-summary-collapse-btn": {
135
135
  padding: "4px",
136
- width: "5px"
136
+ width: '5px'
137
137
  },
138
138
  "& .workflow-icon-btn": {
139
139
  pointerEvents: "none",
@@ -242,7 +242,7 @@ const editorStyles = ({
242
242
  }
243
243
  },
244
244
  "& .section-tw": {
245
- background: "transparent !important",
245
+ background: 'transparent !important',
246
246
  "& button": {
247
247
  padding: "2px",
248
248
  borderRadius: "0px",
@@ -291,8 +291,8 @@ const editorStyles = ({
291
291
  }
292
292
  },
293
293
  "& ::selection": {
294
- background: "rgba(35, 131, 226, 0.35)!important",
295
- color: "inherit"
294
+ background: 'rgba(35, 131, 226, 0.35)!important',
295
+ color: 'inherit'
296
296
  },
297
297
  "&.readOnlyContainer": {
298
298
  "& .max-content": {
@@ -302,7 +302,7 @@ const editorStyles = ({
302
302
  },
303
303
  fullScreenWrapper: {
304
304
  "& .editor-wrapper": {
305
- paddingTop: "20px"
305
+ paddingTop: '20px'
306
306
  },
307
307
  "& .MuiDialog-paper, & .MuiPopover-paper": {
308
308
  background: `${theme?.palette?.editor?.background} !important`
@@ -1,32 +1,8 @@
1
1
  import React from "react";
2
2
  import { Select, MenuItem } from "@mui/material";
3
- import { addMarkData, activeMark, getSelectedElementStyle } from "../../utils/SlateUtilityFunctions.js";
4
- import { toolbarGroups } from "../toolbarGroups.js";
3
+ import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
5
4
  import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
6
- import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
7
5
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const allTools = toolbarGroups.flat();
9
- const fontWeight = allTools.find(f => f.format === "fontWeight");
10
- export const getValue = (editor, format) => {
11
- switch (format) {
12
- case "fontFamily":
13
- {
14
- const style = getSelectedElementStyle("font-family", editor, format);
15
- return style || defaultFonts[0];
16
- }
17
- case "fontWeight":
18
- {
19
- const {
20
- options
21
- } = fontWeight || {};
22
- const fontWeightStyle = getSelectedElementStyle("font-weight", editor, format);
23
- const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
24
- return selected?.value;
25
- }
26
- default:
27
- return activeMark(editor, format);
28
- }
29
- };
30
6
  const Dropdown = ({
31
7
  classes,
32
8
  editor,
@@ -34,7 +10,7 @@ const Dropdown = ({
34
10
  options,
35
11
  width
36
12
  }) => {
37
- const value = activeMark(editor, format, true) || getValue(editor, format);
13
+ const value = activeMark(editor, format);
38
14
  const changeMarkData = (event, format) => {
39
15
  event.preventDefault();
40
16
  const value = event.target.value;
@@ -44,7 +20,7 @@ const Dropdown = ({
44
20
  });
45
21
  };
46
22
  return /*#__PURE__*/_jsx(Select, {
47
- value: value || options?.[0]?.value,
23
+ value: value,
48
24
  className: "editor-dd",
49
25
  onChange: e => changeMarkData(e, format),
50
26
  MenuProps: {
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { Autocomplete, TextField } from "@mui/material";
3
- import { addMarkData } from "../../utils/SlateUtilityFunctions.js";
3
+ import { activeMark, addMarkData } from "../../utils/SlateUtilityFunctions.js";
4
4
  import usePopupStyle from "../PopupTool/PopupToolStyle.js";
5
5
  import { useEditorContext } from "../../hooks/useMouseMove.js";
6
- import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
7
- import { getValue } from "./Dropdown.js";
6
+ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  const FontFamilyAutocomplete = ({
10
9
  editor,
@@ -15,7 +14,7 @@ const FontFamilyAutocomplete = ({
15
14
  val = "",
16
15
  webFont = false
17
16
  }) => {
18
- const markValue = getValue(editor, format);
17
+ const markValue = activeMark(editor, format);
19
18
  const value = !webFont ? markValue : val;
20
19
  const changeMarkData = (event, newValue, format) => {
21
20
  if (!webFont) {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Icon from "../../common/Icon";
3
3
  import Button from "../../common/Button";
4
- import { toggleMark, isMarkBtnActive } from "../../utils/SlateUtilityFunctions.js";
4
+ import { toggleMark, isMarkActive } from "../../utils/SlateUtilityFunctions.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const MarkButton = ({
7
7
  editor,
@@ -13,7 +13,7 @@ const MarkButton = ({
13
13
  translation
14
14
  } = customProps;
15
15
  return /*#__PURE__*/_jsx(Button, {
16
- active: isMarkBtnActive(editor, format),
16
+ active: isMarkActive(editor, format),
17
17
  format: format,
18
18
  onMouseDown: e => {
19
19
  e.preventDefault();
@@ -1,7 +1,8 @@
1
1
  import React, { useEffect, useRef, useState } from "react";
2
2
  import { TextField, IconButton } from "@mui/material";
3
- import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
4
- import { getBreakPointsValue, getTextSizeVal } from "../../helper/theme.js";
3
+ import { addMarkData, activeMark, isBlockActive } from "../../utils/SlateUtilityFunctions.js";
4
+ import { headingMap, sizeMap } from "../../utils/font.js";
5
+ import { getBreakPointsValue } from "../../helper/theme.js";
5
6
  import useWindowResize from "../../hooks/useWindowResize.js";
6
7
  import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
7
8
  import { TextSizeDownArrow, TextSizeUpArrow } from "../../common/iconListV2.js";
@@ -14,15 +15,11 @@ const TextSize = ({
14
15
  format,
15
16
  fullWidth
16
17
  }) => {
17
- const [fontSize, setFontSize] = useState();
18
- const timerRef = useRef();
19
18
  const [size] = useWindowResize();
20
19
  const val = activeMark(editor, format);
21
-
22
- // const noFontSize =
23
- // val === "normal" || (typeof val === "object" && !Object.keys(val)?.length);
24
-
25
- const value = getTextSizeVal(editor);
20
+ const value = getBreakPointsValue(val, size?.device);
21
+ const [fontSize, setFontSize] = useState();
22
+ const timerRef = useRef();
26
23
  useEffect(() => {
27
24
  setFontSize(getSizeVal());
28
25
  }, [value]);
@@ -58,7 +55,13 @@ const TextSize = ({
58
55
  };
59
56
  const getSizeVal = () => {
60
57
  try {
61
- return parseInt(value);
58
+ let size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
59
+ Object.entries(headingMap).forEach(([format, value]) => {
60
+ if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
61
+ size = value;
62
+ }
63
+ });
64
+ return parseInt(size);
62
65
  } catch (err) {
63
66
  return "";
64
67
  }
@@ -215,8 +215,7 @@ const MiniToolbar = props => {
215
215
  setPopper: setPopper,
216
216
  onClose: onClose,
217
217
  search: search,
218
- onSearch: onSearch,
219
- closeMainPopup: onClose
218
+ onSearch: onSearch
220
219
  })]
221
220
  }) : null
222
221
  })]
@@ -12,8 +12,7 @@ function MiniColorPicker(props) {
12
12
  classes,
13
13
  id,
14
14
  editor,
15
- customProps,
16
- type
15
+ customProps
17
16
  } = props;
18
17
  const [openColorTool, setOpenColorTool] = useState(null);
19
18
  const {
@@ -39,8 +38,7 @@ function MiniColorPicker(props) {
39
38
  classes: classes,
40
39
  forMiniTool: true,
41
40
  openColorTool: openColorTool,
42
- closeColorTool: () => setOpenColorTool(null),
43
- type: type
41
+ closeColorTool: () => setOpenColorTool(null)
44
42
  }, id)]
45
43
  });
46
44
  }