@flozy/editor 5.5.7 → 5.5.8

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 (198) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +13 -26
  3. package/dist/Editor/Editor.css +19 -102
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +53 -59
  7. package/dist/Editor/Elements/AI/Styles.js +6 -24
  8. package/dist/Editor/Elements/Accordion/Accordion.js +1 -8
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  10. package/dist/Editor/Elements/Button/EditorButton.js +1 -6
  11. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  12. package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
  13. package/dist/Editor/Elements/Color Picker/Styles.js +3 -8
  14. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  15. package/dist/Editor/Elements/Divider/Divider.js +20 -36
  16. package/dist/Editor/Elements/Embed/Image.js +16 -51
  17. package/dist/Editor/Elements/Embed/Video.js +3 -26
  18. package/dist/Editor/Elements/Form/Form.js +2 -38
  19. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  23. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  24. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  25. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  26. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  27. package/dist/Editor/Elements/Form/Workflow/Styles.js +0 -2
  28. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  29. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -4
  30. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  31. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  32. package/dist/Editor/Elements/FreeGrid/styles.js +1 -1
  33. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  34. package/dist/Editor/Elements/Grid/GridItem.js +36 -47
  35. package/dist/Editor/Elements/Grid/Styles.js +0 -50
  36. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  37. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  38. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  39. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  40. package/dist/Editor/Elements/Signature/SignaturePopup.js +52 -17
  41. package/dist/Editor/Elements/SimpleText/style.js +0 -15
  42. package/dist/Editor/Elements/Table/Styles.js +78 -88
  43. package/dist/Editor/Elements/Table/Table.js +140 -263
  44. package/dist/Editor/Elements/Table/TableCell.js +111 -365
  45. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  46. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  47. package/dist/Editor/Elements/TopBanner/TopBanner.js +1 -2
  48. package/dist/Editor/MiniEditor.js +2 -21
  49. package/dist/Editor/Styles/EditorStyles.js +4 -13
  50. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  51. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  52. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -26
  53. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  54. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
  55. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +8 -8
  56. package/dist/Editor/Toolbar/Mini/Styles.js +1 -9
  57. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +3 -7
  58. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -6
  59. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  60. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +58 -547
  61. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +16 -28
  62. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  63. package/dist/Editor/Toolbar/Toolbar.js +0 -6
  64. package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
  65. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  66. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  67. package/dist/Editor/common/ColorPickerButton.js +45 -85
  68. package/dist/Editor/common/DnD/Draggable.js +1 -2
  69. package/dist/Editor/common/FontLoader/FontLoader.js +2 -2
  70. package/dist/Editor/common/Icon.js +21 -54
  71. package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -2
  72. package/dist/Editor/common/ImageSelector/Styles.js +6 -47
  73. package/dist/Editor/common/ImageSelector/UploadStyles.js +6 -18
  74. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  75. package/dist/Editor/common/LinkSettings/index.js +1 -2
  76. package/dist/Editor/common/MentionsPopup/Styles.js +8 -142
  77. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  78. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
  79. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  80. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  81. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  82. package/dist/Editor/common/RnD/index.js +3 -4
  83. package/dist/Editor/common/Section/index.js +3 -3
  84. package/dist/Editor/common/Section/styles.js +1 -5
  85. package/dist/Editor/common/Shorthands/elements.js +1 -13
  86. package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -2
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -4
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -35
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +2 -15
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +1 -2
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +0 -2
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +6 -22
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -21
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -20
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -12
  98. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  99. package/dist/Editor/common/StyleBuilder/index.js +20 -101
  100. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  101. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  102. package/dist/Editor/common/ToolbarIcon.js +1 -1
  103. package/dist/Editor/common/Uploader.js +37 -39
  104. package/dist/Editor/common/iconListV2.js +74 -598
  105. package/dist/Editor/common/iconslist.js +19 -25
  106. package/dist/Editor/commonStyle.js +15 -421
  107. package/dist/Editor/helper/deserialize/index.js +2 -31
  108. package/dist/Editor/helper/index.js +2 -15
  109. package/dist/Editor/helper/theme.js +1 -15
  110. package/dist/Editor/hooks/useBreakpoints.js +1 -1
  111. package/dist/Editor/plugins/withCustomDeleteBackward.js +1 -1
  112. package/dist/Editor/plugins/withEmbeds.js +26 -30
  113. package/dist/Editor/plugins/withHTML.js +12 -100
  114. package/dist/Editor/plugins/withLayout.js +0 -1
  115. package/dist/Editor/utils/SlateUtilityFunctions.js +11 -31
  116. package/dist/Editor/utils/brains.js +1 -1
  117. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
  118. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  119. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  120. package/dist/Editor/utils/embed.js +1 -2
  121. package/dist/Editor/utils/events.js +1 -0
  122. package/dist/Editor/utils/font.js +4 -11
  123. package/dist/Editor/utils/formfield.js +4 -8
  124. package/dist/Editor/utils/helper.js +2 -100
  125. package/dist/Editor/utils/insertNewLine.js +1 -19
  126. package/dist/Editor/utils/serializeToText.js +0 -2
  127. package/dist/Editor/utils/table.js +24 -228
  128. package/package.json +2 -2
  129. package/dist/Editor/Elements/DataView/DataView.js +0 -124
  130. package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
  131. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -83
  132. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -33
  133. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -180
  134. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -62
  135. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -68
  136. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -35
  137. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -39
  138. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
  139. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
  140. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
  141. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
  142. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
  143. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
  144. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
  145. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -86
  146. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -71
  147. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -138
  148. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -213
  149. package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
  150. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
  151. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -44
  152. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -146
  153. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -79
  154. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -57
  155. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
  156. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -174
  157. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -241
  158. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -45
  159. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -32
  160. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
  161. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -217
  162. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -131
  163. package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -253
  164. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -85
  165. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +0 -10
  166. package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
  167. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -277
  168. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
  169. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -88
  170. package/dist/Editor/Elements/DataView/styles.js +0 -169
  171. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  172. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  173. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  174. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  175. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  176. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  177. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  178. package/dist/Editor/assets/svg/ArrowDownIcon.js +0 -25
  179. package/dist/Editor/assets/svg/ArrowUpIcon.js +0 -25
  180. package/dist/Editor/assets/svg/CalenderIconTick.js +0 -64
  181. package/dist/Editor/assets/svg/ChervDown.js +0 -18
  182. package/dist/Editor/assets/svg/ChervUp.js +0 -18
  183. package/dist/Editor/assets/svg/DataTableIcon.js +0 -50
  184. package/dist/Editor/assets/svg/DuplicateIcon.js +0 -23
  185. package/dist/Editor/assets/svg/EyeIcon.js +0 -23
  186. package/dist/Editor/assets/svg/EyeSlash.js +0 -43
  187. package/dist/Editor/assets/svg/HashtagIcon.js +0 -33
  188. package/dist/Editor/assets/svg/PlusIcon.js +0 -23
  189. package/dist/Editor/assets/svg/SelectRoundedIcon.js +0 -24
  190. package/dist/Editor/assets/svg/SortByIcon.js +0 -33
  191. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  192. package/dist/Editor/assets/svg/TickOutlined.js +0 -23
  193. package/dist/Editor/assets/svg/TrashCanIcon.js +0 -38
  194. package/dist/Editor/common/Select/index.js +0 -20
  195. package/dist/Editor/common/Select/styles.js +0 -17
  196. package/dist/Editor/helper/enforceDateFormat.js +0 -41
  197. package/dist/Editor/hooks/useTable.js +0 -210
  198. package/dist/Editor/utils/dataView.js +0 -43
@@ -14,33 +14,28 @@ import ImageFrame from "./Frames/ImageFrame";
14
14
  import LinkSettings from "../../common/LinkSettings";
15
15
  import { handleLinkType } from "../../utils/helper";
16
16
  import { wrapThemeBreakpoints } from "../FreeGrid/breakpointConstants";
17
- import useCommonStyle from "../../commonStyle";
18
- import SettingsIcon from "../../assets/svg/SettingsIcon";
19
17
  import { jsx as _jsx } from "react/jsx-runtime";
20
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
21
19
  const ToolBar = ({
22
20
  isEmpty,
23
21
  onSettings,
24
- setOpenNav,
25
- topM,
26
- classes
22
+ setOpenNav
27
23
  }) => {
28
24
  return !isEmpty ? /*#__PURE__*/_jsxs("div", {
29
25
  className: "element-toolbar visible-on-hover",
30
26
  contentEditable: false,
31
27
  style: {
32
- top: "-4px",
33
- left: topM ? "35px" : "0px",
34
- margin: "0px",
35
- gap: '3px'
28
+ top: "0px",
29
+ right: "0px",
30
+ left: "auto",
31
+ margin: "0px"
36
32
  },
37
33
  children: [/*#__PURE__*/_jsx(Tooltip, {
38
34
  title: "Image Settings",
39
35
  arrow: true,
40
36
  children: /*#__PURE__*/_jsx(IconButton, {
41
37
  onClick: onSettings,
42
- sx: classes.buttonMoreOption,
43
- children: /*#__PURE__*/_jsx(SettingsIcon, {})
38
+ children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
44
39
  })
45
40
  }), /*#__PURE__*/_jsx(Tooltip, {
46
41
  title: "Link Settings",
@@ -48,7 +43,6 @@ const ToolBar = ({
48
43
  children: /*#__PURE__*/_jsx(IconButton, {
49
44
  className: "last-btn",
50
45
  onClick: () => setOpenNav(true),
51
- sx: classes.buttonMoreOption,
52
46
  children: /*#__PURE__*/_jsx(LinkIcon, {})
53
47
  })
54
48
  })]
@@ -70,34 +64,18 @@ const ImageContent = props => {
70
64
  handleImageClick,
71
65
  onTouchEnd,
72
66
  path,
73
- theme,
74
- classes
67
+ theme
75
68
  } = props;
76
- return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
69
+ return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
77
70
  component: "button",
78
71
  className: "element-empty-btn",
79
72
  contentEditable: false,
80
73
  onClick: () => {
81
74
  setOpenSettings(true);
82
75
  },
83
- sx: {
84
- ...classes.emptyThumbBtn
85
- },
86
76
  children: [/*#__PURE__*/_jsx(Icon, {
87
77
  icon: "image"
88
78
  }), "Add Image"]
89
- }) : /*#__PURE__*/_jsxs(Box, {
90
- sx: {
91
- color: "#64748B !important",
92
- "& svg": {
93
- color: "#64748B"
94
- }
95
- },
96
- component: "button",
97
- className: "element-empty-btn",
98
- children: [/*#__PURE__*/_jsx(Icon, {
99
- icon: "shieldNoAccess"
100
- }), "The Content is no longer available."]
101
79
  }) : /*#__PURE__*/_jsx(Box, {
102
80
  component: "img",
103
81
  className: "emb-img",
@@ -177,10 +155,7 @@ const Image = props => {
177
155
  }, {
178
156
  at: path
179
157
  });
180
- },
181
- MW: 32,
182
- MH: 32,
183
- MP: 2
158
+ }
184
159
  });
185
160
  const arr = Array.from(Node.elements(editor));
186
161
  const ele = arr.find(([elem]) => element === elem);
@@ -193,10 +168,6 @@ const Image = props => {
193
168
  onClick,
194
169
  onTouchEnd
195
170
  } = handleLinkType(webAddress, linkType, readOnly, isNewTab);
196
- const {
197
- theme: appTheme
198
- } = useEditorContext();
199
- const classes = useCommonStyle(appTheme);
200
171
  const handleImageClick = () => {
201
172
  try {
202
173
  Transforms.select(editor, {
@@ -306,9 +277,7 @@ const Image = props => {
306
277
  children: [!readOnly && /*#__PURE__*/_jsx(ToolBar, {
307
278
  isEmpty: isEmpty,
308
279
  onSettings: onSettings,
309
- setOpenNav: setOpenNav,
310
- topM: size.width < 100,
311
- classes: classes
280
+ setOpenNav: setOpenNav
312
281
  }), /*#__PURE__*/_jsx(ImageContent, {
313
282
  ...element,
314
283
  readOnly: readOnly,
@@ -316,8 +285,7 @@ const Image = props => {
316
285
  handleImageClick: handleImageClick,
317
286
  onTouchEnd: onTouchEnd,
318
287
  path: path,
319
- theme: theme,
320
- classes: classes
288
+ theme: theme
321
289
  }), url && frames[frame] ? /*#__PURE__*/_jsx(Box, {
322
290
  component: "div",
323
291
  className: "image-frame",
@@ -333,14 +301,11 @@ const Image = props => {
333
301
  handleImageClick: handleImageClick
334
302
  })
335
303
  }) : null, selected && !readOnly && url && /*#__PURE__*/_jsx(IconButton, {
336
- onPointerDown: onMouseDown
337
- // style={{
338
- // opacity: 1,
339
- // // background: "#FFF",
340
- // // ...classes.resizeButton
341
- // }}
342
- ,
343
- sx: classes.resizeButton,
304
+ onPointerDown: onMouseDown,
305
+ style: {
306
+ opacity: 1,
307
+ background: "#FFF"
308
+ },
344
309
  className: "resize-br visible-on-hover img-resizer",
345
310
  children: /*#__PURE__*/_jsx(AspectRatioIcon, {})
346
311
  })]
@@ -11,8 +11,6 @@ import { GridSettingsIcon } from "../../common/iconslist";
11
11
  import { gradientBorder } from "../../utils/helper";
12
12
  import { getEmbedURL } from "../../helper";
13
13
  import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
14
- import { useEditorContext } from "../../hooks/useMouseMove";
15
- import useCommonStyle from "../../commonStyle";
16
14
  import { jsx as _jsx } from "react/jsx-runtime";
17
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
18
16
  const VideoContent = props => {
@@ -70,31 +68,15 @@ const VideoPlaceholder = props => {
70
68
  const {
71
69
  url,
72
70
  readOnly,
73
- onSettings,
74
- classes
71
+ onSettings
75
72
  } = props;
76
- return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
73
+ return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
77
74
  component: "button",
78
75
  className: "element-empty-btn",
79
76
  onClick: onSettings,
80
- sx: {
81
- ...classes.emptyThumbBtn
82
- },
83
77
  children: [/*#__PURE__*/_jsx(Icon, {
84
78
  icon: "video"
85
79
  }), "Embed Video or Other"]
86
- }) : /*#__PURE__*/_jsxs(Box, {
87
- sx: {
88
- color: "#64748B !important",
89
- "& svg": {
90
- color: "#64748B"
91
- }
92
- },
93
- component: "button",
94
- className: "element-empty-btn",
95
- children: [/*#__PURE__*/_jsx(Icon, {
96
- icon: "shieldNoAccess"
97
- }), "The Content is no longer available."]
98
80
  }) : /*#__PURE__*/_jsx(VideoContent, {
99
81
  ...props
100
82
  });
@@ -127,10 +109,6 @@ const Video = ({
127
109
  } = alignment || {};
128
110
  const path = ReactEditor.findPath(editor, element);
129
111
  const hasAspect = url && aspectRatio !== "custom" && aspectRatio;
130
- const {
131
- theme: appTheme
132
- } = useEditorContext();
133
- const classes = useCommonStyle(appTheme);
134
112
  const getSize = () => {
135
113
  if (element?.size === undefined) {
136
114
  return {
@@ -277,8 +255,7 @@ const Video = ({
277
255
  videoSX: videoSX,
278
256
  url: url,
279
257
  readOnly: readOnly,
280
- resizing: resizing,
281
- classes: classes
258
+ resizing: resizing
282
259
  }), !readOnly && url ? /*#__PURE__*/_jsx(IconButton, {
283
260
  onPointerDown: onMouseDown,
284
261
  style: {
@@ -1,6 +1,5 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
2
  import { Transforms } from "slate";
3
- import { Node } from "slate";
4
3
  import { useSlateStatic, ReactEditor } from "slate-react";
5
4
  import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
6
5
  import DeleteIcon from "@mui/icons-material/Delete";
@@ -49,15 +48,7 @@ const Form = props => {
49
48
  textSize,
50
49
  fontFamily,
51
50
  textAlign,
52
- alignment,
53
- fieldFontFamily,
54
- fieldFontWeight,
55
- fieldTextSize,
56
- fieldTextColor,
57
- fieldBgColor,
58
- fieldBorderColor,
59
- fieldBorderWidth,
60
- fieldBorderStyle
51
+ alignment
61
52
  } = element;
62
53
  const btnR = buttonProps?.borderRadius || {};
63
54
  const btnSpacing = buttonProps?.bannerSpacing || {};
@@ -199,24 +190,6 @@ const Form = props => {
199
190
  }, {
200
191
  at: path
201
192
  });
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
- }
220
193
  onClose();
221
194
  };
222
195
  const onClose = () => {
@@ -225,16 +198,7 @@ const Form = props => {
225
198
  const onAddFormField = () => {
226
199
  try {
227
200
  Transforms.insertNodes(editor, {
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
- })
201
+ ...formField()
238
202
  }, {
239
203
  at: [...path, children.length]
240
204
  });
@@ -16,9 +16,6 @@ const FormCheckbox = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -49,10 +46,7 @@ const FormCheckbox = props => {
49
46
  },
50
47
  borderStyle: borderStyle || "solid",
51
48
  color: textColor || "#000",
52
- background: bgColor || "transparent",
53
- fontFamily: fontFamily || "PoppinsRegular",
54
- fontSize: textSize || "inherit",
55
- fontWeight: `${fontWeight} !important` || "400 !important"
49
+ background: bgColor || "transparent"
56
50
  }
57
51
  })
58
52
  });
@@ -16,9 +16,6 @@ const FormDate = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -50,10 +47,7 @@ const FormDate = props => {
50
47
  borderStyle: borderStyle || "solid",
51
48
  color: textColor || "#000",
52
49
  background: bgColor || "transparent",
53
- paddingRight: '85px !important',
54
- fontFamily: fontFamily || "PoppinsRegular",
55
- fontSize: textSize || "inherit",
56
- fontWeight: `${fontWeight} !important` || "400 !important"
50
+ paddingRight: '85px !important'
57
51
  }
58
52
  })
59
53
  });
@@ -16,9 +16,6 @@ const FormEmail = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -50,10 +47,7 @@ const FormEmail = props => {
50
47
  },
51
48
  borderStyle: borderStyle || "solid",
52
49
  color: textColor || "#000",
53
- background: bgColor || "transparent",
54
- fontFamily: fontFamily || "PoppinsRegular",
55
- fontSize: textSize || "inherit",
56
- fontWeight: `${fontWeight} !important` || "400 !important"
50
+ background: bgColor || "transparent"
57
51
  }
58
52
  })
59
53
  });
@@ -16,9 +16,6 @@ const FormNumbers = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -66,10 +63,7 @@ const FormNumbers = props => {
66
63
  },
67
64
  borderStyle: borderStyle || "solid",
68
65
  color: textColor || "#000",
69
- background: bgColor || "transparent",
70
- fontFamily: fontFamily || "PoppinsRegular",
71
- fontSize: textSize || "inherit",
72
- fontWeight: `${fontWeight} !important` || "400 !important"
66
+ background: bgColor || "transparent"
73
67
  }
74
68
  })
75
69
  });
@@ -16,9 +16,6 @@ const FormRadioButton = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -49,10 +46,7 @@ const FormRadioButton = props => {
49
46
  },
50
47
  borderStyle: borderStyle || "solid",
51
48
  color: textColor || "#000",
52
- background: bgColor || "transparent",
53
- fontFamily: fontFamily || "PoppinsRegular",
54
- fontSize: textSize || "inherit",
55
- fontWeight: `${fontWeight} !important` || "400 !important"
49
+ background: bgColor || "transparent"
56
50
  }
57
51
  })
58
52
  });
@@ -16,9 +16,6 @@ const FormText = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -48,10 +45,7 @@ const FormText = props => {
48
45
  },
49
46
  borderStyle: borderStyle || "solid",
50
47
  color: textColor || "#000",
51
- background: bgColor || "transparent",
52
- fontSize: textSize || "inherit",
53
- fontFamily: fontFamily || "PoppinsRegular",
54
- fontWeight: `${fontWeight} !important` || "400 !important"
48
+ background: bgColor || "transparent"
55
49
  }
56
50
  })
57
51
  });
@@ -15,9 +15,6 @@ const FormTextArea = props => {
15
15
  borderColor,
16
16
  textColor,
17
17
  bgColor,
18
- textSize,
19
- fontFamily,
20
- fontWeight,
21
18
  ...rest
22
19
  } = fieldProps;
23
20
  const onChange = e => {
@@ -48,9 +45,7 @@ const FormTextArea = props => {
48
45
  borderStyle: borderStyle || "solid",
49
46
  color: `${textColor || "#000"} !important`,
50
47
  background: `${bgColor || "transparent"} !important`,
51
- fontSize: textSize || "14px",
52
- fontFamily: fontFamily || "PoppinsRegular",
53
- fontWeight: `${fontWeight} !important` || "400 !important"
48
+ fontSize: '14px'
54
49
  }
55
50
  })
56
51
  });
@@ -1,8 +1,7 @@
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";
6
5
  const FormPopup = props => {
7
6
  const {
8
7
  element,
@@ -10,16 +9,14 @@ const FormPopup = props => {
10
9
  onClose,
11
10
  customProps
12
11
  } = props;
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
- })
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
23
20
  });
24
21
  };
25
22
  export default FormPopup;
@@ -19,7 +19,6 @@ const FormStyles = theme => ({
19
19
  "& .editorWorkflow": {
20
20
  minHeight: '130px',
21
21
  padding: '12px',
22
- paddingBottom: 0,
23
22
  '&:focus-visible': {
24
23
  outline: 'none',
25
24
  border: 'none'
@@ -105,7 +104,6 @@ const FormStyles = theme => ({
105
104
  padding: "4px 22px",
106
105
  textTransform: "none",
107
106
  border: "1px solid #D8DDE1",
108
- minWidth: '126px',
109
107
  "& svg": {
110
108
  "& path": {
111
109
  stroke: "#64748B"
@@ -276,7 +276,7 @@ const FreeGrid = props => {
276
276
  ...insertFreeGridItem("table", {
277
277
  ...DEFAULT_TABLE_NODE()
278
278
  }, {
279
- height: 150,
279
+ height: 130,
280
280
  width: 400
281
281
  })
282
282
  }], {
@@ -25,8 +25,7 @@ const FreeGridBox = props => {
25
25
  const editor = useSlateStatic();
26
26
  const path = ReactEditor.findPath(editor, element);
27
27
  const {
28
- readOnly,
29
- hideTools
28
+ readOnly
30
29
  } = customProps;
31
30
  const {
32
31
  updated_at,
@@ -148,13 +147,12 @@ const FreeGridBox = props => {
148
147
  }
149
148
  };
150
149
  const repeatTimes = Math.floor(height / ROW_HEIGHT);
151
- const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
152
150
  return /*#__PURE__*/_jsx(RnD, {
153
151
  id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
154
152
  className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
155
153
  editor: editor,
156
154
  path: path,
157
- actions: sectionTypeOptions,
155
+ actions: itemOptions?.box,
158
156
  settingsProps: {
159
157
  settings: "freegridBoxItem",
160
158
  onChange: onChangeSettings,
@@ -144,27 +144,8 @@ 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];
157
147
  Transforms.insertNodes(editor, {
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
- })
148
+ ...formField()
168
149
  }, {
169
150
  at: [...path, 0, 0]
170
151
  });
@@ -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";
4
5
  import ToolbarIcon from "../../common/ToolbarIcon";
5
6
  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(GridElement, {}),
49
+ icon: /*#__PURE__*/_jsx(GridIcon, {}),
50
50
  icoBtnType: icoBtnType
51
51
  }), /*#__PURE__*/_jsxs(Dialog, {
52
52
  open: open,