@flozy/editor 1.8.7 → 1.8.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ const Attachments = props => {
18
18
  date
19
19
  } = element;
20
20
  const getLastName = url?.split("/").pop();
21
- const fileName = `${decodeURI(getLastName)}`;
21
+ const fileName = `${decodeURIComponent(getLastName)}`;
22
22
  return /*#__PURE__*/_jsxs(Box, {
23
23
  component: "div",
24
24
  className: "attachment-wrpr-ev2",
@@ -97,6 +97,7 @@ const editorStyles = ({
97
97
  justifyContent: "center",
98
98
  alignItems: "center",
99
99
  position: "relative",
100
+ padding: "0px 12px",
100
101
  "&:hover": {
101
102
  "& .ed-section-inner": {
102
103
  "& .element-toolbar.ss": {
@@ -14,7 +14,7 @@ const AddElements = props => {
14
14
  const {
15
15
  hideTools
16
16
  } = customProps;
17
- const filteredElements = elements.filter(f => hideTools.indexOf(f.type) === -1);
17
+ const filteredElements = elements.filter(f => (hideTools || []).indexOf(f.type) === -1);
18
18
  return /*#__PURE__*/_jsx(Grid, {
19
19
  container: true,
20
20
  sx: classes.textFormatWrapper,
@@ -14,6 +14,11 @@ const SectionStyle = () => ({
14
14
  "& .dh-para": {
15
15
  opacity: 1
16
16
  }
17
+ },
18
+ "& .element-toolbar": {
19
+ "&:hover": {
20
+ display: "block"
21
+ }
17
22
  }
18
23
  }
19
24
  });
@@ -58,7 +63,7 @@ const Section = props => {
58
63
  className: "element-toolbar no-border-button ss hr section-tw",
59
64
  style: {
60
65
  left: "-28px",
61
- top: "2px"
66
+ top: "0px"
62
67
  },
63
68
  children: /*#__PURE__*/_jsx(Tooltip, {
64
69
  title: "Section Settings",
@@ -206,7 +206,7 @@ const elements = props => {
206
206
  search,
207
207
  hideTools
208
208
  } = props;
209
- const filteredElements = ELEMENTS_LIST.filter(f => hideTools.indexOf(f.type) === -1);
209
+ const filteredElements = ELEMENTS_LIST.filter(f => (hideTools || []).indexOf(f.type) === -1);
210
210
  return filteredElements.filter(c => c.name.toLowerCase().includes(search?.toLowerCase()));
211
211
  };
212
212
  export default elements;
@@ -17,14 +17,14 @@ const StyleContent = props => {
17
17
  } = props;
18
18
  const {
19
19
  hideTools
20
- } = customProps;
20
+ } = customProps || {};
21
21
  const tabContent = renderTabs.find(f => f.value === value);
22
22
  const {
23
23
  fields
24
24
  } = tabContent || {
25
25
  fields: []
26
26
  };
27
- const filteredFields = hideTools?.length > 0 ? fields.filter(f => hideTools.indexOf(f.key) === -1) : fields;
27
+ const filteredFields = (hideTools || [])?.length > 0 ? fields.filter(f => (hideTools || []).indexOf(f.key) === -1) : fields;
28
28
  return /*#__PURE__*/_jsx(Grid, {
29
29
  container: true,
30
30
  spacing: 2,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.8.7",
3
+ "version": "1.8.8",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"