@flozy/editor 10.2.4 → 10.2.5

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 (172) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +16 -120
  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 +2 -6
  7. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  8. package/dist/Editor/Elements/Button/EditorButton.js +9 -25
  9. package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  11. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  13. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  14. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +6 -21
  16. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -5
  17. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
  18. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
  19. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
  20. package/dist/Editor/Elements/Embed/Image.js +2 -3
  21. package/dist/Editor/Elements/Embed/Video.js +1 -1
  22. package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
  23. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
  24. package/dist/Editor/Elements/Form/Form.js +168 -181
  25. package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
  26. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
  27. package/dist/Editor/Elements/Form/FormField.js +6 -13
  28. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  29. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +31 -36
  30. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  31. package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
  32. package/dist/Editor/Elements/FreeGrid/styles.js +7 -75
  33. package/dist/Editor/Elements/Grid/Grid.js +2 -14
  34. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  35. package/dist/Editor/Elements/List/CheckList.js +2 -3
  36. package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
  37. package/dist/Editor/Elements/Search/SearchButton.js +8 -9
  38. package/dist/Editor/Elements/Search/SearchList.js +7 -9
  39. package/dist/Editor/Elements/Signature/Signature.css +1 -2
  40. package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
  41. package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
  42. package/dist/Editor/Elements/SimpleText/index.js +1 -6
  43. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  44. package/dist/Editor/Elements/Table/DragButton.js +1 -0
  45. package/dist/Editor/Elements/Table/Draggable.js +2 -6
  46. package/dist/Editor/Elements/Table/Styles.js +0 -7
  47. package/dist/Editor/Elements/Table/Table.js +3 -3
  48. package/dist/Editor/Elements/Table/TableCell.js +5 -24
  49. package/dist/Editor/Elements/Title/title.js +6 -6
  50. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  51. package/dist/Editor/MiniEditor.js +1 -2
  52. package/dist/Editor/Styles/EditorStyles.js +5 -5
  53. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  54. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  55. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  56. package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
  57. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  58. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  59. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
  60. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  61. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
  62. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  63. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
  64. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
  65. package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
  66. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  67. package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
  68. package/dist/Editor/common/ColorPickerButton.js +16 -38
  69. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  70. package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
  71. package/dist/Editor/common/Icon.js +1 -31
  72. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  73. package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
  74. package/dist/Editor/common/LinkSettings/index.js +68 -84
  75. package/dist/Editor/common/LinkSettings/style.js +30 -245
  76. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
  77. package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
  78. package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
  79. package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
  80. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
  81. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
  82. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  83. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  84. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  85. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  86. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  87. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
  88. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  89. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
  90. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
  91. package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
  92. package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
  93. package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
  94. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
  95. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  96. package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
  97. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  98. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +54 -48
  99. package/dist/Editor/common/RnD/VirtualElement/helper.js +131 -143
  100. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
  101. package/dist/Editor/common/RnD/index.js +11 -6
  102. package/dist/Editor/common/Select/index.js +0 -2
  103. package/dist/Editor/common/Shorthands/elements.js +11 -65
  104. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  105. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  106. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  107. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  108. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  109. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  110. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  111. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
  112. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
  113. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  114. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
  115. package/dist/Editor/common/Uploader.js +0 -8
  116. package/dist/Editor/common/iconListV2.js +6 -156
  117. package/dist/Editor/common/iconslist.js +0 -24
  118. package/dist/Editor/commonStyle.js +62 -168
  119. package/dist/Editor/helper/index.js +0 -4
  120. package/dist/Editor/helper/theme.js +2 -203
  121. package/dist/Editor/hooks/useMouseMove.js +5 -8
  122. package/dist/Editor/hooks/useTable.js +4 -5
  123. package/dist/Editor/plugins/withEmbeds.js +1 -1
  124. package/dist/Editor/plugins/withHTML.js +1 -3
  125. package/dist/Editor/plugins/withTable.js +1 -1
  126. package/dist/Editor/theme/ThemeList.js +173 -50
  127. package/dist/Editor/utils/SlateUtilityFunctions.js +45 -169
  128. package/dist/Editor/utils/accordion.js +4 -14
  129. package/dist/Editor/utils/button.js +17 -1
  130. package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
  131. package/dist/Editor/utils/draftToSlate.js +2 -3
  132. package/dist/Editor/utils/events.js +6 -50
  133. package/dist/Editor/utils/font.js +37 -40
  134. package/dist/Editor/utils/form.js +4 -4
  135. package/dist/Editor/utils/formfield.js +2 -8
  136. package/dist/Editor/utils/helper.js +19 -109
  137. package/dist/Editor/utils/signature.js +9 -2
  138. package/package.json +4 -4
  139. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
  140. package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
  141. package/dist/Editor/Elements/FreeGrid/helper.js +0 -113
  142. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  143. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  144. package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
  145. package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
  146. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  147. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  148. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  149. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  150. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  151. package/dist/Editor/common/CustomSelect.js +0 -43
  152. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  153. package/dist/Editor/common/SnackBar/index.js +0 -43
  154. package/dist/Editor/helper/textIndeces.js +0 -58
  155. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  156. package/dist/Editor/hooks/useThemeValues.js +0 -63
  157. package/dist/Editor/theme/index.js +0 -149
  158. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  159. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  160. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  161. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  162. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  163. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  164. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  165. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  166. package/dist/Editor/themeSettings/icons.js +0 -60
  167. package/dist/Editor/themeSettings/index.js +0 -369
  168. package/dist/Editor/themeSettings/style.js +0 -299
  169. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  170. package/dist/Editor/themeSettingsAI/index.js +0 -355
  171. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  172. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -9,20 +9,20 @@ const FormStyles = theme => ({
9
9
  color: "#94A3B8"
10
10
  },
11
11
  bodyTextArea: {
12
- "& .mini-editor-cls": {
13
- padding: "12px",
14
- "&:focus-visible": {
15
- outline: "none",
16
- border: "none"
12
+ '& .mini-editor-cls': {
13
+ padding: '12px',
14
+ '&:focus-visible': {
15
+ outline: 'none',
16
+ border: 'none'
17
17
  }
18
18
  },
19
19
  "& .editorWorkflow": {
20
- minHeight: "130px",
21
- padding: "12px",
20
+ minHeight: '130px',
21
+ padding: '12px',
22
22
  paddingBottom: 0,
23
- "&:focus-visible": {
24
- outline: "none",
25
- border: "none"
23
+ '&:focus-visible': {
24
+ outline: 'none',
25
+ border: 'none'
26
26
  }
27
27
  }
28
28
  },
@@ -105,7 +105,7 @@ const FormStyles = theme => ({
105
105
  padding: "4px 22px",
106
106
  textTransform: "none",
107
107
  border: "1px solid #D8DDE1",
108
- minWidth: "126px",
108
+ minWidth: '126px',
109
109
  "& svg": {
110
110
  "& path": {
111
111
  stroke: "#64748B"
@@ -169,19 +169,17 @@ const FormStyles = theme => ({
169
169
  }
170
170
  },
171
171
  colorButtonSingle: {
172
- border: "1.5px solid #DCE4EC !important",
173
172
  "&.active": {
174
- // "&:before": {
175
- // content: '" "',
176
- // position: "absolute",
177
- // top: "-5px",
178
- // left: "-5px",
179
- // width: "calc(100% + 4px)",
180
- // height: "calc(100% + 4px)",
181
- // border: "3px solid blue",
182
- // borderRadius: "50%",
183
- // },
184
- outline: "2px solid #2563EB"
173
+ "&:before": {
174
+ content: '" "',
175
+ position: "absolute",
176
+ top: "-5px",
177
+ left: "-5px",
178
+ width: "calc(100% + 4px)",
179
+ height: "calc(100% + 4px)",
180
+ border: "3px solid blue",
181
+ borderRadius: "50%"
182
+ }
185
183
  }
186
184
  },
187
185
  colorButtonsInner: {
@@ -251,7 +249,7 @@ const FormStyles = theme => ({
251
249
  }
252
250
  },
253
251
  root: {
254
- padding: "10px"
252
+ padding: '10px'
255
253
  }
256
254
  });
257
255
  export default FormStyles;
@@ -22,7 +22,6 @@ import { DEFAULT_TABLE_NODE } from "../../utils/table";
22
22
  import itemOptions from "./Options/sectionItemOptions";
23
23
  import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
24
24
  import { useDebouncedCallback } from "use-debounce";
25
- import { getNewElementXsValues } from "./helper";
26
25
  import { jsx as _jsx } from "react/jsx-runtime";
27
26
  import { jsxs as _jsxs } from "react/jsx-runtime";
28
27
  const MAX_DEVICE_WIDTH = {
@@ -36,15 +35,11 @@ export const useFreeGrid = () => {
36
35
  return useContext(FreeGridContext);
37
36
  };
38
37
  const FreeGrid = props => {
39
- const {
40
- theme: appTheme
41
- } = useEditorContext();
42
38
  const theme = useTheme();
43
39
  const breakpoint = useBreakpoints(theme);
44
40
  const classes = useFreeGridStyles({
45
41
  theme,
46
- MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint],
47
- appTheme
42
+ MAX_DEVICE_WIDTH: MAX_DEVICE_WIDTH[breakpoint]
48
43
  });
49
44
  const editor = useSlateStatic();
50
45
  const {
@@ -181,10 +176,6 @@ const FreeGrid = props => {
181
176
  const handleAddElementClick = type => () => {
182
177
  const isEmpty = isEmptySection();
183
178
  const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
184
- const {
185
- xsVal,
186
- sectionHeightXs
187
- } = getNewElementXsValues(type, element?.children);
188
179
  switch (type) {
189
180
  case "addText":
190
181
  Transforms.insertNodes(editor, [{
@@ -201,8 +192,7 @@ const FreeGrid = props => {
201
192
  marginTop: 0,
202
193
  top: 0,
203
194
  width: 170,
204
- height: 30,
205
- ...(xsVal || {})
195
+ height: 30
206
196
  }], {
207
197
  at: [...insertAt]
208
198
  });
@@ -220,6 +210,20 @@ const FreeGrid = props => {
220
210
  linkType: "webAddress"
221
211
  },
222
212
  iconPosition: "start",
213
+ bgColor: "#2563EB",
214
+ textColor: "#FFF",
215
+ borderRadius: {
216
+ topLeft: 30,
217
+ topRight: 30,
218
+ bottomLeft: 30,
219
+ bottomRight: 30
220
+ },
221
+ bannerSpacing: {
222
+ left: 12,
223
+ top: 12,
224
+ right: 12,
225
+ bottom: 12
226
+ },
223
227
  textAlign: "center",
224
228
  label: "Get Started"
225
229
  }],
@@ -228,8 +232,7 @@ const FreeGrid = props => {
228
232
  marginTop: 0,
229
233
  top: 0,
230
234
  width: 143,
231
- height: 50,
232
- ...(xsVal || {})
235
+ height: 50
233
236
  }], {
234
237
  at: [...insertAt]
235
238
  });
@@ -255,9 +258,8 @@ const FreeGrid = props => {
255
258
  top: 0,
256
259
  width: 217,
257
260
  height: 173,
258
- // width_xs: 217,
259
- // height_xs: 173,
260
- ...(xsVal || {})
261
+ width_xs: 217,
262
+ height_xs: 173
261
263
  }], {
262
264
  at: [...insertAt]
263
265
  });
@@ -280,8 +282,7 @@ const FreeGrid = props => {
280
282
  marginTop: 0,
281
283
  top: 0,
282
284
  width: 170,
283
- height: 80,
284
- ...(xsVal || {})
285
+ height: 80
285
286
  }], {
286
287
  at: [...insertAt]
287
288
  });
@@ -294,8 +295,7 @@ const FreeGrid = props => {
294
295
  images: []
295
296
  }), {
296
297
  height: 370,
297
- width: 650,
298
- ...(xsVal || {})
298
+ width: 650
299
299
  })
300
300
  }], {
301
301
  at: [...insertAt]
@@ -307,8 +307,7 @@ const FreeGrid = props => {
307
307
  ...DEFAULT_TABLE_NODE()
308
308
  }, {
309
309
  height: 150,
310
- width: 400,
311
- ...(xsVal || {})
310
+ width: 400
312
311
  })
313
312
  }], {
314
313
  at: [...insertAt]
@@ -332,8 +331,7 @@ const FreeGrid = props => {
332
331
  marginTop: 0,
333
332
  top: 0,
334
333
  width: 400,
335
- height: 300,
336
- ...(xsVal || {})
334
+ height: 300
337
335
  }], {
338
336
  at: [...insertAt]
339
337
  });
@@ -345,9 +343,7 @@ const FreeGrid = props => {
345
343
  children: [{
346
344
  text: ""
347
345
  }]
348
- }, {
349
- ...(xsVal || {})
350
- }, "freegridBox")
346
+ }, {}, "freegridBox")
351
347
  }], {
352
348
  at: [...insertAt]
353
349
  });
@@ -358,8 +354,7 @@ const FreeGrid = props => {
358
354
  ...FORM_NODE()
359
355
  }, {
360
356
  height: 92,
361
- width: 400,
362
- ...(xsVal || {})
357
+ width: 400
363
358
  })
364
359
  }], {
365
360
  at: [...insertAt]
@@ -373,8 +368,7 @@ const FreeGrid = props => {
373
368
  })
374
369
  }, {
375
370
  height: 60,
376
- width: 400,
377
- ...(xsVal || {})
371
+ width: 400
378
372
  })
379
373
  }], {
380
374
  at: [...insertAt]
@@ -395,18 +389,19 @@ const FreeGrid = props => {
395
389
  marginTop: 0,
396
390
  top: 0,
397
391
  width: 170,
398
- height: 30,
399
- ...(xsVal || {})
392
+ height: 30
400
393
  }], {
401
394
  at: [...insertAt]
402
395
  });
403
396
  break;
404
397
  default:
405
398
  }
406
- if (xsVal) {
399
+ if (breakpoint === "lg") {
407
400
  setSelectedElement({});
401
+
402
+ // auto align in mobile
408
403
  Transforms.setNodes(editor, {
409
- height_xs: sectionHeightXs,
404
+ xs_updatedOn: null,
410
405
  updated_at: new Date().getTime()
411
406
  }, {
412
407
  at: path
@@ -8,7 +8,7 @@ import { onDropItem, ROW_HEIGHT } from "../../common/RnD/Utils/gridDropItem";
8
8
  import useBreakpoints from "../../hooks/useBreakpoints";
9
9
  import { breakpointValues, formatBreakpointValues } from "./breakpointConstants";
10
10
  import { useEditorContext } from "../../hooks/useMouseMove";
11
- import { getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
11
+ import { getBreakPointsValue } from "../../helper/theme";
12
12
  import focusOnNewItem from "../../helper/RnD/focusOnNewItem";
13
13
  import { bringItemToFB } from "../../helper";
14
14
  import itemOptions from "./Options/sectionItemOptions";
@@ -160,11 +160,6 @@ const FreeGridBox = props => {
160
160
  const isBoxHeader = useMemo(() => {
161
161
  return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
162
162
  }, [element]);
163
- const boxSp = groupByBreakpoint({
164
- borderRadius: {
165
- ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
166
- }
167
- }, theme);
168
163
  return /*#__PURE__*/_jsx(RnD, {
169
164
  id: `freegrid_box_item_${path.join("|")}_${updated_at}_${breakpoint}`,
170
165
  className: `freegrid-item path-${path.length} breakpoint-${breakpoint} freegrid-box_${path.join("_")}`,
@@ -231,7 +226,9 @@ const FreeGridBox = props => {
231
226
  "--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
232
227
  },
233
228
  sx: {
234
- ...boxSp,
229
+ borderRadius: {
230
+ ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
231
+ },
235
232
  background: sectionBgColor,
236
233
  backgroundImage: sectionBackgroundImage ? `url('${sectionBackgroundImage}')` : "",
237
234
  borderColor: borderColor || "transparent",
@@ -5,12 +5,12 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
5
5
  const More = props => {
6
6
  const {
7
7
  handleClick,
8
- translation,
9
- breakpoint
8
+ breakpoint,
9
+ translation
10
10
  } = props;
11
11
  return /*#__PURE__*/_jsx(Box, {
12
12
  children: /*#__PURE__*/_jsxs(List, {
13
- className: "item-list-wrpr sectionMoreOption",
13
+ className: "item-list-wrpr",
14
14
  children: [/*#__PURE__*/_jsx(ListItemButton, {
15
15
  className: "item-wrapper",
16
16
  onClick: handleClick("addSection"),
@@ -19,15 +19,15 @@ const More = props => {
19
19
  className: "item-wrapper",
20
20
  onClick: handleClick("duplicateSection"),
21
21
  children: translation?.translation("Duplicate Section")
22
+ }), /*#__PURE__*/_jsx(ListItemButton, {
23
+ className: "item-wrapper",
24
+ onClick: handleClick("deleteSection"),
25
+ children: "Delete Section"
22
26
  }), breakpoint === "xs" ? /*#__PURE__*/_jsx(ListItemButton, {
23
27
  className: "item-wrapper",
24
28
  onClick: handleClick("forceAutoAlignment"),
25
29
  children: "Force Auto Alignment"
26
- }) : null, /*#__PURE__*/_jsx(ListItemButton, {
27
- className: "item-wrapper",
28
- onClick: handleClick("deleteSection"),
29
- children: "Delete Section"
30
- })]
30
+ }) : null]
31
31
  })
32
32
  });
33
33
  };
@@ -1,7 +1,6 @@
1
1
  const useFreeGridStyles = ({
2
2
  theme,
3
- MAX_DEVICE_WIDTH,
4
- appTheme
3
+ MAX_DEVICE_WIDTH
5
4
  }) => ({
6
5
  root: {
7
6
  "&.freegrid-container": {
@@ -48,9 +47,6 @@ const useFreeGridStyles = ({
48
47
  "&.type_text": {
49
48
  // minHeight: "fit-content !important",
50
49
  // wordBreak: "break-all",
51
- "& .placeholder-simple-text": {
52
- display: "none"
53
- }
54
50
  },
55
51
  "&.enable-1, &.enable-2": {
56
52
  "&.type_text": {
@@ -247,9 +243,6 @@ const useFreeGridStyles = ({
247
243
  },
248
244
  "& > .simple-text": {
249
245
  display: "none"
250
- },
251
- "& > .edt-paragraphs": {
252
- display: "none"
253
246
  }
254
247
  },
255
248
  "& .fgi_type_form": {
@@ -320,50 +313,9 @@ const useFreeGridStyles = ({
320
313
  backgroundColor: "#FFF",
321
314
  overflow: "hidden"
322
315
  },
323
- "& .fgi_type_embedScript:not(:has(.has-code))": {
324
- background: appTheme?.palette?.editor?.sectionSettingIconHover,
325
- color: appTheme?.palette?.editor?.textColor,
326
- fontSize: "14px",
327
- borderRadius: "12px",
328
- display: "flex",
329
- flexDirection: "column",
330
- justifyContent: "center",
331
- alignItems: "center",
332
- height: "100%",
333
- textAlign: "center",
334
- "& svg": {
335
- width: "20px",
336
- height: "20px",
337
- "& path": {
338
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
339
- }
340
- },
341
- "& .code-icon": {
342
- display: "flex",
343
- marginRight: "5px"
344
- },
345
- "& .empty-code": {
346
- display: "flex"
347
- },
348
- "& .code-name": {
349
- display: "flex",
350
- alignItems: "anchor-center"
351
- }
352
- },
353
316
  "& .fgi_type_text": {
354
317
  "& .edt-headings": {
355
318
  margin: "0px"
356
- },
357
- "& .edt-paragraphs": {
358
- margin: "0px"
359
- }
360
- },
361
- "& .fgi_type_table": {
362
- "& .edt-headings": {
363
- margin: "0px"
364
- },
365
- "& .edt-paragraphs": {
366
- margin: "0px"
367
319
  }
368
320
  },
369
321
  /** element toolbar hide */
@@ -404,41 +356,21 @@ const useFreeGridStyles = ({
404
356
  sectionPopper: {
405
357
  zIndex: 1200,
406
358
  width: "40px",
407
- left: "-63px !important",
359
+ left: "-58px !important",
408
360
  borderRadius: "8px",
409
- marginRight: "5px !important",
410
361
  "& .papper-root": {
411
362
  fontFamily: "sans-serif",
412
363
  boxShadow: "-4px -3px 12px 4px rgba(0, 0, 0, 0.12)",
413
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
414
- border: `1px solid ${appTheme?.palette?.editor?.miniToolBarBorder}`,
415
- borderRadius: "10px",
364
+ background: "#FFF",
416
365
  "& .MuiIconButton-root": {
417
- padding: "9px",
366
+ padding: "10px",
418
367
  color: "#000",
419
- background: `${appTheme?.palette?.editor?.miniToolBarBackground} !important`,
368
+ background: "#FFF",
420
369
  "& svg": {
421
370
  width: "20px",
422
- height: "20px",
423
- color: appTheme?.palette?.editor?.closeButtonSvgStroke
424
- },
425
- "& .settingsIcon": {
426
- "& path": {
427
- stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
428
- }
371
+ height: "20px"
429
372
  },
430
- "&.active": {
431
- "& svg": {
432
- width: "20px",
433
- height: "20px",
434
- color: "#2563EB"
435
- },
436
- "& .settingsIcon": {
437
- "& path": {
438
- stroke: "#2563EB"
439
- }
440
- }
441
- }
373
+ "&.active,&:hover ": {}
442
374
  }
443
375
  }
444
376
  },
@@ -1,6 +1,6 @@
1
1
  /* eslint-disable no-unused-vars */
2
2
  import React, { useState } from "react";
3
- import { Transforms, Path, Node, Editor, Element } from "slate";
3
+ import { Transforms, Path, Node } from "slate";
4
4
  import { useSlateStatic, ReactEditor } from "slate-react";
5
5
  import { IconButton, Tooltip, Grid as GridContainer, useTheme } from "@mui/material";
6
6
  import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
@@ -206,19 +206,7 @@ const Grid = props => {
206
206
  };
207
207
  const onAddSection = () => () => {
208
208
  try {
209
- let duplicateGrid = JSON.parse(JSON.stringify(element));
210
- const carousel = Editor.above(editor, {
211
- at: path,
212
- match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "carousel-item"
213
- });
214
- if (carousel) {
215
- const [carouselNode, carouselItemPath] = carousel || [];
216
- const duplicatecCarousel = JSON.parse(JSON.stringify(carouselNode));
217
- Transforms.insertNodes(editor, duplicatecCarousel, {
218
- at: Path.next(carouselItemPath)
219
- });
220
- return;
221
- }
209
+ const duplicateGrid = JSON.parse(JSON.stringify(element));
222
210
  insertGrid(editor, duplicateGrid, [path[0] + 1, 0]);
223
211
  } catch (err) {
224
212
  console.log(err);
@@ -292,7 +292,7 @@ const GridItem = props => {
292
292
  ...getBRProps,
293
293
  display: "flex",
294
294
  flexDirection: flexDirection || "column",
295
- background: bgColor,
295
+ background: bgColor || "transparent",
296
296
  borderColor: getBorderColor(),
297
297
  borderWidth: borderWidth || "1px",
298
298
  borderStyle: borderStyle || "solid",
@@ -15,8 +15,7 @@ const CheckList = props => {
15
15
  isEmpty,
16
16
  className,
17
17
  style,
18
- customProps,
19
- selectedLineHeight
18
+ customProps
20
19
  } = props;
21
20
  const {
22
21
  translation
@@ -46,7 +45,7 @@ const CheckList = props => {
46
45
  justifyContent: "center",
47
46
  alignItems: "center",
48
47
  ...(style || {}),
49
- lineHeight: `${selectedLineHeight}`
48
+ lineHeight: 1.43
50
49
  },
51
50
  children: [/*#__PURE__*/_jsxs("div", {
52
51
  contentEditable: false,
@@ -1,10 +1,5 @@
1
- import React, { useEffect, useState } from "react";
2
- import Box from "@mui/material/Box";
3
- import Card from "@mui/material/Card";
4
- import CardMedia from "@mui/material/CardMedia";
5
- import CardContent from "@mui/material/CardContent";
6
- import Typography from "@mui/material/Typography";
7
- import Skeleton from "@mui/material/Skeleton";
1
+ import React from "react";
2
+ import { Box, Card, CardMedia, CardContent, Typography } from "@mui/material";
8
3
  import Icon from "../../common/Icon";
9
4
  import { useEditorContext } from "../../hooks/useMouseMove";
10
5
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -20,26 +15,13 @@ const SearchAttachment = props => {
20
15
  metadata
21
16
  } = customProps;
22
17
  const {
23
- type,
24
- id
18
+ title,
19
+ type
25
20
  } = element;
26
21
  const {
27
22
  theme
28
23
  } = useEditorContext();
29
- const [title, setTitle] = useState("");
30
- const [showSkeleton, setShowSkeleton] = useState(false);
31
24
  const label = Boolean(title?.trim()) ? title : 'Untitled';
32
- useEffect(() => {
33
- const fetchTitle = async id => {
34
- setShowSkeleton(true);
35
- const title = await customProps?.services('getDocTitle', id);
36
- setTitle(title?.data);
37
- setShowSkeleton(false);
38
- };
39
- if (id) {
40
- fetchTitle(id);
41
- }
42
- }, []);
43
25
  const handleClick = () => {
44
26
  if (metadata && metadata?.actionHandler) {
45
27
  metadata?.actionHandler(type, element);
@@ -56,15 +38,15 @@ const SearchAttachment = props => {
56
38
  children: /*#__PURE__*/_jsxs(Card, {
57
39
  sx: {
58
40
  display: "flex",
59
- justifyContent: showSkeleton ? "center" : "flex-start",
60
- alignItems: showSkeleton ? "center" : "flex-end",
41
+ justifyContent: "flex-start",
42
+ alignItems: "flex-end",
61
43
  width: "fit-content",
62
44
  maxWidth: '250px',
63
45
  padding: "0px 10px",
64
46
  boxShadow: "none",
65
47
  border: `1px solid ${theme?.palette?.primary?.slashBrainBorder} !important`,
66
48
  borderRadius: "7px !important",
67
- background: showSkeleton ? `${theme?.palette?.editor?.menuOptionHoverBackground} !important` : `${theme?.palette?.containers?.slashBrainCardBg} !important`,
49
+ background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
68
50
  cursor: 'pointer',
69
51
  margin: '4px 0px',
70
52
  lineHeight: 1.43,
@@ -94,12 +76,7 @@ const SearchAttachment = props => {
94
76
  width: "unset !important"
95
77
  }
96
78
  },
97
- children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
98
- variant: "circular",
99
- width: 14,
100
- height: 14,
101
- animation: "wave"
102
- }) : /*#__PURE__*/_jsx(Icon, {
79
+ children: /*#__PURE__*/_jsx(Icon, {
103
80
  icon: "docsIcon"
104
81
  })
105
82
  }), /*#__PURE__*/_jsx(CardContent, {
@@ -117,15 +94,7 @@ const SearchAttachment = props => {
117
94
  width: "unset !important"
118
95
  }
119
96
  },
120
- children: showSkeleton ? /*#__PURE__*/_jsx(Skeleton, {
121
- variant: "text",
122
- width: 140,
123
- height: 20,
124
- animation: "wave",
125
- sx: {
126
- borderRadius: "4px"
127
- }
128
- }) : /*#__PURE__*/_jsxs(Typography, {
97
+ children: /*#__PURE__*/_jsxs(Typography, {
129
98
  sx: {
130
99
  fontWeight: "500",
131
100
  background: theme?.palette?.text?.slashBrainText,
@@ -30,7 +30,6 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
30
30
  const [skip, setSkip] = useState(0);
31
31
  const [search, setSearch] = useState("");
32
32
  const [isLoading, setIsLoading] = useState(false);
33
- const [total, setTotal] = useState(0);
34
33
  const [debouncedSearch] = useDebounce(search, 300);
35
34
  const limit = 20;
36
35
  const observer = useRef();
@@ -64,24 +63,24 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
64
63
  }
65
64
  };
66
65
  useEffect(() => {
67
- getDocs();
66
+ getDocs({
67
+ debouncedSearch,
68
+ skip,
69
+ limit,
70
+ current_doc_id: currentId
71
+ });
68
72
  }, [skip, debouncedSearch]);
69
73
  const getDocs = async () => {
70
- if (isLoading) return;
71
- if (total > 0 && mapData?.length >= total) return;
72
74
  setIsLoading(true);
73
75
  try {
74
76
  if (otherProps?.services) {
75
77
  const result = await otherProps?.services("getDocs", {
76
78
  skip,
77
79
  limit,
78
- search: debouncedSearch,
80
+ search,
79
81
  current_doc_id: currentId
80
82
  });
81
- const docs = result?.data?.docs || [];
82
- const totalCount = result?.data?.total || 0;
83
- setMapData(prev => skip === 0 ? docs : [...prev, ...docs]);
84
- setTotal(totalCount);
83
+ setMapData(prev => skip === 0 ? result.data : [...prev, ...result.data]);
85
84
  }
86
85
  } catch (error) {
87
86
  console.error("Error fetching documents:", error);
@@ -259,7 +259,7 @@ const SearchAndDocList = ({
259
259
  xs: 12,
260
260
  children: /*#__PURE__*/_jsx(Typography, {
261
261
  sx: {
262
- display: mapData?.length === 0 && !isLoading ? 'flex' : 'none',
262
+ display: mapData?.length === 0 ? 'flex' : 'none',
263
263
  alignItems: "center",
264
264
  justifyContent: "center",
265
265
  color: theme?.palette?.text?.secondary,
@@ -269,17 +269,15 @@ const SearchAndDocList = ({
269
269
  },
270
270
  children: "No docs"
271
271
  })
272
- }), /*#__PURE__*/_jsx(Grid, {
272
+ }), isLoading && /*#__PURE__*/_jsx(Grid, {
273
273
  item: true,
274
- xs: 12,
275
274
  sx: {
276
- display: isLoading ? 'flex' : 'none',
277
- alignItems: "center",
275
+ display: "flex",
278
276
  justifyContent: "center",
279
- color: theme?.palette?.text?.secondary,
280
- fontSize: '12px',
281
- padding: '20px',
282
- fontWeight: 700
277
+ alignItems: 'center',
278
+ minHeight: '400px',
279
+ padding: '0px 16px 8px',
280
+ position: 'absolute'
283
281
  },
284
282
  children: /*#__PURE__*/_jsx(CircularProgress, {})
285
283
  })]