@flozy/editor 5.1.5 → 5.1.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (156) hide show
  1. package/dist/Editor/ChatEditor.js +25 -34
  2. package/dist/Editor/CommonEditor.js +15 -9
  3. package/dist/Editor/Editor.css +56 -12
  4. package/dist/Editor/Elements/AI/AIInput.js +0 -1
  5. package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
  6. package/dist/Editor/Elements/AI/Styles.js +7 -1
  7. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  8. package/dist/Editor/Elements/Button/EditorButton.js +1 -1
  9. package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -1
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
  11. package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
  12. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  13. package/dist/Editor/Elements/DataView/DataView.js +109 -0
  14. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  15. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +66 -0
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +30 -0
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +30 -0
  21. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -0
  22. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  23. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  24. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  25. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  26. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  27. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  28. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  29. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  30. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  31. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  32. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  33. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  34. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +60 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  40. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  41. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  42. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  43. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  44. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  45. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  46. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +112 -0
  47. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  48. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +70 -0
  49. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  50. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +288 -0
  51. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  52. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +72 -0
  53. package/dist/Editor/Elements/DataView/styles.js +143 -0
  54. package/dist/Editor/Elements/Divider/Divider.js +15 -14
  55. package/dist/Editor/Elements/Form/Form.js +38 -2
  56. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  57. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  58. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  59. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  60. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  61. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  62. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  63. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  64. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  65. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  66. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  67. package/dist/Editor/Elements/FreeGrid/styles.js +1 -1
  68. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  69. package/dist/Editor/Elements/Grid/GridItem.js +21 -18
  70. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  71. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  72. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  73. package/dist/Editor/Elements/Signature/SignaturePopup.js +13 -48
  74. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  75. package/dist/Editor/Elements/SimpleText/style.js +13 -1
  76. package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
  77. package/dist/Editor/Elements/Table/DragButton.js +141 -0
  78. package/dist/Editor/Elements/Table/DragStyles.js +70 -0
  79. package/dist/Editor/Elements/Table/Draggable.js +25 -0
  80. package/dist/Editor/Elements/Table/Droppable.js +53 -0
  81. package/dist/Editor/Elements/Table/Styles.js +25 -43
  82. package/dist/Editor/Elements/Table/Table.js +205 -138
  83. package/dist/Editor/Elements/Table/TableCell.js +355 -102
  84. package/dist/Editor/Elements/Table/TablePopup.js +9 -3
  85. package/dist/Editor/Elements/Table/TableRow.js +10 -2
  86. package/dist/Editor/Elements/Table/TableTool.js +101 -0
  87. package/dist/Editor/Elements/Table/tableHelper.js +71 -0
  88. package/dist/Editor/Styles/EditorStyles.js +3 -1
  89. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
  90. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -12
  91. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +10 -4
  92. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
  93. package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
  94. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
  95. package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
  96. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  97. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +19 -15
  98. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +411 -49
  99. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +62 -8
  100. package/dist/Editor/Toolbar/PopupTool/index.js +5 -6
  101. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  102. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  103. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  104. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  105. package/dist/Editor/common/ColorPickerButton.js +3 -2
  106. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  107. package/dist/Editor/common/Icon.js +20 -19
  108. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
  109. package/dist/Editor/common/LinkSettings/index.js +2 -1
  110. package/dist/Editor/common/MentionsPopup/Styles.js +152 -8
  111. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  112. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
  113. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  114. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  115. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  116. package/dist/Editor/common/Select/index.js +20 -0
  117. package/dist/Editor/common/Select/styles.js +17 -0
  118. package/dist/Editor/common/Shorthands/elements.js +13 -1
  119. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
  120. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +8 -4
  121. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  122. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  123. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  124. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
  125. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
  126. package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
  127. package/dist/Editor/common/StyleBuilder/index.js +84 -11
  128. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  129. package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
  130. package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
  131. package/dist/Editor/common/Uploader.js +8 -0
  132. package/dist/Editor/common/iconListV2.js +378 -40
  133. package/dist/Editor/common/iconslist.js +23 -17
  134. package/dist/Editor/commonStyle.js +126 -9
  135. package/dist/Editor/helper/deserialize/index.js +4 -1
  136. package/dist/Editor/helper/index.js +2 -2
  137. package/dist/Editor/helper/theme.js +24 -1
  138. package/dist/Editor/hooks/useMouseMove.js +5 -2
  139. package/dist/Editor/hooks/useTable.js +195 -0
  140. package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
  141. package/dist/Editor/plugins/withHTML.js +17 -1
  142. package/dist/Editor/plugins/withLayout.js +48 -1
  143. package/dist/Editor/utils/SlateUtilityFunctions.js +18 -0
  144. package/dist/Editor/utils/button.js +4 -4
  145. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +21 -0
  146. package/dist/Editor/utils/dataView.js +43 -0
  147. package/dist/Editor/utils/embed.js +2 -1
  148. package/dist/Editor/utils/events.js +0 -1
  149. package/dist/Editor/utils/font.js +11 -4
  150. package/dist/Editor/utils/formfield.js +8 -4
  151. package/dist/Editor/utils/helper.js +67 -2
  152. package/dist/Editor/utils/insertNewLine.js +19 -1
  153. package/dist/Editor/utils/pageSettings.js +14 -2
  154. package/dist/Editor/utils/serializeToText.js +2 -0
  155. package/dist/Editor/utils/table.js +228 -24
  156. package/package.json +1 -1
@@ -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;
@@ -276,7 +276,7 @@ const FreeGrid = props => {
276
276
  ...insertFreeGridItem("table", {
277
277
  ...DEFAULT_TABLE_NODE()
278
278
  }, {
279
- height: 130,
279
+ height: 150,
280
280
  width: 400
281
281
  })
282
282
  }], {
@@ -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
  });
@@ -47,22 +47,22 @@ export function wrapThemeBreakpoints(sxProp, prop, theme) {
47
47
  const formatedSxProp = Object.keys(sxProp).reduce((a, b) => {
48
48
  switch (b) {
49
49
  case "md":
50
- a[theme.breakpoints.up("lg")] = {
50
+ a[theme?.breakpoints?.up("lg")] = {
51
51
  [prop]: sxProp["md"] || sxProp["lg"]
52
52
  };
53
53
  break;
54
54
  case "sm":
55
- a[theme.breakpoints.up("lg")] = {
55
+ a[theme?.breakpoints?.up("lg")] = {
56
56
  [prop]: sxProp["sm"] || sxProp["lg"]
57
57
  };
58
58
  break;
59
59
  case "xs":
60
- a[theme.breakpoints.between("xs", "md")] = {
60
+ a[theme?.breakpoints?.between("xs", "md")] = {
61
61
  [prop]: sxProp["xs"] || sxProp["lg"]
62
62
  };
63
63
  break;
64
64
  default:
65
- a[theme.breakpoints.up("lg")] = {
65
+ a[theme?.breakpoints?.up("lg")] = {
66
66
  [prop]: sxProp["lg"]
67
67
  };
68
68
  }
@@ -318,7 +318,7 @@ const useFreeGridStyles = ({
318
318
  "& .element-toolbar": {
319
319
  display: "none"
320
320
  },
321
- [theme.breakpoints.between("xs", "md")]: {
321
+ [theme?.breakpoints?.between("xs", "md")]: {
322
322
  marginLeft: `calc((100% - 320px) * 0.5)`
323
323
  }
324
324
  },
@@ -1,9 +1,9 @@
1
1
  import React, { useState } from "react";
2
2
  import { Button, Dialog, DialogContent, DialogTitle, Grid, Tooltip, Box } from "@mui/material";
3
3
  import { insertGrid, insertPlainGrid } from "../../utils/grid";
4
- import { GridIcon } from "../../common/iconslist";
5
4
  import ToolbarIcon from "../../common/ToolbarIcon";
6
5
  import GridStyles from "./Styles";
6
+ import { GridElement } from "../../common/iconListV2";
7
7
  import { jsx as _jsx } from "react/jsx-runtime";
8
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -46,7 +46,7 @@ const GridButton = props => {
46
46
  children: [/*#__PURE__*/_jsx(ToolbarIcon, {
47
47
  title: "Column",
48
48
  onClick: onButtonClick,
49
- icon: /*#__PURE__*/_jsx(GridIcon, {}),
49
+ icon: /*#__PURE__*/_jsx(GridElement, {}),
50
50
  icoBtnType: icoBtnType
51
51
  }), /*#__PURE__*/_jsxs(Dialog, {
52
52
  open: open,
@@ -51,6 +51,7 @@ const GridItemToolbar = props => {
51
51
  placement: "top-end",
52
52
  sx: classes.popTools,
53
53
  className: "gi-tool-pp",
54
+ disablePortal: true,
54
55
  children: [/*#__PURE__*/_jsx(Tooltip, {
55
56
  title: "Column Settings",
56
57
  arrow: true,
@@ -293,24 +294,26 @@ const GridItem = props => {
293
294
  },
294
295
  "data-path": path.join(","),
295
296
  "data-info": "handle-outside-editor-click",
296
- children: [!readOnly && /*#__PURE__*/_jsxs("div", {
297
- className: `element-selector ${selected ? "selected" : ""}`,
298
- contentEditable: false,
299
- style: {
300
- zIndex: 1000
301
- },
302
- children: [/*#__PURE__*/_jsx("div", {
303
- className: "element-selector-dots tl",
304
- children: " "
305
- }), /*#__PURE__*/_jsx("div", {
306
- className: "element-selector-dots tr",
307
- children: " "
308
- }), /*#__PURE__*/_jsx("div", {
309
- className: "element-selector-dots bl",
310
- children: " "
311
- }), /*#__PURE__*/_jsx("div", {
312
- className: "element-selector-dots br",
313
- children: " "
297
+ children: [!readOnly && /*#__PURE__*/_jsxs(_Fragment, {
298
+ children: [/*#__PURE__*/_jsxs("div", {
299
+ className: `element-selector ${selected ? "selected" : ""}`,
300
+ contentEditable: false,
301
+ style: {
302
+ zIndex: 1000
303
+ },
304
+ children: [/*#__PURE__*/_jsx("div", {
305
+ className: "element-selector-dots tl",
306
+ children: " "
307
+ }), /*#__PURE__*/_jsx("div", {
308
+ className: "element-selector-dots tr",
309
+ children: " "
310
+ }), /*#__PURE__*/_jsx("div", {
311
+ className: "element-selector-dots bl",
312
+ children: " "
313
+ }), /*#__PURE__*/_jsx("div", {
314
+ className: "element-selector-dots br",
315
+ children: " "
316
+ })]
314
317
  }), /*#__PURE__*/_jsx(GridItemToolbar, {
315
318
  classes: classes,
316
319
  selected: selected,
@@ -64,7 +64,7 @@ const LinkButton = props => {
64
64
  title: "Link",
65
65
  arrow: true,
66
66
  children: /*#__PURE__*/_jsx(IconButton, {
67
- className: `${showInput ? "clicked" : ""} ${isActive ? "btnActive" : ""}`,
67
+ className: `${showInput ? "clicked btnActive" : ""} ${isActive ? "btnActive" : ""}`,
68
68
  format: "link",
69
69
  onClick: toggleLink,
70
70
  children: /*#__PURE__*/_jsx(Icon, {
@@ -57,7 +57,7 @@
57
57
  cursor: pointer;
58
58
  }
59
59
  .upload-wrapper-ui {
60
- border: 1px dashed #92B1F5 !important;
60
+ border: 1.5px dashed #2563EB !important;
61
61
  /* box-shadow: 0px 0px 25px rgba(0, 0, 0, 0.17) !important; */
62
62
  border-radius: 7px;
63
63
  display: flex;
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { signedTextFonts } from "../../../utils/font";
3
3
  import { Grid, Button, TextField, InputAdornment, IconButton, Typography } from "@mui/material";
4
- import ClearIcon from "@mui/icons-material/Clear";
4
+ import ClearRoundedIcon from '@mui/icons-material/ClearRounded';
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const TypeSignature = props => {
@@ -73,7 +73,7 @@ const TypeSignature = props => {
73
73
  position: "end",
74
74
  children: /*#__PURE__*/_jsx(IconButton, {
75
75
  onClick: () => setName(""),
76
- children: /*#__PURE__*/_jsx(ClearIcon, {})
76
+ children: /*#__PURE__*/_jsx(ClearRoundedIcon, {})
77
77
  })
78
78
  })
79
79
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment, Box } from "@mui/material";
3
- import CloseIcon from "@mui/icons-material/Close";
3
+ import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
4
4
  import DatePicker from "react-datepicker";
5
5
  import "react-datepicker/dist/react-datepicker.css";
6
6
  import SignatureOptions from "./SignatureOptions";
@@ -158,7 +158,7 @@ const SignaturePopup = props => {
158
158
  sx: {
159
159
  borderRadius: "8px",
160
160
  boxShadow: "0px 4px 10px 0px #00000029",
161
- maxWidth: "560px"
161
+ maxWidth: "530px"
162
162
  }
163
163
  },
164
164
  sx: classes.signaturePopup,
@@ -200,7 +200,7 @@ const SignaturePopup = props => {
200
200
  children: /*#__PURE__*/_jsx(IconButton, {
201
201
  onClick: handleClose,
202
202
  className: "close-popupbtn",
203
- children: /*#__PURE__*/_jsx(CloseIcon, {})
203
+ children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
204
204
  })
205
205
  })]
206
206
  })
@@ -316,25 +316,7 @@ const SignaturePopup = props => {
316
316
  defaultValue: defaultName || "",
317
317
  size: "small",
318
318
  onChange: onChange,
319
- sx: {
320
- "& .MuiOutlinedInput-root": {
321
- borderRadius: "10px",
322
- "& fieldset": {
323
- border: "1px solid #D8DDE1"
324
- }
325
- // '&:hover fieldset': {
326
- // borderColor: 'yourHoverColor',
327
- // },
328
- // '&.Mui-focused fieldset': {
329
- // borderColor: 'yourFocusedColor',
330
- // },
331
- },
332
-
333
- "& .MuiInputBase-input::placeholder": {
334
- fontFamily: '"Inter", sans-serif"',
335
- fontSize: "14px"
336
- }
337
- }
319
+ sx: classes.signaturePopUpNameField
338
320
  })
339
321
  })]
340
322
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -459,25 +441,7 @@ const SignaturePopup = props => {
459
441
  placeholder: "Enter Email",
460
442
  size: "small",
461
443
  onChange: onChange,
462
- sx: {
463
- "& .MuiOutlinedInput-root": {
464
- borderRadius: "10px",
465
- "& fieldset": {
466
- border: "1px solid #D8DDE1"
467
- }
468
- // '&:hover fieldset': {
469
- // borderColor: 'yourHoverColor',
470
- // },
471
- // '&.Mui-focused fieldset': {
472
- // borderColor: 'yourFocusedColor',
473
- // },
474
- },
475
-
476
- "& .MuiInputBase-input::placeholder": {
477
- fontFamily: '"Inter", sans-serif"',
478
- fontSize: "14px"
479
- }
480
- },
444
+ sx: classes.signaturePopUpNameField,
481
445
  defaultValue: defaultEmail || ""
482
446
  })
483
447
  })]
@@ -507,7 +471,8 @@ const SignaturePopup = props => {
507
471
  classes: classes,
508
472
  value: brush.color,
509
473
  onSave: onBrushColor,
510
- recentColors: []
474
+ recentColors: [],
475
+ hideGradient: true
511
476
  }), /*#__PURE__*/_jsx("span", {
512
477
  style: {
513
478
  marginLeft: "10px",
@@ -530,13 +495,13 @@ const SignaturePopup = props => {
530
495
  className: brush.size === m ? "activeBrush" : "",
531
496
  children: /*#__PURE__*/_jsx("span", {
532
497
  style: {
533
- width: 20 + m,
534
- height: 20 + m
498
+ width: 17 + m,
499
+ height: 17 + m
535
500
  },
536
501
  children: /*#__PURE__*/_jsx(PencilIcon, {
537
502
  style: {
538
- width: 20 + m,
539
- height: 20 + m
503
+ width: 17 + m,
504
+ height: 17 + m
540
505
  }
541
506
  })
542
507
  })
@@ -547,11 +512,11 @@ const SignaturePopup = props => {
547
512
  }) : null, /*#__PURE__*/_jsxs(_Fragment, {
548
513
  children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
549
514
  onClick: handleClear,
550
- className: "secondaryBtn actionBtn deleteBtn",
515
+ className: `secondaryBtn actionBtn deleteBtn deleteButtonSignature`,
551
516
  children: "Delete"
552
517
  }) : null, /*#__PURE__*/_jsx(Button, {
553
518
  onClick: handleSave,
554
- className: `primaryBtn actionBtn ${isEmpty ? "disabled" : ""}`,
519
+ className: `primaryBtn actionBtn ${isEmpty ? "disabled disabledSaveBtn" : ""}`,
555
520
  disabled: isEmpty,
556
521
  children: "Save"
557
522
  })]
@@ -5,6 +5,7 @@ import { getPageSettings } from "../../utils/pageSettings";
5
5
  import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
+ import { getBreakpointLineSpacing } from "../../helper/theme";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
11
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -32,8 +33,14 @@ const SimpleText = props => {
32
33
  const {
33
34
  pageColor
34
35
  } = pageSt?.pageProps || {};
36
+ const {
37
+ activeBreakPoint
38
+ } = useEditorContext();
39
+ const lineHeight = element?.children[0]?.lineHeight;
40
+ const lineH = getBreakpointLineSpacing(lineHeight, activeBreakPoint);
35
41
  const classes = SimpleTextStyle({
36
- pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF"
42
+ pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF",
43
+ lineHeight: lineH
37
44
  });
38
45
  const selected = useSelected();
39
46
  const path = ReactEditor.findPath(editor, element);
@@ -1,10 +1,22 @@
1
1
  import { invertColor } from "../../helper";
2
2
  const SimpleTextStyle = ({
3
- pageColor
3
+ pageColor,
4
+ lineHeight
4
5
  }) => ({
5
6
  root: {
6
7
  position: "relative",
7
8
  padding: "0px",
9
+ lineHeight: lineHeight,
10
+ "&.signature": {
11
+ "& .placeholder-simple-text": {
12
+ opacity: 0
13
+ }
14
+ },
15
+ "&.dataView, &.signature": {
16
+ "& .placeholder-simple-text": {
17
+ opacity: 0
18
+ }
19
+ },
8
20
  "& .placeholder-simple-text": {
9
21
  color: "#94A3B8",
10
22
  background: "transparent",