@flozy/editor 10.8.8 → 10.8.9

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 (151) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +27 -138
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +11 -39
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AI/Styles.js +0 -1
  7. package/dist/Editor/Elements/Accordion/Accordion.js +22 -28
  8. package/dist/Editor/Elements/Accordion/AccordionButton.js +3 -12
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  10. package/dist/Editor/Elements/Attachments/Attachments.js +11 -153
  11. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +3 -8
  12. package/dist/Editor/Elements/Button/EditorButton.js +7 -23
  13. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  14. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  15. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  16. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +55 -134
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +8 -7
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +3 -8
  21. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
  22. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
  23. package/dist/Editor/Elements/Embed/Embed.js +43 -36
  24. package/dist/Editor/Elements/Embed/Image.js +23 -240
  25. package/dist/Editor/Elements/Embed/Video.js +15 -246
  26. package/dist/Editor/Elements/Form/FormField.js +1 -1
  27. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  28. package/dist/Editor/Elements/Form/Workflow/constant.js +1 -25
  29. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +33 -39
  30. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  31. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
  32. package/dist/Editor/Elements/FreeGrid/Options/More.js +7 -7
  33. package/dist/Editor/Elements/FreeGrid/styles.js +0 -9
  34. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  35. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -2
  36. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  37. package/dist/Editor/Elements/Table/Table.js +3 -3
  38. package/dist/Editor/Elements/Title/title.js +6 -6
  39. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -4
  40. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +3 -5
  41. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  42. package/dist/Editor/MiniEditor.js +1 -2
  43. package/dist/Editor/Styles/EditorStyles.js +5 -20
  44. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  45. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  46. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  47. package/dist/Editor/Toolbar/FormatTools/TextSize.js +29 -33
  48. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  49. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  50. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +23 -23
  51. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +7 -25
  52. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  53. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +8 -24
  54. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  55. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +10 -70
  56. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +14 -73
  57. package/dist/Editor/Toolbar/PopupTool/index.js +2 -5
  58. package/dist/Editor/Toolbar/toolbarGroups.js +10 -56
  59. package/dist/Editor/common/ColorPickerButton.js +16 -38
  60. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  61. package/dist/Editor/common/FontLoader/FontLoader.js +0 -4
  62. package/dist/Editor/common/Icon.js +0 -28
  63. package/dist/Editor/common/ImageSelector/ImageSelector.js +7 -45
  64. package/dist/Editor/common/ImageSelector/Options/Upload.js +11 -26
  65. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  66. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -6
  67. package/dist/Editor/common/MentionsPopup/index.js +1 -9
  68. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  69. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  70. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +7 -20
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -9
  77. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +7 -20
  78. package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
  79. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -11
  80. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  81. package/dist/Editor/common/RnD/Utils/gridDropItem.js +18 -28
  82. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  83. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -45
  84. package/dist/Editor/common/RnD/VirtualElement/helper.js +130 -320
  85. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -22
  86. package/dist/Editor/common/RnD/index.js +13 -48
  87. package/dist/Editor/common/Shorthands/elements.js +4 -62
  88. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  89. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +2 -15
  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/index.js +1 -3
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -2
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  99. package/dist/Editor/common/StyleBuilder/index.js +4 -8
  100. package/dist/Editor/common/Uploader.js +17 -125
  101. package/dist/Editor/common/iconslist.js +0 -21
  102. package/dist/Editor/commonStyle.js +64 -107
  103. package/dist/Editor/helper/index.js +2 -10
  104. package/dist/Editor/helper/theme.js +2 -203
  105. package/dist/Editor/hooks/useMouseMove.js +3 -9
  106. package/dist/Editor/plugins/withEmbeds.js +1 -12
  107. package/dist/Editor/plugins/withHTML.js +3 -58
  108. package/dist/Editor/plugins/withTable.js +1 -1
  109. package/dist/Editor/service/fileupload.js +0 -53
  110. package/dist/Editor/theme/ThemeList.js +173 -50
  111. package/dist/Editor/utils/SlateUtilityFunctions.js +21 -183
  112. package/dist/Editor/utils/accordion.js +40 -68
  113. package/dist/Editor/utils/button.js +17 -1
  114. package/dist/Editor/utils/draftToSlate.js +2 -3
  115. package/dist/Editor/utils/events.js +89 -94
  116. package/dist/Editor/utils/font.js +37 -40
  117. package/dist/Editor/utils/helper.js +21 -97
  118. package/dist/Editor/utils/insertAppHeader.js +4 -8
  119. package/package.json +4 -4
  120. package/dist/Editor/Elements/Attachments/AttachmentStyles.js +0 -16
  121. package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
  122. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  123. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  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/StyleBuilder/fieldTypes/embedUpload.js +0 -115
  132. package/dist/Editor/common/UploaderWithProgress.js +0 -183
  133. package/dist/Editor/helper/textIndeces.js +0 -58
  134. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  135. package/dist/Editor/hooks/useThemeValues.js +0 -63
  136. package/dist/Editor/theme/index.js +0 -149
  137. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  138. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  139. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  140. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  141. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  142. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  143. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  144. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  145. package/dist/Editor/themeSettings/icons.js +0 -60
  146. package/dist/Editor/themeSettings/index.js +0 -380
  147. package/dist/Editor/themeSettings/style.js +0 -299
  148. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  149. package/dist/Editor/themeSettingsAI/index.js +0 -355
  150. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  151. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -7,7 +7,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { Transforms } from "slate";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
- const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "headingFour", "headingFive", "headingSix", "paragraphOne", "paragraphTwo", "paragraphThree", "grid"];
10
+ const DRAGGABLE_TYPES = ["paragraph", "headingOne", "headingTwo", "headingThree", "grid"];
11
11
  const DragHandleStyle = fromPopper => {
12
12
  const handleDragStyle = fromPopper ? {
13
13
  position: "absolute",
@@ -19,8 +19,6 @@ const FontLoader = props => {
19
19
  const loadFontsInBatches = (families, batchSize = 5, maxRetries = 3) => {
20
20
  let currentIndex = 0;
21
21
  let retryCount = 0;
22
- // let hideLoaderOn = 30;
23
-
24
22
  const loadNextBatch = () => {
25
23
  try {
26
24
  if (currentIndex >= families?.length) {
@@ -81,7 +79,6 @@ const FontLoader = props => {
81
79
  // console.log(err);
82
80
  // setLoading(false);
83
81
  });
84
- // setLoading(true);
85
82
  } else {
86
83
  function correctFontArray(fontString) {
87
84
  let fontsArray = fontString?.split(",");
@@ -100,7 +97,6 @@ const FontLoader = props => {
100
97
  });
101
98
  let families = Array.from(fontSet);
102
99
  families = correctFontArray(families.join(", "));
103
- // eslint-disable-next-line no-useless-escape
104
100
  families = families?.map(font => font?.replace(/\"/g, ""));
105
101
  families = families?.map(font => font?.replace(", sans-serif", ""));
106
102
  families = families?.filter(font => googleFontList?.includes(font));
@@ -48,16 +48,6 @@ import ChervUp from "../assets/svg/ChervUp";
48
48
  import ResetIconNew from "../assets/svg/ResetIconNew";
49
49
  import { jsx as _jsx } from "react/jsx-runtime";
50
50
  import { jsxs as _jsxs } from "react/jsx-runtime";
51
- const HeadingIcon = ({
52
- variant
53
- }) => {
54
- return /*#__PURE__*/_jsx("div", {
55
- style: {
56
- color: "#64748B"
57
- },
58
- children: variant
59
- });
60
- };
61
51
  const iconList = {
62
52
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
63
53
  size: 20
@@ -90,24 +80,6 @@ const iconList = {
90
80
  size: 18,
91
81
  fill: "#64748B"
92
82
  }),
93
- headingFour: /*#__PURE__*/_jsx(HeadingIcon, {
94
- variant: "H4"
95
- }),
96
- headingFive: /*#__PURE__*/_jsx(HeadingIcon, {
97
- variant: "H5"
98
- }),
99
- headingSix: /*#__PURE__*/_jsx(HeadingIcon, {
100
- variant: "H6"
101
- }),
102
- paragraphOne: /*#__PURE__*/_jsx(HeadingIcon, {
103
- variant: "P1"
104
- }),
105
- paragraphTwo: /*#__PURE__*/_jsx(HeadingIcon, {
106
- variant: "P2"
107
- }),
108
- paragraphThree: /*#__PURE__*/_jsx(HeadingIcon, {
109
- variant: "P3"
110
- }),
111
83
  blockquote: /*#__PURE__*/_jsx(MdFormatQuote, {
112
84
  size: 20,
113
85
  fill: "#64748B",
@@ -17,7 +17,7 @@ const IMAGE_SLECTOR_OPTIONS = {
17
17
  };
18
18
  const TAB_SHOW = {
19
19
  Image: ["upload", "choose", "addLink"],
20
- Video: ["upload", "addLink"],
20
+ Video: ["addLink"],
21
21
  Embed: ["addLink"],
22
22
  Document: ["addLink", "upload"]
23
23
  };
@@ -31,54 +31,21 @@ const ImageSelector = props => {
31
31
  onClose,
32
32
  open,
33
33
  onSelectImage,
34
- customProps,
35
- setUploadStatus = () => {},
36
- disableProgress
34
+ title,
35
+ customProps
37
36
  } = props;
38
- const {
39
- uploadTerminator
40
- } = customProps;
41
- const [uniqueId, setUniqueId] = useState(null);
42
- const title = props.title || "Image";
43
37
  const translation = customProps?.translation;
44
38
  const [tabValue, setTabValue] = useState(title === "Image" ? "choose" : "addLink");
45
39
  const [image, setImage] = useState(value || "");
46
- const [s3UploadProp, setS3UploadProp] = useState({
47
- file: null,
48
- pageId: null,
49
- services: customProps?.services,
50
- setUploadStatus: setUploadStatus
51
- });
52
40
  const handleTabChange = (e, newValue) => {
53
41
  setImage("");
54
42
  setTabValue(newValue);
55
- setS3UploadProp({
56
- file: null,
57
- pageId: null,
58
- services: customProps?.services,
59
- setUploadStatus: setUploadStatus
60
- });
61
43
  };
62
44
  const onUploaded = url => {
63
45
  setImage(url);
64
46
  };
65
47
  const onSave = () => {
66
- if (tabValue === "upload") {
67
- if (disableProgress) {
68
- onSelectImage(image);
69
- } else {
70
- onSelectImage(s3UploadProp);
71
- }
72
- } else {
73
- onSelectImage({
74
- embedURL: image,
75
- isUpload: false
76
- });
77
- }
78
- };
79
- const onCloseUpload = () => {
80
- uploadTerminator(uniqueId, setUploadStatus);
81
- onClose();
48
+ onSelectImage(image);
82
49
  };
83
50
  const isActive = val => tabValue === val ? "active" : "";
84
51
  const Comp = IMAGE_SLECTOR_OPTIONS[tabValue] || /*#__PURE__*/_jsx(_Fragment, {});
@@ -162,12 +129,7 @@ const ImageSelector = props => {
162
129
  children: /*#__PURE__*/_jsx(Comp, {
163
130
  ...props,
164
131
  classes: classes,
165
- onUploaded: onUploaded,
166
- setS3UploadProp: setS3UploadProp,
167
- s3UploadProp: s3UploadProp,
168
- disableProgress: disableProgress,
169
- setUniqueId: setUniqueId,
170
- uniqueId: uniqueId
132
+ onUploaded: onUploaded
171
133
  })
172
134
  })]
173
135
  })
@@ -181,12 +143,12 @@ const ImageSelector = props => {
181
143
  p: 2
182
144
  },
183
145
  children: [/*#__PURE__*/_jsx(Button, {
184
- onClick: onCloseUpload,
146
+ onClick: onClose,
185
147
  className: "secondaryBtn",
186
148
  sx: classes.closeBtn,
187
149
  children: translation("Cancel")
188
150
  }), /*#__PURE__*/_jsx(Button, {
189
- disabled: tabValue === "upload" ? !s3UploadProp?.file : !image,
151
+ disabled: !image,
190
152
  onClick: onSave,
191
153
  className: `primaryBtn ${!image ? "disabled" : ""}`,
192
154
  sx: classes.saveBtn,
@@ -1,6 +1,5 @@
1
1
  import React from "react";
2
2
  import { Grid } from "@mui/material";
3
- import UploaderWithProgress from "../../UploaderWithProgress";
4
3
  import Uploader from "../../Uploader";
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  const Upload = props => {
@@ -10,31 +9,11 @@ const Upload = props => {
10
9
  onUploaded,
11
10
  customProps,
12
11
  disableUpload = false,
13
- title,
14
- setS3UploadProp,
15
- s3UploadProp,
16
- disableProgress,
17
- setUniqueId,
18
- uniqueId
12
+ title
19
13
  } = props;
20
14
  const onDone = img => {
21
15
  onUploaded(img);
22
16
  };
23
- const commonProps = {
24
- classes,
25
- value,
26
- data: {
27
- key: "url"
28
- },
29
- customProps,
30
- onUploaded: onDone,
31
- disableUpload,
32
- title,
33
- setS3UploadProp,
34
- s3UploadProp,
35
- setUniqueId,
36
- uniqueId
37
- };
38
17
  return /*#__PURE__*/_jsx(Grid, {
39
18
  item: true,
40
19
  xs: 12,
@@ -43,10 +22,16 @@ const Upload = props => {
43
22
  height: '100%'
44
23
  },
45
24
  className: "ims-right",
46
- children: disableProgress ? /*#__PURE__*/_jsx(Uploader, {
47
- ...commonProps
48
- }) : /*#__PURE__*/_jsx(UploaderWithProgress, {
49
- ...commonProps
25
+ children: /*#__PURE__*/_jsx(Uploader, {
26
+ classes: classes,
27
+ value: value,
28
+ data: {
29
+ key: "url"
30
+ },
31
+ customProps: customProps,
32
+ onUploaded: onDone,
33
+ disableUpload: disableUpload,
34
+ title: title
50
35
  })
51
36
  });
52
37
  };
@@ -76,7 +76,7 @@ const ImageSelectorStyles = theme => ({
76
76
  background: theme?.palette?.editor?.deviderBgColor,
77
77
  "@media only screen and (min-width: 899px)": {
78
78
  margin: "0px 24px",
79
- width: "calc(100% - 48px)"
79
+ width: 'calc(100% - 48px)'
80
80
  }
81
81
  },
82
82
  "& .primaryBtn": {
@@ -104,6 +104,12 @@ const ImageSelectorStyles = theme => ({
104
104
  marginRight: "8px !important"
105
105
  },
106
106
  "& .MuiGrid-root": {
107
+ "&::-webkit-scrollbar-thumb": {
108
+ background: `none !important`
109
+ },
110
+ "&::-webkit-scrollbar-track": {
111
+ visibility: "hidden"
112
+ },
107
113
  "&::-webkit-scrollbar-thumb": {
108
114
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
109
115
  },
@@ -112,10 +118,10 @@ const ImageSelectorStyles = theme => ({
112
118
  }
113
119
  },
114
120
  "& .MuiImageList-root": {
115
- margin: "0px"
121
+ margin: '0px'
116
122
  },
117
123
  "& .MuiDialogContent-root": {
118
- padding: "20px 24px 5px 24px"
124
+ padding: '20px 24px 5px 24px'
119
125
  }
120
126
  },
121
127
  titleTypo: {
@@ -175,8 +175,7 @@ export const ScrollTopBottom = props => {
175
175
  const {
176
176
  value,
177
177
  onChange,
178
- translation,
179
- classes
178
+ translation
180
179
  } = props;
181
180
  return /*#__PURE__*/_jsx(Select, {
182
181
  options: scrollToOptions,
@@ -184,10 +183,7 @@ export const ScrollTopBottom = props => {
184
183
  onChange: e => onChange(e.target.value),
185
184
  label: translation("Choose Top/Bottom of page"),
186
185
  showDefault: true,
187
- translation: translation,
188
- MenuProps: {
189
- sx: classes.customSelect
190
- }
186
+ translation: translation
191
187
  });
192
188
  };
193
189
  const filter = createFilterOptions();
@@ -9,7 +9,6 @@ import usePopupStyle from "./Styles";
9
9
  import { useEditorContext } from "../../hooks/useMouseMove";
10
10
  import { checkTypings } from "../../hooks/useMentions";
11
11
  import canOpen from "../../helper/canOpen";
12
- import { getListType } from "../../utils/SlateUtilityFunctions";
13
12
  import { jsx as _jsx } from "react/jsx-runtime";
14
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
15
14
  const POPUP_LIST_TYPES = {
@@ -65,14 +64,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
65
64
  }, [editor?.selection]);
66
65
  useEffect(() => {
67
66
  try {
68
- let onNodeType = canOpen(editor);
69
- if (onNodeType === "accordion") {
70
- const isAccordion = getListType(editor) === "accordion-summary";
71
- if (isAccordion) {
72
- // if cursor at accordion-summary
73
- onNodeType = "accordion-summary";
74
- }
75
- }
67
+ const onNodeType = canOpen(editor);
76
68
  if (target && chars.length > 0 && onNodeType !== false) {
77
69
  const domRange = ReactEditor.toDOMRange(editor, target);
78
70
  const rect = domRange?.getBoundingClientRect();
@@ -68,8 +68,7 @@ const Settings = props => {
68
68
  editor: editor,
69
69
  path: path,
70
70
  customProps: customProps,
71
- theme: theme,
72
- onClose: onClose
71
+ theme: theme
73
72
  }) : null
74
73
  })]
75
74
  })
@@ -8,8 +8,7 @@ const AppHeaderSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const AppHeaderSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const BoxSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path];
@@ -28,7 +27,7 @@ const BoxSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -8,8 +8,7 @@ const ButtonSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -29,7 +28,7 @@ const ButtonSettings = props => {
29
28
  });
30
29
  };
31
30
  const handleClose = () => {
32
- onClose();
31
+ console.log("close");
33
32
  };
34
33
  return /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
@@ -8,8 +8,7 @@ const CodeSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -28,7 +27,7 @@ const CodeSettings = props => {
28
27
  });
29
28
  };
30
29
  const handleClose = () => {
31
- onClose();
30
+ console.log("close");
32
31
  };
33
32
  return /*#__PURE__*/_jsx(Box, {
34
33
  component: "div",
@@ -12,8 +12,7 @@ const FormSettings = props => {
12
12
  const {
13
13
  editor,
14
14
  path,
15
- customProps,
16
- onClose
15
+ customProps
17
16
  } = props;
18
17
  const item_path = path?.split("|").map(m => parseInt(m));
19
18
  const element_path = [...item_path];
@@ -57,14 +56,13 @@ const FormSettings = props => {
57
56
  }
58
57
  };
59
58
  const handleClose = () => {
60
- onClose();
59
+ console.log("close");
61
60
  };
62
61
  const muiTheme = createTheme({
63
62
  components: {
64
63
  MuiAccordion: {
65
64
  styleOverrides: {
66
65
  root: {
67
- background: theme?.palette?.editor?.miniToolBarBackground,
68
66
  "& .MuiAccordionSummary-root": {
69
67
  flexDirection: "row-reverse",
70
68
  "& .MuiSvgIcon-root": {
@@ -8,30 +8,17 @@ const ImageSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
16
15
  const element = Node.get(editor, element_path);
17
16
  const onChange = data => {
18
- let updated_props = {};
19
- if (data?.url?.embedURL) {
20
- updated_props = {
21
- url: data?.url?.embedURL
22
- };
23
- } else if (data?.url?.file) {
24
- updated_props = {
25
- fromFreeGrid: true,
26
- isUpload: true,
27
- file: data?.url?.file,
28
- url: ""
29
- };
30
- } else {
31
- updated_props = {
32
- ...data
33
- };
34
- }
17
+ const updated_props = {
18
+ ...element,
19
+ ...data,
20
+ field_type: data?.element
21
+ };
35
22
  delete updated_props.children;
36
23
  Transforms.setNodes(editor, {
37
24
  ...updated_props
@@ -40,7 +27,7 @@ const ImageSettings = props => {
40
27
  });
41
28
  };
42
29
  const handleClose = () => {
43
- onClose();
30
+ console.log("close");
44
31
  };
45
32
  return /*#__PURE__*/_jsx(Box, {
46
33
  component: "div",
@@ -9,8 +9,7 @@ const TableSettings = props => {
9
9
  const {
10
10
  editor,
11
11
  path,
12
- customProps,
13
- onClose
12
+ customProps
14
13
  } = props;
15
14
  const item_path = path?.split("|").map(m => parseInt(m));
16
15
  const element_path = [...item_path, 0];
@@ -58,7 +57,7 @@ const TableSettings = props => {
58
57
  }
59
58
  };
60
59
  const handleClose = () => {
61
- onClose();
60
+ console.log("close");
62
61
  };
63
62
  return /*#__PURE__*/_jsx(Box, {
64
63
  component: "div",
@@ -3,23 +3,17 @@ import { Editor, Transforms } from "slate";
3
3
  import TextFormat from "../../../../Toolbar/PopupTool/TextFormat";
4
4
  import usePopupStyle from "../../../../Toolbar/PopupTool/PopupToolStyle";
5
5
  import { ReactEditor } from "slate-react";
6
- import { getListType } from "../../../../utils/SlateUtilityFunctions";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  const TextSettings = props => {
9
8
  const {
10
9
  editor,
11
10
  path,
12
11
  theme,
13
- onClose,
14
12
  customProps
15
13
  } = props;
16
14
  const item_path = path.split("|").map(m => parseInt(m));
17
15
  const element_path = [...item_path, 0];
18
16
  const classes = usePopupStyle(theme);
19
- const listType = getListType(editor);
20
- const commonProps = {
21
- listType
22
- };
23
17
  useEffect(() => {
24
18
  try {
25
19
  ReactEditor.focus(editor);
@@ -33,9 +27,7 @@ const TextSettings = props => {
33
27
  return /*#__PURE__*/_jsx(TextFormat, {
34
28
  classes: classes,
35
29
  editor: editor,
36
- customProps: customProps,
37
- closeMainPopup: onClose,
38
- commonProps: commonProps
30
+ customProps: customProps
39
31
  });
40
32
  };
41
33
  export default TextSettings;
@@ -8,31 +8,18 @@ const VideoSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
16
15
  const element = Node.get(editor, element_path);
17
16
  const styleMaps = embedVideoStyle?.filter(f => !f?.hideOnFGS);
18
17
  const onChange = data => {
19
- let updated_props = {};
20
- if (data?.url?.embedURL) {
21
- updated_props = {
22
- url: data?.url?.embedURL
23
- };
24
- } else if (data?.url?.file) {
25
- updated_props = {
26
- isUpload: true,
27
- fromFreeGrid: true,
28
- file: data?.url?.file,
29
- url: ""
30
- };
31
- } else {
32
- updated_props = {
33
- ...data
34
- };
35
- }
18
+ const updated_props = {
19
+ ...element,
20
+ ...data,
21
+ field_type: data?.element
22
+ };
36
23
  delete updated_props.children;
37
24
  Transforms.setNodes(editor, {
38
25
  ...updated_props
@@ -41,7 +28,7 @@ const VideoSettings = props => {
41
28
  });
42
29
  };
43
30
  const handleClose = () => {
44
- onClose();
31
+ console.log("close");
45
32
  };
46
33
  return /*#__PURE__*/_jsx(Box, {
47
34
  component: "div",
@@ -45,7 +45,7 @@ const useGuideLineStyle = ({
45
45
  position: "absolute",
46
46
  width: "calc(50% - 162px)",
47
47
  height: "calc(100% - 2px)",
48
- backgroundColor: "rgba(255,255,255,0)",
48
+ backgroundColor: "rgba(255,255,255,1)",
49
49
  pointerEvents: "none",
50
50
  top: 2,
51
51
  "&.w_left": {
@@ -3,29 +3,20 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
3
3
  import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
4
4
  import useSwitchViewport from "./styles";
5
5
  import { useEffect } from "react";
6
- import { useEditorContext } from "../../../hooks/useMouseMove";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
8
  const SwitchViewport = props => {
10
9
  const {
11
10
  breakpoint,
12
11
  onChange,
13
- translation,
14
- show
12
+ translation
15
13
  } = props;
16
14
  const classes = useSwitchViewport();
17
- const {
18
- setSelectedElement
19
- } = useEditorContext();
20
15
  useEffect(() => {
21
- // to reset selection on viewport changes - FS-6589
22
- setSelectedElement({});
16
+ console.log(breakpoint);
23
17
  }, [breakpoint]);
24
18
  return /*#__PURE__*/_jsxs(Box, {
25
19
  sx: classes.root,
26
- style: {
27
- display: show ? "block" : "none"
28
- },
29
20
  children: [/*#__PURE__*/_jsx(Tooltip, {
30
21
  title: translation("Desktop View"),
31
22
  children: /*#__PURE__*/_jsx(IconButton, {
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- import { useTheme, createTheme, useMediaQuery } from "@mui/material";
2
+ import { useTheme, ThemeProvider, createTheme, useMediaQuery } from "@mui/material";
3
3
  import { isStimulator, STIMULATOR_MOCK } from "../../../hooks/useBreakpoints";
4
- import MainThemeProvider from "./MainThemeProvider";
5
4
 
6
5
  // Custom breakpoints functions
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -60,15 +59,13 @@ const extendedTheme = (prevTheme, isPrintMode) => createTheme({
60
59
  } : getBreakPoints(prevTheme)
61
60
  });
62
61
  const ViewportStimulator = ({
63
- children,
64
- selectedTheme
62
+ children
65
63
  }) => {
66
64
  const theme = useTheme();
67
65
  const isPrintMode = useMediaQuery("print");
68
66
  const viewportTheme = extendedTheme(theme, isPrintMode);
69
- return /*#__PURE__*/_jsx(MainThemeProvider, {
67
+ return /*#__PURE__*/_jsx(ThemeProvider, {
70
68
  theme: viewportTheme,
71
- userSelectedTheme: selectedTheme,
72
69
  children: children
73
70
  });
74
71
  };