@flozy/editor 5.3.6 → 5.3.8

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 (102) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +8 -16
  3. package/dist/Editor/Editor.css +11 -57
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +11 -19
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -9
  7. package/dist/Editor/Elements/AI/Styles.js +5 -17
  8. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  9. package/dist/Editor/Elements/Color Picker/ColorButtons.js +3 -3
  10. package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
  11. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  12. package/dist/Editor/Elements/Divider/Divider.js +15 -16
  13. package/dist/Editor/Elements/Embed/Image.js +7 -23
  14. package/dist/Editor/Elements/Embed/Video.js +1 -13
  15. package/dist/Editor/Elements/Form/Form.js +2 -38
  16. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  17. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  18. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  19. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  23. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  24. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  25. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  26. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  27. package/dist/Editor/Elements/Grid/GridItem.js +36 -45
  28. package/dist/Editor/Elements/Grid/Styles.js +0 -6
  29. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  30. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  31. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  32. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  33. package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
  34. package/dist/Editor/Elements/SimpleText/style.js +0 -10
  35. package/dist/Editor/Elements/Table/Styles.js +79 -82
  36. package/dist/Editor/Elements/Table/Table.js +140 -260
  37. package/dist/Editor/Elements/Table/TableCell.js +103 -362
  38. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  39. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  40. package/dist/Editor/Styles/EditorStyles.js +1 -8
  41. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  42. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  43. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
  44. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  45. package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
  46. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
  47. package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  49. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  50. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -409
  51. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -17
  52. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  53. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  54. package/dist/Editor/common/ColorPickerButton.js +44 -82
  55. package/dist/Editor/common/Icon.js +20 -17
  56. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  57. package/dist/Editor/common/LinkSettings/index.js +1 -2
  58. package/dist/Editor/common/MentionsPopup/Styles.js +8 -156
  59. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  60. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
  61. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  62. package/dist/Editor/common/RnD/index.js +1 -1
  63. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +4 -8
  64. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
  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/tableStyle.js +25 -69
  69. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  70. package/dist/Editor/common/iconListV2.js +40 -378
  71. package/dist/Editor/common/iconslist.js +14 -17
  72. package/dist/Editor/commonStyle.js +10 -130
  73. package/dist/Editor/helper/deserialize/index.js +20 -27
  74. package/dist/Editor/helper/index.js +1 -1
  75. package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
  76. package/dist/Editor/plugins/withHTML.js +10 -61
  77. package/dist/Editor/plugins/withLayout.js +0 -1
  78. package/dist/Editor/utils/SlateUtilityFunctions.js +0 -2
  79. package/dist/Editor/utils/brains.js +1 -1
  80. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
  81. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  82. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  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 +2 -55
  88. package/dist/Editor/utils/insertNewLine.js +1 -19
  89. package/dist/Editor/utils/serializeToText.js +0 -2
  90. package/dist/Editor/utils/table.js +24 -228
  91. package/package.json +1 -1
  92. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  93. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  94. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  95. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  96. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  97. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  98. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  99. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  100. package/dist/Editor/common/Select/index.js +0 -20
  101. package/dist/Editor/common/Select/styles.js +0 -17
  102. package/dist/Editor/hooks/useTable.js +0 -207
@@ -97,7 +97,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
97
97
  id: `cmd-li-ind-${index}}`,
98
98
  component: "div",
99
99
  onClick: handleClick(char, i),
100
- className: `${type !== 'elements' && i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
100
+ className: `${i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
101
101
  sx: classes.listItem,
102
102
  ref: i === index ? papperRef : null,
103
103
  children: char.renderComponent ? char.renderComponent({
@@ -1,13 +1,10 @@
1
1
  import React from "react";
2
2
  import { Transforms, Node } from "slate";
3
- import { Accordion, AccordionDetails, AccordionSummary, Box, createTheme, ThemeProvider, Typography } from "@mui/material";
3
+ import { Box } from "@mui/material";
4
4
  import { StyleContent } from "../../../StyleBuilder";
5
- import { formStyle } from "../../../StyleBuilder/formStyle";
5
+ import formStyle from "../../../StyleBuilder/formStyle";
6
6
  import { ReactEditor } from "slate-react";
7
- import { ExpandMoreOutlined } from "@mui/icons-material";
8
- import { useEditorContext } from "../../../../hooks/useMouseMove";
9
7
  import { jsx as _jsx } from "react/jsx-runtime";
10
- import { jsxs as _jsxs } from "react/jsx-runtime";
11
8
  const FormSettings = props => {
12
9
  const {
13
10
  editor,
@@ -17,13 +14,7 @@ const FormSettings = props => {
17
14
  const item_path = path?.split("|").map(m => parseInt(m));
18
15
  const element_path = [...item_path];
19
16
  const element = Node.get(editor, element_path);
20
- const styleMaps = formStyle;
21
- const {
22
- hideTools
23
- } = customProps || {};
24
- const {
25
- theme
26
- } = useEditorContext();
17
+ const styleMaps = formStyle?.filter(f => !f?.hideOnFGS);
27
18
  const onChange = data => {
28
19
  const currentPath = ReactEditor.findPath(editor, element);
29
20
  const updateData = {
@@ -35,109 +26,23 @@ const FormSettings = props => {
35
26
  }, {
36
27
  at: [...currentPath, 0]
37
28
  });
38
- // adding form field style to the current form node
39
- const currentNode = Node.get(editor, element_path);
40
- if (currentNode) {
41
- currentNode?.children[0]?.children?.forEach((item, index) => {
42
- Transforms.setNodes(editor, {
43
- bgColor: data?.fieldBgColor ? data?.fieldBgColor : item?.bgColor,
44
- borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : item?.borderColor,
45
- borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : item?.borderStyle,
46
- borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : item?.borderWidth,
47
- textColor: data?.fieldTextColor ? data?.fieldTextColor : item?.textColor,
48
- fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : item?.fontFamily,
49
- textSize: data?.fieldTextSize ? data?.fieldTextSize : item?.textSize,
50
- fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : item?.fontWeight
51
- }, {
52
- at: [...currentPath, 0, index]
53
- });
54
- });
55
- }
56
29
  };
57
30
  const handleClose = () => {
58
31
  console.log("close");
59
32
  };
60
- const muiTheme = createTheme({
61
- components: {
62
- MuiAccordion: {
63
- styleOverrides: {
64
- root: {
65
- "& .MuiAccordionSummary-root": {
66
- flexDirection: "row-reverse",
67
- "& .MuiSvgIcon-root": {
68
- color: theme?.palette?.primary?.main
69
- },
70
- "& .Mui-expanded": {
71
- "& .MuiSvgIcon-root": {
72
- color: theme?.palette?.text?.blueText
73
- }
74
- }
75
- },
76
- padding: "0px",
77
- "&.Mui-expanded": {
78
- margin: "0"
79
- }
80
- }
81
- },
82
- defaultProps: {
83
- elevation: 0
84
- }
85
- }
86
- }
87
- });
88
33
  return /*#__PURE__*/_jsx(Box, {
89
34
  component: "div",
90
35
  className: "item-w",
91
36
  children: styleMaps?.map((m, i) => {
92
- if (m?.hasChildrenTabs) {
93
- return /*#__PURE__*/_jsx(ThemeProvider, {
94
- theme: muiTheme,
95
- children: /*#__PURE__*/_jsxs(Accordion, {
96
- defaultExpanded: true,
97
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
98
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
99
- sx: {
100
- padding: "0px"
101
- },
102
- children: /*#__PURE__*/_jsx(Typography, {
103
- variant: "body1",
104
- className: "settingsHeader",
105
- color: "primary",
106
- style: {
107
- fontSize: "14px !important",
108
- fontWeight: "400"
109
- },
110
- children: m?.tab
111
- })
112
- }), /*#__PURE__*/_jsx(AccordionDetails, {
113
- sx: {
114
- padding: "5px"
115
- },
116
- children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
117
- return /*#__PURE__*/_jsx(StyleContent, {
118
- renderTabs: [field],
119
- value: field.value,
120
- element: element,
121
- onChange: onChange,
122
- customElement: element?.children?.[0] || null,
123
- customProps: customProps,
124
- handleClose: handleClose
125
- }, `tab_${field.value}_${index}`);
126
- })
127
- })]
128
- }, `accordion_${i}`)
129
- }, i);
130
- } else {
131
- return /*#__PURE__*/_jsx(StyleContent, {
132
- renderTabs: styleMaps,
133
- value: m.value,
134
- element: element,
135
- customElement: element?.children?.[0] || null,
136
- onChange: onChange,
137
- customProps: customProps,
138
- handleClose: handleClose
139
- }, `tab_${m.value}_$${i}`);
140
- }
37
+ return /*#__PURE__*/_jsx(StyleContent, {
38
+ renderTabs: styleMaps,
39
+ value: m.value,
40
+ element: element,
41
+ customElement: element?.children?.[0] || null,
42
+ onChange: onChange,
43
+ customProps: customProps,
44
+ handleClose: handleClose
45
+ }, `tab_${m.value}_$${i}`);
141
46
  })
142
47
  });
143
48
  };
@@ -141,11 +141,7 @@ const VirtualElement = props => {
141
141
  sx: classes.root,
142
142
  dangerouslySetInnerHTML: {
143
143
  __html: getItems()
144
- },
145
- style: {
146
- visibility: "hidden"
147
- },
148
- "aria-hidden": "true"
144
+ }
149
145
  });
150
146
  };
151
147
  export default VirtualElement;
@@ -533,7 +533,7 @@ const RnD = props => {
533
533
  children: [/*#__PURE__*/_jsx("div", {
534
534
  id: `opt_ref_${str_path}`,
535
535
  style: {
536
- display: readOnly ? "none" : "block",
536
+ display: "block",
537
537
  position: "absolute",
538
538
  left: "-8px",
539
539
  top: "-30px",
@@ -135,8 +135,7 @@ const BannerSpacing = props => {
135
135
  value: pro_value?.top,
136
136
  className: "borderInput removeScroll",
137
137
  style: {
138
- ...squreStyle.topRight,
139
- ...classes.customPaddingInput
138
+ ...squreStyle.topRight
140
139
  },
141
140
  onChange: handleChange,
142
141
  placeholder: "0"
@@ -149,8 +148,7 @@ const BannerSpacing = props => {
149
148
  value: pro_value?.right,
150
149
  className: "borderInput removeScroll",
151
150
  style: {
152
- ...squreStyle.bottomLeft,
153
- ...classes.customPaddingInput
151
+ ...squreStyle.bottomLeft
154
152
  },
155
153
  onChange: handleChange,
156
154
  placeholder: "0"
@@ -163,8 +161,7 @@ const BannerSpacing = props => {
163
161
  value: pro_value?.bottom,
164
162
  className: "borderInput removeScroll",
165
163
  style: {
166
- ...squreStyle.bottomRight,
167
- ...classes.customPaddingInput
164
+ ...squreStyle.bottomRight
168
165
  },
169
166
  onChange: handleChange,
170
167
  placeholder: "0"
@@ -177,8 +174,7 @@ const BannerSpacing = props => {
177
174
  value: pro_value?.left,
178
175
  className: "borderInput removeScroll",
179
176
  style: {
180
- ...squreStyle.topLeft,
181
- ...classes.customPaddingInput
177
+ ...squreStyle.topLeft
182
178
  },
183
179
  onChange: handleChange,
184
180
  placeholder: "0"
@@ -61,7 +61,7 @@ export const squreStyle = {
61
61
  margin: "auto",
62
62
  // borderTop: `2px solid #2563eb`,
63
63
  // borderLeft: `2px solid #2563eb`,
64
- // border: `1px solid transparent`,
64
+ border: `none`,
65
65
  // borderBottom: `none`,
66
66
  fontSize: "14px",
67
67
  textAlign: "center"
@@ -76,8 +76,8 @@ export const squreStyle = {
76
76
  height: "30px",
77
77
  // borderTop: `2px solid #2563eb`,
78
78
  // borderRight: `2px solid #2563eb`,
79
- // border: `none`,
80
- // borderLeft: `none`,
79
+ border: `none`,
80
+ borderLeft: `none`,
81
81
  fontSize: "14px"
82
82
  },
83
83
  bottomLeft: {
@@ -90,8 +90,8 @@ export const squreStyle = {
90
90
  height: "30px",
91
91
  // borderBottom: `2px solid #2563eb`,
92
92
  // borderLeft: `2px solid #2563eb`,
93
- // border: `none`,
94
- // borderTop: `none`,
93
+ border: `none`,
94
+ borderTop: `none`,
95
95
  fontSize: "14px"
96
96
  },
97
97
  bottomRight: {
@@ -104,8 +104,8 @@ export const squreStyle = {
104
104
  height: "30px",
105
105
  // borderBottom: `2px solid #2563eb`,
106
106
  // borderRight: `2px solid #2563eb`,
107
- // border: "none",
108
- // borderLeft: "none",
107
+ border: "none",
108
+ borderLeft: "none",
109
109
  fontSize: "14px"
110
110
  }
111
111
  };
@@ -5,8 +5,6 @@ import useWindowResize from "../../../hooks/useWindowResize";
5
5
  import { useEditorContext } from "../../../hooks/useMouseMove";
6
6
  import FontFamilyAutocomplete from "../../../Toolbar/FormatTools/FontFamilyAutocomplete";
7
7
  import { useSlate } from "slate-react";
8
-
9
- // hideMetaDataOptions -- pass true to hide metadata option in select field
10
8
  import { jsx as _jsx } from "react/jsx-runtime";
11
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
12
10
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -28,8 +26,7 @@ const TextOptions = props => {
28
26
  options,
29
27
  renderOption,
30
28
  width,
31
- webFont = false,
32
- hideMetaDataOptions = false
29
+ webFont = false
33
30
  } = data;
34
31
  const {
35
32
  fontFamilies
@@ -38,7 +35,7 @@ const TextOptions = props => {
38
35
  const [size] = useWindowResize();
39
36
  const value = isBreakpoint ? getBreakPointsValue(val, size?.device) : val;
40
37
  const metaDataMappingOptions = metaMappings?.boards || [];
41
- const updatedOption = !hideMetaDataOptions && elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
38
+ const updatedOption = elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
42
39
  const handleChange = (e, d) => {
43
40
  if (isBreakpoint) {
44
41
  onChange({