@flozy/editor 4.7.9 → 4.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (27) hide show
  1. package/dist/Editor/CommonEditor.js +2 -1
  2. package/dist/Editor/Editor.css +13 -0
  3. package/dist/Editor/Elements/AppHeader/AppHeader.js +12 -5
  4. package/dist/Editor/Elements/Emoji/EmojiPicker.js +4 -2
  5. package/dist/Editor/Elements/Form/Form.js +38 -2
  6. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  7. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  8. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  9. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  10. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  11. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  12. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  13. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  14. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  15. package/dist/Editor/Elements/Grid/GridItem.js +7 -2
  16. package/dist/Editor/Elements/Link/Link.js +0 -2
  17. package/dist/Editor/common/FontLoader/FontLoader.js +2 -1
  18. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +144 -12
  19. package/dist/Editor/common/RnD/index.js +2 -6
  20. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
  21. package/dist/Editor/common/StyleBuilder/formStyle.js +206 -119
  22. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +5 -0
  23. package/dist/Editor/common/StyleBuilder/index.js +123 -10
  24. package/dist/Editor/utils/font.js +11 -4
  25. package/dist/Editor/utils/formfield.js +8 -4
  26. package/dist/Editor/utils/helper.js +1 -1
  27. package/package.json +1 -1
@@ -314,7 +314,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
314
314
  site_id: site_id,
315
315
  page_title: page_title,
316
316
  isIframe: isIframe,
317
- onDrawerOpen: onDrawerOpen
317
+ onDrawerOpen: onDrawerOpen,
318
+ ICON_API: "https://assets.agenciflow.com"
318
319
  };
319
320
  const renderElement = useCallback(props => {
320
321
  return /*#__PURE__*/_jsx(Element, {
@@ -1220,4 +1220,17 @@ blockquote {
1220
1220
 
1221
1221
  .dividerComponent:hover .divider-settings {
1222
1222
  display: block;
1223
+ }
1224
+
1225
+ @media (max-width: 899px) {
1226
+ .MuiPopover-root {
1227
+ z-index: 1302 !important;
1228
+ }
1229
+ }
1230
+
1231
+ .settingsHeader {
1232
+ font-size: 14px !important;
1233
+ font-weight: 600 !important;
1234
+ font-family: Inter, sans-serif;
1235
+ text-transform: uppercase;
1223
1236
  }
@@ -129,7 +129,6 @@ function AppHeader(props) {
129
129
  }
130
130
  };
131
131
  const drawer = /*#__PURE__*/_jsxs(Box, {
132
- onClick: handleDrawerToggle,
133
132
  sx: {
134
133
  textAlign: "center"
135
134
  },
@@ -139,6 +138,7 @@ function AppHeader(props) {
139
138
  my: 2,
140
139
  color: textColor
141
140
  },
141
+ onClick: closeDrawer,
142
142
  children: appLogo && appLogo !== "none" ? /*#__PURE__*/_jsx("img", {
143
143
  alt: `${appTitle} Logo`,
144
144
  style: {
@@ -150,16 +150,20 @@ function AppHeader(props) {
150
150
  }), /*#__PURE__*/_jsx(Divider, {}), /*#__PURE__*/_jsx(List, {
151
151
  children: menus.map((item, i) => {
152
152
  const buttonProps = handleLinkType(item.url, item.linkType, true, item.target === "_blank");
153
+ const onButtonClick = e => {
154
+ closeDrawer();
155
+ setTimeout(() => {
156
+ buttonProps?.onClick(e);
157
+ }, 200);
158
+ };
153
159
  const onTouchEnd = e => {
154
160
  if (buttonProps?.onTouchEnd) {
155
- buttonProps?.onTouchEnd(e);
156
- closeDrawer();
161
+ onButtonClick(e);
157
162
  }
158
163
  };
159
164
  const onClick = e => {
160
165
  if (buttonProps?.onClick) {
161
- buttonProps?.onClick(e);
162
- closeDrawer();
166
+ onButtonClick(e);
163
167
  }
164
168
  };
165
169
  const props = {
@@ -171,6 +175,9 @@ function AppHeader(props) {
171
175
  disablePadding: true,
172
176
  children: /*#__PURE__*/_jsx(ListItemButton, {
173
177
  ...props,
178
+ component: "button",
179
+ href: "" // to avoid <a> tag
180
+ ,
174
181
  sx: {
175
182
  textAlign: "center"
176
183
  },
@@ -6,14 +6,16 @@ const EmojiPicker = props => {
6
6
  const {
7
7
  onEmojiSelect,
8
8
  onClose,
9
- theme = 'light'
9
+ theme = 'light',
10
+ ...rest
10
11
  } = props;
11
12
  return /*#__PURE__*/_jsx(_Fragment, {
12
13
  children: /*#__PURE__*/_jsx(Picker, {
13
14
  data: data,
14
15
  onEmojiSelect: onEmojiSelect,
15
16
  onClickOutside: onClose,
16
- theme: theme
17
+ theme: theme,
18
+ ...rest
17
19
  })
18
20
  });
19
21
  };
@@ -1,5 +1,6 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
2
  import { Transforms } from "slate";
3
+ import { Node } from "slate";
3
4
  import { useSlateStatic, ReactEditor } from "slate-react";
4
5
  import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
5
6
  import DeleteIcon from "@mui/icons-material/Delete";
@@ -48,7 +49,15 @@ const Form = props => {
48
49
  textSize,
49
50
  fontFamily,
50
51
  textAlign,
51
- alignment
52
+ alignment,
53
+ fieldFontFamily,
54
+ fieldFontWeight,
55
+ fieldTextSize,
56
+ fieldTextColor,
57
+ fieldBgColor,
58
+ fieldBorderColor,
59
+ fieldBorderWidth,
60
+ fieldBorderStyle
52
61
  } = element;
53
62
  const btnR = buttonProps?.borderRadius || {};
54
63
  const btnSpacing = buttonProps?.bannerSpacing || {};
@@ -190,6 +199,24 @@ const Form = props => {
190
199
  }, {
191
200
  at: path
192
201
  });
202
+ // adding form field style to the current form node
203
+ const currentNode = Node.get(editor, path);
204
+ if (currentNode) {
205
+ currentNode.children.forEach((item, index) => {
206
+ Transforms.setNodes(editor, {
207
+ bgColor: data?.fieldBgColor ? data?.fieldBgColor : "rgba(255, 255, 255, 1)",
208
+ borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : "#ccc",
209
+ borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : "",
210
+ borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : "",
211
+ textColor: data?.fieldTextColor ? data?.fieldTextColor : "",
212
+ fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : "",
213
+ textSize: data?.fieldTextSize ? data?.fieldTextSize : "",
214
+ fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : ""
215
+ }, {
216
+ at: [...path, index]
217
+ });
218
+ });
219
+ }
193
220
  onClose();
194
221
  };
195
222
  const onClose = () => {
@@ -198,7 +225,16 @@ const Form = props => {
198
225
  const onAddFormField = () => {
199
226
  try {
200
227
  Transforms.insertNodes(editor, {
201
- ...formField()
228
+ ...formField({
229
+ fontFamily: fieldFontFamily,
230
+ fontWeight: fieldFontWeight,
231
+ textSize: fieldTextSize,
232
+ textColor: fieldTextColor,
233
+ bgColor: fieldBgColor,
234
+ borderColor: fieldBorderColor,
235
+ borderWidth: fieldBorderWidth,
236
+ borderStyle: fieldBorderStyle
237
+ })
202
238
  }, {
203
239
  at: [...path, children.length]
204
240
  });
@@ -16,6 +16,9 @@ const FormCheckbox = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -46,7 +49,10 @@ const FormCheckbox = props => {
46
49
  },
47
50
  borderStyle: borderStyle || "solid",
48
51
  color: textColor || "#000",
49
- background: bgColor || "transparent"
52
+ background: bgColor || "transparent",
53
+ fontFamily: fontFamily || "PoppinsRegular",
54
+ fontSize: textSize || "inherit",
55
+ fontWeight: `${fontWeight} !important` || "400 !important"
50
56
  }
51
57
  })
52
58
  });
@@ -16,6 +16,9 @@ const FormDate = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -47,7 +50,10 @@ const FormDate = props => {
47
50
  borderStyle: borderStyle || "solid",
48
51
  color: textColor || "#000",
49
52
  background: bgColor || "transparent",
50
- paddingRight: '85px !important'
53
+ paddingRight: '85px !important',
54
+ fontFamily: fontFamily || "PoppinsRegular",
55
+ fontSize: textSize || "inherit",
56
+ fontWeight: `${fontWeight} !important` || "400 !important"
51
57
  }
52
58
  })
53
59
  });
@@ -16,6 +16,9 @@ const FormEmail = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -47,7 +50,10 @@ const FormEmail = props => {
47
50
  },
48
51
  borderStyle: borderStyle || "solid",
49
52
  color: textColor || "#000",
50
- background: bgColor || "transparent"
53
+ background: bgColor || "transparent",
54
+ fontFamily: fontFamily || "PoppinsRegular",
55
+ fontSize: textSize || "inherit",
56
+ fontWeight: `${fontWeight} !important` || "400 !important"
51
57
  }
52
58
  })
53
59
  });
@@ -16,6 +16,9 @@ const FormNumbers = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -63,7 +66,10 @@ const FormNumbers = props => {
63
66
  },
64
67
  borderStyle: borderStyle || "solid",
65
68
  color: textColor || "#000",
66
- background: bgColor || "transparent"
69
+ background: bgColor || "transparent",
70
+ fontFamily: fontFamily || "PoppinsRegular",
71
+ fontSize: textSize || "inherit",
72
+ fontWeight: `${fontWeight} !important` || "400 !important"
67
73
  }
68
74
  })
69
75
  });
@@ -16,6 +16,9 @@ const FormRadioButton = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -46,7 +49,10 @@ const FormRadioButton = props => {
46
49
  },
47
50
  borderStyle: borderStyle || "solid",
48
51
  color: textColor || "#000",
49
- background: bgColor || "transparent"
52
+ background: bgColor || "transparent",
53
+ fontFamily: fontFamily || "PoppinsRegular",
54
+ fontSize: textSize || "inherit",
55
+ fontWeight: `${fontWeight} !important` || "400 !important"
50
56
  }
51
57
  })
52
58
  });
@@ -16,6 +16,9 @@ const FormText = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
+ textSize,
20
+ fontFamily,
21
+ fontWeight,
19
22
  ...rest
20
23
  } = fieldProps;
21
24
  const onChange = e => {
@@ -45,7 +48,10 @@ const FormText = props => {
45
48
  },
46
49
  borderStyle: borderStyle || "solid",
47
50
  color: textColor || "#000",
48
- background: bgColor || "transparent"
51
+ background: bgColor || "transparent",
52
+ fontSize: textSize || "inherit",
53
+ fontFamily: fontFamily || "PoppinsRegular",
54
+ fontWeight: `${fontWeight} !important` || "400 !important"
49
55
  }
50
56
  })
51
57
  });
@@ -15,6 +15,9 @@ const FormTextArea = props => {
15
15
  borderColor,
16
16
  textColor,
17
17
  bgColor,
18
+ textSize,
19
+ fontFamily,
20
+ fontWeight,
18
21
  ...rest
19
22
  } = fieldProps;
20
23
  const onChange = e => {
@@ -45,7 +48,9 @@ const FormTextArea = props => {
45
48
  borderStyle: borderStyle || "solid",
46
49
  color: `${textColor || "#000"} !important`,
47
50
  background: `${bgColor || "transparent"} !important`,
48
- fontSize: '14px'
51
+ fontSize: textSize || "14px",
52
+ fontFamily: fontFamily || "PoppinsRegular",
53
+ fontWeight: `${fontWeight} !important` || "400 !important"
49
54
  }
50
55
  })
51
56
  });
@@ -1,7 +1,8 @@
1
1
  import React from "react";
2
2
  import StyleBuilder from "../../common/StyleBuilder";
3
- import formStyle from "../../common/StyleBuilder/formStyle";
3
+ import { formStyle } from "../../common/StyleBuilder/formStyle";
4
4
  import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { Fragment as _Fragment } from "react/jsx-runtime";
5
6
  const FormPopup = props => {
6
7
  const {
7
8
  element,
@@ -9,14 +10,16 @@ const FormPopup = props => {
9
10
  onClose,
10
11
  customProps
11
12
  } = props;
12
- return /*#__PURE__*/_jsx(StyleBuilder, {
13
- title: "Form",
14
- type: "formStyle",
15
- element: element,
16
- onSave: onSave,
17
- onClose: onClose,
18
- renderTabs: formStyle,
19
- customProps: customProps
13
+ return /*#__PURE__*/_jsx(_Fragment, {
14
+ children: /*#__PURE__*/_jsx(StyleBuilder, {
15
+ title: "Form",
16
+ type: "formStyle",
17
+ element: element,
18
+ onSave: onSave,
19
+ onClose: onClose,
20
+ renderTabs: formStyle,
21
+ customProps: customProps
22
+ })
20
23
  });
21
24
  };
22
25
  export default FormPopup;
@@ -144,8 +144,27 @@ const FreeGridItem = props => {
144
144
  };
145
145
  const onAddFormField = () => {
146
146
  try {
147
+ const {
148
+ fieldFontFamily,
149
+ fieldFontWeight,
150
+ fieldTextSize,
151
+ fieldTextColor,
152
+ fieldBgColor,
153
+ fieldBorderColor,
154
+ fieldBorderWidth,
155
+ fieldBorderStyle
156
+ } = element?.children[0];
147
157
  Transforms.insertNodes(editor, {
148
- ...formField()
158
+ ...formField({
159
+ fontFamily: fieldFontFamily ? fieldFontFamily : "",
160
+ fontWeight: fieldFontWeight ? fieldFontWeight : "",
161
+ textSize: fieldTextSize ? fieldTextSize : "",
162
+ textColor: fieldTextColor ? fieldTextColor : "",
163
+ bgColor: fieldBgColor ? fieldBgColor : "",
164
+ borderColor: fieldBorderColor ? fieldBorderColor : "",
165
+ borderWidth: fieldBorderWidth ? fieldBorderWidth : "",
166
+ borderStyle: fieldBorderStyle ? fieldBorderStyle : ""
167
+ })
149
168
  }, {
150
169
  at: [...path, 0, 0]
151
170
  });
@@ -62,7 +62,8 @@ const GridItem = props => {
62
62
  textColor,
63
63
  animation,
64
64
  cellGHeight,
65
- xsHidden
65
+ xsHidden,
66
+ forceFullWidth
66
67
  } = element;
67
68
  const {
68
69
  vertical,
@@ -105,13 +106,17 @@ const GridItem = props => {
105
106
  const getBorderColor = () => {
106
107
  return borderColor || "transparent";
107
108
  };
109
+
110
+ // getting Grid Item Width value
111
+ const gridWidthBreakPointsValue = getBreakPointsValue(grid, null, "overrideGridSize", true);
108
112
  const getBRProps = groupByBreakpoint({
109
113
  display: {
110
114
  xs: xsHidden ? "none" : "inline-block",
111
115
  lg: "inline-block"
112
116
  },
113
117
  width: {
114
- ...getBreakPointsValue(grid, null, "overrideGridSize", true)
118
+ ...getBreakPointsValue(grid, null, "overrideGridSize", true),
119
+ xs: forceFullWidth ? "100%" : gridWidthBreakPointsValue?.xs
115
120
  },
116
121
  height: {
117
122
  ...getBreakPointsValue(cellGHeight || "auto")
@@ -81,7 +81,6 @@ const Link = props => {
81
81
  const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
82
82
  const navType = getLinkType(linkType, urlPath);
83
83
  const hideOpenLink = navType === "page" || !navType;
84
- console.log("linkType", linkType, navType, hideOpenLink);
85
84
  return selected && focused ? /*#__PURE__*/_jsxs("div", {
86
85
  className: "element-toolbar hr",
87
86
  contentEditable: false,
@@ -117,7 +116,6 @@ const Link = props => {
117
116
  }) : null;
118
117
  };
119
118
  const buttonProps = handleLinkType(urlPath, linkType, readOnly, showInNewTab === "_blank");
120
- console.log("buttonProps===>", buttonProps);
121
119
  return /*#__PURE__*/_jsxs("div", {
122
120
  className: "link",
123
121
  children: [/*#__PURE__*/_jsx(Box, {
@@ -84,7 +84,8 @@ const FontLoader = props => {
84
84
  });
85
85
  let families = Array.from(fontSet);
86
86
  families = correctFontArray(families.join(", "));
87
- families = families.map(font => font.replace(/\"/g, ""));
87
+ families = families?.map(font => font?.replace(/\"/g, ""));
88
+ families = families?.map(font => font?.replace(", sans-serif", "")); //This is temporary fix for patch
88
89
  loadFontsInBatches(families);
89
90
  }
90
91
  }, []);
@@ -1,10 +1,12 @@
1
1
  import React from "react";
2
2
  import { Transforms, Node } from "slate";
3
- import { Box } from "@mui/material";
3
+ import { Accordion, AccordionDetails, AccordionSummary, Box, createTheme, ThemeProvider, Typography } from "@mui/material";
4
4
  import { StyleContent } from "../../../StyleBuilder";
5
- import formStyle from "../../../StyleBuilder/formStyle";
5
+ import { formStyle } from "../../../StyleBuilder/formStyle";
6
6
  import { ReactEditor } from "slate-react";
7
+ import { ExpandMoreOutlined } from "@mui/icons-material";
7
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
10
  const FormSettings = props => {
9
11
  const {
10
12
  editor,
@@ -14,7 +16,10 @@ const FormSettings = props => {
14
16
  const item_path = path?.split("|").map(m => parseInt(m));
15
17
  const element_path = [...item_path];
16
18
  const element = Node.get(editor, element_path);
17
- const styleMaps = formStyle?.filter(f => !f?.hideOnFGS);
19
+ const styleMaps = formStyle;
20
+ const {
21
+ hideTools
22
+ } = customProps || {};
18
23
  const onChange = data => {
19
24
  const currentPath = ReactEditor.findPath(editor, element);
20
25
  const updateData = {
@@ -26,23 +31,150 @@ const FormSettings = props => {
26
31
  }, {
27
32
  at: [...currentPath, 0]
28
33
  });
34
+ // adding form field style to the current form node
35
+ const currentNode = Node.get(editor, element_path);
36
+ if (currentNode) {
37
+ currentNode?.children[0]?.children?.forEach((item, index) => {
38
+ Transforms.setNodes(editor, {
39
+ bgColor: data?.fieldBgColor ? data?.fieldBgColor : item?.bgColor,
40
+ borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : item?.borderColor,
41
+ borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : item?.borderStyle,
42
+ borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : item?.borderWidth,
43
+ textColor: data?.fieldTextColor ? data?.fieldTextColor : item?.textColor,
44
+ fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : item?.fontFamily,
45
+ textSize: data?.fieldTextSize ? data?.fieldTextSize : item?.textSize,
46
+ fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : item?.fontWeight
47
+ }, {
48
+ at: [...currentPath, 0, index]
49
+ });
50
+ });
51
+ }
29
52
  };
30
53
  const handleClose = () => {
31
54
  console.log("close");
32
55
  };
56
+ const muiTheme = createTheme({
57
+ components: {
58
+ MuiAccordion: {
59
+ styleOverrides: {
60
+ root: {
61
+ padding: "0px",
62
+ "&.Mui-expanded": {
63
+ margin: "0"
64
+ }
65
+ }
66
+ },
67
+ defaultProps: {
68
+ elevation: 0
69
+ }
70
+ }
71
+ }
72
+ });
33
73
  return /*#__PURE__*/_jsx(Box, {
34
74
  component: "div",
35
75
  className: "item-w",
36
76
  children: styleMaps?.map((m, i) => {
37
- return /*#__PURE__*/_jsx(StyleContent, {
38
- renderTabs: styleMaps,
39
- value: m.value,
40
- element: element,
41
- customElement: element?.children?.[0] || null,
42
- onChange: onChange,
43
- customProps: customProps,
44
- handleClose: handleClose
45
- }, `tab_${m.value}_$${i}`);
77
+ if (m?.hasChildrenTabs) {
78
+ return /*#__PURE__*/_jsx(ThemeProvider, {
79
+ theme: muiTheme,
80
+ children: /*#__PURE__*/_jsxs(Accordion, {
81
+ defaultExpanded: true,
82
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
83
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
84
+ sx: {
85
+ padding: "0px"
86
+ },
87
+ children: /*#__PURE__*/_jsx(Typography, {
88
+ variant: "h3",
89
+ className: "settingsHeader",
90
+ color: "primary",
91
+ style: {
92
+ fontSize: "14px !important",
93
+ fontWeight: "400"
94
+ },
95
+ children: m?.tab
96
+ })
97
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
98
+ sx: {
99
+ padding: "5px"
100
+ },
101
+ children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
102
+ return /*#__PURE__*/_jsx(ThemeProvider, {
103
+ theme: muiTheme,
104
+ children: /*#__PURE__*/_jsxs(Accordion, {
105
+ defaultExpanded: true,
106
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
107
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
108
+ sx: {
109
+ padding: "0px"
110
+ },
111
+ children: /*#__PURE__*/_jsx(Typography, {
112
+ variant: "h3",
113
+ className: "settingsHeader",
114
+ color: "primary",
115
+ style: {
116
+ fontSize: "14px !important",
117
+ fontWeight: "400"
118
+ },
119
+ children: field?.tab
120
+ })
121
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
122
+ sx: {
123
+ padding: "0px"
124
+ },
125
+ children: /*#__PURE__*/_jsx(StyleContent, {
126
+ renderTabs: [field],
127
+ value: field.value,
128
+ element: element,
129
+ onChange: onChange,
130
+ customElement: element?.children?.[0] || null,
131
+ customProps: customProps,
132
+ handleClose: handleClose
133
+ }, `tab_${field.value}_${index}`)
134
+ })]
135
+ }, `accordion_${index}`)
136
+ }, index);
137
+ })
138
+ })]
139
+ }, `accordion_${i}`)
140
+ }, i);
141
+ } else {
142
+ return /*#__PURE__*/_jsx(ThemeProvider, {
143
+ theme: muiTheme,
144
+ children: /*#__PURE__*/_jsxs(Accordion, {
145
+ defaultExpanded: true,
146
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
147
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
148
+ sx: {
149
+ padding: "0px"
150
+ },
151
+ children: /*#__PURE__*/_jsx(Typography, {
152
+ variant: "h3",
153
+ className: "settingsHeader",
154
+ color: "primary",
155
+ style: {
156
+ fontSize: "14px !important",
157
+ fontWeight: "400"
158
+ },
159
+ children: m?.tab
160
+ })
161
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
162
+ sx: {
163
+ padding: "0px"
164
+ },
165
+ children: /*#__PURE__*/_jsx(StyleContent, {
166
+ renderTabs: styleMaps,
167
+ value: m.value,
168
+ element: element,
169
+ customElement: element?.children?.[0] || null,
170
+ onChange: onChange,
171
+ customProps: customProps,
172
+ handleClose: handleClose
173
+ }, `tab_${m.value}_$${i}`)
174
+ })]
175
+ }, `accordion_${i}`)
176
+ }, i);
177
+ }
46
178
  })
47
179
  });
48
180
  };
@@ -171,14 +171,10 @@ const RnD = props => {
171
171
  anchorEl: rndRef?.current
172
172
  });
173
173
  }
174
- focusSelection(editor, {
175
- path
176
- });
174
+ // focusSelection(editor, { path });temporary fix for scroll issue
177
175
  break;
178
176
  case 2:
179
- focusSelection(editor, {
180
- path
181
- });
177
+ // focusSelection(editor, { path });temporary fix for scroll issue
182
178
  setSelectedElement({
183
179
  path: str_path,
184
180
  enable: EDIT_MODES.includes(childType) ? 2 : 1,
@@ -5,6 +5,8 @@ import useWindowResize from "../../../hooks/useWindowResize";
5
5
  import { useEditorContext } from "../../../hooks/useMouseMove";
6
6
  import FontFamilyAutocomplete from "../../../Toolbar/FormatTools/FontFamilyAutocomplete";
7
7
  import { useSlate } from "slate-react";
8
+
9
+ // hideMetaDataOptions -- pass true to hide metadata option in select field
8
10
  import { jsx as _jsx } from "react/jsx-runtime";
9
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -26,7 +28,8 @@ const TextOptions = props => {
26
28
  options,
27
29
  renderOption,
28
30
  width,
29
- webFont = false
31
+ webFont = false,
32
+ hideMetaDataOptions = false
30
33
  } = data;
31
34
  const {
32
35
  fontFamilies
@@ -35,7 +38,7 @@ const TextOptions = props => {
35
38
  const [size] = useWindowResize();
36
39
  const value = isBreakpoint ? getBreakPointsValue(val, size?.device) : val;
37
40
  const metaDataMappingOptions = metaMappings?.boards || [];
38
- const updatedOption = elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
41
+ const updatedOption = !hideMetaDataOptions && elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
39
42
  const handleChange = (e, d) => {
40
43
  if (isBreakpoint) {
41
44
  onChange({
@@ -1,38 +1,187 @@
1
- import { fontOptions } from "../../utils/font";
1
+ import { fontOptions, fontWeightOptions } from "../../utils/font";
2
2
  import Icon from "../Icon";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
- const formStyle = [{
5
- tab: "General",
6
- value: "general",
4
+ export const formStyle = [{
5
+ tab: "Form Settings",
6
+ value: "FormSetting",
7
+ hasChildrenTabs: true,
7
8
  fields: [{
8
- label: "Form Name",
9
- key: "formName",
10
- type: "text"
9
+ tab: "General",
10
+ value: "general",
11
+ fields: [{
12
+ label: "Form Name",
13
+ key: "formName",
14
+ type: "text"
15
+ }, {
16
+ label: "Send Form to Email",
17
+ key: "email",
18
+ type: "text",
19
+ placeholder: "Enter Email to send the response..."
20
+ }, {
21
+ label: "Save Response",
22
+ key: "saveResponse",
23
+ type: "selectBox",
24
+ placeholder: "Save Response"
25
+ }]
11
26
  }, {
12
- label: "Send Form to Email",
13
- key: "email",
14
- type: "text",
15
- placeholder: "Enter Email to send the response..."
27
+ tab: "Form Title",
28
+ value: "formTitle",
29
+ fields: [{
30
+ label: "Title",
31
+ key: "formTitle",
32
+ type: "text"
33
+ }, {
34
+ label: "Font Family",
35
+ key: "fontFamily",
36
+ type: "textOptions",
37
+ hideMetaDataOptions: true,
38
+ options: fontOptions,
39
+ webFont: true,
40
+ width: 7,
41
+ renderOption: option => {
42
+ return /*#__PURE__*/_jsx("span", {
43
+ style: {
44
+ fontFamily: option.value
45
+ },
46
+ children: option.text
47
+ });
48
+ }
49
+ }, {
50
+ label: "Font Size",
51
+ key: "textSize",
52
+ type: "fontSize",
53
+ width: 5,
54
+ placeholder: "16px"
55
+ }, {
56
+ label: "Text Align",
57
+ key: "textAlign",
58
+ type: "textAlign",
59
+ placeholder: "16px or 1em"
60
+ }]
61
+ }, {
62
+ tab: "Banner Spacing",
63
+ value: "bannerSpacing",
64
+ fields: [{
65
+ label: "Banner Spacing",
66
+ key: "bannerSpacing",
67
+ type: "bannerSpacing"
68
+ }]
69
+ }, {
70
+ tab: "Border",
71
+ value: "border",
72
+ fields: [{
73
+ label: "Border Radius",
74
+ key: "borderRadius",
75
+ type: "borderRadius"
76
+ }, {
77
+ label: "Border Width",
78
+ key: "borderWidth",
79
+ type: "text",
80
+ placeholder: "1px"
81
+ }, {
82
+ label: "Border Style",
83
+ key: "borderStyle",
84
+ type: "textOptions",
85
+ hideMetaDataOptions: true,
86
+ options: [{
87
+ text: "Solid",
88
+ value: "solid"
89
+ }, {
90
+ text: "Dotted",
91
+ value: "dotted"
92
+ }, {
93
+ text: "Dashed",
94
+ value: "dashed"
95
+ }],
96
+ renderOption: option => {
97
+ return /*#__PURE__*/_jsx("span", {
98
+ children: option.text
99
+ });
100
+ }
101
+ }]
102
+ }, {
103
+ tab: "Colors",
104
+ value: "colors",
105
+ fields: [{
106
+ label: "Text Color",
107
+ key: "textColor",
108
+ type: "color",
109
+ needPreview: true
110
+ }, {
111
+ label: "Background Color",
112
+ key: "bgColor",
113
+ type: "color"
114
+ }, {
115
+ label: "Border Color",
116
+ key: "borderColor",
117
+ type: "color"
118
+ }]
119
+ }, {
120
+ tab: "Position",
121
+ value: "position",
122
+ fields: [{
123
+ label: "Set Postion (Vertical & Horizantal)",
124
+ key: "alignment",
125
+ type: "alignment"
126
+ }]
127
+ }, {
128
+ tab: "Background",
129
+ value: "backgroundImage",
130
+ fields: [{
131
+ label: "URL",
132
+ key: "backgroundImage",
133
+ type: "text"
134
+ }, {
135
+ label: "Background Image",
136
+ key: "backgroundImage",
137
+ type: "backgroundImage"
138
+ }]
139
+ }, {
140
+ tab: "Add to Boards",
141
+ value: "metadatamapping",
142
+ fields: [{
143
+ label: "Add response to contacts board",
144
+ key: "metadatamapping",
145
+ type: "metadatamapping",
146
+ compType: "card",
147
+ content: "By default, form responses are added as separate cards on the default contact board.",
148
+ value: "mappingToContactBoard",
149
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
150
+ icon: "info"
151
+ })
152
+ }, {
153
+ label: "Create a separate board",
154
+ key: "metadatamapping",
155
+ type: "metadatamapping",
156
+ compType: "card",
157
+ content: "By default, form responses are added as separate cards on a new board (Contact Us).",
158
+ value: "mappingToSeparateBoard",
159
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
160
+ icon: "info"
161
+ })
162
+ }]
16
163
  }, {
17
- label: "Save Response",
18
- key: "saveResponse",
19
- type: "selectBox",
20
- placeholder: "Save Response"
164
+ tab: "Save As Template",
165
+ value: "saveAsTemplate",
166
+ needActions: false,
167
+ hideOnFGS: true,
168
+ fields: [{
169
+ label: "Template Image",
170
+ key: "saveAsTemplate",
171
+ type: "saveAsTemplate"
172
+ }]
21
173
  }]
22
174
  }, {
23
- tab: "Form Title",
24
- value: "formTitle",
175
+ tab: "Field Settings",
176
+ value: "FieldSetting",
177
+ hasChildrenTabs: false,
25
178
  fields: [{
26
- label: "Title",
27
- key: "formTitle",
28
- type: "text"
29
- }, {
30
179
  label: "Font Family",
31
- key: "fontFamily",
180
+ key: "fieldFontFamily",
32
181
  type: "textOptions",
182
+ hideMetaDataOptions: true,
33
183
  options: fontOptions,
34
184
  webFont: true,
35
- width: 7,
36
185
  renderOption: option => {
37
186
  return /*#__PURE__*/_jsx("span", {
38
187
  style: {
@@ -41,42 +190,52 @@ const formStyle = [{
41
190
  children: option.text
42
191
  });
43
192
  }
193
+ }, {
194
+ label: "Font Weight",
195
+ key: "fieldFontWeight",
196
+ type: "textOptions",
197
+ width: 5,
198
+ options: fontWeightOptions,
199
+ hideMetaDataOptions: true,
200
+ renderOption: option => {
201
+ return /*#__PURE__*/_jsx("span", {
202
+ style: {
203
+ fontWeight: option.value
204
+ },
205
+ children: option.text
206
+ });
207
+ }
44
208
  }, {
45
209
  label: "Font Size",
46
- key: "textSize",
210
+ key: "fieldTextSize",
47
211
  type: "fontSize",
48
212
  width: 5,
49
213
  placeholder: "16px"
50
214
  }, {
51
- label: "Text Align",
52
- key: "textAlign",
53
- type: "textAlign",
54
- placeholder: "16px or 1em"
55
- }]
56
- }, {
57
- tab: "Banner Spacing",
58
- value: "bannerSpacing",
59
- fields: [{
60
- label: "Banner Spacing",
61
- key: "bannerSpacing",
62
- type: "bannerSpacing"
63
- }]
64
- }, {
65
- tab: "Border",
66
- value: "border",
67
- fields: [{
68
- label: "Border Radius",
69
- key: "borderRadius",
70
- type: "borderRadius"
215
+ label: "Text Color",
216
+ key: "fieldTextColor",
217
+ type: "color",
218
+ needPreview: true
219
+ }, {
220
+ label: "Background Color",
221
+ key: "fieldBgColor",
222
+ type: "color"
223
+ }, {
224
+ label: "Border Color",
225
+ key: "fieldBorderColor",
226
+ type: "color"
71
227
  }, {
72
228
  label: "Border Width",
73
- key: "borderWidth",
229
+ key: "fieldBorderWidth",
74
230
  type: "text",
231
+ width: 5,
75
232
  placeholder: "1px"
76
233
  }, {
77
234
  label: "Border Style",
78
- key: "borderStyle",
235
+ key: "fieldBorderStyle",
79
236
  type: "textOptions",
237
+ hideMetaDataOptions: true,
238
+ width: 5,
80
239
  options: [{
81
240
  text: "Solid",
82
241
  value: "solid"
@@ -93,76 +252,4 @@ const formStyle = [{
93
252
  });
94
253
  }
95
254
  }]
96
- }, {
97
- tab: "Colors",
98
- value: "colors",
99
- fields: [{
100
- label: "Text Color",
101
- key: "textColor",
102
- type: "color",
103
- needPreview: true
104
- }, {
105
- label: "Background Color",
106
- key: "bgColor",
107
- type: "color"
108
- }, {
109
- label: "Border Color",
110
- key: "borderColor",
111
- type: "color"
112
- }]
113
- }, {
114
- tab: "Position",
115
- value: "position",
116
- fields: [{
117
- label: "Set Postion (Vertical & Horizantal)",
118
- key: "alignment",
119
- type: "alignment"
120
- }]
121
- }, {
122
- tab: "Background",
123
- value: "backgroundImage",
124
- fields: [{
125
- label: "URL",
126
- key: "backgroundImage",
127
- type: "text"
128
- }, {
129
- label: "Background Image",
130
- key: "backgroundImage",
131
- type: "backgroundImage"
132
- }]
133
- }, {
134
- tab: "Add to Boards",
135
- value: "metadatamapping",
136
- fields: [{
137
- label: "Add response to contacts board",
138
- key: "metadatamapping",
139
- type: "metadatamapping",
140
- compType: "card",
141
- content: "By default, form responses are added as separate cards on the default contact board.",
142
- value: "mappingToContactBoard",
143
- infoIcon: /*#__PURE__*/_jsx(Icon, {
144
- icon: "info"
145
- })
146
- }, {
147
- label: "Create a separate board",
148
- key: "metadatamapping",
149
- type: "metadatamapping",
150
- compType: "card",
151
- content: "By default, form responses are added as separate cards on a new board (Contact Us).",
152
- value: "mappingToSeparateBoard",
153
- infoIcon: /*#__PURE__*/_jsx(Icon, {
154
- icon: "info"
155
- })
156
- }]
157
- }, {
158
- tab: "Save As Template",
159
- value: "saveAsTemplate",
160
- needActions: false,
161
- hideOnFGS: true,
162
- fields: [{
163
- label: "Template Image",
164
- key: "saveAsTemplate",
165
- type: "saveAsTemplate"
166
- }]
167
- }];
168
- export default formStyle;
255
+ }];
@@ -79,6 +79,11 @@ const gridItemStyle = [{
79
79
  label: "Width Size",
80
80
  key: "grid",
81
81
  type: "gridSize"
82
+ }, {
83
+ label: "Force Full Width on Mobile",
84
+ key: "forceFullWidth",
85
+ type: "selectBox",
86
+ placeholder: "Force Full Width on Mobile"
82
87
  }, {
83
88
  label: "Height",
84
89
  key: "cellGHeight",
@@ -1,12 +1,31 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer } from "@mui/material";
2
+ import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer, Accordion, AccordionSummary, AccordionDetails, createTheme } from "@mui/material";
3
3
  import FieldMap from "./fieldTypes";
4
4
  import CloseIcon from "@mui/icons-material/Close";
5
5
  import useCommonStyle from "../../commonStyle";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
+ import { ThemeProvider } from "@mui/material/styles";
8
+ import { ExpandMoreOutlined, Height } from "@mui/icons-material";
7
9
  import { jsx as _jsx } from "react/jsx-runtime";
8
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
12
+ const muiTheme = createTheme({
13
+ components: {
14
+ MuiAccordion: {
15
+ styleOverrides: {
16
+ root: {
17
+ padding: "0px",
18
+ "&.Mui-expanded": {
19
+ margin: "0"
20
+ }
21
+ }
22
+ },
23
+ defaultProps: {
24
+ elevation: 0
25
+ }
26
+ }
27
+ }
28
+ });
10
29
  export const StyleContent = props => {
11
30
  const {
12
31
  value,
@@ -73,6 +92,9 @@ const StyleBuilder = props => {
73
92
  } = tabVal || {
74
93
  needActions: true
75
94
  };
95
+ const {
96
+ hideTools
97
+ } = customProps || {};
76
98
  useEffect(() => {
77
99
  if (customProps?.onDrawerOpen) {
78
100
  customProps?.onDrawerOpen(true);
@@ -140,17 +162,108 @@ const StyleBuilder = props => {
140
162
  }), /*#__PURE__*/_jsx(DialogContent, {
141
163
  sx: {
142
164
  maxHeight: isMobile ? `500px` : `${window.innerHeight - 125}px`,
143
- padding: "8px"
165
+ padding: "0px"
144
166
  },
145
167
  children: renderTabs.map((m, i) => {
146
- return /*#__PURE__*/_jsx(StyleContent, {
147
- renderTabs: renderTabs,
148
- value: m.value,
149
- element: elementProps,
150
- onChange: onElementPropsChange,
151
- customProps: customProps,
152
- handleClose: handleClose
153
- }, `tab_${m.value}_$${i}`);
168
+ if (m?.hasChildrenTabs) {
169
+ return /*#__PURE__*/_jsx(ThemeProvider, {
170
+ theme: muiTheme,
171
+ children: /*#__PURE__*/_jsxs(Accordion, {
172
+ defaultExpanded: true,
173
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
174
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
175
+ sx: {
176
+ padding: "0px"
177
+ },
178
+ children: /*#__PURE__*/_jsx(Typography, {
179
+ variant: "h3",
180
+ className: "settingsHeader",
181
+ color: "primary",
182
+ style: {
183
+ fontSize: "14px !important",
184
+ fontWeight: "400"
185
+ },
186
+ children: m?.tab
187
+ })
188
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
189
+ sx: {
190
+ padding: "5px"
191
+ },
192
+ children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
193
+ return /*#__PURE__*/_jsx(ThemeProvider, {
194
+ theme: muiTheme,
195
+ children: /*#__PURE__*/_jsxs(Accordion, {
196
+ defaultExpanded: true,
197
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
198
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
199
+ sx: {
200
+ padding: "0px"
201
+ },
202
+ children: /*#__PURE__*/_jsx(Typography, {
203
+ variant: "h3",
204
+ className: "settingsHeader",
205
+ color: "primary",
206
+ style: {
207
+ fontSize: "14px !important",
208
+ fontWeight: "400"
209
+ },
210
+ children: field?.tab
211
+ })
212
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
213
+ sx: {
214
+ padding: "0px"
215
+ },
216
+ children: /*#__PURE__*/_jsx(StyleContent, {
217
+ renderTabs: [field],
218
+ value: field.value,
219
+ element: elementProps,
220
+ onChange: onElementPropsChange,
221
+ customProps: customProps,
222
+ handleClose: handleClose
223
+ }, `tab_${field.value}_${index}`)
224
+ })]
225
+ }, `accordion_${index}`)
226
+ }, index);
227
+ })
228
+ })]
229
+ }, `accordion_${i}`)
230
+ }, i);
231
+ } else {
232
+ return /*#__PURE__*/_jsx(ThemeProvider, {
233
+ theme: muiTheme,
234
+ children: /*#__PURE__*/_jsxs(Accordion, {
235
+ defaultExpanded: true,
236
+ children: [/*#__PURE__*/_jsx(AccordionSummary, {
237
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
238
+ sx: {
239
+ padding: "0px"
240
+ },
241
+ children: /*#__PURE__*/_jsx(Typography, {
242
+ variant: "h3",
243
+ className: "settingsHeader",
244
+ color: "primary",
245
+ style: {
246
+ fontSize: "14px !important",
247
+ fontWeight: "400"
248
+ },
249
+ children: m?.tab
250
+ })
251
+ }), /*#__PURE__*/_jsx(AccordionDetails, {
252
+ sx: {
253
+ padding: "0px"
254
+ },
255
+ children: /*#__PURE__*/_jsx(StyleContent, {
256
+ renderTabs: renderTabs,
257
+ value: m.value,
258
+ element: elementProps,
259
+ onChange: onElementPropsChange,
260
+ customProps: customProps,
261
+ handleClose: handleClose
262
+ }, `tab_${m.value}_$${i}`)
263
+ })]
264
+ }, `accordion_${i}`)
265
+ }, i);
266
+ }
154
267
  })
155
268
  }), needActions ? /*#__PURE__*/_jsxs(DialogActions, {
156
269
  sx: {
@@ -60,7 +60,14 @@ export const signedTextFonts = Object.keys(fontFamilyMap).slice(-12).map(m => {
60
60
  };
61
61
  });
62
62
  export const headingMap = {
63
- "headingOne": "32px",
64
- "headingTwo": "24px",
65
- "headingThree": "19px"
66
- };
63
+ headingOne: "32px",
64
+ headingTwo: "24px",
65
+ headingThree: "19px"
66
+ };
67
+ export const fontWeightOptions = [{
68
+ text: "Bold",
69
+ value: "500"
70
+ }, {
71
+ text: "Bolder",
72
+ value: "600"
73
+ }];
@@ -1,5 +1,5 @@
1
1
  import { Transforms } from "slate";
2
- export const formField = () => {
2
+ export const formField = data => {
3
3
  return {
4
4
  type: "form-field",
5
5
  grid: 6,
@@ -12,14 +12,18 @@ export const formField = () => {
12
12
  text: ""
13
13
  }],
14
14
  field_type: "text",
15
- bgColor: "rgba(255, 255, 255, 1)",
16
- borderColor: "#ccc",
15
+ bgColor: data?.bgColor ? data?.bgColor : "rgba(255, 255, 255, 1)",
16
+ borderColor: data?.borderColor ? data?.borderColor : "#ccc",
17
17
  bannerSpacing: {
18
18
  left: 16,
19
19
  right: 16,
20
20
  top: 16,
21
21
  bottom: 16
22
- }
22
+ },
23
+ fontFamily: data?.fontFamily ? data?.fontFamily : "",
24
+ textSize: data?.textSize ? data?.textSize : "",
25
+ textColor: data?.textColor ? data?.textColor : "",
26
+ fontWeight: data?.fontWeight ? data?.fontWeight : "500"
23
27
  };
24
28
  };
25
29
  export const insertGridItem = editor => {
@@ -64,7 +64,7 @@ export const getBorderColor = (color, borderWidth = 3) => {
64
64
  export const absoluteLink = url => {
65
65
  try {
66
66
  if (url?.indexOf("://") === -1) {
67
- return `//${url}`;
67
+ return `/${url}`;
68
68
  }
69
69
  return url;
70
70
  } catch (err) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.7.9",
3
+ "version": "4.8.1",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"