@flozy/editor 5.1.9 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -108,10 +108,15 @@ const updateAnchorEl = (setAnchorEl, editor, openAI, selectedElement) => {
108
108
  return;
109
109
  }
110
110
  const selection = window.getSelection();
111
- if (openAI === "fromToolBar" && selection.anchorOffset !== selection.focusOffset) {
112
- // to fix some issue in Drag n Drop
113
- return;
114
- }
111
+
112
+ // if (
113
+ // openAI === "fromToolBar" &&
114
+ // selection.anchorOffset !== selection.focusOffset
115
+ // ) {
116
+ // // to fix some issue in Drag n Drop
117
+ // return;
118
+ // }
119
+
115
120
  if (selection.rangeCount) {
116
121
  let caret;
117
122
  if (getSelectedText(editor)) {
@@ -115,7 +115,7 @@ const Styles = theme => ({
115
115
  overflow: "auto",
116
116
  // width: "240px",
117
117
  minWidth: "200px",
118
- border: "1px solid #E0E0E0",
118
+ border: `1px solid${theme?.palette?.editor?.popUpBorderColor}`,
119
119
  padding: "6px"
120
120
  },
121
121
  optionWrapper: {
@@ -142,22 +142,28 @@ const Styles = theme => ({
142
142
  gap: "8px"
143
143
  },
144
144
  "&:hover": {
145
- backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
145
+ backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
146
+ "& svg path": {
147
+ stroke: `${theme?.palette?.editor?.textColor} !important`
148
+ },
149
+ "& svg": {
150
+ color: `${theme?.palette?.editor?.textColor} !important`
151
+ }
146
152
  },
147
153
  "& svg path": {
148
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`
154
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
149
155
  },
150
156
  "& svg": {
151
- color: `${theme?.palette?.editor?.menuOptionTextColor} !important`
157
+ color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
152
158
  },
153
159
  "&.active": {
154
160
  background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`,
155
- color: "#2563EB",
161
+ color: theme?.palette?.editor?.menuOptionsSelectedTextColor,
156
162
  "& svg path": {
157
- stroke: "#2563EB"
163
+ stroke: theme?.palette?.editor?.menuOptionsSelectedTextColor
158
164
  },
159
165
  "& svg": {
160
- color: "#2563EB !important"
166
+ color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
161
167
  }
162
168
  }
163
169
  },
@@ -66,7 +66,7 @@ const ImageContent = props => {
66
66
  path,
67
67
  theme
68
68
  } = props;
69
- return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
69
+ return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
70
70
  component: "button",
71
71
  className: "element-empty-btn",
72
72
  contentEditable: false,
@@ -76,6 +76,18 @@ const ImageContent = props => {
76
76
  children: [/*#__PURE__*/_jsx(Icon, {
77
77
  icon: "image"
78
78
  }), "Add Image"]
79
+ }) : /*#__PURE__*/_jsxs(Box, {
80
+ sx: {
81
+ color: "#64748B !important",
82
+ "& svg": {
83
+ color: "#64748B"
84
+ }
85
+ },
86
+ component: "button",
87
+ className: "element-empty-btn",
88
+ children: [/*#__PURE__*/_jsx(Icon, {
89
+ icon: "shieldNoAccess"
90
+ }), "The Content is no longer available."]
79
91
  }) : /*#__PURE__*/_jsx(Box, {
80
92
  component: "img",
81
93
  className: "emb-img",
@@ -70,13 +70,25 @@ const VideoPlaceholder = props => {
70
70
  readOnly,
71
71
  onSettings
72
72
  } = props;
73
- return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
73
+ return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
74
74
  component: "button",
75
75
  className: "element-empty-btn",
76
76
  onClick: onSettings,
77
77
  children: [/*#__PURE__*/_jsx(Icon, {
78
78
  icon: "video"
79
79
  }), "Embed Video or Other"]
80
+ }) : /*#__PURE__*/_jsxs(Box, {
81
+ sx: {
82
+ color: "#64748B !important",
83
+ "& svg": {
84
+ color: "#64748B"
85
+ }
86
+ },
87
+ component: "button",
88
+ className: "element-empty-btn",
89
+ children: [/*#__PURE__*/_jsx(Icon, {
90
+ icon: "shieldNoAccess"
91
+ }), "The Content is no longer available."]
80
92
  }) : /*#__PURE__*/_jsx(VideoContent, {
81
93
  ...props
82
94
  });
@@ -42,6 +42,7 @@ function DragButton({
42
42
  const dragProps = {
43
43
  ...dndProps,
44
44
  id: dndProps?.id + dragType,
45
+ disabled: isMobile,
45
46
  data: {
46
47
  ...dndProps.data,
47
48
  dragType
@@ -106,7 +106,8 @@ const Table = props => {
106
106
  } = props;
107
107
  const classes = TableStyles(editorTheme);
108
108
  const {
109
- readOnly
109
+ readOnly,
110
+ isMobile
110
111
  } = customProps;
111
112
  const [openSetttings, setOpenSettings] = useState(false);
112
113
  const [exandTools, setExpandTools] = useState(null);
@@ -219,10 +220,14 @@ const Table = props => {
219
220
  handleRowDragBtns();
220
221
  };
221
222
  const onMouseOver = () => {
222
- containerRef?.current?.classList.remove("hideScroll");
223
+ if (!isMobile) {
224
+ containerRef?.current?.classList.remove("hideScroll");
225
+ }
223
226
  };
224
227
  const onMouseLeave = () => {
225
- containerRef?.current?.classList.add("hideScroll");
228
+ if (!isMobile) {
229
+ containerRef?.current?.classList.add("hideScroll");
230
+ }
226
231
  };
227
232
  const commonAddBtnProps = {
228
233
  tableRef,
@@ -401,6 +401,7 @@ const TableCell = props => {
401
401
  color: entireTextColor || "inherit",
402
402
  cursor: "text",
403
403
  verticalAlign: "top",
404
+ padding: "0px",
404
405
  ...(sizeProps || {})
405
406
  },
406
407
  ...tbProps,
@@ -415,7 +416,8 @@ const TableCell = props => {
415
416
  tableDOM: tableDOM
416
417
  }) : null, /*#__PURE__*/_jsx("div", {
417
418
  style: {
418
- overflow: "auto hidden"
419
+ overflow: "auto hidden",
420
+ padding: "8px"
419
421
  },
420
422
  children: children
421
423
  }), isHeader && !readOnly && tableSize?.height && !showTool ? /*#__PURE__*/_jsx(Resizer, {
@@ -12,6 +12,7 @@ import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
12
12
  import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
13
13
  import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
14
14
  import GridOnIcon from "@mui/icons-material/GridOn";
15
+ import GppBadOutlinedIcon from "@mui/icons-material/GppBadOutlined";
15
16
  import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, H1, H2, H3, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon, CalendlyIcon, LeftAlignTextFormat, CenterAlignTextFormat, RightAlignTextFormat, JustifyTextFormat, FreeGridElement, AppHeaderElement, CodeElementIcon } from "./iconListV2";
16
17
  import MoreVertRoundedIcon from "@mui/icons-material/MoreVertRounded";
17
18
  import SettingsIcon from "../assets/svg/SettingsIcon";
@@ -280,7 +281,8 @@ const iconList = {
280
281
  deleteIcon: /*#__PURE__*/_jsx(DeleteIcon, {}),
281
282
  brain: /*#__PURE__*/_jsx(BrainIcon, {}),
282
283
  docsIcon: /*#__PURE__*/_jsx(DocsIcon, {}),
283
- userIcon: /*#__PURE__*/_jsx(UserIcon, {})
284
+ userIcon: /*#__PURE__*/_jsx(UserIcon, {}),
285
+ shieldNoAccess: /*#__PURE__*/_jsx(GppBadOutlinedIcon, {})
284
286
  };
285
287
  export const icons = {
286
288
  ...iconList
@@ -141,7 +141,11 @@ const VirtualElement = props => {
141
141
  sx: classes.root,
142
142
  dangerouslySetInnerHTML: {
143
143
  __html: getItems()
144
- }
144
+ },
145
+ style: {
146
+ visibility: "hidden"
147
+ },
148
+ "aria-hidden": "true"
145
149
  });
146
150
  };
147
151
  export default VirtualElement;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.1.9",
3
+ "version": "5.2.0",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"