@flozy/editor 10.0.9 → 10.1.0

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 (144) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +20 -120
  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 +24 -6
  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/RnD/index.js +6 -5
  83. package/dist/Editor/common/Select/index.js +0 -2
  84. package/dist/Editor/common/Shorthands/elements.js +0 -54
  85. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  86. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  95. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  96. package/dist/Editor/common/Uploader.js +0 -8
  97. package/dist/Editor/common/iconListV2.js +6 -101
  98. package/dist/Editor/common/iconslist.js +0 -24
  99. package/dist/Editor/commonStyle.js +61 -174
  100. package/dist/Editor/helper/theme.js +2 -203
  101. package/dist/Editor/hooks/useMouseMove.js +5 -8
  102. package/dist/Editor/plugins/withEmbeds.js +1 -1
  103. package/dist/Editor/plugins/withHTML.js +1 -3
  104. package/dist/Editor/plugins/withTable.js +1 -1
  105. package/dist/Editor/theme/ThemeList.js +173 -50
  106. package/dist/Editor/utils/SlateUtilityFunctions.js +43 -166
  107. package/dist/Editor/utils/button.js +17 -1
  108. package/dist/Editor/utils/draftToSlate.js +2 -3
  109. package/dist/Editor/utils/font.js +37 -40
  110. package/dist/Editor/utils/helper.js +19 -90
  111. package/package.json +4 -4
  112. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  113. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  114. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  115. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  116. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  117. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  118. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  119. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  120. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  121. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  122. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  123. package/dist/Editor/common/CustomSelect.js +0 -43
  124. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  125. package/dist/Editor/common/SnackBar/index.js +0 -43
  126. package/dist/Editor/helper/textIndeces.js +0 -58
  127. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  128. package/dist/Editor/hooks/useThemeValues.js +0 -63
  129. package/dist/Editor/theme/index.js +0 -149
  130. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  131. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  132. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  133. package/dist/Editor/themeSettings/colorTheme/index.js +0 -309
  134. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  135. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  136. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  137. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  138. package/dist/Editor/themeSettings/icons.js +0 -60
  139. package/dist/Editor/themeSettings/index.js +0 -361
  140. package/dist/Editor/themeSettings/style.js +0 -292
  141. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  142. package/dist/Editor/themeSettingsAI/index.js +0 -355
  143. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  144. package/dist/Editor/themeSettingsAI/style.js +0 -324
@@ -21,6 +21,7 @@ import { FORM_NODE } from "../../utils/form";
21
21
  import { DEFAULT_TABLE_NODE } from "../../utils/table";
22
22
  import itemOptions from "./Options/sectionItemOptions";
23
23
  import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
24
+ import { useDebouncedCallback } from "use-debounce";
24
25
  import { jsx as _jsx } from "react/jsx-runtime";
25
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
26
27
  const MAX_DEVICE_WIDTH = {
@@ -34,15 +35,11 @@ export const useFreeGrid = () => {
34
35
  return useContext(FreeGridContext);
35
36
  };
36
37
  const FreeGrid = props => {
37
- const {
38
- theme: appTheme
39
- } = useEditorContext();
40
38
  const theme = useTheme();
41
39
  const breakpoint = useBreakpoints(theme);
42
40
  const classes = useFreeGridStyles({
43
41
  theme,
44
- MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint],
45
- appTheme
42
+ MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
46
43
  });
47
44
  const editor = useSlateStatic();
48
45
  const {
@@ -79,6 +76,9 @@ const FreeGrid = props => {
79
76
  const count = useRef(2);
80
77
  const childrenCountRef = useRef(element?.children?.length);
81
78
  const [isInteracting, setIsInteracting] = useState(false);
79
+ const debouncedStopInteraction = useDebouncedCallback(() => {
80
+ setIsInteracting(false);
81
+ }, 500);
82
82
  const onChange = data => {
83
83
  const append = breakpoint === "lg" ? "" : `_${breakpoint}`;
84
84
  const updateData = {
@@ -210,6 +210,20 @@ const FreeGrid = props => {
210
210
  linkType: "webAddress"
211
211
  },
212
212
  iconPosition: "start",
213
+ bgColor: "#2563EB",
214
+ textColor: "#FFF",
215
+ borderRadius: {
216
+ topLeft: 30,
217
+ topRight: 30,
218
+ bottomLeft: 30,
219
+ bottomRight: 30
220
+ },
221
+ bannerSpacing: {
222
+ left: 12,
223
+ top: 12,
224
+ right: 12,
225
+ bottom: 12
226
+ },
213
227
  textAlign: "center",
214
228
  label: "Get Started"
215
229
  }],
@@ -480,7 +494,11 @@ const FreeGrid = props => {
480
494
  return /*#__PURE__*/_jsx(FreeGridContext.Provider, {
481
495
  value: {
482
496
  isInteracting,
483
- setIsInteracting
497
+ handleStart: () => {
498
+ setIsInteracting(true);
499
+ debouncedStopInteraction.cancel();
500
+ },
501
+ handleStop: debouncedStopInteraction
484
502
  },
485
503
  children: /*#__PURE__*/_jsx(RnD, {
486
504
  id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
@@ -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": {
@@ -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 */
@@ -393,41 +356,21 @@ const useFreeGridStyles = ({
393
356
  sectionPopper: {
394
357
  zIndex: 1200,
395
358
  width: "40px",
396
- left: "-63px !important",
359
+ left: "-58px !important",
397
360
  borderRadius: "8px",
398
- marginRight: "5px !important",
399
361
  "& .papper-root": {
400
362
  fontFamily: "sans-serif",
401
363
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
402
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
403
- border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
404
- borderRadius: "10px",
364
+ background: "#FFF",
405
365
  "& .MuiIconButton-root": {
406
- padding: "9px",
366
+ padding: "10px",
407
367
  color: "#000",
408
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
368
+ background: "#FFF",
409
369
  "& svg": {
410
370
  width: "20px",
411
- height: "20px",
412
- color: appTheme?.palette?.editor?.closeButtonSvgStroke
371
+ height: "20px"
413
372
  },
414
- "& .settingsIcon": {
415
- "& path": {
416
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
417
- }
418
- },
419
- "&.active": {
420
- "& svg": {
421
- width: "20px",
422
- height: "20px",
423
- color: "#2563EB"
424
- },
425
- "& .settingsIcon": {
426
- "& path": {
427
- stroke: "#2563EB"
428
- }
429
- }
430
- }
373
+ "&.active,&:hover ": {}
431
374
  }
432
375
  }
433
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();