@flozy/editor 4.3.6 → 4.3.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -609,10 +609,14 @@ blockquote {
609
609
  left: 0;
610
610
  right: 0;
611
611
  bottom: 0;
612
- top: 0;
612
+ top: auto;
613
613
  width: fit-content;
614
614
  height: fit-content;
615
- margin: auto;
615
+ margin-left: auto;
616
+ margin-right: auto;
617
+ background: #000000b6;
618
+ padding: 6px 10px 2px 10px;
619
+ border-radius: 8px 8px 0 0;
616
620
  }
617
621
 
618
622
  .embed-code .element-toolbar {
@@ -22,7 +22,8 @@ const EditorButton = props => {
22
22
  } = props;
23
23
  const {
24
24
  readOnly,
25
- metadata
25
+ metadata,
26
+ isMobile
26
27
  } = customProps;
27
28
  const editor = useSlateStatic();
28
29
  const path = ReactEditor.findPath(editor, element);
@@ -66,6 +67,9 @@ const EditorButton = props => {
66
67
  const BtnIcon = buttonIcon ? buttonIcon : null;
67
68
  windowVar.lastButtonProps = element;
68
69
  const handleTrigger = async () => {
70
+ if (!readOnly) {
71
+ return;
72
+ }
69
73
  if (metadata?.buttonLink?.handler) {
70
74
  const response = isTrigger ? linkType : "click";
71
75
  metadata.buttonLink.handler(response);
@@ -265,21 +269,21 @@ const EditorButton = props => {
265
269
  paddingRight: "4px"
266
270
  },
267
271
  props: customProps
268
- }), !readOnly && /*#__PURE__*/_jsx(IconButton, {
269
- className: `moreBtnShow ${openMoreOptions && "activeBtnShow"}`,
270
- sx: {
271
- position: "absolute",
272
- right: '-42px',
273
- stroke: '#fff',
274
- "& path": {
275
- fill: openMoreOptions ? theme.palette.text.blueText : ""
276
- }
277
- },
278
- onClick: handleMoreBtn,
279
- children: /*#__PURE__*/_jsx(Icon, {
280
- icon: "moreVertical"
281
- })
282
272
  })]
273
+ }), !readOnly && /*#__PURE__*/_jsx(IconButton, {
274
+ className: `moreBtnShow ${isMobile || openMoreOptions ? "activeBtnShow" : ""}`,
275
+ sx: {
276
+ position: "absolute",
277
+ right: "-42px",
278
+ stroke: "#fff",
279
+ "& path": {
280
+ fill: openMoreOptions ? theme.palette.text.blueText : ""
281
+ }
282
+ },
283
+ onClick: handleMoreBtn,
284
+ children: /*#__PURE__*/_jsx(Icon, {
285
+ icon: "moreVertical"
286
+ })
283
287
  }), !readOnly && isTrigger ? /*#__PURE__*/_jsx(IconButton, {
284
288
  className: "workflow-icon-btn",
285
289
  children: /*#__PURE__*/_jsx(WorkflowIcon, {})
@@ -31,6 +31,14 @@ const VariableButton = props => {
31
31
  style: {
32
32
  maxHeight: 300,
33
33
  overflowY: "auto"
34
+ },
35
+ sx: {
36
+ "&::-webkit-scrollbar-track": {
37
+ display: "none"
38
+ },
39
+ "&::-webkit-scrollbar-thumb": {
40
+ borderRadius: "16px"
41
+ }
34
42
  }
35
43
  }
36
44
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.3.6",
3
+ "version": "4.3.8",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"