@flozy/editor 10.3.8 → 10.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 (189) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +18 -134
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +8 -46
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/Accordion/Accordion.js +9 -46
  7. package/dist/Editor/Elements/Accordion/AccordionSummary.js +23 -1
  8. package/dist/Editor/Elements/AppHeader/AppHeader.js +5 -10
  9. package/dist/Editor/Elements/Button/EditorButton.js +9 -27
  10. package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
  11. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  13. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  14. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  15. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +8 -23
  17. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -5
  18. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  19. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  20. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  21. package/dist/Editor/Elements/Embed/Image.js +2 -3
  22. package/dist/Editor/Elements/Embed/Video.js +1 -1
  23. package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
  24. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  25. package/dist/Editor/Elements/Form/Form.js +171 -184
  26. package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
  27. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -2
  28. package/dist/Editor/Elements/Form/FormField.js +6 -13
  29. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  30. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +32 -40
  31. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  32. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
  33. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  34. package/dist/Editor/Elements/FreeGrid/styles.js +7 -75
  35. package/dist/Editor/Elements/Grid/Grid.js +2 -14
  36. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  37. package/dist/Editor/Elements/List/CheckList.js +2 -3
  38. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  39. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  40. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  41. package/dist/Editor/Elements/Signature/Signature.css +1 -2
  42. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
  43. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
  44. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  45. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  46. package/dist/Editor/Elements/Table/DragButton.js +1 -0
  47. package/dist/Editor/Elements/Table/Draggable.js +2 -6
  48. package/dist/Editor/Elements/Table/Styles.js +0 -7
  49. package/dist/Editor/Elements/Table/Table.js +3 -3
  50. package/dist/Editor/Elements/Table/TableCell.js +8 -31
  51. package/dist/Editor/Elements/Title/title.js +6 -6
  52. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  53. package/dist/Editor/MiniEditor.js +1 -2
  54. package/dist/Editor/Styles/EditorStyles.js +5 -5
  55. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  56. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  57. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  58. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  59. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  60. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  61. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  62. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  63. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  64. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  65. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  66. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  67. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  68. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  69. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  70. package/dist/Editor/common/ColorPickerButton.js +16 -41
  71. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  72. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  73. package/dist/Editor/common/Icon.js +1 -31
  74. package/dist/Editor/common/ImageSelector/ImageSelector.js +2 -2
  75. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  76. package/dist/Editor/common/LinkSettings/NavComponents.js +56 -61
  77. package/dist/Editor/common/LinkSettings/index.js +81 -82
  78. package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
  79. package/dist/Editor/common/LinkSettings/style.js +74 -209
  80. package/dist/Editor/common/RnD/ElementOptions/Actions.js +15 -13
  81. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  82. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  83. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  84. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
  85. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
  86. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  87. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  88. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  89. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  90. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  91. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  92. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  93. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  94. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  95. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -146
  96. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  97. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -120
  98. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  99. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  100. package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
  101. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  102. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -42
  103. package/dist/Editor/common/RnD/VirtualElement/helper.js +132 -323
  104. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
  105. package/dist/Editor/common/RnD/index.js +39 -68
  106. package/dist/Editor/common/Select/index.js +5 -44
  107. package/dist/Editor/common/Select/styles.js +2 -30
  108. package/dist/Editor/common/Shorthands/elements.js +11 -65
  109. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
  110. package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +9 -12
  111. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  112. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
  113. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  114. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  115. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  116. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  117. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  118. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  119. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  120. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  121. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  122. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  123. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  124. package/dist/Editor/common/SwipeableDrawer/style.js +12 -14
  125. package/dist/Editor/common/Uploader.js +0 -16
  126. package/dist/Editor/common/iconListV2.js +6 -177
  127. package/dist/Editor/common/iconslist.js +0 -24
  128. package/dist/Editor/commonStyle.js +62 -186
  129. package/dist/Editor/helper/index.js +1 -5
  130. package/dist/Editor/helper/theme.js +2 -203
  131. package/dist/Editor/hooks/useMouseMove.js +5 -8
  132. package/dist/Editor/hooks/useTable.js +4 -5
  133. package/dist/Editor/plugins/withEmbeds.js +1 -1
  134. package/dist/Editor/plugins/withHTML.js +1 -3
  135. package/dist/Editor/plugins/withTable.js +1 -1
  136. package/dist/Editor/theme/ThemeList.js +173 -50
  137. package/dist/Editor/utils/SlateUtilityFunctions.js +46 -172
  138. package/dist/Editor/utils/accordion.js +4 -14
  139. package/dist/Editor/utils/button.js +17 -1
  140. package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
  141. package/dist/Editor/utils/draftToSlate.js +2 -3
  142. package/dist/Editor/utils/events.js +6 -50
  143. package/dist/Editor/utils/font.js +37 -40
  144. package/dist/Editor/utils/form.js +4 -4
  145. package/dist/Editor/utils/formfield.js +2 -9
  146. package/dist/Editor/utils/helper.js +26 -188
  147. package/dist/Editor/utils/insertAppHeader.js +1 -1
  148. package/dist/Editor/utils/signature.js +9 -2
  149. package/package.json +4 -4
  150. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  151. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  152. package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
  153. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  154. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  155. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  156. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  157. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  158. package/dist/Editor/common/Checkbox/index.js +0 -46
  159. package/dist/Editor/common/Checkbox/styles.js +0 -45
  160. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  161. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  162. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  163. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  164. package/dist/Editor/common/CustomSelect.js +0 -43
  165. package/dist/Editor/common/RadioGroup/index.js +0 -48
  166. package/dist/Editor/common/RadioGroup/styles.js +0 -29
  167. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  168. package/dist/Editor/common/SnackBar/index.js +0 -43
  169. package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
  170. package/dist/Editor/helper/textIndeces.js +0 -58
  171. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  172. package/dist/Editor/hooks/useThemeValues.js +0 -63
  173. package/dist/Editor/theme/index.js +0 -149
  174. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  175. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  176. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  177. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  178. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  179. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  180. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  181. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  182. package/dist/Editor/themeSettings/icons.js +0 -60
  183. package/dist/Editor/themeSettings/index.js +0 -380
  184. package/dist/Editor/themeSettings/style.js +0 -299
  185. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  186. package/dist/Editor/themeSettingsAI/index.js +0 -355
  187. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  188. package/dist/Editor/themeSettingsAI/style.js +0 -332
  189. package/dist/Editor/utils/updateFormName.js +0 -22
@@ -8,8 +8,7 @@ const VideoSettings = props => {
8
8
  const {
9
9
  editor,
10
10
  path,
11
- customProps,
12
- onClose
11
+ customProps
13
12
  } = props;
14
13
  const item_path = path?.split("|").map(m => parseInt(m));
15
14
  const element_path = [...item_path, 0];
@@ -29,7 +28,7 @@ const VideoSettings = props => {
29
28
  });
30
29
  };
31
30
  const handleClose = () => {
32
- onClose();
31
+ console.log("close");
33
32
  };
34
33
  return /*#__PURE__*/_jsx(Box, {
35
34
  component: "div",
@@ -1,9 +1,8 @@
1
1
  const useElementSettingsStyle = theme => ({
2
2
  root: {
3
3
  zIndex: 1200,
4
- background: theme?.palette?.editor?.miniToolBarBackground,
5
- border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder}`,
6
- borderRadius: "20px",
4
+ background: theme?.palette?.editor?.background,
5
+ borderRadius: "10px",
7
6
  overflow: "hidden",
8
7
  boxShadow: "0px 0px 12px 4px #00000014",
9
8
  padding: "10px 16px",
@@ -59,34 +58,28 @@ const useElementSettingsStyle = theme => ({
59
58
  maxHeight: "500px",
60
59
  overflowX: "hidden",
61
60
  overflowY: "auto",
62
- background: theme?.palette?.editor?.miniToolBarBackground,
63
- paddingLeft: "2px",
64
- paddingRight: "6px",
65
- overflow: "hidden",
66
- "&:hover": {
67
- overflowY: "auto",
68
- "&::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb": {
69
- background: `${theme?.palette?.editor?.brainPopupScroll} !important`
70
- },
71
- "&::-webkit-scrollbar-track, ::-webkit-scrollbar-track": {
72
- visibility: "hidden"
73
- }
74
- },
61
+ background: theme?.palette?.editor?.background,
62
+ paddingLeft: "4px",
75
63
  "& .MuiTypography-root, .MuiInputBase-root, input": {
76
64
  color: theme?.palette?.editor?.textColor
77
65
  },
66
+ "& .MuiInputBase-root, input": {
67
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`
68
+ },
78
69
  "& .borderInput": {
79
70
  background: theme?.palette?.editor?.background,
80
71
  color: theme?.palette?.editor?.textColor
81
72
  },
73
+ "& .MuiCheckbox-root": {
74
+ "& svg": {
75
+ fill: theme?.palette?.editor?.textColor
76
+ }
77
+ },
82
78
  "& .fillPath": {
83
79
  fill: theme?.palette?.editor?.textColor
84
80
  },
85
81
  "& .MuiIconButton-root": {
86
82
  color: theme?.palette?.editor?.textColor
87
- },
88
- "& .MuiFormHelperText-root": {
89
- color: theme?.palette?.editor?.textColor
90
83
  }
91
84
  },
92
85
  "& .item-wrapper": {
@@ -111,133 +104,6 @@ const useElementSettingsStyle = theme => ({
111
104
  }
112
105
  }
113
106
  }
114
- },
115
- "& .settingsPopUp": {
116
- background: theme?.palette?.editor?.miniToolBarBackground,
117
- "& .text-formatter-popup": {
118
- paddingRight: "10px",
119
- overflow: "hidden",
120
- "&:hover": {
121
- overflow: "auto",
122
- "&::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb": {
123
- background: `${theme?.palette?.editor?.brainPopupScroll} !important`
124
- },
125
- "&::-webkit-scrollbar-track, ::-webkit-scrollbar-track": {
126
- visibility: "hidden"
127
- }
128
- },
129
- "& .more-btn-cbs": {
130
- color: `${theme?.palette?.editor?.closeButtonSvgStroke}`,
131
- border: `1px solid ${theme?.palette?.editor?.closeButtonSvgStroke}`,
132
- paddingTop: "10px",
133
- "& svg": {
134
- width: "20px",
135
- height: "24px"
136
- }
137
- },
138
- "& .MuiInputBase-root": {
139
- height: "36px"
140
- }
141
- },
142
- "& .popUpHeader": {
143
- fontFamily: "'Inter',sans-serif",
144
- fontWeight: "700",
145
- fontSize: "16px",
146
- lineHeight: "25px",
147
- "& button": {
148
- background: theme?.palette?.editor?.closeButtonBackground,
149
- borderRadius: "8px",
150
- "& svg": {
151
- fill: theme?.palette?.editor?.closeButtonSvgStroke
152
- }
153
- }
154
- },
155
- "& .MuiTypography-root": {
156
- color: `${theme?.palette?.editor?.textColor} !important`
157
- },
158
- "& .MuiInputBase-root": {
159
- background: theme?.palette?.editor?.inputFieldBgColor,
160
- borderRadius: "8px",
161
- fontSize: "12px",
162
- height: "36px",
163
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
164
- "& fieldset": {
165
- border: `1px solid transparent !important`,
166
- background: "transparent",
167
- borderRadius: "8px"
168
- // fontSize: "12px",
169
- },
170
-
171
- "& input": {
172
- // border: `1px solid transparent`,
173
- // background: theme?.palette?.editor?.inputFieldBgColor,
174
- borderRadius: "8px"
175
- // fontSize: "12px",
176
- }
177
- },
178
-
179
- "& .editor-dd": {
180
- "& .MuiOutlinedInput-notchedOutline": {
181
- border: `1px solid transparent !important`
182
- }
183
- },
184
- "& .MuiAutocomplete-root": {
185
- "& fieldset": {
186
- border: `1px solid transparent !important`
187
- }
188
- },
189
- "& .sliderInput": {
190
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
191
- background: theme?.palette?.editor?.inputFieldBgColor,
192
- borderRadius: "10px",
193
- paddingLeft: "10px",
194
- width: "50px !important"
195
- },
196
- "& .selctedBtnIcon": {
197
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
198
- background: theme?.palette?.editor?.inputFieldBgColor,
199
- borderRadius: "10px",
200
- height: "36px",
201
- "& svg": {
202
- color: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
203
- }
204
- },
205
- "& .muiIconsListParent": {
206
- "& svg": {
207
- color: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
208
- },
209
- "&::-webkit-scrollbar-thumb": {
210
- background: `${theme?.palette?.editor?.brainPopupScroll} !important`
211
- },
212
- "&::-webkit-scrollbar-track": {
213
- visibility: "hidden"
214
- }
215
- },
216
- "& .menu-item-app-header": {
217
- paddingBottom: "5px",
218
- "& .text-field1": {
219
- marginRight: "5px"
220
- },
221
- "& .settingsIcon, .deleteIcon": {
222
- width: "20px",
223
- height: "20px",
224
- "& path": {
225
- stroke: theme?.palette?.editor?.closeButtonSvgStroke
226
- }
227
- }
228
- },
229
- "& .MuiPaper-root": {
230
- background: theme?.palette?.editor?.miniToolBarBackground
231
- },
232
- "& .iconRadioButton": {
233
- "& svg": {
234
- height: "24px",
235
- width: "24px"
236
- },
237
- "& .MuiRadio-root": {
238
- paddingLeft: "0px"
239
- }
240
- }
241
107
  }
242
108
  },
243
109
  dialog: {
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Box, Paper, Popper, Typography, Tooltip, IconButton, Grid } from "@mui/material";
3
- import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
2
+ import { Box, Paper, Popper, Typography, Tooltip, IconButton } from "@mui/material";
3
+ import CloseIcon from "@mui/icons-material/Close";
4
4
  import useOptionsPopupStyle from "./style";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -30,7 +30,7 @@ const OptionsPopup = props => {
30
30
  className: "papper-root",
31
31
  children: [/*#__PURE__*/_jsxs(Typography, {
32
32
  variant: "div",
33
- className: "item-wrapper title sectionOptionTitle",
33
+ className: "item-wrapper title",
34
34
  children: [translation(title), /*#__PURE__*/_jsx(Box, {
35
35
  component: "div",
36
36
  children: /*#__PURE__*/_jsx(Tooltip, {
@@ -38,14 +38,11 @@ const OptionsPopup = props => {
38
38
  arrow: true,
39
39
  children: /*#__PURE__*/_jsx(IconButton, {
40
40
  onClick: handleClose,
41
- children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
41
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
42
42
  })
43
43
  })
44
44
  })]
45
- }), /*#__PURE__*/_jsx(Grid, {
46
- className: "sectionOptionChild",
47
- children: children
48
- })]
45
+ }), children]
49
46
  })
50
47
  }) : null;
51
48
  };
@@ -3,138 +3,31 @@ const useOptionsPopupStyle = ({
3
3
  }) => ({
4
4
  root: {
5
5
  zIndex: 1200,
6
- background: theme?.palette?.editor?.miniToolBarBackground,
7
- border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder}`,
8
- borderRadius: "20px",
6
+ background: theme?.palette?.editor?.background,
7
+ borderRadius: "7px",
9
8
  overflow: "hidden",
10
- boxShadow: "0px 0px 12px 4px #00000014",
9
+ boxShadow: "1px 1px 3px rgba(0,0,0,0.3)",
11
10
  marginRight: "4px !important",
12
- padding: "0px 5px",
13
- fontFamily: "'Inter',sans-serif",
14
- "& .MuiPaper-root": {
15
- background: theme?.palette?.editor?.miniToolBarBackground
16
- },
17
- "& .sectionOptionTitle": {
18
- fontFamily: "'Inter',sans-serif",
19
- fontWeight: "700",
20
- fontSize: "16px",
21
- lineHeight: "25px",
22
- background: theme?.palette?.editor?.miniToolBarBackground,
23
- "& button": {
24
- background: theme?.palette?.editor?.closeButtonBackground,
25
- borderRadius: "8px",
26
- "& svg": {
27
- fill: theme?.palette?.editor?.closeButtonSvgStroke
28
- }
29
- }
30
- },
31
- "& .sectionOptionChild": {
32
- background: theme?.palette?.editor?.miniToolBarBackground,
33
- "& .MuiBox-root": {
34
- maxHeight: "unset"
35
- },
36
- "& .MuiInputBase-root, fieldset": {
37
- background: theme?.palette?.editor?.inputFieldBgColor,
38
- borderRadius: "8px",
39
- "& fieldset": {
40
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
41
- background: "transparent",
42
- borderRadius: "8px"
43
- },
44
- "& input": {
45
- border: `1px solid transparent`,
46
- background: theme?.palette?.editor?.inputFieldBgColor,
47
- borderRadius: "8px",
48
- fontSize: "12px",
49
- color: theme?.palette?.editor?.textColor
50
- }
51
- },
52
- "& p": {
53
- color: theme?.palette?.editor?.textColor
54
- },
55
- "& .sliderInput": {
56
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
57
- background: theme?.palette?.editor?.inputFieldBgColor,
58
- borderRadius: "10px"
59
- },
60
- "& .style-settings-wrpr": {
61
- overflow: "hidden",
62
- "&:hover": {
63
- overflowY: "auto",
64
- "&::-webkit-scrollbar-thumb, ::-webkit-scrollbar-thumb": {
65
- background: `${theme?.palette?.editor?.brainPopupScroll} !important`
66
- },
67
- "&::-webkit-scrollbar-track, ::-webkit-scrollbar-track": {
68
- visibility: "hidden"
69
- }
70
- }
71
- },
72
- "& svg": {
73
- width: "17.5px",
74
- height: "17.5px"
75
- }
76
- },
77
- "& .MuiList-root": {
78
- "& .MuiButtonBase-root": {
79
- padding: "8px 12px",
80
- "& .MuiTypography-root": {
81
- color: `${theme?.palette?.editor?.textColor} !important`,
82
- fontSize: "14px",
83
- fontWeight: "500",
84
- fontFamily: "'Inter',sans-serif"
85
- },
86
- "&:hover": {
87
- background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`,
88
- "& .MuiTypography-root": {
89
- color: `${theme?.palette?.editor?.textColor} !important`
90
- },
91
- "& .MuiListItemIcon-root": {
92
- "& .signatureElementIcon, & .newLineElementIcon": {
93
- "& path": {
94
- fill: `${theme?.palette?.editor?.textColor}`
95
- }
96
- },
97
- "& .commonSvgStyle, & .commonSvgStyle2": {
98
- "& path": {
99
- stroke: `${theme?.palette?.editor?.textColor}`
100
- }
101
- },
102
- "& .colorBoxElementIcon": {
103
- "& path": {
104
- stroke: `${theme?.palette?.editor?.textColor}`,
105
- fill: "none"
106
- }
107
- },
108
- "& .gridElementIcon": {
109
- "& path": {
110
- stroke: `${theme?.palette?.editor?.textColor}`,
111
- fill: `${theme?.palette?.editor?.textColor}`
112
- }
113
- }
114
- }
115
- }
116
- }
117
- },
118
- "& .sectionMoreOption": {
119
- "& .MuiButtonBase-root": {
120
- padding: "12px 12px",
121
- color: `${theme?.palette?.editor?.textColor} !important`,
122
- fontSize: "14px",
123
- fontWeight: "500",
124
- fontFamily: "'Inter',sans-serif"
125
- }
126
- },
127
11
  "& .papper-root": {
128
12
  width: "344px",
129
13
  boxShadow: "none",
14
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`,
130
15
  borderRadius: "7px",
131
16
  background: theme?.palette?.editor?.background,
132
17
  "& .MuiTypography-root, .MuiInputBase-root, input": {
133
18
  color: theme?.palette?.editor?.textColor
134
19
  },
20
+ "& .MuiInputBase-root, input": {
21
+ border: `1px solid ${theme?.palette?.editor?.borderColor}`
22
+ },
135
23
  "& .borderInput": {
136
24
  background: theme?.palette?.editor?.background,
137
25
  color: theme?.palette?.editor?.textColor
26
+ },
27
+ "& .MuiCheckbox-root": {
28
+ "& svg": {
29
+ fill: theme?.palette?.editor?.textColor
30
+ }
138
31
  }
139
32
  },
140
33
  "& .item-list-wrpr": {
@@ -144,7 +37,13 @@ const useOptionsPopupStyle = ({
144
37
  "& .MuiListItemButton-root": {
145
38
  borderRadius: "7px",
146
39
  color: theme?.palette?.editor?.textColor,
147
- alignItems: "center"
40
+ "&:hover": {
41
+ color: theme?.palette?.editor?.activeColor,
42
+ background: "rgba(233, 243, 254, 1)",
43
+ "& .MuiTypography-root": {
44
+ color: theme?.palette?.editor?.activeColor
45
+ }
46
+ }
148
47
  }
149
48
  },
150
49
  "& .item-wrapper": {
@@ -10,27 +10,23 @@ const SwitchViewport = props => {
10
10
  const {
11
11
  breakpoint,
12
12
  onChange,
13
- translation,
14
- show
13
+ translation
15
14
  } = props;
16
15
  const classes = useSwitchViewport();
17
16
  const {
18
- setSelectedElement
17
+ setActiveBreakPoint
19
18
  } = useEditorContext();
20
19
  useEffect(() => {
21
- // to reset selection on viewport changes - FS-6589
22
- setSelectedElement({});
20
+ console.log(breakpoint);
23
21
  }, [breakpoint]);
24
22
  return /*#__PURE__*/_jsxs(Box, {
25
23
  sx: classes.root,
26
- style: {
27
- display: show ? "block" : "none"
28
- },
29
24
  children: [/*#__PURE__*/_jsx(Tooltip, {
30
25
  title: translation("Desktop View"),
31
26
  children: /*#__PURE__*/_jsx(IconButton, {
32
27
  className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
33
28
  onClick: () => {
29
+ setActiveBreakPoint("");
34
30
  onChange("");
35
31
  },
36
32
  children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
@@ -40,6 +36,7 @@ const SwitchViewport = props => {
40
36
  children: /*#__PURE__*/_jsx(IconButton, {
41
37
  className: `${breakpoint === "xs" ? "active" : ""}`,
42
38
  onClick: () => {
39
+ setActiveBreakPoint("xs");
43
40
  onChange("xs");
44
41
  },
45
42
  children: /*#__PURE__*/_jsx(PhoneIphoneIcon, {})
@@ -1,7 +1,6 @@
1
1
  import React from "react";
2
- import { useTheme, createTheme, useMediaQuery } from "@mui/material";
2
+ import { useTheme, ThemeProvider, createTheme, useMediaQuery } from "@mui/material";
3
3
  import { isStimulator, STIMULATOR_MOCK } from "../../../hooks/useBreakpoints";
4
- import MainThemeProvider from "./MainThemeProvider";
5
4
 
6
5
  // Custom breakpoints functions
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -60,15 +59,13 @@ const extendedTheme = (prevTheme, isPrintMode) => createTheme({
60
59
  } : getBreakPoints(prevTheme)
61
60
  });
62
61
  const ViewportStimulator = ({
63
- children,
64
- selectedTheme
62
+ children
65
63
  }) => {
66
64
  const theme = useTheme();
67
65
  const isPrintMode = useMediaQuery("print");
68
66
  const viewportTheme = extendedTheme(theme, isPrintMode);
69
- return /*#__PURE__*/_jsx(MainThemeProvider, {
67
+ return /*#__PURE__*/_jsx(ThemeProvider, {
70
68
  theme: viewportTheme,
71
- userSelectedTheme: selectedTheme,
72
69
  children: children
73
70
  });
74
71
  };
@@ -2,7 +2,6 @@ import { Transforms, Node, Path, Editor } from "slate";
2
2
  import { ReactEditor } from "slate-react";
3
3
  import { getNode, handleNegativeInteger } from "../../../utils/helper";
4
4
  import { handleBoxAlignment } from "../VirtualElement/helper";
5
- import { convertToGridArea, findMaxYValue } from "../../../Elements/FreeGrid/helper";
6
5
  export const ROW_HEIGHT = 50;
7
6
 
8
7
  // const MARGIN_OF = {
@@ -23,27 +22,18 @@ export function updateRows() {}
23
22
  export function updateCols() {}
24
23
  const handleMoveNode = (editor, path, newPath, {
25
24
  isEmpty
26
- }, autoAlign, moveToNode) => {
25
+ }, autoAlign) => {
27
26
  try {
28
27
  let replaceNode = Node.get(editor, path);
29
- let heightDiff = 0;
30
28
  if (autoAlign) {
31
- const y = findMaxYValue(moveToNode?.children);
32
- const {
33
- gridArea,
34
- marginTop
35
- } = convertToGridArea(y);
29
+ // reset node for auto alignment in mobile
36
30
  replaceNode = {
37
31
  ...replaceNode,
38
- gridArea_xs: gridArea,
39
- marginTop_xs: marginTop + 12,
40
- xs_updatedOn: new Date().getTime()
32
+ gridArea_xs: null,
33
+ xs_updatedOn: null,
34
+ marginTop_xs: null
41
35
  };
42
- const newHeight = y + replaceNode?.height_xs + 12;
43
- const diffH = newHeight - moveToNode?.height_xs;
44
- heightDiff = diffH >= 0 ? diffH : 0;
45
36
  }
46
- let rPath;
47
37
  if (isEmpty) {
48
38
  const toPath = [...newPath, 0];
49
39
  Transforms.insertNodes(editor, [{
@@ -54,7 +44,7 @@ const handleMoveNode = (editor, path, newPath, {
54
44
  Transforms.removeNodes(editor, {
55
45
  at: path
56
46
  });
57
- rPath = toPath;
47
+ return toPath;
58
48
  } else {
59
49
  Transforms.insertNodes(editor, [{
60
50
  ...replaceNode
@@ -64,12 +54,8 @@ const handleMoveNode = (editor, path, newPath, {
64
54
  Transforms.removeNodes(editor, {
65
55
  at: path
66
56
  });
67
- rPath = newPath;
57
+ return newPath;
68
58
  }
69
- return {
70
- rPath,
71
- heightDiff
72
- };
73
59
  } catch (err) {
74
60
  console.log(err);
75
61
  console.log("Drop Node error");
@@ -224,7 +210,7 @@ export function onDropItem(props, parentClass) {
224
210
  at: moveTo,
225
211
  match: n => n.type === "freegrid"
226
212
  });
227
- const [, sectionPath] = sectionData || [];
213
+ const [sectionNode, sectionPath] = sectionData || [];
228
214
  if (needMove && isInsidePath(from, moveTo)) {
229
215
  reRenderSectionPath = sectionPath;
230
216
  } else {
@@ -243,6 +229,14 @@ export function onDropItem(props, parentClass) {
243
229
  const isBoxHeader = currentNode?.childType === "appHeader" && moveTo?.length > 2;
244
230
  if (isBoxHeader) {
245
231
  // will handle on <BoxHeaderAutoAlignment />
232
+ } else if (moveTo?.length === 2 && autoAlign) {
233
+ // auto align in mobile
234
+ Transforms.setNodes(editor, {
235
+ xs_updatedOn: null,
236
+ xs_updatedOn: new Date().getTime()
237
+ }, {
238
+ at: moveTo
239
+ });
246
240
  } else if (autoAlign) {
247
241
  Transforms.setNodes(editor, {
248
242
  autoAlign: true,
@@ -251,15 +245,12 @@ export function onDropItem(props, parentClass) {
251
245
  at: moveTo
252
246
  });
253
247
  }
254
- const {
255
- rPath,
256
- heightDiff
257
- } = handleMoveNode(editor, path, newPath, {
248
+ const rPath = handleMoveNode(editor, path, newPath, {
258
249
  isEmpty
259
- }, autoAlign, toSectionNode) || {};
250
+ }, autoAlign);
260
251
  reRenderChildNodes(editor, reRenderSectionPath || moveTo);
261
252
  if (autoAlign && !isBoxHeader) {
262
- handleBoxAlignment(editor, sectionPath, heightDiff);
253
+ handleBoxAlignment(editor, sectionNode, sectionPath);
263
254
  }
264
255
  return {
265
256
  updated_at: rPath
@@ -87,9 +87,7 @@ export function updatePositions(props, closestClass) {
87
87
  newPath = [...newPath, toSectionNode?.children?.length];
88
88
  }
89
89
  newPath = newPath.map(m => parseInt(m));
90
- const {
91
- rPath
92
- } = handleMoveNode(editor, path, newPath, {
90
+ const rPath = handleMoveNode(editor, path, newPath, {
93
91
  isEmpty
94
92
  });
95
93
  // to update path index need to re-render items in parent sections