@flozy/editor 11.2.1 → 11.2.2

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 (141) hide show
  1. package/dist/Editor/ChatEditor.js +7 -7
  2. package/dist/Editor/CommonEditor.js +24 -86
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +4 -37
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Attachments/Attachments.js +11 -154
  8. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +3 -8
  9. package/dist/Editor/Elements/Button/EditorButton.js +7 -22
  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/DataTypes/Components/Select.js +55 -134
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +8 -7
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +3 -8
  17. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
  18. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
  19. package/dist/Editor/Elements/Embed/Embed.js +43 -37
  20. package/dist/Editor/Elements/Embed/Image.js +22 -242
  21. package/dist/Editor/Elements/Embed/Video.js +32 -277
  22. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +6 -9
  23. package/dist/Editor/Elements/EmbedScript/styles.js +1 -17
  24. package/dist/Editor/Elements/Form/FormField.js +1 -1
  25. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -25
  26. package/dist/Editor/Elements/Form/Workflow/constant.js +1 -25
  27. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +76 -37
  28. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +5 -9
  29. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -3
  30. package/dist/Editor/Elements/FreeGrid/styles.js +0 -15
  31. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  32. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -2
  33. package/dist/Editor/Elements/Table/Table.js +1 -2
  34. package/dist/Editor/Elements/Table/TableCell.js +3 -10
  35. package/dist/Editor/Elements/Title/title.js +5 -4
  36. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -4
  37. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +3 -5
  38. package/dist/Editor/Styles/EditorStyles.js +5 -19
  39. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  40. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  41. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  42. package/dist/Editor/Toolbar/FormatTools/TextSize.js +29 -33
  43. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +1 -3
  45. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +23 -25
  46. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  47. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +5 -15
  48. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  49. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +7 -65
  50. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +12 -66
  51. package/dist/Editor/Toolbar/PopupTool/index.js +4 -6
  52. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  53. package/dist/Editor/common/ColorPickerButton.js +19 -38
  54. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  55. package/dist/Editor/common/FontLoader/FontLoader.js +0 -1
  56. package/dist/Editor/common/Icon.js +0 -28
  57. package/dist/Editor/common/ImageSelector/ImageSelector.js +7 -45
  58. package/dist/Editor/common/ImageSelector/Options/Upload.js +11 -26
  59. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  60. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  61. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  62. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  63. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  64. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  65. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -3
  66. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +7 -20
  67. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  68. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +0 -2
  69. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +7 -20
  70. package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
  71. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  72. package/dist/Editor/common/RnD/Utils/gridDropItem.js +11 -28
  73. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  74. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +63 -52
  75. package/dist/Editor/common/RnD/VirtualElement/helper.js +68 -248
  76. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -22
  77. package/dist/Editor/common/RnD/index.js +14 -61
  78. package/dist/Editor/common/Shorthands/elements.js +3 -55
  79. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  80. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
  81. package/dist/Editor/common/StyleBuilder/fieldStyle.js +0 -1
  82. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -13
  83. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  84. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  85. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  86. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -2
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -16
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  90. package/dist/Editor/common/StyleBuilder/formStyle.js +13 -19
  91. package/dist/Editor/common/StyleBuilder/index.js +4 -8
  92. package/dist/Editor/common/Uploader.js +17 -118
  93. package/dist/Editor/common/iconslist.js +0 -21
  94. package/dist/Editor/commonStyle.js +53 -111
  95. package/dist/Editor/helper/index.js +1 -4
  96. package/dist/Editor/helper/theme.js +2 -203
  97. package/dist/Editor/hooks/useMouseMove.js +3 -12
  98. package/dist/Editor/hooks/useTable.js +1 -62
  99. package/dist/Editor/plugins/withEmbeds.js +1 -1
  100. package/dist/Editor/plugins/withHTML.js +3 -56
  101. package/dist/Editor/plugins/withTable.js +1 -1
  102. package/dist/Editor/service/fileupload.js +0 -70
  103. package/dist/Editor/theme/ThemeList.js +173 -50
  104. package/dist/Editor/utils/SlateUtilityFunctions.js +40 -165
  105. package/dist/Editor/utils/accordion.js +1 -1
  106. package/dist/Editor/utils/button.js +17 -1
  107. package/dist/Editor/utils/font.js +37 -40
  108. package/dist/Editor/utils/formfield.js +2 -2
  109. package/dist/Editor/utils/helper.js +3 -101
  110. package/dist/Editor/utils/insertAppHeader.js +4 -8
  111. package/package.json +1 -1
  112. package/dist/Editor/Elements/Attachments/AttachmentStyles.js +0 -16
  113. package/dist/Editor/Elements/FreeGrid/helper.js +0 -194
  114. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  115. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  116. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  117. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  118. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  119. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  120. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  121. package/dist/Editor/common/CustomSelect.js +0 -43
  122. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  123. package/dist/Editor/common/UploaderWithProgress.js +0 -183
  124. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  125. package/dist/Editor/hooks/useThemeValues.js +0 -63
  126. package/dist/Editor/theme/index.js +0 -149
  127. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  128. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  129. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  130. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  131. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  132. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  133. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  134. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  135. package/dist/Editor/themeSettings/icons.js +0 -60
  136. package/dist/Editor/themeSettings/index.js +0 -380
  137. package/dist/Editor/themeSettings/style.js +0 -299
  138. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  139. package/dist/Editor/themeSettingsAI/index.js +0 -355
  140. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  141. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -22,9 +22,7 @@ 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 { getElementValues } from "./helper";
26
25
  import updateFormName from "../../utils/updateFormName";
27
- import { GetsectionBgImage } from "../../utils/helper";
28
26
  import { jsx as _jsx } from "react/jsx-runtime";
29
27
  import { jsxs as _jsxs } from "react/jsx-runtime";
30
28
  const MAX_DEVICE_WIDTH = {
@@ -185,11 +183,6 @@ const FreeGrid = props => {
185
183
  const handleAddElementClick = type => () => {
186
184
  const isEmpty = isEmptySection();
187
185
  const insertAt = isEmpty ? [...path, 0] : [...path, childrenCountRef.current];
188
- const id = crypto?.randomUUID();
189
- const {
190
- elValues,
191
- sectionVal
192
- } = getElementValues(type, element?.children, breakpoint);
193
186
  switch (type) {
194
187
  case "addText":
195
188
  Transforms.insertNodes(editor, [{
@@ -201,7 +194,12 @@ const FreeGrid = props => {
201
194
  text: "Text"
202
195
  }]
203
196
  }],
204
- ...(elValues || {})
197
+ gridArea: "3 / 1 / 4 / 2",
198
+ left: 50,
199
+ marginTop: 0,
200
+ top: 0,
201
+ width: 170,
202
+ height: 30
205
203
  }], {
206
204
  at: [...insertAt]
207
205
  });
@@ -219,10 +217,29 @@ const FreeGrid = props => {
219
217
  linkType: "webAddress"
220
218
  },
221
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
+ },
222
234
  textAlign: "center",
223
235
  label: "Get Started"
224
236
  }],
225
- ...(elValues || {})
237
+ gridArea: "3 / 1 / 4 / 2",
238
+ left: 50,
239
+ marginTop: 0,
240
+ top: 0,
241
+ width: 143,
242
+ height: 50
226
243
  }], {
227
244
  at: [...insertAt]
228
245
  });
@@ -242,7 +259,14 @@ const FreeGrid = props => {
242
259
  date: ""
243
260
  }
244
261
  }],
245
- ...(elValues || {})
262
+ gridArea: "3 / 1 / 4 / 2",
263
+ left: 50,
264
+ marginTop: 0,
265
+ top: 0,
266
+ width: 217,
267
+ height: 173,
268
+ width_xs: 217,
269
+ height_xs: 173
246
270
  }], {
247
271
  at: [...insertAt]
248
272
  });
@@ -258,11 +282,14 @@ const FreeGrid = props => {
258
282
  images: [],
259
283
  children: [{
260
284
  text: ""
261
- }],
262
- fromFreeGrid: true,
263
- uniqueId: id
285
+ }]
264
286
  }],
265
- ...(elValues || {})
287
+ gridArea: "3 / 1 / 4 / 2",
288
+ left: 50,
289
+ marginTop: 0,
290
+ top: 0,
291
+ width: 170,
292
+ height: 80
266
293
  }], {
267
294
  at: [...insertAt]
268
295
  });
@@ -272,11 +299,10 @@ const FreeGrid = props => {
272
299
  ...insertFreeGridItem("video", createEmbedNode("video", {
273
300
  url: "",
274
301
  alt: "",
275
- images: [],
276
- fromFreeGrid: true,
277
- uniqueId: id
302
+ images: []
278
303
  }), {
279
- ...(elValues || {})
304
+ height: 370,
305
+ width: 650
280
306
  })
281
307
  }], {
282
308
  at: [...insertAt]
@@ -287,7 +313,8 @@ const FreeGrid = props => {
287
313
  ...insertFreeGridItem("table", {
288
314
  ...DEFAULT_TABLE_NODE()
289
315
  }, {
290
- ...(elValues || {})
316
+ height: 150,
317
+ width: 400
291
318
  })
292
319
  }], {
293
320
  at: [...insertAt]
@@ -306,7 +333,12 @@ const FreeGrid = props => {
306
333
  isEncoded: true,
307
334
  isSanitized: true
308
335
  }],
309
- ...(elValues || {})
336
+ gridArea: "3 / 1 / 4 / 2",
337
+ left: 50,
338
+ marginTop: 0,
339
+ top: 0,
340
+ width: 400,
341
+ height: 300
310
342
  }], {
311
343
  at: [...insertAt]
312
344
  });
@@ -318,9 +350,7 @@ const FreeGrid = props => {
318
350
  children: [{
319
351
  text: ""
320
352
  }]
321
- }, {
322
- ...(elValues || {})
323
- }, "freegridBox")
353
+ }, {}, "freegridBox")
324
354
  }], {
325
355
  at: [...insertAt]
326
356
  });
@@ -330,7 +360,8 @@ const FreeGrid = props => {
330
360
  ...insertFreeGridItem("form", {
331
361
  ...FORM_NODE()
332
362
  }, {
333
- ...(elValues || {})
363
+ height: 92,
364
+ width: 400
334
365
  })
335
366
  }], {
336
367
  at: [...insertAt]
@@ -343,7 +374,8 @@ const FreeGrid = props => {
343
374
  menus: null
344
375
  })
345
376
  }, {
346
- ...(elValues || {})
377
+ height: 60,
378
+ width: 400
347
379
  })
348
380
  }], {
349
381
  at: [...insertAt]
@@ -359,21 +391,29 @@ const FreeGrid = props => {
359
391
  text: ""
360
392
  }]
361
393
  }],
362
- ...(elValues || {})
394
+ gridArea: "3 / 1 / 4 / 2",
395
+ left: 50,
396
+ marginTop: 0,
397
+ top: 0,
398
+ width: 170,
399
+ height: 30
363
400
  }], {
364
401
  at: [...insertAt]
365
402
  });
366
403
  break;
367
404
  default:
368
405
  }
369
- setSelectedElement({});
370
- // increase the section height if new element is inserted based on auto align
371
- Transforms.setNodes(editor, {
372
- ...sectionVal,
373
- updated_at: new Date().getTime()
374
- }, {
375
- at: path
376
- });
406
+ if (breakpoint === "lg") {
407
+ setSelectedElement({});
408
+
409
+ // auto align in mobile
410
+ Transforms.setNodes(editor, {
411
+ xs_updatedOn: null,
412
+ updated_at: new Date().getTime()
413
+ }, {
414
+ at: path
415
+ });
416
+ }
377
417
  count.current = count.current + 1;
378
418
 
379
419
  // focus on newly added element
@@ -458,7 +498,6 @@ const FreeGrid = props => {
458
498
  // return eleId;
459
499
  // }, [autoAlign, updated_at, breakpoint, path]);
460
500
 
461
- const sectionBgImage = GetsectionBgImage(sectionBackgroundImage);
462
501
  return /*#__PURE__*/_jsx(FreeGridContext.Provider, {
463
502
  value: {
464
503
  isInteracting,
@@ -480,7 +519,7 @@ const FreeGrid = props => {
480
519
  style: {
481
520
  position: "relative",
482
521
  "--height": `${height}px`,
483
- display: "block" //for test purpose
522
+ display: 'block' //for test purpose
484
523
  },
485
524
 
486
525
  dataSets: {
@@ -577,7 +616,7 @@ const FreeGrid = props => {
577
616
  ...classes.root,
578
617
  ...freegridSX,
579
618
  background: sectionBgColor || "rgba(255,255,255,1)",
580
- ...sectionBgImage,
619
+ backgroundImage: sectionBackgroundImage ? `url('${sectionBackgroundImage}')` : "",
581
620
  backgroundSize: "cover"
582
621
  },
583
622
  "data-path": path.join("|"),
@@ -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";
@@ -157,11 +157,6 @@ const FreeGridBox = props => {
157
157
  };
158
158
  const repeatTimes = Math.floor(height / ROW_HEIGHT);
159
159
  const sectionTypeOptions = (itemOptions?.box || []).filter(f => (hideTools || []).indexOf(f) === -1);
160
- const boxSp = groupByBreakpoint({
161
- borderRadius: {
162
- ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
163
- }
164
- }, theme);
165
160
  const isBoxHeader = useMemo(() => {
166
161
  return element?.children?.some(c => c.childType === "appHeader" && !c.xs_updatedOn);
167
162
  }, [element]);
@@ -197,8 +192,7 @@ const FreeGridBox = props => {
197
192
  "data-margin-top-xs": marginTop_xs,
198
193
  "data-height-xs": height_xs,
199
194
  "data-width-xs": width_xs,
200
- "data-left-xs": left_xs,
201
- "data-width-lg": width
195
+ "data-left-xs": left_xs
202
196
  },
203
197
  gridArea: gridArea,
204
198
  onChange: onChange,
@@ -232,7 +226,9 @@ const FreeGridBox = props => {
232
226
  "--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
233
227
  },
234
228
  sx: {
235
- ...boxSp,
229
+ borderRadius: {
230
+ ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
231
+ },
236
232
  background: sectionBgColor,
237
233
  backgroundImage: sectionBackgroundImage ? `url('${sectionBackgroundImage}')` : "",
238
234
  borderColor: borderColor || "transparent",
@@ -296,8 +296,7 @@ const FreeGridItem = props => {
296
296
  "data-margin-top-xs": marginTop_xs,
297
297
  "data-height-xs": height_xs,
298
298
  "data-width-xs": width_xs,
299
- "data-left-xs": left_xs,
300
- "data-width-lg": width
299
+ "data-left-xs": left_xs
301
300
  },
302
301
  defaultStyle: {
303
302
  height: `${height}px`,
@@ -322,7 +321,6 @@ const FreeGridItem = props => {
322
321
  customProps: customProps,
323
322
  translation: translation,
324
323
  xsHidden: xsHidden,
325
- disableClick: element?.children?.[0]?.isUploading && (element?.childType === "image" || element?.childType === "video"),
326
324
  children: /*#__PURE__*/_jsxs(Box, {
327
325
  component: "div",
328
326
  ...attributes,
@@ -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": {
@@ -312,12 +309,6 @@ const useFreeGridStyles = ({
312
309
  "& .toolbtn.remove": {
313
310
  display: "none"
314
311
  }
315
- },
316
- "& .edt-headings": {
317
- margin: "0px"
318
- },
319
- "& .edt-paragraphs": {
320
- margin: "0px"
321
312
  }
322
313
  },
323
314
  "& .fgi_type_embedScript": {
@@ -359,12 +350,6 @@ const useFreeGridStyles = ({
359
350
  "& .fgi_type_text": {
360
351
  "& .edt-headings": {
361
352
  margin: "0px"
362
- },
363
- "& .edt-paragraphs": {
364
- margin: "0px"
365
- },
366
- "& blockquote": {
367
- margin: "0px !important"
368
353
  }
369
354
  },
370
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);
@@ -291,8 +291,7 @@ const Table = props => {
291
291
  dragRowBtnCls,
292
292
  tablePath: path,
293
293
  openSetttings,
294
- exandTools,
295
- tableNode: element
294
+ exandTools
296
295
  },
297
296
  children: [/*#__PURE__*/_jsxs("div", {
298
297
  style: {
@@ -13,7 +13,7 @@ import { Droppable } from "./Droppable";
13
13
  import { useDndContext } from "@dnd-kit/core";
14
14
  import { getNodeWithType } from "../../utils/helper";
15
15
  import { ResizeIcon } from "../../common/iconListV2";
16
- import { getTextColor, isEmptyTextNode } from "../../helper";
16
+ import { isEmptyTextNode } from "../../helper";
17
17
  import SimpleText from "../SimpleText";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -443,10 +443,8 @@ const TableCell = props => {
443
443
  };
444
444
  const showRowDragBtn = (showRowDrag || isRowDragging) && containerEle?.scrollLeft <= 0;
445
445
  const TableResizer = isMobile && hoverCol === column ? MobileResizer : Resizer;
446
- const cellTextColor = entireTextColor || rowProps?.textColor || parentProps?.textColor;
447
- const textStyles = cellTextColor ? getTextColor(cellTextColor) : "inherit";
448
446
  return /*#__PURE__*/_jsxs(_Fragment, {
449
- children: [/*#__PURE__*/_jsxs(Box, {
447
+ children: [/*#__PURE__*/_jsxs("td", {
450
448
  ...element.attr,
451
449
  ...attributes,
452
450
  className: `editor-table-cell ${hasSelected ? "selection" : ""}`,
@@ -457,19 +455,14 @@ const TableCell = props => {
457
455
  fontFamily: entireFontFamily || "inherit",
458
456
  fontWeight: entireFontWeight || "inherit",
459
457
  fontSize: entireTextSize || "inherit",
458
+ color: entireTextColor || "inherit",
460
459
  cursor: "text",
461
460
  verticalAlign: "top",
462
461
  padding: "0px",
463
462
  ...(sizeProps || {})
464
463
  },
465
- sx: {
466
- '& span[data-slate-string="true"]': {
467
- ...textStyles
468
- }
469
- },
470
464
  ...tbProps,
471
465
  "data-cell": path.toString(),
472
- component: "td",
473
466
  children: [isFirstRow && currentDraggingType === "col" ? /*#__PURE__*/_jsx(Droppable, {
474
467
  ...dndProps,
475
468
  dragType: currentDraggingType,
@@ -1,7 +1,7 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Text } from "slate";
2
+ import { Editor, Text } from "slate";
3
3
  import { useSlate } from "slate-react";
4
- import { getNodeText, getNodeWithType } from "../../utils/helper";
4
+ import { getNodeText } from "../../utils/helper";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const Title = props => {
7
7
  const {
@@ -31,8 +31,9 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
31
31
  if (!editor.selection) return;
32
32
 
33
33
  // Get the current node where the cursor is
34
- const [nodeEntry] = getNodeWithType(editor, "title", {
35
- at: editor.selection
34
+ const [nodeEntry] = Editor.nodes(editor, {
35
+ at: editor.selection,
36
+ match: n => n.type === "title"
36
37
  });
37
38
  if (nodeEntry) {
38
39
  setWasInsideTitle(true); // User was inside the title
@@ -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
  };
@@ -14,9 +14,6 @@ const editorStyles = ({
14
14
  "*": {
15
15
  boxSizing: "border-box"
16
16
  },
17
- "& .blockQuoteComp": {
18
- backgroundColor: theme?.palette?.editor?.colorBoxBg
19
- },
20
17
  "&.iframe-editor": {
21
18
  "& .mini-tool-wrpr-ei": {
22
19
  display: "none"
@@ -136,7 +133,7 @@ const editorStyles = ({
136
133
  },
137
134
  "& .accordion-summary-collapse-btn": {
138
135
  padding: "4px",
139
- width: "5px"
136
+ width: '5px'
140
137
  },
141
138
  "& .workflow-icon-btn": {
142
139
  pointerEvents: "none",
@@ -218,17 +215,6 @@ const editorStyles = ({
218
215
  borderRadius: "12px",
219
216
  "& svg": {
220
217
  marginRight: "8px"
221
- },
222
- "& .circularProgress-cls": {
223
- "& svg": {
224
- width: "15px !important",
225
- height: "15px !important"
226
- }
227
- },
228
- "& .uploadCancel": {
229
- color: theme?.palette?.editor?.closeButtonSvgStroke,
230
- width: "25px !important",
231
- height: "25px !important"
232
218
  }
233
219
  },
234
220
  "& .content-editable.empty": {
@@ -256,7 +242,7 @@ const editorStyles = ({
256
242
  }
257
243
  },
258
244
  "& .section-tw": {
259
- background: "transparent !important",
245
+ background: 'transparent !important',
260
246
  "& button": {
261
247
  padding: "2px",
262
248
  borderRadius: "0px",
@@ -305,8 +291,8 @@ const editorStyles = ({
305
291
  }
306
292
  },
307
293
  "& ::selection": {
308
- // background: 'rgba(35, 131, 226, 0.35)!important',
309
- color: "inherit"
294
+ background: 'rgba(35, 131, 226, 0.35)!important',
295
+ color: 'inherit'
310
296
  },
311
297
  "&.readOnlyContainer": {
312
298
  "& .max-content": {
@@ -316,7 +302,7 @@ const editorStyles = ({
316
302
  },
317
303
  fullScreenWrapper: {
318
304
  "& .editor-wrapper": {
319
- paddingTop: "20px"
305
+ paddingTop: '20px'
320
306
  },
321
307
  "& .MuiDialog-paper, & .MuiPopover-paper": {
322
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: {
@@ -1,10 +1,9 @@
1
1
  import React from "react";
2
2
  import { Autocomplete, TextField } from "@mui/material";
3
- import { addMarkData } from "../../utils/SlateUtilityFunctions.js";
3
+ import { activeMark, addMarkData } from "../../utils/SlateUtilityFunctions.js";
4
4
  import usePopupStyle from "../PopupTool/PopupToolStyle.js";
5
5
  import { useEditorContext } from "../../hooks/useMouseMove.js";
6
- import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
7
- import { getValue } from "./Dropdown.js";
6
+ import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  const FontFamilyAutocomplete = ({
10
9
  editor,
@@ -15,7 +14,7 @@ const FontFamilyAutocomplete = ({
15
14
  val = "",
16
15
  webFont = false
17
16
  }) => {
18
- const markValue = getValue(editor, format);
17
+ const markValue = activeMark(editor, format);
19
18
  const value = !webFont ? markValue : val;
20
19
  const changeMarkData = (event, newValue, format) => {
21
20
  if (!webFont) {
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import Icon from "../../common/Icon";
3
3
  import Button from "../../common/Button";
4
- import { toggleMark, isMarkBtnActive } from "../../utils/SlateUtilityFunctions.js";
4
+ import { toggleMark, isMarkActive } from "../../utils/SlateUtilityFunctions.js";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const MarkButton = ({
7
7
  editor,
@@ -13,7 +13,7 @@ const MarkButton = ({
13
13
  translation
14
14
  } = customProps;
15
15
  return /*#__PURE__*/_jsx(Button, {
16
- active: isMarkBtnActive(editor, format),
16
+ active: isMarkActive(editor, format),
17
17
  format: format,
18
18
  onMouseDown: e => {
19
19
  e.preventDefault();