@flozy/editor 10.1.3 → 10.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +15 -115
  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/Image.js +2 -3
  19. package/dist/Editor/Elements/Embed/Video.js +1 -1
  20. package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
  21. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  22. package/dist/Editor/Elements/Form/Form.js +168 -181
  23. package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
  24. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
  25. package/dist/Editor/Elements/Form/FormField.js +6 -13
  26. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  27. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +24 -6
  28. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  29. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  30. package/dist/Editor/Elements/FreeGrid/styles.js +7 -67
  31. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  32. package/dist/Editor/Elements/List/CheckList.js +1 -4
  33. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  34. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  35. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  36. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  37. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  38. package/dist/Editor/Elements/Table/Table.js +3 -3
  39. package/dist/Editor/Elements/Title/title.js +6 -6
  40. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  41. package/dist/Editor/MiniEditor.js +1 -2
  42. package/dist/Editor/Styles/EditorStyles.js +5 -5
  43. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  44. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  45. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  46. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  47. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  49. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  50. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  51. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  52. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  53. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  54. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  55. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  56. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  57. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  58. package/dist/Editor/common/ColorPickerButton.js +17 -39
  59. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  60. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  61. package/dist/Editor/common/Icon.js +1 -31
  62. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  63. package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
  64. package/dist/Editor/common/LinkSettings/index.js +68 -84
  65. package/dist/Editor/common/LinkSettings/style.js +30 -245
  66. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
  67. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  68. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  69. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  70. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  77. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  78. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  79. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  80. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
  81. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  82. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
  83. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  84. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  85. package/dist/Editor/common/RnD/Utils/gridDropItem.js +2 -1
  86. package/dist/Editor/common/RnD/index.js +6 -5
  87. package/dist/Editor/common/Select/index.js +0 -2
  88. package/dist/Editor/common/Shorthands/elements.js +0 -54
  89. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  99. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  100. package/dist/Editor/common/Uploader.js +0 -8
  101. package/dist/Editor/common/iconListV2.js +6 -101
  102. package/dist/Editor/common/iconslist.js +0 -24
  103. package/dist/Editor/commonStyle.js +61 -165
  104. package/dist/Editor/helper/theme.js +2 -203
  105. package/dist/Editor/hooks/useMouseMove.js +5 -8
  106. package/dist/Editor/plugins/withEmbeds.js +1 -1
  107. package/dist/Editor/plugins/withHTML.js +1 -3
  108. package/dist/Editor/plugins/withTable.js +1 -1
  109. package/dist/Editor/theme/ThemeList.js +173 -50
  110. package/dist/Editor/utils/SlateUtilityFunctions.js +43 -166
  111. package/dist/Editor/utils/button.js +17 -1
  112. package/dist/Editor/utils/draftToSlate.js +2 -3
  113. package/dist/Editor/utils/font.js +37 -40
  114. package/dist/Editor/utils/form.js +4 -4
  115. package/dist/Editor/utils/formfield.js +2 -8
  116. package/dist/Editor/utils/helper.js +19 -90
  117. package/package.json +4 -4
  118. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  119. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  120. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  121. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  122. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  123. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  124. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  125. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  126. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  127. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  128. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  129. package/dist/Editor/common/CustomSelect.js +0 -43
  130. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  131. package/dist/Editor/common/SnackBar/index.js +0 -43
  132. package/dist/Editor/helper/textIndeces.js +0 -58
  133. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  134. package/dist/Editor/hooks/useThemeValues.js +0 -63
  135. package/dist/Editor/theme/index.js +0 -149
  136. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  137. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  138. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  139. package/dist/Editor/themeSettings/colorTheme/index.js +0 -309
  140. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  141. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  142. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  143. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  144. package/dist/Editor/themeSettings/icons.js +0 -60
  145. package/dist/Editor/themeSettings/index.js +0 -361
  146. package/dist/Editor/themeSettings/style.js +0 -292
  147. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  148. package/dist/Editor/themeSettingsAI/index.js +0 -355
  149. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  150. package/dist/Editor/themeSettingsAI/style.js +0 -324
@@ -8,7 +8,7 @@ import { onDropItem, ROW_HEIGHT } from "../../common/RnD/Utils/gridDropItem";
8
8
  import useBreakpoints from "../../hooks/useBreakpoints";
9
9
  import { breakpointValues, formatBreakpointValues } from "./breakpointConstants";
10
10
  import { useEditorContext } from "../../hooks/useMouseMove";
11
- import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
11
+ import { getBreakPointsValue } from "../../helper/theme";
12
12
  import focusOnNewItem from "../../helper/RnD/focusOnNewItem";
13
13
  import { bringItemToFB } from "../../helper";
14
14
  import itemOptions from "./Options/sectionItemOptions";
@@ -160,11 +160,6 @@ const FreeGridBox = props => {
160
160
  const isBoxHeader = useMemo(() => {
161
161
  return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
162
162
  }, [element]);
163
- const boxSp = groupByBreakpoint({
164
- borderRadius: {
165
- ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
166
- }
167
- }, theme);
168
163
  return /*#__PURE__*/_jsx(RnD, {
169
164
  id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
170
165
  className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
@@ -231,7 +226,9 @@ const FreeGridBox = props => {
231
226
  "--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
232
227
  },
233
228
  sx: {
234
- ...boxSp,
229
+ borderRadius: {
230
+ ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
231
+ },
235
232
  background: sectionBgColor,
236
233
  backgroundImage: sectionBackgroundImage ? `url('${sectionBackgroundImage}')` : "",
237
234
  borderColor: borderColor || "transparent",
@@ -5,12 +5,12 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const More = props => {
6
6
  const {
7
7
  handleClick,
8
- translation,
9
- breakpoint
8
+ breakpoint,
9
+ translation
10
10
  } = props;
11
11
  return /*#__PURE__*/_jsx(Box, {
12
12
  children: /*#__PURE__*/_jsxs(List, {
13
- className: "item-list-wrpr sectionMoreOption",
13
+ className: "item-list-wrpr",
14
14
  children: [/*#__PURE__*/_jsx(ListItemButton, {
15
15
  className: "item-wrapper",
16
16
  onClick: handleClick("addSection"),
@@ -19,15 +19,15 @@ const More = props => {
19
19
  className: "item-wrapper",
20
20
  onClick: handleClick("duplicateSection"),
21
21
  children: translation?.translation("Duplicate Section")
22
+ }), /*#__PURE__*/_jsx(ListItemButton, {
23
+ className: "item-wrapper",
24
+ onClick: handleClick("deleteSection"),
25
+ children: "Delete Section"
22
26
  }), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
23
27
  className: "item-wrapper",
24
28
  onClick: handleClick("forceAutoAlignment"),
25
29
  children: "Force Auto Alignment"
26
- }) : null, /*#__PURE__*/_jsx(ListItemButton, {
27
- className: "item-wrapper",
28
- onClick: handleClick("deleteSection"),
29
- children: "Delete Section"
30
- })]
30
+ }) : null]
31
31
  })
32
32
  });
33
33
  };
@@ -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": {
@@ -247,9 +243,6 @@ const useFreeGridStyles = ({
247
243
  },
248
244
  "& > .simple-text": {
249
245
  display: "none"
250
- },
251
- "& > .edt-paragraphs": {
252
- display: "none"
253
246
  }
254
247
  },
255
248
  "& .fgi_type_form": {
@@ -320,42 +313,9 @@ const useFreeGridStyles = ({
320
313
  backgroundColor: "#FFF",
321
314
  overflow: "hidden"
322
315
  },
323
- "& .fgi_type_embedScript:not(:has(.has-code))": {
324
- background: appTheme?.palette?.editor?.sectionSettingIconHover,
325
- color: appTheme?.palette?.editor?.textColor,
326
- fontSize: "14px",
327
- borderRadius: "12px",
328
- display: "flex",
329
- flexDirection: "column",
330
- justifyContent: "center",
331
- alignItems: "center",
332
- height: "100%",
333
- textAlign: "center",
334
- "& svg": {
335
- width: "20px",
336
- height: "20px",
337
- "& path": {
338
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
339
- }
340
- },
341
- "& .code-icon": {
342
- display: "flex",
343
- marginRight: "5px"
344
- },
345
- "& .empty-code": {
346
- display: "flex"
347
- },
348
- "& .code-name": {
349
- display: "flex",
350
- alignItems: "anchor-center"
351
- }
352
- },
353
316
  "& .fgi_type_text": {
354
317
  "& .edt-headings": {
355
318
  margin: "0px"
356
- },
357
- "& .edt-paragraphs": {
358
- margin: "0px"
359
319
  }
360
320
  },
361
321
  /** element toolbar hide */
@@ -396,41 +356,21 @@ const useFreeGridStyles = ({
396
356
  sectionPopper: {
397
357
  zIndex: 1200,
398
358
  width: "40px",
399
- left: "-63px !important",
359
+ left: "-58px !important",
400
360
  borderRadius: "8px",
401
- marginRight: "5px !important",
402
361
  "& .papper-root": {
403
362
  fontFamily: "sans-serif",
404
363
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
405
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
406
- border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
407
- borderRadius: "10px",
364
+ background: "#FFF",
408
365
  "& .MuiIconButton-root": {
409
- padding: "9px",
366
+ padding: "10px",
410
367
  color: "#000",
411
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
368
+ background: "#FFF",
412
369
  "& svg": {
413
370
  width: "20px",
414
- height: "20px",
415
- color: appTheme?.palette?.editor?.closeButtonSvgStroke
371
+ height: "20px"
416
372
  },
417
- "& .settingsIcon": {
418
- "& path": {
419
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
420
- }
421
- },
422
- "&.active": {
423
- "& svg": {
424
- width: "20px",
425
- height: "20px",
426
- color: "#2563EB"
427
- },
428
- "& .settingsIcon": {
429
- "& path": {
430
- stroke: "#2563EB"
431
- }
432
- }
433
- }
373
+ "&.active,&:hover ": {}
434
374
  }
435
375
  }
436
376
  },
@@ -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();