@flozy/editor 10.8.7 → 10.8.9

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 (151) hide show
  1. package/dist/Editor/ChatEditor.js +16 -17
  2. package/dist/Editor/CommonEditor.js +27 -138
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +11 -39
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AI/Styles.js +0 -1
  7. package/dist/Editor/Elements/Accordion/Accordion.js +22 -28
  8. package/dist/Editor/Elements/Accordion/AccordionButton.js +3 -12
  9. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  10. package/dist/Editor/Elements/Attachments/Attachments.js +11 -153
  11. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +3 -8
  12. package/dist/Editor/Elements/Button/EditorButton.js +7 -23
  13. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  14. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  15. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  16. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  17. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
  18. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +55 -134
  19. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +8 -7
  20. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +3 -8
  21. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
  22. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
  23. package/dist/Editor/Elements/Embed/Embed.js +43 -36
  24. package/dist/Editor/Elements/Embed/Image.js +23 -240
  25. package/dist/Editor/Elements/Embed/Video.js +15 -246
  26. package/dist/Editor/Elements/Form/FormField.js +1 -1
  27. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  28. package/dist/Editor/Elements/Form/Workflow/constant.js +1 -25
  29. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +33 -39
  30. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
  31. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
  32. package/dist/Editor/Elements/FreeGrid/Options/More.js +7 -7
  33. package/dist/Editor/Elements/FreeGrid/styles.js +0 -9
  34. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  35. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -2
  36. package/dist/Editor/Elements/SimpleText/style.js +2 -2
  37. package/dist/Editor/Elements/Table/Table.js +3 -3
  38. package/dist/Editor/Elements/Title/title.js +6 -6
  39. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -4
  40. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +3 -5
  41. package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
  42. package/dist/Editor/MiniEditor.js +1 -2
  43. package/dist/Editor/Styles/EditorStyles.js +5 -20
  44. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  45. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  46. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  47. package/dist/Editor/Toolbar/FormatTools/TextSize.js +29 -33
  48. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  49. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
  50. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +23 -23
  51. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +7 -25
  52. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  53. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +8 -24
  54. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  55. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +10 -70
  56. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +14 -73
  57. package/dist/Editor/Toolbar/PopupTool/index.js +2 -5
  58. package/dist/Editor/Toolbar/toolbarGroups.js +10 -56
  59. package/dist/Editor/common/ColorPickerButton.js +16 -38
  60. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  61. package/dist/Editor/common/FontLoader/FontLoader.js +0 -4
  62. package/dist/Editor/common/Icon.js +0 -28
  63. package/dist/Editor/common/ImageSelector/ImageSelector.js +7 -45
  64. package/dist/Editor/common/ImageSelector/Options/Upload.js +11 -26
  65. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  66. package/dist/Editor/common/LinkSettings/NavComponents.js +2 -6
  67. package/dist/Editor/common/MentionsPopup/index.js +1 -9
  68. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  69. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  70. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  71. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  72. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  73. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
  74. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +7 -20
  75. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  76. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -9
  77. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +7 -20
  78. package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
  79. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -11
  80. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  81. package/dist/Editor/common/RnD/Utils/gridDropItem.js +18 -28
  82. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  83. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -45
  84. package/dist/Editor/common/RnD/VirtualElement/helper.js +130 -320
  85. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -22
  86. package/dist/Editor/common/RnD/index.js +13 -48
  87. package/dist/Editor/common/Shorthands/elements.js +4 -62
  88. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  89. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
  90. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +2 -15
  91. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  92. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  93. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
  94. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  95. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
  96. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  97. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -2
  98. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  99. package/dist/Editor/common/StyleBuilder/index.js +4 -8
  100. package/dist/Editor/common/Uploader.js +17 -125
  101. package/dist/Editor/common/iconslist.js +0 -21
  102. package/dist/Editor/commonStyle.js +64 -107
  103. package/dist/Editor/helper/index.js +2 -10
  104. package/dist/Editor/helper/theme.js +2 -203
  105. package/dist/Editor/hooks/useMouseMove.js +3 -9
  106. package/dist/Editor/plugins/withEmbeds.js +1 -12
  107. package/dist/Editor/plugins/withHTML.js +3 -58
  108. package/dist/Editor/plugins/withTable.js +1 -1
  109. package/dist/Editor/service/fileupload.js +0 -53
  110. package/dist/Editor/theme/ThemeList.js +173 -51
  111. package/dist/Editor/utils/SlateUtilityFunctions.js +21 -183
  112. package/dist/Editor/utils/accordion.js +40 -68
  113. package/dist/Editor/utils/button.js +17 -1
  114. package/dist/Editor/utils/draftToSlate.js +2 -3
  115. package/dist/Editor/utils/events.js +89 -94
  116. package/dist/Editor/utils/font.js +37 -40
  117. package/dist/Editor/utils/helper.js +21 -97
  118. package/dist/Editor/utils/insertAppHeader.js +4 -8
  119. package/package.json +4 -4
  120. package/dist/Editor/Elements/Attachments/AttachmentStyles.js +0 -16
  121. package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
  122. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  123. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  124. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  125. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  126. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  127. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  128. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  129. package/dist/Editor/common/CustomSelect.js +0 -43
  130. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  131. package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
  132. package/dist/Editor/common/UploaderWithProgress.js +0 -183
  133. package/dist/Editor/helper/textIndeces.js +0 -58
  134. package/dist/Editor/hooks/useEditorTheme.js +0 -155
  135. package/dist/Editor/hooks/useThemeValues.js +0 -63
  136. package/dist/Editor/theme/index.js +0 -149
  137. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  138. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  139. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  140. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  141. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  142. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  143. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  144. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  145. package/dist/Editor/themeSettings/icons.js +0 -60
  146. package/dist/Editor/themeSettings/index.js +0 -380
  147. package/dist/Editor/themeSettings/style.js +0 -299
  148. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  149. package/dist/Editor/themeSettingsAI/index.js +0 -355
  150. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  151. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import { Transforms } from "slate";
2
+ import { Transforms, Node } from "slate";
3
3
  import { useSlateStatic, ReactEditor } from "slate-react";
4
4
  import { IconButton, Tooltip, Grid, useTheme } from "@mui/material";
5
5
  import FormElements from "./FormElements";
@@ -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;
@@ -1,27 +1,3 @@
1
1
  export const minutes = [30, 35, 40, 45, 50, 55];
2
2
  export const hours = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23];
3
- export const days = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
4
- export const allowedFormat = {
5
- Document: ".pdf,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.txt,.rtf",
6
- Image: "image/*",
7
- Video: ".mp4,.webm,.ogg,.mov,.avi,.mkv",
8
- Embed: "*"
9
- };
10
- export const maxSizeMap = {
11
- Image: 25 * 1024 * 1024,
12
- // Test -> 5 * 1024 * 1024 -> 5MB
13
- Video: 1024 * 1024 * 1024,
14
- Document: 25 * 1024 * 1024,
15
- Embed: Infinity
16
- };
17
- export const allowedTypes = {
18
- Document: ["application/pdf", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "text/plain", "application/rtf"],
19
- Image: ["image/jpeg", "image/png", "image/gif", "image/webp", "image/svg+xml"],
20
- Video: ["video/mp4", "video/webm", "video/ogg", "video/quicktime", "video/x-msvideo", "video/x-matroska"],
21
- Embed: ["*"]
22
- };
23
- export const extensionMap = {
24
- Video: ["mp4", "webm", "ogg", "mov", "avi", "mkv"],
25
- Image: ["jpg", "jpeg", "png", "gif", "webp", "svg"],
26
- Document: ["pdf", "doc", "docx", "xls", "xlsx", "ppt", "pptx", "txt", "rtf"]
27
- };
3
+ export const days = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31];
@@ -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 updateFormName from "../../utils/updateFormName";
27
26
  import { jsx as _jsx } from "react/jsx-runtime";
28
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -184,11 +183,6 @@ const FreeGrid = props => {
184
183
  const handleAddElementClick = type => () => {
185
184
  const isEmpty = isEmptySection();
186
185
  const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
187
- const {
188
- xsVal,
189
- sectionHeightXs
190
- } = getNewElementXsValues(type, element?.children);
191
- const id = crypto?.randomUUID();
192
186
  switch (type) {
193
187
  case "addText":
194
188
  Transforms.insertNodes(editor, [{
@@ -205,8 +199,7 @@ const FreeGrid = props => {
205
199
  marginTop: 0,
206
200
  top: 0,
207
201
  width: 170,
208
- height: 30,
209
- ...(xsVal || {})
202
+ height: 30
210
203
  }], {
211
204
  at: [...insertAt]
212
205
  });
@@ -224,6 +217,20 @@ const FreeGrid = props => {
224
217
  linkType: "webAddress"
225
218
  },
226
219
  iconPosition: "start",
220
+ bgColor: "#2563EB",
221
+ textColor: "#FFF",
222
+ borderRadius: {
223
+ topLeft: 30,
224
+ topRight: 30,
225
+ bottomLeft: 30,
226
+ bottomRight: 30
227
+ },
228
+ bannerSpacing: {
229
+ left: 12,
230
+ top: 12,
231
+ right: 12,
232
+ bottom: 12
233
+ },
227
234
  textAlign: "center",
228
235
  label: "Get Started"
229
236
  }],
@@ -232,8 +239,7 @@ const FreeGrid = props => {
232
239
  marginTop: 0,
233
240
  top: 0,
234
241
  width: 143,
235
- height: 50,
236
- ...(xsVal || {})
242
+ height: 50
237
243
  }], {
238
244
  at: [...insertAt]
239
245
  });
@@ -259,9 +265,8 @@ const FreeGrid = props => {
259
265
  top: 0,
260
266
  width: 217,
261
267
  height: 173,
262
- // width_xs: 217,
263
- // height_xs: 173,
264
- ...(xsVal || {})
268
+ width_xs: 217,
269
+ height_xs: 173
265
270
  }], {
266
271
  at: [...insertAt]
267
272
  });
@@ -277,17 +282,14 @@ const FreeGrid = props => {
277
282
  images: [],
278
283
  children: [{
279
284
  text: ""
280
- }],
281
- fromFreeGrid: true,
282
- uniqueId: id
285
+ }]
283
286
  }],
284
287
  gridArea: "3 / 1 / 4 / 2",
285
288
  left: 50,
286
289
  marginTop: 0,
287
290
  top: 0,
288
- width: 650,
289
- height: 80,
290
- ...(xsVal || {})
291
+ width: 170,
292
+ height: 80
291
293
  }], {
292
294
  at: [...insertAt]
293
295
  });
@@ -297,13 +299,10 @@ const FreeGrid = props => {
297
299
  ...insertFreeGridItem("video", createEmbedNode("video", {
298
300
  url: "",
299
301
  alt: "",
300
- images: [],
301
- fromFreeGrid: true,
302
- uniqueId: id
302
+ images: []
303
303
  }), {
304
304
  height: 370,
305
- width: 650,
306
- ...(xsVal || {})
305
+ width: 650
307
306
  })
308
307
  }], {
309
308
  at: [...insertAt]
@@ -315,8 +314,7 @@ const FreeGrid = props => {
315
314
  ...DEFAULT_TABLE_NODE()
316
315
  }, {
317
316
  height: 150,
318
- width: 400,
319
- ...(xsVal || {})
317
+ width: 400
320
318
  })
321
319
  }], {
322
320
  at: [...insertAt]
@@ -340,8 +338,7 @@ const FreeGrid = props => {
340
338
  marginTop: 0,
341
339
  top: 0,
342
340
  width: 400,
343
- height: 300,
344
- ...(xsVal || {})
341
+ height: 300
345
342
  }], {
346
343
  at: [...insertAt]
347
344
  });
@@ -353,9 +350,7 @@ const FreeGrid = props => {
353
350
  children: [{
354
351
  text: ""
355
352
  }]
356
- }, {
357
- ...(xsVal || {})
358
- }, "freegridBox")
353
+ }, {}, "freegridBox")
359
354
  }], {
360
355
  at: [...insertAt]
361
356
  });
@@ -366,8 +361,7 @@ const FreeGrid = props => {
366
361
  ...FORM_NODE()
367
362
  }, {
368
363
  height: 92,
369
- width: 400,
370
- ...(xsVal || {})
364
+ width: 400
371
365
  })
372
366
  }], {
373
367
  at: [...insertAt]
@@ -381,8 +375,7 @@ const FreeGrid = props => {
381
375
  })
382
376
  }, {
383
377
  height: 60,
384
- width: 400,
385
- ...(xsVal || {})
378
+ width: 400
386
379
  })
387
380
  }], {
388
381
  at: [...insertAt]
@@ -403,18 +396,19 @@ const FreeGrid = props => {
403
396
  marginTop: 0,
404
397
  top: 0,
405
398
  width: 170,
406
- height: 30,
407
- ...(xsVal || {})
399
+ height: 30
408
400
  }], {
409
401
  at: [...insertAt]
410
402
  });
411
403
  break;
412
404
  default:
413
405
  }
414
- if (xsVal) {
406
+ if (breakpoint === "lg") {
415
407
  setSelectedElement({});
408
+
409
+ // auto align in mobile
416
410
  Transforms.setNodes(editor, {
417
- height_xs: sectionHeightXs,
411
+ xs_updatedOn: null,
418
412
  updated_at: new Date().getTime()
419
413
  }, {
420
414
  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",
@@ -321,7 +321,6 @@ const FreeGridItem = props => {
321
321
  customProps: customProps,
322
322
  translation: translation,
323
323
  xsHidden: xsHidden,
324
- disableClick: element?.children?.[0]?.isUploading,
325
324
  children: /*#__PURE__*/_jsxs(Box, {
326
325
  component: "div",
327
326
  ...attributes,
@@ -5,8 +5,8 @@ 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, {
@@ -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
  };
@@ -247,9 +247,6 @@ const useFreeGridStyles = ({
247
247
  },
248
248
  "& > .simple-text": {
249
249
  display: "none"
250
- },
251
- "& > .edt-paragraphs": {
252
- display: "none"
253
250
  }
254
251
  },
255
252
  "& .fgi_type_form": {
@@ -353,12 +350,6 @@ const useFreeGridStyles = ({
353
350
  "& .fgi_type_text": {
354
351
  "& .edt-headings": {
355
352
  margin: "0px"
356
- },
357
- "& .edt-paragraphs": {
358
- margin: "0px"
359
- },
360
- "& blockquote": {
361
- margin: "0px !important"
362
353
  }
363
354
  },
364
355
  /** element toolbar hide */
@@ -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",
@@ -46,8 +46,7 @@ const PageSettingsButton = props => {
46
46
  const onSave = data => {
47
47
  try {
48
48
  const updateData = {
49
- ...data,
50
- isUploading: false
49
+ ...data
51
50
  };
52
51
  delete updateData.children;
53
52
  updatePageSettings(editor, updateData);
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
35
35
  height: "24px",
36
36
  overflow: "hidden",
37
37
  fontSize: "14px",
38
- display: "inline-flex",
39
- alignItems: "center",
38
+ display: 'inline-flex',
39
+ alignItems: 'center',
40
40
  "& .bg-pad-sl": {
41
41
  padding: "2px 4px 2px 4px",
42
42
  background: "transparent",
@@ -307,7 +307,7 @@ const Table = props => {
307
307
  onScroll: handleScroll,
308
308
  onMouseOver: onMouseOver,
309
309
  onMouseLeave: onMouseLeave,
310
- className: "custom-scroll",
310
+ className: !hideTools.includes("add_column") ? "custom-scroll" : '',
311
311
  children: [/*#__PURE__*/_jsx(TableComp, {
312
312
  className: readOnly ? "readOnly" : "",
313
313
  sx: {
@@ -345,8 +345,8 @@ const Table = props => {
345
345
  handleAction: handleAction,
346
346
  exandTools: exandTools,
347
347
  openSetttings: openSetttings,
348
- hideTools: hideTools,
349
- translation: translation
348
+ translation: translation,
349
+ hideTools: hideTools
350
350
  }), /*#__PURE__*/_jsx(MoreTableSettings, {
351
351
  exandTools: exandTools,
352
352
  handleAction: handleAction,
@@ -3,12 +3,6 @@ import { Editor, Text } from "slate";
3
3
  import { useSlate } from "slate-react";
4
4
  import { getNodeText } from "../../utils/helper";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
- const isEmptyTextNode = node => {
7
- if (Text.isText(node)) {
8
- return !node.text.trim();
9
- }
10
- return false;
11
- };
12
6
  const Title = props => {
13
7
  const {
14
8
  attributes,
@@ -53,4 +47,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
53
47
  }
54
48
  }, [editor.selection]);
55
49
  return null;
50
+ };
51
+ const isEmptyTextNode = node => {
52
+ if (Text.isText(node)) {
53
+ return !node.text.trim();
54
+ }
55
+ return false;
56
56
  };
@@ -28,9 +28,8 @@ export const TopBannerToolbar = props => {
28
28
  }
29
29
  };
30
30
  const onSelectImage = img => {
31
- const embedURL = typeof img === "string" ? img : img?.embedURL ? img?.embedURL : null;
32
31
  updateTopBanner(editor, {
33
- url: embedURL
32
+ url: img
34
33
  });
35
34
  handleClose();
36
35
  };
@@ -57,8 +56,7 @@ export const TopBannerToolbar = props => {
57
56
  open: open,
58
57
  onClose: handleClose,
59
58
  customProps: customProps,
60
- onSelectImage: onSelectImage,
61
- disableProgress: true
59
+ onSelectImage: onSelectImage
62
60
  })]
63
61
  });
64
62
  };
@@ -17,10 +17,9 @@ const TopBannerButton = props => {
17
17
  translation
18
18
  } = customProps;
19
19
  const onSelectImage = url => {
20
- const embedURL = typeof url === "string" ? url : url?.embedURL ? url?.embedURL : null;
21
- if (embedURL) {
20
+ if (url) {
22
21
  insertTopBanner(editor, {
23
- url: embedURL
22
+ url
24
23
  });
25
24
  }
26
25
  setOpen(false);
@@ -43,8 +42,7 @@ const TopBannerButton = props => {
43
42
  open: open,
44
43
  onClose: handleClose,
45
44
  customProps: customProps,
46
- onSelectImage: onSelectImage,
47
- disableProgress: true
45
+ onSelectImage: onSelectImage
48
46
  })]
49
47
  });
50
48
  };
@@ -34,8 +34,7 @@ const VariableButton = props => {
34
34
  PaperProps: {
35
35
  style: {
36
36
  maxHeight: 300,
37
- overflowY: "auto",
38
- transformOrigin: 'top left'
37
+ overflowY: "auto"
39
38
  },
40
39
  sx: {
41
40
  "&::-webkit-scrollbar-track": {
@@ -45,14 +44,6 @@ const VariableButton = props => {
45
44
  borderRadius: "16px"
46
45
  }
47
46
  }
48
- },
49
- anchorOrigin: {
50
- vertical: 'bottom',
51
- horizontal: 'right'
52
- },
53
- transformOrigin: {
54
- vertical: 'top',
55
- horizontal: 'right'
56
47
  }
57
48
  },
58
49
  children: [/*#__PURE__*/_jsx(MenuItem, {
@@ -45,13 +45,12 @@ const MiniEditor = props => {
45
45
  const {
46
46
  translationMock
47
47
  } = otherProps;
48
- const dummyTranslation = () => {};
49
48
  const customProps = {
50
49
  ...(otherProps || {}),
51
50
  readOnly: isReadOnly,
52
51
  editorPlaceholder: miniEditorPlaceholder,
53
52
  page_id: id,
54
- translation: translation || translationMock || dummyTranslation
53
+ translation: translation || translationMock
55
54
  };
56
55
  const [mentions, setMentions] = useMentions({
57
56
  editor,
@@ -133,11 +133,7 @@ const editorStyles = ({
133
133
  },
134
134
  "& .accordion-summary-collapse-btn": {
135
135
  padding: "4px",
136
- width: "5px",
137
- "& svg:hover": {
138
- background: theme?.palette?.editor?.tv_hover_bg,
139
- borderRadius: "4px"
140
- }
136
+ width: '5px'
141
137
  },
142
138
  "& .workflow-icon-btn": {
143
139
  pointerEvents: "none",
@@ -219,17 +215,6 @@ const editorStyles = ({
219
215
  borderRadius: "12px",
220
216
  "& svg": {
221
217
  marginRight: "8px"
222
- },
223
- "& .circularProgress-cls": {
224
- "& svg": {
225
- width: "15px !important",
226
- height: "15px !important"
227
- }
228
- },
229
- "& .uploadCancel": {
230
- color: theme?.palette?.editor?.closeButtonSvgStroke,
231
- width: "25px !important",
232
- height: "25px !important"
233
218
  }
234
219
  },
235
220
  "& .content-editable.empty": {
@@ -257,7 +242,7 @@ const editorStyles = ({
257
242
  }
258
243
  },
259
244
  "& .section-tw": {
260
- background: "transparent !important",
245
+ background: 'transparent !important',
261
246
  "& button": {
262
247
  padding: "2px",
263
248
  borderRadius: "0px",
@@ -306,8 +291,8 @@ const editorStyles = ({
306
291
  }
307
292
  },
308
293
  "& ::selection": {
309
- // background: 'rgba(35, 131, 226, 0.35)!important',
310
- color: "inherit"
294
+ background: 'rgba(35, 131, 226, 0.35)!important',
295
+ color: 'inherit'
311
296
  },
312
297
  "&.readOnlyContainer": {
313
298
  "& .max-content": {
@@ -317,7 +302,7 @@ const editorStyles = ({
317
302
  },
318
303
  fullScreenWrapper: {
319
304
  "& .editor-wrapper": {
320
- paddingTop: "20px"
305
+ paddingTop: '20px'
321
306
  },
322
307
  "& .MuiDialog-paper, & .MuiPopover-paper": {
323
308
  background: `${theme?.palette?.editor?.background} !important`
@@ -1,32 +1,8 @@
1
1
  import React from "react";
2
2
  import { Select, MenuItem } from "@mui/material";
3
- import { addMarkData, activeMark, getSelectedElementStyle } from "../../utils/SlateUtilityFunctions.js";
4
- import { toolbarGroups } from "../toolbarGroups.js";
3
+ import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
5
4
  import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
6
- import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
7
5
  import { jsx as _jsx } from "react/jsx-runtime";
8
- const allTools = toolbarGroups.flat();
9
- const fontWeight = allTools.find(f => f.format === "fontWeight");
10
- export const getValue = (editor, format) => {
11
- switch (format) {
12
- case "fontFamily":
13
- {
14
- const style = getSelectedElementStyle("font-family", editor, format);
15
- return style || defaultFonts[0];
16
- }
17
- case "fontWeight":
18
- {
19
- const {
20
- options
21
- } = fontWeight || {};
22
- const fontWeightStyle = getSelectedElementStyle("font-weight", editor, format);
23
- const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
24
- return selected?.value;
25
- }
26
- default:
27
- return activeMark(editor, format);
28
- }
29
- };
30
6
  const Dropdown = ({
31
7
  classes,
32
8
  editor,
@@ -34,7 +10,7 @@ const Dropdown = ({
34
10
  options,
35
11
  width
36
12
  }) => {
37
- const value = activeMark(editor, format, true) || getValue(editor, format);
13
+ const value = activeMark(editor, format);
38
14
  const changeMarkData = (event, format) => {
39
15
  event.preventDefault();
40
16
  const value = event.target.value;
@@ -44,7 +20,7 @@ const Dropdown = ({
44
20
  });
45
21
  };
46
22
  return /*#__PURE__*/_jsx(Select, {
47
- value: value || options?.[0]?.value,
23
+ value: value,
48
24
  className: "editor-dd",
49
25
  onChange: e => changeMarkData(e, format),
50
26
  MenuProps: {