@flozy/editor 4.8.2 → 4.8.4

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 (50) hide show
  1. package/dist/Editor/CommonEditor.js +6 -6
  2. package/dist/Editor/Editor.css +8 -1
  3. package/dist/Editor/Elements/AI/AIInput.js +4 -5
  4. package/dist/Editor/Elements/AI/PopoverAIInput.js +78 -62
  5. package/dist/Editor/Elements/AI/Styles.js +1 -0
  6. package/dist/Editor/Elements/Divider/Divider.js +9 -4
  7. package/dist/Editor/Elements/Embed/EmbedPopup.js +7 -1
  8. package/dist/Editor/Elements/Form/Form.js +38 -2
  9. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  10. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  11. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  12. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  13. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  14. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  15. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  16. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  17. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  18. package/dist/Editor/Elements/Grid/GridItem.js +7 -2
  19. package/dist/Editor/Elements/Search/SearchAttachment.js +98 -0
  20. package/dist/Editor/Elements/Search/SearchButton.js +111 -0
  21. package/dist/Editor/Elements/Search/SearchList.js +207 -0
  22. package/dist/Editor/Styles/EditorStyles.js +1 -1
  23. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -1
  24. package/dist/Editor/Toolbar/Toolbar.js +8 -0
  25. package/dist/Editor/Toolbar/toolbarGroups.js +5 -0
  26. package/dist/Editor/assets/svg/BrainIcon.js +37 -0
  27. package/dist/Editor/assets/svg/DocsIcon.js +38 -0
  28. package/dist/Editor/assets/svg/UserIcon.js +23 -0
  29. package/dist/Editor/common/Icon.js +7 -1
  30. package/dist/Editor/common/MentionsPopup/index.js +4 -2
  31. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/SaveAsTemplate.js +0 -1
  32. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -1
  33. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +144 -12
  34. package/dist/Editor/common/RnD/Utils/gridDropItem.js +5 -3
  35. package/dist/Editor/common/Section/index.js +2 -4
  36. package/dist/Editor/common/Shorthands/elements.js +13 -0
  37. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +1 -1
  38. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
  39. package/dist/Editor/common/StyleBuilder/formStyle.js +206 -119
  40. package/dist/Editor/common/StyleBuilder/gridItemStyle.js +5 -0
  41. package/dist/Editor/common/StyleBuilder/index.js +123 -10
  42. package/dist/Editor/plugins/withCustomDeleteBackward.js +53 -2
  43. package/dist/Editor/utils/Decorators/highlightSelection.js +22 -0
  44. package/dist/Editor/utils/Decorators/index.js +3 -2
  45. package/dist/Editor/utils/SlateUtilityFunctions.js +14 -0
  46. package/dist/Editor/utils/brains.js +16 -0
  47. package/dist/Editor/utils/font.js +11 -4
  48. package/dist/Editor/utils/formfield.js +8 -4
  49. package/dist/Editor/utils/helper.js +15 -2
  50. package/package.json +1 -1
@@ -320,9 +320,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
320
320
  const renderElement = useCallback(props => {
321
321
  return /*#__PURE__*/_jsx(Element, {
322
322
  ...props,
323
- customProps: customProps
323
+ customProps: customProps,
324
+ theme: theme
324
325
  });
325
- }, []);
326
+ }, [theme]);
326
327
  const renderLeaf = useCallback(props => {
327
328
  return /*#__PURE__*/_jsx(Leaf, {
328
329
  ...props,
@@ -535,7 +536,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
535
536
  readOnly: isReadOnly,
536
537
  renderElement: renderElement,
537
538
  renderLeaf: renderLeaf,
538
- decorate: decorators,
539
+ decorate: d => decorators(d, editor),
539
540
  onKeyDown: onKeyDown,
540
541
  onSelect: () => handleCursorScroll(editorWrapper.current)
541
542
  }), !readOnly ? /*#__PURE__*/_jsx(MentionsPopup, {
@@ -547,7 +548,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
547
548
  index: index,
548
549
  chars: chars,
549
550
  type: type,
550
- theme: theme
551
+ theme: theme,
552
+ otherProps: otherProps
551
553
  }) : null, /*#__PURE__*/_jsx(RnDCopy, {
552
554
  readOnly: readOnly
553
555
  })]
@@ -585,8 +587,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
585
587
  }), htmlAction.showInput && /*#__PURE__*/_jsx(CodeToText, {
586
588
  ...htmlAction,
587
589
  handleCodeToText: handleCodeToText
588
- }), /*#__PURE__*/_jsx(FontLoader, {
589
- ...props
590
590
  })]
591
591
  }, id)
592
592
  })
@@ -1225,5 +1225,12 @@ blockquote {
1225
1225
  @media (max-width: 899px) {
1226
1226
  .MuiPopover-root {
1227
1227
  z-index: 1302 !important;
1228
- }
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;
1229
1236
  }
@@ -90,6 +90,7 @@ function AIInput({
90
90
  children: [/*#__PURE__*/_jsxs(Box, {
91
91
  component: "div",
92
92
  sx: classes.aiContainer,
93
+ ref: refs[0],
93
94
  children: [generatedText ? /*#__PURE__*/_jsx(Typography, {
94
95
  sx: classes.generatedText,
95
96
  style: {
@@ -104,7 +105,6 @@ function AIInput({
104
105
  onSubmit: e => {
105
106
  e.preventDefault();
106
107
  },
107
- ref: refs[0],
108
108
  children: [/*#__PURE__*/_jsx("div", {
109
109
  className: "icon-container icons-elements",
110
110
  ref: inputWrapperRef,
@@ -116,22 +116,21 @@ function AIInput({
116
116
  children: /*#__PURE__*/_jsx(WaveLoading, {})
117
117
  }) : /*#__PURE__*/_jsx(TextareaAutosize, {
118
118
  className: "ai-input",
119
- placeholder: fromToolBar ? "" : "Ask AI to write anything...",
119
+ placeholder: "Ask AI to write anything...",
120
120
  ref: inputRef,
121
121
  value: inputValue,
122
122
  onChange: onInputChange,
123
- disabled: fromToolBar,
124
123
  onKeyDown: event => {
125
124
  if (event.key === "Enter" && !event.shiftKey) {
126
125
  event.preventDefault();
127
126
  handleSendBtnClick();
128
127
  }
129
128
  }
130
- }), fromToolBar ? null : /*#__PURE__*/_jsxs(Box, {
129
+ }), /*#__PURE__*/_jsxs(Box, {
131
130
  component: "div",
132
131
  style: classes.sendIconContainer,
133
132
  className: "icons-elements",
134
- children: [isMobile ? null : /*#__PURE__*/_jsx(IconButton, {
133
+ children: [/*#__PURE__*/_jsx(IconButton, {
135
134
  disabled: loading,
136
135
  onClick: () => startRecording(),
137
136
  children: /*#__PURE__*/_jsx(ChatMicIcon, {})
@@ -40,9 +40,11 @@ const scrollToAIInput = editor => {
40
40
  }, 200);
41
41
  };
42
42
  const insertText = (editor, text, options) => {
43
- const parsed = new DOMParser().parseFromString(text, "text/html");
44
- const fragment = deserialize(parsed.body);
45
- Transforms.insertFragment(editor, fragment, options);
43
+ if (text?.length) {
44
+ const parsed = new DOMParser().parseFromString(text, "text/html");
45
+ const fragment = deserialize(parsed.body);
46
+ Transforms.insertFragment(editor, fragment, options);
47
+ }
46
48
  };
47
49
  const insertAtNextLine = (editor, text) => {
48
50
  const nextLine = getNextLine(editor);
@@ -199,81 +201,95 @@ function PopoverAIInput({
199
201
  useEffect(() => {
200
202
  selectedEleRef.current = selectedElement;
201
203
  }, [selectedElement]);
202
- const onSend = async (type, option) => {
203
- if (type === "close") {
204
- onClickOutside();
205
- return;
206
- }
207
- if (type === "done") {
208
- // Get the current selection point
209
- const {
210
- anchor
211
- } = editor.selection;
212
- const {
213
- path
214
- } = anchor;
215
- const {
216
- text: selectText
217
- } = Node.get(editor, path);
218
- if (selectText?.length) {
219
- insertAtNextLine(editor, generatedText);
220
- } else {
221
- insertText(editor, generatedText);
222
- }
223
- onClickOutside();
224
- return;
225
- }
226
- if (type === "replace_selection") {
227
- // replace generated text
228
- insertText(editor, generatedText);
229
- onClickOutside();
230
- return;
231
- }
232
- if (type === "speech_to_text") {
233
- setGeneratedText(option.text);
234
- return;
235
- }
236
- if (type === "try_again") {
237
- // resetting the previous option and try again
238
- option = selectedOption;
239
- type = selectedOption.value;
240
- } else {
241
- setSelectedOption(option);
242
- }
243
- setLoading(true);
244
- const payload = {
204
+ const framePayload = (type, option) => {
205
+ let payload = {
245
206
  mode: option.mode || 0,
246
207
  query: option?.inputValue || inputValue
247
208
  };
248
209
  if (option.mode === MODES.translate || option.mode === MODES.rephraseTone) {
249
210
  payload.textOptionInput = type;
250
211
  }
212
+ const selectedText = getSelectedText(editor);
213
+ const textData = generatedText || selectedText;
251
214
  if (option.mode) {
252
- payload.textData = generatedText || window.getSelection().toString();
215
+ payload.textData = textData;
216
+ } else if (selectedText && Number(payload.mode) === 0) {
217
+ payload.query = `${selectedText} \n ${payload.query}`;
253
218
  }
254
- const result = await services("infinityAI", payload);
255
- setLoading(false);
256
- setInputValue("");
257
- let {
258
- data: text
259
- } = result || {};
260
- if (!text) {
261
- onClickOutside();
262
- return;
219
+ const tryAgain = type === "try_again";
220
+ if (tryAgain) {
221
+ // resetting previous payload
222
+ const prevPayload = selectedOption?.payload || {};
223
+ payload = prevPayload;
263
224
  }
264
- if (!option.replace) {
225
+ return payload;
226
+ };
227
+ const onSend = async (type, option) => {
228
+ try {
229
+ if (type === "close") {
230
+ onClickOutside();
231
+ return;
232
+ }
233
+ if (type === "done") {
234
+ // Get the current selection point
235
+ const {
236
+ anchor
237
+ } = editor.selection;
238
+ const {
239
+ path
240
+ } = anchor;
241
+ const {
242
+ text: selectText
243
+ } = Node.get(editor, path);
244
+ if (selectText?.length) {
245
+ insertAtNextLine(editor, generatedText);
246
+ } else {
247
+ insertText(editor, generatedText);
248
+ }
249
+ onClickOutside();
250
+ return;
251
+ }
252
+ if (type === "replace_selection") {
253
+ // replace generated text
254
+ insertText(editor, generatedText);
255
+ onClickOutside();
256
+ return;
257
+ }
258
+ setLoading(true);
259
+ const payload = framePayload(type, option);
260
+ setSelectedOption({
261
+ ...option,
262
+ payload
263
+ });
264
+ const result = await services("infinityAI", payload);
265
+ setLoading(false);
266
+ setInputValue("");
267
+ let {
268
+ data: text
269
+ } = result || {};
270
+ if (!text) {
271
+ onClickOutside();
272
+ return;
273
+ }
274
+
275
+ // if (!option.replace) {
265
276
  if (type === "continue_writing") {
266
277
  setGeneratedText(generatedText + text);
267
278
  } else {
268
279
  setGeneratedText(text);
269
280
  }
270
- return;
271
- }
272
- insertText(editor, text);
273
281
 
274
- // scrollToAIInput();
275
- };
282
+ // return;
283
+ // }
276
284
 
285
+ // ** we are not using this insertText right now, AI returned response will not insert into the editor immediately, so option.replace will be false always
286
+ // insertText(editor, text);
287
+
288
+ // scrollToAIInput();
289
+ } catch (err) {
290
+ console.error("Error on sending/inserting text", err);
291
+ }
292
+ };
277
293
  const onInputChange = e => {
278
294
  setInputValue(e.target.value);
279
295
  };
@@ -102,6 +102,7 @@ const Styles = theme => ({
102
102
  customSelectWrapper: {
103
103
  width: "fit-content",
104
104
  marginTop: "4px",
105
+ position: "absolute",
105
106
  "@media only screen and (max-width: 600px)": {
106
107
  marginBottom: "4px"
107
108
  }
@@ -38,10 +38,16 @@ const Divider = props => {
38
38
  setOpenSettings(true);
39
39
  };
40
40
  const DividerToolbar = ({
41
+ readOnly,
41
42
  selected,
42
43
  showTool,
43
44
  onSettings
44
45
  }) => {
46
+ const hoverStyles = readOnly ? {
47
+ '&.MuiIconButton-root:hover': {
48
+ background: theme?.palette?.type === 'dark' ? `${theme?.palette?.greyshades?.light8} !important` : `${theme?.palette?.containers?.card} !important`
49
+ }
50
+ } : {};
45
51
  return /*#__PURE__*/_jsx("div", {
46
52
  contentEditable: false,
47
53
  className: "divider-settings",
@@ -62,9 +68,7 @@ const Divider = props => {
62
68
  '& svg': {
63
69
  stroke: theme?.palette?.text?.secondary3
64
70
  },
65
- '&.MuiIconButton-root:hover': {
66
- background: theme?.palette?.type === 'dark' ? `${theme?.palette?.greyshades?.light8} !important` : `${theme?.palette?.containers?.card} !important`
67
- }
71
+ ...hoverStyles
68
72
  },
69
73
  onClick: onSettings,
70
74
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
@@ -110,7 +114,8 @@ const Divider = props => {
110
114
  children: /*#__PURE__*/_jsx(DividerToolbar, {
111
115
  selected: selected,
112
116
  showTool: showTool,
113
- onSettings: onSettings
117
+ onSettings: onSettings,
118
+ readOnly: readOnly
114
119
  })
115
120
  }), /*#__PURE__*/_jsx("hr", {
116
121
  contentEditable: false,
@@ -12,13 +12,19 @@ const EmbedPopup = props => {
12
12
  format,
13
13
  onDelete
14
14
  } = props;
15
+ const videoStyles = embedVideoStyle?.filter(f => {
16
+ if (f?.value === "AspectRatio" && format !== "video") {
17
+ return false;
18
+ }
19
+ return true;
20
+ });
15
21
  return /*#__PURE__*/_jsx(StyleBuilder, {
16
22
  title: format === "image" ? "Image" : format === "video" ? "video" : format === "calendly" ? "calendly" : "Embed",
17
23
  type: format === "image" ? "embedImageStyle" : "embedVideoStyle",
18
24
  element: element,
19
25
  onSave: onSave,
20
26
  onClose: onClose,
21
- renderTabs: format === "image" ? embedImageStyle : embedVideoStyle,
27
+ renderTabs: format === "image" ? embedImageStyle : videoStyles,
22
28
  customProps: customProps,
23
29
  onDelete: onDelete
24
30
  });
@@ -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")