@flozy/editor 5.3.8 → 5.4.0

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 (192) hide show
  1. package/dist/Editor/ChatEditor.js +25 -34
  2. package/dist/Editor/CommonEditor.js +29 -15
  3. package/dist/Editor/Editor.css +100 -18
  4. package/dist/Editor/Elements/AI/AIInput.js +0 -1
  5. package/dist/Editor/Elements/AI/CustomSelect.js +19 -11
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +58 -52
  7. package/dist/Editor/Elements/AI/Styles.js +24 -6
  8. package/dist/Editor/Elements/Accordion/Accordion.js +8 -1
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
  10. package/dist/Editor/Elements/Button/EditorButton.js +9 -2
  11. package/dist/Editor/Elements/Carousel/CarouselItem.js +11 -3
  12. package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
  13. package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
  14. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  15. package/dist/Editor/Elements/DataView/DataView.js +124 -0
  16. package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
  17. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +67 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +33 -0
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
  21. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
  22. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +35 -0
  23. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -0
  24. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
  25. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
  26. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
  27. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
  28. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
  29. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
  30. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
  31. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
  32. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
  33. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
  34. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
  35. package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
  36. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
  37. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
  38. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
  39. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +60 -0
  40. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
  41. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
  42. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
  43. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
  44. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
  45. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
  46. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
  47. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
  48. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +112 -0
  49. package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
  50. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +80 -0
  51. package/dist/Editor/Elements/DataView/Layouts/colStyles.js +10 -0
  52. package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
  53. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +281 -0
  54. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
  55. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +74 -0
  56. package/dist/Editor/Elements/DataView/styles.js +154 -0
  57. package/dist/Editor/Elements/Divider/Divider.js +36 -20
  58. package/dist/Editor/Elements/Embed/Image.js +51 -16
  59. package/dist/Editor/Elements/Embed/Video.js +26 -3
  60. package/dist/Editor/Elements/Form/Form.js +39 -2
  61. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
  62. package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
  63. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
  64. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
  65. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
  66. package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
  67. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
  68. package/dist/Editor/Elements/Form/FormPopup.js +12 -9
  69. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  70. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
  71. package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
  72. package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
  73. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  74. package/dist/Editor/Elements/Grid/GridItem.js +47 -36
  75. package/dist/Editor/Elements/Grid/Styles.js +50 -0
  76. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  77. package/dist/Editor/Elements/List/CheckList.js +2 -1
  78. package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
  79. package/dist/Editor/Elements/Search/SearchButton.js +1 -0
  80. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  81. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  82. package/dist/Editor/Elements/Signature/SignaturePopup.js +17 -52
  83. package/dist/Editor/Elements/SimpleText/index.js +8 -1
  84. package/dist/Editor/Elements/SimpleText/style.js +20 -1
  85. package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
  86. package/dist/Editor/Elements/Table/DragButton.js +142 -0
  87. package/dist/Editor/Elements/Table/DragStyles.js +70 -0
  88. package/dist/Editor/Elements/Table/Draggable.js +25 -0
  89. package/dist/Editor/Elements/Table/Droppable.js +53 -0
  90. package/dist/Editor/Elements/Table/Styles.js +82 -79
  91. package/dist/Editor/Elements/Table/Table.js +258 -140
  92. package/dist/Editor/Elements/Table/TableCell.js +365 -111
  93. package/dist/Editor/Elements/Table/TablePopup.js +9 -3
  94. package/dist/Editor/Elements/Table/TableRow.js +10 -2
  95. package/dist/Editor/Elements/Table/TableTool.js +101 -0
  96. package/dist/Editor/Elements/Table/tableHelper.js +71 -0
  97. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
  98. package/dist/Editor/MiniEditor.js +15 -1
  99. package/dist/Editor/Styles/EditorStyles.js +13 -4
  100. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
  101. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -12
  102. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +26 -4
  103. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
  104. package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
  105. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
  106. package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
  107. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +7 -3
  108. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +6 -4
  109. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +19 -15
  110. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +555 -57
  111. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +73 -16
  112. package/dist/Editor/Toolbar/PopupTool/index.js +3 -5
  113. package/dist/Editor/Toolbar/Toolbar.js +6 -0
  114. package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
  115. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  116. package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
  117. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  118. package/dist/Editor/common/ColorPickerButton.js +85 -45
  119. package/dist/Editor/common/DnD/Draggable.js +2 -1
  120. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  121. package/dist/Editor/common/Icon.js +23 -20
  122. package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -1
  123. package/dist/Editor/common/ImageSelector/Styles.js +47 -6
  124. package/dist/Editor/common/ImageSelector/UploadStyles.js +18 -6
  125. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
  126. package/dist/Editor/common/LinkSettings/index.js +2 -1
  127. package/dist/Editor/common/MentionsPopup/Styles.js +143 -8
  128. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  129. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
  130. package/dist/Editor/common/RnD/GuideLines/styles.js +3 -3
  131. package/dist/Editor/common/RnD/ShadowElement.js +1 -1
  132. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
  133. package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -6
  134. package/dist/Editor/common/RnD/VirtualElement/index.js +5 -1
  135. package/dist/Editor/common/RnD/index.js +3 -2
  136. package/dist/Editor/common/Section/index.js +3 -3
  137. package/dist/Editor/common/Section/styles.js +5 -1
  138. package/dist/Editor/common/Select/index.js +20 -0
  139. package/dist/Editor/common/Select/styles.js +17 -0
  140. package/dist/Editor/common/Shorthands/elements.js +13 -1
  141. package/dist/Editor/common/StyleBuilder/fieldStyle.js +2 -1
  142. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +9 -3
  143. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +35 -7
  144. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -2
  145. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
  146. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +2 -1
  147. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
  148. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -0
  149. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
  150. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
  151. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
  152. package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +22 -6
  153. package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +21 -2
  154. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +20 -4
  155. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -2
  156. package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
  157. package/dist/Editor/common/StyleBuilder/index.js +101 -20
  158. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
  159. package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
  160. package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
  161. package/dist/Editor/common/ToolbarIcon.js +1 -1
  162. package/dist/Editor/common/Uploader.js +46 -36
  163. package/dist/Editor/common/iconListV2.js +616 -60
  164. package/dist/Editor/common/iconslist.js +23 -17
  165. package/dist/Editor/commonStyle.js +417 -11
  166. package/dist/Editor/helper/deserialize/index.js +19 -7
  167. package/dist/Editor/helper/enforceDateFormat.js +41 -0
  168. package/dist/Editor/helper/index.js +17 -4
  169. package/dist/Editor/helper/theme.js +24 -1
  170. package/dist/Editor/hooks/useMouseMove.js +5 -2
  171. package/dist/Editor/hooks/useTable.js +210 -0
  172. package/dist/Editor/plugins/withCustomDeleteBackward.js +36 -4
  173. package/dist/Editor/plugins/withEmbeds.js +30 -26
  174. package/dist/Editor/plugins/withHTML.js +61 -10
  175. package/dist/Editor/plugins/withLayout.js +1 -0
  176. package/dist/Editor/utils/SlateUtilityFunctions.js +39 -12
  177. package/dist/Editor/utils/brains.js +1 -1
  178. package/dist/Editor/utils/button.js +4 -4
  179. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +26 -1
  180. package/dist/Editor/utils/customHooks/useResize.js +7 -4
  181. package/dist/Editor/utils/customHooks/useTableResize.js +6 -2
  182. package/dist/Editor/utils/dataView.js +43 -0
  183. package/dist/Editor/utils/embed.js +2 -1
  184. package/dist/Editor/utils/events.js +0 -1
  185. package/dist/Editor/utils/font.js +11 -4
  186. package/dist/Editor/utils/formfield.js +8 -4
  187. package/dist/Editor/utils/helper.js +103 -2
  188. package/dist/Editor/utils/insertNewLine.js +19 -1
  189. package/dist/Editor/utils/pageSettings.js +14 -2
  190. package/dist/Editor/utils/serializeToText.js +2 -0
  191. package/dist/Editor/utils/table.js +228 -24
  192. package/package.json +2 -2
@@ -5,6 +5,7 @@ import { IconButton, Tooltip } from "@mui/material";
5
5
  import { GridSettingsIcon } from "../../common/iconslist";
6
6
  import DividerPopup from "./DividerPopup";
7
7
  import { Transforms } from "slate";
8
+ import useCommonStyle from "../../commonStyle";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const Divider = props => {
@@ -17,10 +18,11 @@ const Divider = props => {
17
18
  const {
18
19
  theme
19
20
  } = useEditorContext();
21
+ const classes = useCommonStyle(theme);
20
22
  const {
21
- borderColor = theme?.palette?.primary?.main || '#0F172A',
22
- borderWidth = '1px',
23
- borderStyle = 'solid'
23
+ borderColor = theme?.palette?.primary?.main || "#0F172A",
24
+ borderWidth = "1px",
25
+ borderStyle = "solid"
24
26
  } = element;
25
27
  const {
26
28
  readOnly
@@ -33,7 +35,7 @@ const Divider = props => {
33
35
  } = useEditorContext();
34
36
  const [showTool] = useEditorSelection(editor);
35
37
  const selected = hoverPath === path.join(",");
36
- const width = borderWidth?.includes('px') ? borderWidth : `${borderWidth}px`;
38
+ const width = borderWidth?.includes("px") ? borderWidth : `${borderWidth}px`;
37
39
  const onSettings = () => {
38
40
  setOpenSettings(true);
39
41
  };
@@ -43,16 +45,21 @@ const Divider = props => {
43
45
  showTool,
44
46
  onSettings
45
47
  }) => {
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
- } : {};
48
+ // const hoverStyles = readOnly
49
+ // ? {
50
+ // "&.MuiIconButton-root:hover": {
51
+ // background:
52
+ // theme?.palette?.type === "dark"
53
+ // ? `${theme?.palette?.greyshades?.light8} !important`
54
+ // : `${theme?.palette?.containers?.card} !important`,
55
+ // },
56
+ // }
57
+ // : {};
51
58
  return /*#__PURE__*/_jsx("div", {
52
59
  contentEditable: false,
53
60
  className: "divider-settings",
54
61
  style: {
55
- top: "-20px",
62
+ top: "-33px",
56
63
  left: 0
57
64
  },
58
65
  children: /*#__PURE__*/_jsx(Tooltip, {
@@ -61,14 +68,22 @@ const Divider = props => {
61
68
  children: /*#__PURE__*/_jsx(IconButton, {
62
69
  size: "small",
63
70
  sx: {
64
- background: theme?.palette?.type === 'dark' ? theme?.palette?.greyshades?.light8 : theme?.palette?.containers?.card,
65
- border: theme?.palette?.type === 'dark' ? '1px solid #E4E8EB33' : 'none',
66
- boxShadow: '0px 0px 4px 0px #00000040',
67
- borderRadius: '50%',
68
- '& svg': {
69
- stroke: theme?.palette?.text?.secondary3
71
+ // background:
72
+ // theme?.palette?.type === "dark"
73
+ // ? theme?.palette?.greyshades?.light8
74
+ // : theme?.palette?.containers?.card,
75
+ // border:
76
+ // theme?.palette?.type === "dark"
77
+ // ? "1px solid #E4E8EB33"
78
+ // : "none",
79
+ boxShadow: "0px 0px 4px 0px #00000040",
80
+ borderRadius: "50%",
81
+ "& svg": {
82
+ width: '16px',
83
+ height: '16px'
70
84
  },
71
- ...hoverStyles
85
+ // ...hoverStyles,
86
+ ...classes.buttonMoreOption
72
87
  },
73
88
  onClick: onSettings,
74
89
  children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
@@ -103,14 +118,15 @@ const Divider = props => {
103
118
  className: `dividerComponent`,
104
119
  style: {
105
120
  userSelect: "none",
106
- position: 'relative'
121
+ position: "relative"
107
122
  },
108
123
  contentEditable: false,
109
124
  children: [!readOnly && /*#__PURE__*/_jsx("div", {
110
125
  className: `element-root element-selector`,
111
126
  contentEditable: false,
112
127
  style: {
113
- zIndex: 1000
128
+ zIndex: 1000,
129
+ left: "0%"
114
130
  },
115
131
  children: /*#__PURE__*/_jsx(DividerToolbar, {
116
132
  selected: selected,
@@ -126,7 +142,7 @@ const Divider = props => {
126
142
  borderTop: !borderColor?.includes("linear") ? `${width} ${borderStyle} ${borderColor}` : `transparent`,
127
143
  backgroundImage: borderColor?.includes("linear") ? borderColor : "none",
128
144
  height: borderColor?.includes("linear") ? borderWidth : undefined,
129
- marginTop: '15px'
145
+ marginTop: "15px"
130
146
  }
131
147
  }), /*#__PURE__*/_jsx("span", {
132
148
  style: {
@@ -14,28 +14,33 @@ 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";
17
19
  import { jsx as _jsx } from "react/jsx-runtime";
18
20
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
21
  const ToolBar = ({
20
22
  isEmpty,
21
23
  onSettings,
22
- setOpenNav
24
+ setOpenNav,
25
+ topM,
26
+ classes
23
27
  }) => {
24
28
  return !isEmpty ? /*#__PURE__*/_jsxs("div", {
25
29
  className: "element-toolbar visible-on-hover",
26
30
  contentEditable: false,
27
31
  style: {
28
- top: "0px",
29
- right: "0px",
30
- left: "auto",
31
- margin: "0px"
32
+ top: "-4px",
33
+ left: topM ? "35px" : "0px",
34
+ margin: "0px",
35
+ gap: '3px'
32
36
  },
33
37
  children: [/*#__PURE__*/_jsx(Tooltip, {
34
38
  title: "Image Settings",
35
39
  arrow: true,
36
40
  children: /*#__PURE__*/_jsx(IconButton, {
37
41
  onClick: onSettings,
38
- children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
42
+ sx: classes.buttonMoreOption,
43
+ children: /*#__PURE__*/_jsx(SettingsIcon, {})
39
44
  })
40
45
  }), /*#__PURE__*/_jsx(Tooltip, {
41
46
  title: "Link Settings",
@@ -43,6 +48,7 @@ const ToolBar = ({
43
48
  children: /*#__PURE__*/_jsx(IconButton, {
44
49
  className: "last-btn",
45
50
  onClick: () => setOpenNav(true),
51
+ sx: classes.buttonMoreOption,
46
52
  children: /*#__PURE__*/_jsx(LinkIcon, {})
47
53
  })
48
54
  })]
@@ -64,18 +70,34 @@ const ImageContent = props => {
64
70
  handleImageClick,
65
71
  onTouchEnd,
66
72
  path,
67
- theme
73
+ theme,
74
+ classes
68
75
  } = props;
69
- return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
76
+ return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
70
77
  component: "button",
71
78
  className: "element-empty-btn",
72
79
  contentEditable: false,
73
80
  onClick: () => {
74
81
  setOpenSettings(true);
75
82
  },
83
+ sx: {
84
+ ...classes.emptyThumbBtn
85
+ },
76
86
  children: [/*#__PURE__*/_jsx(Icon, {
77
87
  icon: "image"
78
88
  }), "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."]
79
101
  }) : /*#__PURE__*/_jsx(Box, {
80
102
  component: "img",
81
103
  className: "emb-img",
@@ -155,7 +177,10 @@ const Image = props => {
155
177
  }, {
156
178
  at: path
157
179
  });
158
- }
180
+ },
181
+ MW: 32,
182
+ MH: 32,
183
+ MP: 2
159
184
  });
160
185
  const arr = Array.from(Node.elements(editor));
161
186
  const ele = arr.find(([elem]) => element === elem);
@@ -168,6 +193,10 @@ const Image = props => {
168
193
  onClick,
169
194
  onTouchEnd
170
195
  } = handleLinkType(webAddress, linkType, readOnly, isNewTab);
196
+ const {
197
+ theme: appTheme
198
+ } = useEditorContext();
199
+ const classes = useCommonStyle(appTheme);
171
200
  const handleImageClick = () => {
172
201
  try {
173
202
  Transforms.select(editor, {
@@ -277,7 +306,9 @@ const Image = props => {
277
306
  children: [!readOnly && /*#__PURE__*/_jsx(ToolBar, {
278
307
  isEmpty: isEmpty,
279
308
  onSettings: onSettings,
280
- setOpenNav: setOpenNav
309
+ setOpenNav: setOpenNav,
310
+ topM: size.width < 100,
311
+ classes: classes
281
312
  }), /*#__PURE__*/_jsx(ImageContent, {
282
313
  ...element,
283
314
  readOnly: readOnly,
@@ -285,7 +316,8 @@ const Image = props => {
285
316
  handleImageClick: handleImageClick,
286
317
  onTouchEnd: onTouchEnd,
287
318
  path: path,
288
- theme: theme
319
+ theme: theme,
320
+ classes: classes
289
321
  }), url && frames[frame] ? /*#__PURE__*/_jsx(Box, {
290
322
  component: "div",
291
323
  className: "image-frame",
@@ -301,11 +333,14 @@ const Image = props => {
301
333
  handleImageClick: handleImageClick
302
334
  })
303
335
  }) : null, selected && !readOnly && url && /*#__PURE__*/_jsx(IconButton, {
304
- onPointerDown: onMouseDown,
305
- style: {
306
- opacity: 1,
307
- background: "#FFF"
308
- },
336
+ onPointerDown: onMouseDown
337
+ // style={{
338
+ // opacity: 1,
339
+ // // background: "#FFF",
340
+ // // ...classes.resizeButton
341
+ // }}
342
+ ,
343
+ sx: classes.resizeButton,
309
344
  className: "resize-br visible-on-hover img-resizer",
310
345
  children: /*#__PURE__*/_jsx(AspectRatioIcon, {})
311
346
  })]
@@ -11,6 +11,8 @@ 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";
14
16
  import { jsx as _jsx } from "react/jsx-runtime";
15
17
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
18
  const VideoContent = props => {
@@ -68,15 +70,31 @@ const VideoPlaceholder = props => {
68
70
  const {
69
71
  url,
70
72
  readOnly,
71
- onSettings
73
+ onSettings,
74
+ classes
72
75
  } = props;
73
- return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
76
+ return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
74
77
  component: "button",
75
78
  className: "element-empty-btn",
76
79
  onClick: onSettings,
80
+ sx: {
81
+ ...classes.emptyThumbBtn
82
+ },
77
83
  children: [/*#__PURE__*/_jsx(Icon, {
78
84
  icon: "video"
79
85
  }), "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."]
80
98
  }) : /*#__PURE__*/_jsx(VideoContent, {
81
99
  ...props
82
100
  });
@@ -109,6 +127,10 @@ const Video = ({
109
127
  } = alignment || {};
110
128
  const path = ReactEditor.findPath(editor, element);
111
129
  const hasAspect = url && aspectRatio !== "custom" && aspectRatio;
130
+ const {
131
+ theme: appTheme
132
+ } = useEditorContext();
133
+ const classes = useCommonStyle(appTheme);
112
134
  const getSize = () => {
113
135
  if (element?.size === undefined) {
114
136
  return {
@@ -255,7 +277,8 @@ const Video = ({
255
277
  videoSX: videoSX,
256
278
  url: url,
257
279
  readOnly: readOnly,
258
- resizing: resizing
280
+ resizing: resizing,
281
+ classes: classes
259
282
  }), !readOnly && url ? /*#__PURE__*/_jsx(IconButton, {
260
283
  onPointerDown: onMouseDown,
261
284
  style: {
@@ -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
  });
@@ -366,6 +402,7 @@ const Form = props => {
366
402
  borderStyle: borderStyle || "solid",
367
403
  background: bgColor || "transparent",
368
404
  position: "relative",
405
+ lineHeight: 1.43,
369
406
  ...formSX
370
407
  },
371
408
  ref: formEle,
@@ -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
  }
@@ -171,6 +171,7 @@ const useFreeGridStyles = ({
171
171
  height: "100%",
172
172
  "& .signature-container": {
173
173
  height: "100%",
174
+ LineHeight: 1.43,
174
175
  "& .signature-btn-container": {
175
176
  height: "100%",
176
177
  display: "flex",
@@ -318,7 +319,7 @@ const useFreeGridStyles = ({
318
319
  "& .element-toolbar": {
319
320
  display: "none"
320
321
  },
321
- [theme.breakpoints.between("xs", "md")]: {
322
+ [theme?.breakpoints?.between("xs", "md")]: {
322
323
  marginLeft: `calc((100% - 320px) * 0.5)`
323
324
  }
324
325
  },