@flozy/editor 5.1.2 → 5.1.4

Sign up to get free protection for your applications and to get access to all the features.
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,69 +1,35 @@
1
- import { toolbarGroups } from "../../Toolbar/toolbarGroups";
2
- import { fontOptions } from "../../utils/font";
3
- import { capitalizeFirstLetter } from "../../utils/helper";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- const allTools = toolbarGroups.flat();
6
- const fontWeight = allTools.find(f => f.format === "fontWeight");
7
- function getKey(prefix, key) {
8
- const settingKey = prefix === "col" ? `entire${capitalizeFirstLetter(key)}` : key;
9
- return `${prefix}.${settingKey}`;
10
- }
11
- function getCommonSettings(prefix) {
12
- let settings = [{
13
- label: "Font Family",
14
- key: "fontFamily",
15
- type: "textOptions",
16
- webFont: true,
17
- options: fontOptions,
18
- renderOption: option => {
19
- return /*#__PURE__*/_jsx("span", {
20
- style: {
21
- fontFamily: option.value
22
- },
23
- children: option.text
24
- });
25
- }
26
- }, {
27
- label: "Font Weight",
28
- key: "fontWeight",
29
- type: "textOptions",
30
- options: fontWeight?.options,
31
- width: 7
32
- }, {
33
- label: "Font Size",
34
- key: "textSize",
35
- type: "fontSize",
36
- width: 5,
37
- placeholder: "16px or 1em"
38
- }, {
39
- label: "Text Color",
40
- key: "textColor",
1
+ const tableStyle = [{
2
+ tab: "Table",
3
+ value: "tableSettings",
4
+ fields: [{
5
+ label: "Table Background",
6
+ key: "table.bgColor",
41
7
  type: "color"
42
8
  }, {
43
- label: "Background",
44
- key: "bgColor",
9
+ label: "Cell Border",
10
+ key: "table.borderColor",
11
+ type: "color"
12
+ }]
13
+ }, {
14
+ tab: "Row",
15
+ value: "rowSettings",
16
+ fields: [{
17
+ label: "Row Background",
18
+ key: "row.bgColor",
45
19
  type: "color"
46
20
  }, {
47
- label: "Border",
48
- key: "borderColor",
21
+ label: "Row Border",
22
+ key: "row.borderColor",
49
23
  type: "color"
50
- }];
51
-
52
- // modify keys based on setting type (prefix)
53
- settings = settings.map(s => ({
54
- ...s,
55
- key: getKey(prefix, s.key)
56
- }));
57
- return settings;
58
- }
59
- const tableStyle = [{
60
- tab: "Table",
61
- value: "tableSettings",
62
- fields: getCommonSettings("table")
24
+ }]
63
25
  }, {
64
- tab: "Selected cell",
26
+ tab: "Column",
65
27
  value: "columnSettings",
66
28
  fields: [{
29
+ label: "Entire Column Background",
30
+ key: "col.entireBgColor",
31
+ type: "color"
32
+ }, {
67
33
  label: "Selected Cell Background",
68
34
  key: "col.bgColor",
69
35
  type: "color"
@@ -82,14 +48,4 @@ const tableStyle = [{
82
48
  placeholder: "Hide on Mobile"
83
49
  }]
84
50
  }];
85
- export default tableStyle;
86
- export const tableRowStyle = [{
87
- tab: "Row",
88
- value: "rowSettings",
89
- fields: getCommonSettings("row")
90
- }];
91
- export const tableColumnStyle = [{
92
- tab: "Column",
93
- value: "columnSettings",
94
- fields: getCommonSettings("col")
95
- }];
51
+ export default tableStyle;
@@ -4,7 +4,6 @@ import { convertBase64 } from "../utils/helper";
4
4
  import { uploadFile } from "../service/fileupload";
5
5
  import Icon from "./Icon";
6
6
  import UploadStyles from "../common/ImageSelector/UploadStyles";
7
- import { useEditorContext } from "../hooks/useMouseMove";
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -19,9 +18,6 @@ const Uploader = props => {
19
18
  const [base64, setBase64] = useState(value?.url);
20
19
  const [fileName, setFileName] = useState("");
21
20
  const [uploading, setUploading] = useState(false);
22
- const {
23
- theme
24
- } = useEditorContext();
25
21
  const handleChange = async e => {
26
22
  const uFile = e.target.files[0];
27
23
  const strImage = await convertBase64(uFile);
@@ -102,10 +98,6 @@ const Uploader = props => {
102
98
  className: "uploadImageSection",
103
99
  children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
104
100
  className: "uploadImageText",
105
- sx: {
106
- background: `${theme?.palette?.editor?.inputFieldBgColor}`,
107
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
108
- },
109
101
  children: /*#__PURE__*/_jsxs(Button, {
110
102
  component: "label",
111
103
  variant: "text",