@flozy/editor 5.1.2 → 5.1.4

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 (146) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +7 -13
  3. package/dist/Editor/Editor.css +10 -52
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
  6. package/dist/Editor/Elements/AI/Styles.js +1 -7
  7. package/dist/Editor/Elements/Button/EditorButton.js +1 -0
  8. package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
  9. package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
  10. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  11. package/dist/Editor/Elements/Form/Form.js +2 -38
  12. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  13. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  14. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  15. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  16. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  17. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  18. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  19. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  20. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  21. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  22. package/dist/Editor/Elements/Grid/GridButton.js +1 -2
  23. package/dist/Editor/Elements/Grid/GridItem.js +2 -3
  24. package/dist/Editor/Elements/Grid/Styles.js +3 -0
  25. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  26. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  27. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  28. package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
  29. package/dist/Editor/Elements/SimpleText/index.js +1 -8
  30. package/dist/Editor/Elements/SimpleText/style.js +1 -8
  31. package/dist/Editor/Elements/Table/Styles.js +43 -25
  32. package/dist/Editor/Elements/Table/Table.js +138 -206
  33. package/dist/Editor/Elements/Table/TableCell.js +102 -355
  34. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  35. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  36. package/dist/Editor/Styles/EditorStyles.js +1 -3
  37. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  38. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +11 -7
  39. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
  40. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  41. package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
  42. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
  43. package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  45. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +11 -16
  46. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -416
  47. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -62
  48. package/dist/Editor/Toolbar/PopupTool/index.js +6 -5
  49. package/dist/Editor/Toolbar/Toolbar.js +0 -6
  50. package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
  51. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  52. package/dist/Editor/common/ColorPickerButton.js +2 -3
  53. package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
  54. package/dist/Editor/common/Icon.js +23 -24
  55. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  56. package/dist/Editor/common/LinkSettings/index.js +1 -2
  57. package/dist/Editor/common/MentionsPopup/Styles.js +3 -151
  58. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  59. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -108
  60. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
  61. package/dist/Editor/common/Shorthands/elements.js +1 -13
  62. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  63. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
  64. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  65. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
  66. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  67. package/dist/Editor/common/StyleBuilder/index.js +11 -84
  68. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
  69. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  70. package/dist/Editor/common/Uploader.js +0 -8
  71. package/dist/Editor/common/iconListV2.js +40 -378
  72. package/dist/Editor/common/iconslist.js +5 -8
  73. package/dist/Editor/commonStyle.js +9 -117
  74. package/dist/Editor/helper/deserialize/index.js +1 -4
  75. package/dist/Editor/helper/index.js +2 -2
  76. package/dist/Editor/helper/theme.js +1 -24
  77. package/dist/Editor/hooks/useMouseMove.js +2 -5
  78. package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
  79. package/dist/Editor/plugins/withHTML.js +1 -17
  80. package/dist/Editor/plugins/withLayout.js +1 -48
  81. package/dist/Editor/utils/SlateUtilityFunctions.js +0 -18
  82. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -21
  83. package/dist/Editor/utils/embed.js +1 -2
  84. package/dist/Editor/utils/events.js +1 -0
  85. package/dist/Editor/utils/font.js +4 -11
  86. package/dist/Editor/utils/formfield.js +4 -8
  87. package/dist/Editor/utils/helper.js +1 -34
  88. package/dist/Editor/utils/insertNewLine.js +1 -19
  89. package/dist/Editor/utils/pageSettings.js +2 -14
  90. package/dist/Editor/utils/serializeToText.js +0 -2
  91. package/dist/Editor/utils/table.js +24 -228
  92. package/package.json +1 -1
  93. package/dist/Editor/Elements/DataView/DataView.js +0 -101
  94. package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
  95. package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -59
  96. package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -30
  97. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -140
  98. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -40
  99. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -59
  100. package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -26
  101. package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -38
  102. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
  103. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
  104. package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
  105. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
  106. package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
  107. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
  108. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
  109. package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -74
  110. package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -64
  111. package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -106
  112. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -174
  113. package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
  114. package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
  115. package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -37
  116. package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -111
  117. package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -62
  118. package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -36
  119. package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
  120. package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -160
  121. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -190
  122. package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -42
  123. package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -30
  124. package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
  125. package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -179
  126. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -100
  127. package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -227
  128. package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -70
  129. package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
  130. package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -288
  131. package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
  132. package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -72
  133. package/dist/Editor/Elements/DataView/styles.js +0 -143
  134. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  135. package/dist/Editor/Elements/Table/DragButton.js +0 -141
  136. package/dist/Editor/Elements/Table/DragStyles.js +0 -69
  137. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  138. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  139. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  140. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  141. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  142. package/dist/Editor/common/Select/index.js +0 -20
  143. package/dist/Editor/common/Select/styles.js +0 -17
  144. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
  145. package/dist/Editor/hooks/useTable.js +0 -175
  146. package/dist/Editor/utils/dataView.js +0 -43
@@ -1,8 +1,9 @@
1
1
  import React, { useCallback, useMemo, useRef, useState, useEffect, useImperativeHandle, forwardRef } from "react";
2
2
  import { Editable, Slate, ReactEditor } from 'slate-react';
3
3
  import { createEditor, Transforms, Editor } from 'slate';
4
+ import { useDebounce } from "use-debounce";
4
5
  import withCommon from "./hooks/withCommon";
5
- import { getBlock, getMarked, serializeMentions } from "./utils/chatEditor/SlateUtilityFunctions";
6
+ import { getBlock, getMarked } from "./utils/chatEditor/SlateUtilityFunctions";
6
7
  import MiniTextFormat from "./Toolbar/PopupTool/MiniTextFormat";
7
8
  import { commands, mentionsEvent } from "./utils/events";
8
9
  import { insertEmoji } from "./utils/emoji";
@@ -14,7 +15,6 @@ import Shorthands from "./common/Shorthands";
14
15
  import usePopupStyle from "./Toolbar/PopupTool/PopupToolStyle";
15
16
  import { EditorProvider } from "./hooks/useMouseMove";
16
17
  import decorators from "./utils/Decorators";
17
- import { useDebouncedCallback } from "use-debounce";
18
18
  import { jsx as _jsx } from "react/jsx-runtime";
19
19
  import { jsxs as _jsxs } from "react/jsx-runtime";
20
20
  const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
@@ -42,18 +42,8 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
42
42
  });
43
43
  const [isInteracted, setIsInteracted] = useState(false);
44
44
  const [value, setValue] = useState(convertedContent);
45
- const debouncedValue = useRef(value);
46
- const debounced = useDebouncedCallback(
47
- // function
48
- value => {
49
- const {
50
- value: strVal,
51
- ...restVal
52
- } = getOnSaveData(value);
53
- onSave(strVal, restVal);
54
- },
55
- // delay in ms
56
- 500);
45
+ const [loadedValue] = useState(value);
46
+ const [deboundedValue] = useDebounce(value, 500);
57
47
  const editor = useMemo(() => {
58
48
  return withCommon(createEditor(), {
59
49
  needLayout,
@@ -73,7 +63,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
73
63
  const {
74
64
  value: strVal,
75
65
  ...restVal
76
- } = getOnSaveData(debouncedValue?.current);
66
+ } = getOnSaveData(value);
77
67
  onsubmit(false, {
78
68
  strVal,
79
69
  restVal
@@ -109,8 +99,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
109
99
  const newValue = draftToSlate({
110
100
  data: content
111
101
  });
112
- debounced(newValue);
113
-
102
+ setValue(newValue);
114
103
  // setTimeout(() => {
115
104
  if (editor.children.length === 0) {
116
105
  Transforms.insertNodes(editor, newValue);
@@ -123,14 +112,27 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
123
112
  }
124
113
  }
125
114
  }));
115
+
116
+ // useEffect(() => {
117
+ // setIsExternalUpdate(true);
118
+ // setValue(draftToSlate({ data: content }));
119
+ // }, [content]);
120
+
121
+ useEffect(() => {
122
+ if (JSON.stringify(loadedValue) !== JSON.stringify(deboundedValue) && isInteracted && onSave) {
123
+ const {
124
+ value: strVal,
125
+ ...restVal
126
+ } = getOnSaveData(deboundedValue);
127
+ onSave(strVal, restVal);
128
+ }
129
+ }, [deboundedValue]);
126
130
  const getOnSaveData = val => {
127
131
  const text = serializeToText(val);
128
- const mentions = serializeMentions(val);
129
132
  const title = val?.find(f => f.type === "title");
130
133
  return {
131
134
  value: JSON.stringify(val),
132
135
  text: text,
133
- mentions: mentions,
134
136
  title: serializeToText(title?.children) || "Untitled"
135
137
  };
136
138
  };
@@ -178,8 +180,15 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
178
180
  });
179
181
  };
180
182
  const handleEditorChange = newValue => {
181
- debounced(newValue);
182
- debouncedValue.current = newValue;
183
+ const value_txt = serializeToText(value);
184
+ if (!value_txt) {
185
+ const {
186
+ value: strVal,
187
+ ...restVal
188
+ } = getOnSaveData(newValue);
189
+ onSave(strVal, restVal);
190
+ }
191
+ setValue(newValue);
183
192
  if (!isInteracted) {
184
193
  setIsInteracted(true);
185
194
  }
@@ -219,7 +228,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
219
228
  editor
220
229
  });
221
230
  } else if (event.key === "Enter" && !isMobile) {
222
- const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === 'paragraph' && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === '';
231
+ const isEmpty = value.length === 1 && value[0].type === 'paragraph' && value[0].children.length === 1 && value[0].children[0].text === '';
223
232
  if (isEmpty) {
224
233
  event.preventDefault();
225
234
  return;
@@ -228,7 +237,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
228
237
  const {
229
238
  value: strVal,
230
239
  ...restVal
231
- } = getOnSaveData(debouncedValue?.current);
240
+ } = getOnSaveData(value);
232
241
  onsubmit(false, {
233
242
  strVal,
234
243
  restVal
@@ -242,7 +251,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
242
251
  const {
243
252
  value: strVal,
244
253
  ...restVal
245
- } = getOnSaveData(debouncedValue?.current);
254
+ } = getOnSaveData(value);
246
255
  onBlur({
247
256
  strVal,
248
257
  restVal
@@ -263,7 +272,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
263
272
  editor: editor,
264
273
  children: /*#__PURE__*/_jsxs(Slate, {
265
274
  editor: editor,
266
- initialValue: debouncedValue?.current,
275
+ initialValue: value,
267
276
  onChange: handleEditorChange,
268
277
  children: [toolBar && /*#__PURE__*/_jsx(MiniTextFormat, {
269
278
  classes: classes,
@@ -26,7 +26,7 @@ import editorStyles from "./Styles/EditorStyles";
26
26
  import DragAndDrop from "./common/DnD";
27
27
  import Section from "./common/Section";
28
28
  import decorators from "./utils/Decorators";
29
- import { getBreakpointLineSpacing, getTRBLBreakPoints } from "./helper/theme";
29
+ import { getTRBLBreakPoints } from "./helper/theme";
30
30
  import { handleInsertLastElement, isFreeGrid, isFreeGridFragment, isPageSettings, outsideEditorClickLabel } from "./utils/helper";
31
31
  import useWindowResize from "./hooks/useWindowResize";
32
32
  import PopoverAIInput from "./Elements/AI/PopoverAIInput";
@@ -130,8 +130,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
130
130
  pageColor,
131
131
  color: pageTextColor,
132
132
  pageWidth,
133
- maxWidth: pageMaxWidth,
134
- lineHeight
133
+ maxWidth: pageMaxWidth
135
134
  } = pageSt?.pageProps || {
136
135
  bannerSpacing: {
137
136
  left: 0,
@@ -298,12 +297,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
298
297
  hideTools: updatedHideTools || []
299
298
  }) : [];
300
299
  const handleEditorChange = newValue => {
301
- if (!readOnly) {
302
- if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
303
- debounced(newValue);
304
- if (!isInteracted) {
305
- setIsInteracted(true);
306
- }
300
+ if (JSON.stringify(newValue) !== JSON.stringify(debouncedValue?.current)) {
301
+ debounced(newValue);
302
+ if (!isInteracted) {
303
+ setIsInteracted(true);
307
304
  }
308
305
  }
309
306
  };
@@ -322,7 +319,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
322
319
  onDrawerOpen: onDrawerOpen,
323
320
  ICON_API: "https://assets.agenciflow.com"
324
321
  };
325
- const lineH = getBreakpointLineSpacing(lineHeight, breakpoint);
326
322
  const renderElement = useCallback(props => {
327
323
  return /*#__PURE__*/_jsx(Element, {
328
324
  ...props,
@@ -528,7 +524,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
528
524
  padding: {
529
525
  ...getTRBLBreakPoints(bannerSpacing)
530
526
  },
531
- lineHeight: lineH,
532
527
  width: !pageWidth || pageWidth === "fixed" ? fixedWidth : fullWidth,
533
528
  height: viewport.h ? `${viewport.h}px` : `100%`,
534
529
  alignSelf: "center",
@@ -586,9 +581,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
586
581
  setIsTextSelected: setIsTextSelected,
587
582
  customProps: customProps,
588
583
  editorWrapper: editorWrapper
589
- }) : null, !readOnly ? /*#__PURE__*/_jsx(SwitchViewport, {
584
+ }) : null, !readOnly && showViewport ? /*#__PURE__*/_jsx(SwitchViewport, {
590
585
  breakpoint: breakpoint,
591
- show: showViewport,
592
586
  onChange: b => onSwitchBreakpoint(b)
593
587
  }) : null]
594
588
  })
@@ -42,7 +42,7 @@ blockquote {
42
42
  }
43
43
 
44
44
  .editor-wrapper table {
45
- border-collapse: collapse;
45
+ border-collapse: separate;
46
46
  }
47
47
 
48
48
  .editor-wrapper .editor-wrapperbutton {
@@ -351,7 +351,7 @@ blockquote {
351
351
  height: 100%;
352
352
  width: 100%;
353
353
  border: 1px solid #2563EB;
354
- border-radius: 7px;
354
+ border-radius: 12px;
355
355
  }
356
356
 
357
357
  .activeBrush svg {
@@ -383,7 +383,7 @@ blockquote {
383
383
 
384
384
  .dialog-actions-si .MuiButtonBase-root {
385
385
  opacity: 1;
386
- padding: 0px 5px 0px 2px !important
386
+ padding: 6px 5px 0px 3px !important
387
387
  }
388
388
 
389
389
  .signature-tab {
@@ -397,9 +397,9 @@ blockquote {
397
397
  .signature-tab2 {
398
398
  /* display: flex; */
399
399
  align-items: center;
400
- border-width: 1px;
400
+ border-width: 0px, 0px, 0px, 0px;
401
401
  border-style: solid;
402
- border-color: #2563EB66;
402
+ border-color: #2563EB;
403
403
  justify-content: center;
404
404
  flex-direction: column;
405
405
  width: 100%;
@@ -493,9 +493,9 @@ blockquote {
493
493
 
494
494
  .MuiButton-root.primaryBtn.disabled,
495
495
  .MuiButton-root.secondaryBtn.disabled {
496
- background: #eee;
497
- color: #ccc;
498
- border: 1px solid #ccc;
496
+ background: #eee !important;
497
+ color: #ccc !important;
498
+ border: 1px solid #ccc !important;
499
499
  }
500
500
 
501
501
  .MuiButton-root.secondaryBtn {
@@ -623,7 +623,7 @@ blockquote {
623
623
  }
624
624
 
625
625
  .MuiIconButton-root.btnActive {
626
- color: #2563EB !important;
626
+ background-color: #ccc;
627
627
  }
628
628
 
629
629
  .embed .element-toolbar {
@@ -858,7 +858,7 @@ blockquote {
858
858
 
859
859
  .dialogComp .MuiInputBase-input {
860
860
  border-radius: 8px;
861
- /* box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.05); */
861
+ box-shadow: 0px 4px 18px 0px rgba(0, 0, 0, 0.05);
862
862
  font-size: 12px;
863
863
  font-weight: 500;
864
864
  }
@@ -1073,10 +1073,6 @@ blockquote {
1073
1073
  font-size: 14px;
1074
1074
  }
1075
1075
 
1076
- .listItemMargin {
1077
- margin: 0px;
1078
- }
1079
-
1080
1076
  .content-editable.empty {
1081
1077
  position: relative;
1082
1078
  }
@@ -1242,41 +1238,3 @@ blockquote {
1242
1238
  max-width: 100% !important;
1243
1239
  }
1244
1240
  }
1245
-
1246
- .settingsHeader {
1247
- font-size: 14px !important;
1248
- font-weight: 500 !important;
1249
- }
1250
- .hideScroll {
1251
- overflow-anchor: none;
1252
- }
1253
-
1254
- .hideScroll::-webkit-scrollbar-track {
1255
- background: none !important;
1256
- }
1257
-
1258
- .hideScroll::-webkit-scrollbar-thumb {
1259
- background: none !important;
1260
- }
1261
-
1262
- .hideScroll::-webkit-scrollbar-thumb:hover {
1263
- background: none !important;
1264
- }
1265
-
1266
- .custom-scroll::-webkit-scrollbar {
1267
- height: .6rem;
1268
- }
1269
-
1270
- .custom-scroll::-webkit-scrollbar-thumb {
1271
- background: #888;
1272
- border-radius: 5px;
1273
- cursor: pointer;
1274
- }
1275
-
1276
- .custom-scroll::-webkit-scrollbar-track {
1277
- background: #f1f1f1;
1278
- }
1279
-
1280
- .custom-scroll:hover::-webkit-scrollbar-thumb {
1281
- background: #A7AEC1;
1282
- }
@@ -71,6 +71,7 @@ function AIInput({
71
71
  }, [openAI]);
72
72
  const isSendBtnDisabled = !inputValue || loading;
73
73
  const props = getProps(openAI, generatedText) || {};
74
+ const fromToolBar = openAI === "fromToolBar";
74
75
  const handleSendBtnClick = () => {
75
76
  if (isSendBtnDisabled) {
76
77
  return;
@@ -8,14 +8,12 @@ function CustomSelect({
8
8
  classes,
9
9
  options,
10
10
  onSend,
11
- show,
12
- btnProps = {}
11
+ show
13
12
  }) {
14
13
  if (show) {
15
14
  return /*#__PURE__*/_jsx(Box, {
16
15
  component: "div",
17
16
  sx: classes.customSelectContainer,
18
- className: "customSelectContainer",
19
17
  children: options?.map((groupOption, index) => {
20
18
  const {
21
19
  options,
@@ -30,8 +28,7 @@ function CustomSelect({
30
28
  return /*#__PURE__*/_jsx(DisplayOption, {
31
29
  option: option,
32
30
  classes: classes,
33
- onSend: onSend,
34
- btnProps: btnProps
31
+ onSend: onSend
35
32
  }, i);
36
33
  })]
37
34
  }, index);
@@ -45,18 +42,15 @@ export default CustomSelect;
45
42
  function DisplayOption({
46
43
  option,
47
44
  classes,
48
- onSend,
49
- btnProps = {}
45
+ onSend
50
46
  }) {
51
47
  const {
52
- Icon,
53
- Component
48
+ Icon
54
49
  } = option;
55
50
  const [open, setOpen] = useState(false);
56
51
  const optionRef = useRef();
57
- const showChild = option.options?.length || Component;
58
52
  const openOptions = e => {
59
- if (showChild && !open) {
53
+ if (option.options?.length && !open) {
60
54
  setOpen(e.currentTarget);
61
55
  return;
62
56
  }
@@ -72,7 +66,7 @@ function DisplayOption({
72
66
  e.stopPropagation();
73
67
 
74
68
  // is having child options
75
- if (showChild) {
69
+ if (option.options?.length) {
76
70
  openOptions(e);
77
71
  return;
78
72
  }
@@ -81,19 +75,18 @@ function DisplayOption({
81
75
  },
82
76
  id: "infinity-select-popover",
83
77
  className: open ? "active" : "",
84
- ...btnProps,
85
78
  children: [/*#__PURE__*/_jsxs("div", {
86
79
  className: "option-label",
87
80
  id: "infinity-select-popover",
88
81
  children: [Icon && /*#__PURE__*/_jsx(Icon, {}), option.label]
89
- }), showChild ? /*#__PURE__*/_jsx(IconButton, {
82
+ }), option.options?.length && /*#__PURE__*/_jsx(IconButton, {
90
83
  children: /*#__PURE__*/_jsx(FaChevronRight, {
91
84
  color: "#94A3B8",
92
85
  size: 12
93
86
  })
94
- }) : null]
87
+ })]
95
88
  }), /*#__PURE__*/_jsx(Popper, {
96
- open: open && showChild,
89
+ open: open && option.options,
97
90
  anchorEl: open,
98
91
  sx: {
99
92
  zIndex: 9001,
@@ -103,7 +96,7 @@ function DisplayOption({
103
96
  setOpen(null);
104
97
  },
105
98
  placement: "right-start",
106
- children: Component ? /*#__PURE__*/_jsx(Component, {}) : /*#__PURE__*/_jsx(Box, {
99
+ children: /*#__PURE__*/_jsx(Box, {
107
100
  children: /*#__PURE__*/_jsx(CustomSelect, {
108
101
  options: option.options,
109
102
  onSend: onSend,
@@ -142,13 +142,7 @@ const Styles = theme => ({
142
142
  gap: "8px"
143
143
  },
144
144
  "&:hover": {
145
- backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
146
- },
147
- "& svg path": {
148
- stroke: `${theme?.palette?.editor?.menuOptionTextColor} !important`
149
- },
150
- "& svg": {
151
- color: `${theme?.palette?.editor?.menuOptionTextColor} !important`
145
+ background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`
152
146
  },
153
147
  "&.active": {
154
148
  background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`,
@@ -299,6 +299,7 @@ const EditorButton = props => {
299
299
  children: /*#__PURE__*/_jsx(IconButton, {
300
300
  className: `moreBtnShow ${isMobile || openMoreOptions ? "activeBtnShow" : ""}`,
301
301
  sx: {
302
+ color: "#64748B",
302
303
  "& path": {
303
304
  fill: openMoreOptions ? appTheme.palette.text.blueText : ""
304
305
  }
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import { Box, IconButton, Popover } from "@mui/material";
3
- import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
3
+ import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
4
4
  import Button from "../../common/Button";
5
5
  import { colors } from "./defaultColors";
6
6
  import ColorPicker from "./colorPicker.svg";
@@ -46,7 +46,7 @@ const SingleColorButton = ({
46
46
  id: `in_${id}`,
47
47
  onClick: handleMore,
48
48
  className: "more-btn-cbs",
49
- children: /*#__PURE__*/_jsx(KeyboardArrowDownRoundedIcon, {})
49
+ children: /*#__PURE__*/_jsx(ArrowDropDownIcon, {})
50
50
  }) : null]
51
51
  }, `ci_bs_row_${index}}`);
52
52
  };
@@ -82,7 +82,7 @@ export const AllColors = props => {
82
82
  children: /*#__PURE__*/_jsx(Box, {
83
83
  className: "buttonsWrpr",
84
84
  style: {
85
- padding: "5px"
85
+ padding: "8px"
86
86
  },
87
87
  children: all.map((m, i) => {
88
88
  return /*#__PURE__*/_jsx(SingleColorButton, {
@@ -109,13 +109,11 @@ const ColorButtons = props => {
109
109
  forMiniTool,
110
110
  openColorTool,
111
111
  onClose,
112
- onColorPickerClick,
113
- defaultColors = []
112
+ onColorPickerClick
114
113
  } = props;
115
114
  const [row1, ...restRows] = ColorChunks([]);
116
115
  const [anchorEl, setAnchorEl] = useState(null);
117
116
  const open = Boolean(anchorEl);
118
- const firstRow = defaultColors || row1;
119
117
  const handleMore = e => {
120
118
  setAnchorEl(e.currentTarget);
121
119
  };
@@ -133,7 +131,7 @@ const ColorButtons = props => {
133
131
  sx: classes.colorButtons,
134
132
  children: [forMiniTool ? null : /*#__PURE__*/_jsx(Box, {
135
133
  className: "buttonsWrpr first",
136
- children: [firstRow].map((m, i) => {
134
+ children: [row1].map((m, i) => {
137
135
  return /*#__PURE__*/_jsx(SingleColorButton, {
138
136
  id: `p1_${id}`,
139
137
  crs: m,
@@ -9,17 +9,13 @@ const ColorPickerStyles = theme => ({
9
9
  width: "24px",
10
10
  height: "24px",
11
11
  marginRight: "8px",
12
- border: "unset"
12
+ border: "1px solid #ccc"
13
13
  }
14
14
  },
15
15
  colorPopper: {
16
16
  marginTop: "20px",
17
- borderRadius: "7px !important",
18
17
  "& .MuiPaper-root": {
19
- backgroundColor: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
20
- border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder} !important`,
21
- borderRadius: "7px !important",
22
- padding: "0px 5px",
18
+ backgroundColor: theme?.palette?.editor?.background,
23
19
  '@media only screen and (max-width: 600px)': {
24
20
  marginTop: "-40px"
25
21
  }
@@ -58,7 +54,7 @@ const ColorPickerStyles = theme => ({
58
54
  width: "24px",
59
55
  height: "24px",
60
56
  margin: "0px 4px",
61
- border: "unset"
57
+ border: "1px solid #ccc"
62
58
  }
63
59
  },
64
60
  colorPickerIcon: {
@@ -1,4 +1,4 @@
1
- export const colors = ["#000000", "#578CFF", "#A58CFF", "#46BBFF", "#FFC93A", "#33B24F", "#F06C83", "#64748B", "#82A9FE", "#C4B3FF", "#71CBFF", "#FFD055", "#61D57A", "#FA91A4", "#A2B0B9", "#A4C1FF", "#D7CBFF", "#9FDCFF", "#FFDC80", "#8AE59E", "#FCB0BE", "#E4ECF3", "#CDDCFF", "#E0D7FF", "#BEE7FF", "#FFE49E", "#B9F6C6", "#FDCAD3", "#FFFFFF", "#489FF8", "#FE7A00", "linear-gradient(327.62deg, #EBB9E0 13.53%, #9CEEE5 86.82%)", "linear-gradient(310.6deg, #7FA4F4 15.53%, #805EF5 83.64%)", "linear-gradient(95.19deg, #A831E7 4.17%, #F05339 88.89%)", "linear-gradient(90deg, #3F2AB7 12.5%, #0DC9B5 100%)", "#0F172A", "#2563EB", "#8360FD", "#19A9FC", "#FDB52A", "#0E8E2A", "#E1425E"
1
+ export const colors = ["#292D32", "#578CFF", "#A58CFF", "#46BBFF", "#FFC93A", "#33B24F", "#F06C83", "#64748B", "#82A9FE", "#C4B3FF", "#71CBFF", "#FFD055", "#61D57A", "#FA91A4", "#A2B0B9", "#A4C1FF", "#D7CBFF", "#9FDCFF", "#FFDC80", "#8AE59E", "#FCB0BE", "#E4ECF3", "#CDDCFF", "#E0D7FF", "#BEE7FF", "#FFE49E", "#B9F6C6", "#FDCAD3", "#FFFFFF", "#489FF8", "#FE7A00", "linear-gradient(327.62deg, #EBB9E0 13.53%, #9CEEE5 86.82%)", "linear-gradient(310.6deg, #7FA4F4 15.53%, #805EF5 83.64%)", "linear-gradient(95.19deg, #A831E7 4.17%, #F05339 88.89%)", "linear-gradient(90deg, #3F2AB7 12.5%, #0DC9B5 100%)", "#0F172A", "#2563EB", "#8360FD", "#19A9FC", "#FDB52A", "#0E8E2A", "#E1425E"
2
2
  // "#E6E6E6",
3
- // "#BEBEBE",
3
+ // "#BEBEBE"
4
4
  ];
@@ -1,6 +1,5 @@
1
1
  import React, { useState, useRef, useEffect } from "react";
2
2
  import { Transforms } from "slate";
3
- import { Node } from "slate";
4
3
  import { useSlateStatic, ReactEditor } from "slate-react";
5
4
  import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
6
5
  import DeleteIcon from "@mui/icons-material/Delete";
@@ -49,15 +48,7 @@ const Form = props => {
49
48
  textSize,
50
49
  fontFamily,
51
50
  textAlign,
52
- alignment,
53
- fieldFontFamily,
54
- fieldFontWeight,
55
- fieldTextSize,
56
- fieldTextColor,
57
- fieldBgColor,
58
- fieldBorderColor,
59
- fieldBorderWidth,
60
- fieldBorderStyle
51
+ alignment
61
52
  } = element;
62
53
  const btnR = buttonProps?.borderRadius || {};
63
54
  const btnSpacing = buttonProps?.bannerSpacing || {};
@@ -199,24 +190,6 @@ const Form = props => {
199
190
  }, {
200
191
  at: path
201
192
  });
202
- // adding form field style to the current form node
203
- const currentNode = Node.get(editor, path);
204
- if (currentNode) {
205
- currentNode.children.forEach((item, index) => {
206
- Transforms.setNodes(editor, {
207
- bgColor: data?.fieldBgColor ? data?.fieldBgColor : "rgba(255, 255, 255, 1)",
208
- borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : "#ccc",
209
- borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : "",
210
- borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : "",
211
- textColor: data?.fieldTextColor ? data?.fieldTextColor : "",
212
- fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : "",
213
- textSize: data?.fieldTextSize ? data?.fieldTextSize : "",
214
- fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : ""
215
- }, {
216
- at: [...path, index]
217
- });
218
- });
219
- }
220
193
  onClose();
221
194
  };
222
195
  const onClose = () => {
@@ -225,16 +198,7 @@ const Form = props => {
225
198
  const onAddFormField = () => {
226
199
  try {
227
200
  Transforms.insertNodes(editor, {
228
- ...formField({
229
- fontFamily: fieldFontFamily,
230
- fontWeight: fieldFontWeight,
231
- textSize: fieldTextSize,
232
- textColor: fieldTextColor,
233
- bgColor: fieldBgColor,
234
- borderColor: fieldBorderColor,
235
- borderWidth: fieldBorderWidth,
236
- borderStyle: fieldBorderStyle
237
- })
201
+ ...formField()
238
202
  }, {
239
203
  at: [...path, children.length]
240
204
  });
@@ -16,9 +16,6 @@ const FormCheckbox = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -49,10 +46,7 @@ const FormCheckbox = props => {
49
46
  },
50
47
  borderStyle: borderStyle || "solid",
51
48
  color: textColor || "#000",
52
- background: bgColor || "transparent",
53
- fontFamily: fontFamily || "PoppinsRegular",
54
- fontSize: textSize || "inherit",
55
- fontWeight: `${fontWeight} !important` || "400 !important"
49
+ background: bgColor || "transparent"
56
50
  }
57
51
  })
58
52
  });
@@ -16,9 +16,6 @@ const FormDate = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -50,10 +47,7 @@ const FormDate = props => {
50
47
  borderStyle: borderStyle || "solid",
51
48
  color: textColor || "#000",
52
49
  background: bgColor || "transparent",
53
- paddingRight: '85px !important',
54
- fontFamily: fontFamily || "PoppinsRegular",
55
- fontSize: textSize || "inherit",
56
- fontWeight: `${fontWeight} !important` || "400 !important"
50
+ paddingRight: '85px !important'
57
51
  }
58
52
  })
59
53
  });
@@ -16,9 +16,6 @@ const FormEmail = props => {
16
16
  textColor,
17
17
  bgColor,
18
18
  lockSpacing,
19
- textSize,
20
- fontFamily,
21
- fontWeight,
22
19
  ...rest
23
20
  } = fieldProps;
24
21
  const onChange = e => {
@@ -50,10 +47,7 @@ const FormEmail = props => {
50
47
  },
51
48
  borderStyle: borderStyle || "solid",
52
49
  color: textColor || "#000",
53
- background: bgColor || "transparent",
54
- fontFamily: fontFamily || "PoppinsRegular",
55
- fontSize: textSize || "inherit",
56
- fontWeight: `${fontWeight} !important` || "400 !important"
50
+ background: bgColor || "transparent"
57
51
  }
58
52
  })
59
53
  });