@flozy/editor 3.6.9 → 3.7.1
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.
- package/dist/Editor/CommonEditor.js +111 -169
- package/dist/Editor/Elements/Accordion/Accordion.js +7 -74
- package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +2 -3
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +60 -4
- package/dist/Editor/Elements/AppHeader/AppHeader.js +4 -26
- package/dist/Editor/Elements/Button/EditorButton.js +18 -34
- package/dist/Editor/Elements/ChipText/ChipText.js +3 -3
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +17 -60
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -2
- package/dist/Editor/Elements/Embed/Frames/ImageFrame.js +0 -1
- package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -2
- package/dist/Editor/Elements/Emoji/EmojiPicker.js +0 -16
- package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
- package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
- package/dist/Editor/Elements/Grid/Grid.js +1 -3
- package/dist/Editor/Elements/Grid/GridItem.js +2 -4
- package/dist/Editor/Elements/InlineIcon/InlineIcon.js +3 -2
- package/dist/Editor/Elements/Link/Link.js +1 -6
- package/dist/Editor/Elements/Link/LinkButton.js +2 -4
- package/dist/Editor/Elements/Link/LinkPopup.js +3 -11
- package/dist/Editor/Elements/List/CheckList.js +2 -6
- package/dist/Editor/Elements/Table/TableCell.js +1 -1
- package/dist/Editor/MiniEditor.js +1 -3
- package/dist/Editor/Styles/EditorStyles.js +2 -3
- package/dist/Editor/Toolbar/Basic/index.js +2 -4
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +2 -26
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +11 -5
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +11 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +86 -213
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +13 -20
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +7 -52
- package/dist/Editor/Toolbar/PopupTool/index.js +2 -9
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/common/ColorPickerButton.js +9 -25
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/Icon.js +2 -30
- package/dist/Editor/common/MentionsPopup/MentionsListCard.js +2 -5
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -6
- package/dist/Editor/common/Shorthands/elements.js +0 -54
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +16 -16
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +3 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -31
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +28 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
- package/dist/Editor/common/StyleBuilder/formStyle.js +26 -25
- package/dist/Editor/common/StyleBuilder/index.js +1 -1
- package/dist/Editor/helper/index.js +0 -15
- package/dist/Editor/helper/theme.js +4 -190
- package/dist/Editor/hooks/useMouseMove.js +6 -15
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +5 -47
- package/dist/Editor/plugins/withLayout.js +10 -15
- package/dist/Editor/plugins/withTable.js +2 -2
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +25 -157
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/events.js +4 -11
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/form.js +2 -2
- package/dist/Editor/utils/helper.js +12 -71
- package/dist/Editor/utils/serializeToHTML.js +13 -25
- package/dist/index.js +1 -5
- package/package.json +4 -4
- package/dist/Editor/ChatEditor.js +0 -211
- package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
- package/dist/Editor/common/CustomColorPicker/index.js +0 -106
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog/index.js +0 -94
- package/dist/Editor/common/CustomDialog/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -33
- package/dist/Editor/common/EditorCmds.js +0 -35
- package/dist/Editor/common/MUIIcon/index.js +0 -48
- package/dist/Editor/common/StyleBuilder/fieldTypes/loadIcon.js +0 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/mui_filled_icons.js +0 -2
- package/dist/Editor/hooks/useEditorTheme.js +0 -139
- package/dist/Editor/theme/index.js +0 -144
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -290
- package/dist/Editor/themeSettings/buttons/style.js +0 -21
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
- package/dist/Editor/themeSettings/fonts/index.js +0 -213
- package/dist/Editor/themeSettings/fonts/style.js +0 -44
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -320
- package/dist/Editor/themeSettings/style.js +0 -152
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -356
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
- package/dist/Editor/themeSettingsAI/style.js +0 -247
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -361
|
@@ -2,8 +2,7 @@ import React, { useState } from "react";
|
|
|
2
2
|
import { Transforms } from "slate";
|
|
3
3
|
import { ReactEditor, useSlateStatic } from "slate-react";
|
|
4
4
|
import { IconButton, Tooltip, Box } from "@mui/material";
|
|
5
|
-
|
|
6
|
-
import MUIIcon from "../../common/StyleBuilder/fieldTypes/loadIcon";
|
|
5
|
+
import * as fIcons from "@mui/icons-material";
|
|
7
6
|
import SettingsIcon from "@mui/icons-material/Settings";
|
|
8
7
|
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
|
9
8
|
import LinkIcon from "@mui/icons-material/Link";
|
|
@@ -13,9 +12,6 @@ import { WorkflowIcon } from "../../common/iconslist";
|
|
|
13
12
|
import { getTRBLBreakPoints, getBreakPointsValue } from "../../helper/theme";
|
|
14
13
|
import { handleLinkType, windowVar } from "../../utils/helper";
|
|
15
14
|
import LinkSettings from "../../common/LinkSettings";
|
|
16
|
-
import { useEditorTheme } from "../../hooks/useEditorTheme";
|
|
17
|
-
import { getTheme } from "../../theme";
|
|
18
|
-
import { fontFamilyMap } from "../../utils/font";
|
|
19
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
16
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
21
17
|
const EditorButton = props => {
|
|
@@ -33,12 +29,6 @@ const EditorButton = props => {
|
|
|
33
29
|
const path = ReactEditor.findPath(editor, element);
|
|
34
30
|
const [edit, setEdit] = useState(false);
|
|
35
31
|
const [openNav, setOpenNav] = useState(false);
|
|
36
|
-
const {
|
|
37
|
-
theme
|
|
38
|
-
} = useEditorTheme();
|
|
39
|
-
const {
|
|
40
|
-
buttonTheme
|
|
41
|
-
} = getTheme(theme);
|
|
42
32
|
const {
|
|
43
33
|
label,
|
|
44
34
|
bgColor,
|
|
@@ -52,7 +42,7 @@ const EditorButton = props => {
|
|
|
52
42
|
fontFamily,
|
|
53
43
|
textColorHover,
|
|
54
44
|
bgColorHover,
|
|
55
|
-
|
|
45
|
+
buttonIcon,
|
|
56
46
|
iconPosition = "start",
|
|
57
47
|
borderStyle,
|
|
58
48
|
borderWidth,
|
|
@@ -73,8 +63,7 @@ const EditorButton = props => {
|
|
|
73
63
|
};
|
|
74
64
|
const isTrigger = linkType === "actionTrigger";
|
|
75
65
|
const refURl = isTrigger ? buttonLink?.url : url;
|
|
76
|
-
const
|
|
77
|
-
const BtnIcon = buttonIcon ? buttonIcon : null;
|
|
66
|
+
const BtnIcon = buttonIcon ? fIcons[buttonIcon] : null;
|
|
78
67
|
windowVar.lastButtonProps = element;
|
|
79
68
|
const handleTrigger = async () => {
|
|
80
69
|
if (metadata?.buttonLink?.handler) {
|
|
@@ -91,7 +80,6 @@ const EditorButton = props => {
|
|
|
91
80
|
}
|
|
92
81
|
};
|
|
93
82
|
const buttonProps = handleLinkType(refURl, linkType, readOnly, openInNewTab, handleTrigger);
|
|
94
|
-
console.log(openInNewTab);
|
|
95
83
|
const onMenuClick = val => () => {
|
|
96
84
|
switch (val) {
|
|
97
85
|
case "edit":
|
|
@@ -143,7 +131,6 @@ const EditorButton = props => {
|
|
|
143
131
|
color: "rgba(0, 0, 0, 0.54)"
|
|
144
132
|
},
|
|
145
133
|
...btnProps,
|
|
146
|
-
target: openInNewTab ? "_blank" : "_self",
|
|
147
134
|
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
|
148
135
|
})
|
|
149
136
|
})]
|
|
@@ -196,9 +183,20 @@ const EditorButton = props => {
|
|
|
196
183
|
children: [/*#__PURE__*/_jsxs(Box, {
|
|
197
184
|
sx: {
|
|
198
185
|
textDecoration: "none",
|
|
186
|
+
background: bgColor || "rgb(30, 75, 122)",
|
|
199
187
|
borderBlockStyle: "solid",
|
|
188
|
+
borderColor: borderColor || "transparent",
|
|
200
189
|
borderWidth: borderWidth !== undefined ? borderWidth : borderColor ? "1px" : "0px",
|
|
190
|
+
borderRadius: {
|
|
191
|
+
...getBreakPointsValue(borderRadius || {}, null, "overrideBorderRadius", true)
|
|
192
|
+
},
|
|
201
193
|
borderStyle: borderStyle || "solid",
|
|
194
|
+
padding: {
|
|
195
|
+
...getTRBLBreakPoints(bannerSpacing)
|
|
196
|
+
},
|
|
197
|
+
color: `${textColor || "#FFFFFF"}`,
|
|
198
|
+
fontSize: textSize || "inherit",
|
|
199
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
|
202
200
|
display: "inline-flex",
|
|
203
201
|
alignItems: "center",
|
|
204
202
|
position: "relative",
|
|
@@ -206,34 +204,20 @@ const EditorButton = props => {
|
|
|
206
204
|
display: "none"
|
|
207
205
|
},
|
|
208
206
|
"&:hover": {
|
|
209
|
-
color: `${textColorHover || textColor}`,
|
|
210
|
-
background: bgColorHover || bgColor,
|
|
207
|
+
color: `${textColorHover || textColor || "#FFFFFF"}`,
|
|
208
|
+
background: bgColorHover || bgColor || "rgb(30, 75, 122)",
|
|
211
209
|
"& .element-toolbar": {
|
|
212
210
|
display: "flex"
|
|
213
211
|
}
|
|
214
|
-
},
|
|
215
|
-
color: `${textColor} !important`,
|
|
216
|
-
fontSize: `${textSize}px !important`,
|
|
217
|
-
fontFamily: `${fontFamilyMap[fontFamily] || ""} !important`,
|
|
218
|
-
background: `${bgColor} !important`,
|
|
219
|
-
borderColor: `${borderColor} !important`,
|
|
220
|
-
borderRadius: {
|
|
221
|
-
...getBreakPointsValue(borderRadius || buttonTheme?.borderRadius || {}, null, "overrideBorderRadius", true)
|
|
222
|
-
},
|
|
223
|
-
padding: {
|
|
224
|
-
...getTRBLBreakPoints(bannerSpacing || buttonTheme?.bannerSpacing || {})
|
|
225
212
|
}
|
|
226
213
|
},
|
|
227
214
|
...buttonProps,
|
|
228
|
-
|
|
229
|
-
children: [BtnIcon && iconPosition === "start" && /*#__PURE__*/_jsx(MUIIcon, {
|
|
230
|
-
iconName: buttonIcon,
|
|
215
|
+
children: [BtnIcon && iconPosition === "start" && /*#__PURE__*/_jsx(BtnIcon, {
|
|
231
216
|
style: {
|
|
232
217
|
paddingLeft: "4px",
|
|
233
218
|
paddingRight: "4px"
|
|
234
219
|
}
|
|
235
|
-
}), label || "My Button", BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(
|
|
236
|
-
iconName: buttonIcon,
|
|
220
|
+
}), label || "My Button", BtnIcon && iconPosition === "end" && /*#__PURE__*/_jsx(BtnIcon, {
|
|
237
221
|
style: {
|
|
238
222
|
paddingLeft: "4px",
|
|
239
223
|
paddingRight: "4px"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { Transforms } from "slate";
|
|
3
3
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
|
4
|
+
import * as fIcons from "@mui/icons-material";
|
|
4
5
|
import { Box } from "@mui/material";
|
|
5
6
|
import ChipTextPopup from "./ChipTextPopup";
|
|
6
7
|
import { getTRBLBreakPoints, getBreakPointsValue } from "../../helper/theme";
|
|
7
|
-
import MUIIcon from "../../common/StyleBuilder/fieldTypes/loadIcon";
|
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const ChipText = props => {
|
|
@@ -26,6 +26,7 @@ const ChipText = props => {
|
|
|
26
26
|
buttonIcon,
|
|
27
27
|
textSize
|
|
28
28
|
} = element;
|
|
29
|
+
const BtnIcon = buttonIcon ? fIcons[buttonIcon] : fIcons["Check"];
|
|
29
30
|
const [openSetttings, setOpenSettings] = useState(false);
|
|
30
31
|
const editor = useSlateStatic();
|
|
31
32
|
const path = ReactEditor.findPath(editor, element);
|
|
@@ -81,8 +82,7 @@ const ChipText = props => {
|
|
|
81
82
|
background: bgColor || "#CCC",
|
|
82
83
|
color: textColor
|
|
83
84
|
},
|
|
84
|
-
children: [/*#__PURE__*/_jsx(
|
|
85
|
-
iconName: buttonIcon || "Check",
|
|
85
|
+
children: [/*#__PURE__*/_jsx(BtnIcon, {
|
|
86
86
|
style: {
|
|
87
87
|
fontSize: textSize || "16px",
|
|
88
88
|
lineHeight: textSize || "16px",
|
|
@@ -1,15 +1,11 @@
|
|
|
1
|
-
import React, {
|
|
2
|
-
import { Box, IconButton, Popover
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { Box, IconButton, Popover } from "@mui/material";
|
|
3
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";
|
|
7
|
-
import { ThemeContext } from "../../CommonEditor";
|
|
8
|
-
import { useSlateStatic } from "slate-react";
|
|
9
|
-
import { Transforms } from "slate";
|
|
10
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
11
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
12
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
13
9
|
let c = [];
|
|
14
10
|
const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
|
|
15
11
|
if (i % 7 === 0) {
|
|
@@ -35,7 +31,9 @@ const SingleColorButton = ({
|
|
|
35
31
|
style: {
|
|
36
32
|
width: "100%",
|
|
37
33
|
display: "flex",
|
|
38
|
-
|
|
34
|
+
alignItems: "center",
|
|
35
|
+
padding: padding || "8px",
|
|
36
|
+
justifyContent: "center"
|
|
39
37
|
},
|
|
40
38
|
children: [crs.map(m => /*#__PURE__*/_jsx(Button, {
|
|
41
39
|
onClick: handleSelect(m),
|
|
@@ -111,17 +109,11 @@ const ColorButtons = props => {
|
|
|
111
109
|
forMiniTool,
|
|
112
110
|
openColorTool,
|
|
113
111
|
onClose,
|
|
114
|
-
onColorPickerClick
|
|
115
|
-
disableEditTheme
|
|
112
|
+
onColorPickerClick
|
|
116
113
|
} = props;
|
|
117
114
|
const [row1, ...restRows] = ColorChunks([]);
|
|
118
115
|
const [anchorEl, setAnchorEl] = useState(null);
|
|
119
116
|
const open = Boolean(anchorEl);
|
|
120
|
-
const theme = useTheme();
|
|
121
|
-
const editor = useSlateStatic();
|
|
122
|
-
const {
|
|
123
|
-
setOpenTheme
|
|
124
|
-
} = useContext(ThemeContext);
|
|
125
117
|
const handleMore = e => {
|
|
126
118
|
setAnchorEl(e.currentTarget);
|
|
127
119
|
};
|
|
@@ -134,7 +126,6 @@ const ColorButtons = props => {
|
|
|
134
126
|
const handleSelect = color => () => {
|
|
135
127
|
onSelect(color);
|
|
136
128
|
};
|
|
137
|
-
const colorVars = theme?.vars?.colors || {};
|
|
138
129
|
return /*#__PURE__*/_jsxs(Box, {
|
|
139
130
|
component: "span",
|
|
140
131
|
sx: classes.colorButtons,
|
|
@@ -151,7 +142,7 @@ const ColorButtons = props => {
|
|
|
151
142
|
activeColor: activeColor
|
|
152
143
|
}, `si_btn_row1_${m}_${i}`);
|
|
153
144
|
})
|
|
154
|
-
}), /*#__PURE__*/
|
|
145
|
+
}), /*#__PURE__*/_jsxs(Popover, {
|
|
155
146
|
open: open || openColorTool,
|
|
156
147
|
anchorEl: anchorEl || openColorTool,
|
|
157
148
|
onClose: handleClose,
|
|
@@ -165,39 +156,9 @@ const ColorButtons = props => {
|
|
|
165
156
|
},
|
|
166
157
|
sx: classes.colorPopper,
|
|
167
158
|
className: "colorPopper",
|
|
168
|
-
children: /*#__PURE__*/
|
|
159
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
|
169
160
|
sx: classes.colorButtonsInner,
|
|
170
|
-
children:
|
|
171
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
|
172
|
-
component: "div",
|
|
173
|
-
className: "singleColorTitleWrapper",
|
|
174
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
|
175
|
-
variant: "subtitle2",
|
|
176
|
-
children: "Theme colour"
|
|
177
|
-
}), disableEditTheme ? null : /*#__PURE__*/_jsx("div", {
|
|
178
|
-
className: "editBtn",
|
|
179
|
-
onClick: () => {
|
|
180
|
-
Transforms.deselect(editor, {
|
|
181
|
-
at: editor.selection
|
|
182
|
-
});
|
|
183
|
-
setOpenTheme("editThemeColor");
|
|
184
|
-
},
|
|
185
|
-
children: "Edit"
|
|
186
|
-
})]
|
|
187
|
-
}), /*#__PURE__*/_jsx(SingleColorButton, {
|
|
188
|
-
crs: Object.values(colorVars),
|
|
189
|
-
handleSelect: handleSelect,
|
|
190
|
-
classes: classes,
|
|
191
|
-
activeColor: activeColor
|
|
192
|
-
})]
|
|
193
|
-
}) : null, /*#__PURE__*/_jsx(Box, {
|
|
194
|
-
component: "div",
|
|
195
|
-
className: "singleColorTitleWrapper",
|
|
196
|
-
children: /*#__PURE__*/_jsx(Typography, {
|
|
197
|
-
variant: "subtitle2",
|
|
198
|
-
children: "Custom colour"
|
|
199
|
-
})
|
|
200
|
-
}), restRows.map((m, i) => {
|
|
161
|
+
children: restRows.map((m, i) => {
|
|
201
162
|
return /*#__PURE__*/_jsx(SingleColorButton, {
|
|
202
163
|
id: `p2_${id}`,
|
|
203
164
|
crs: m,
|
|
@@ -206,18 +167,14 @@ const ColorButtons = props => {
|
|
|
206
167
|
classes: classes,
|
|
207
168
|
activeColor: activeColor
|
|
208
169
|
}, `si_btn_${m}_${i}`);
|
|
209
|
-
})
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
alt: "color wheel"
|
|
218
|
-
})
|
|
219
|
-
}) : null]
|
|
220
|
-
})
|
|
170
|
+
})
|
|
171
|
+
}), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
|
|
172
|
+
onClick: onColorPickerClick,
|
|
173
|
+
children: /*#__PURE__*/_jsx("img", {
|
|
174
|
+
src: ColorPicker,
|
|
175
|
+
alt: "color wheel"
|
|
176
|
+
})
|
|
177
|
+
}) : null]
|
|
221
178
|
})]
|
|
222
179
|
});
|
|
223
180
|
};
|
|
@@ -60,28 +60,4 @@
|
|
|
60
60
|
padding: 0 15px !important;
|
|
61
61
|
width: 60px !important;
|
|
62
62
|
flex-shrink: 0;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
.singleColorTitleWrapper {
|
|
67
|
-
display: flex;
|
|
68
|
-
justify-content: space-between;
|
|
69
|
-
align-items: center;
|
|
70
|
-
padding: 10px;
|
|
71
|
-
width: 100%;
|
|
72
|
-
border-bottom: 1px solid #DCE4EC;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.singleColorTitleWrapper .MuiTypography-root {
|
|
76
|
-
font-weight: 600;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.singleColorTitleWrapper .editBtn {
|
|
80
|
-
text-transform: none;
|
|
81
|
-
color: #2563EB;
|
|
82
|
-
text-decoration: underline;
|
|
83
|
-
padding: 0px;
|
|
84
|
-
min-width: unset;
|
|
85
|
-
cursor: pointer;
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
}
|
|
63
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React, { useState } from "react";
|
|
2
2
|
import { ReactEditor } from "slate-react";
|
|
3
3
|
import { Transforms } from "slate";
|
|
4
|
+
import ColorPickerTool from "react-gcolor-picker";
|
|
4
5
|
import { IconButton, Tooltip, Box, Popover } from "@mui/material";
|
|
5
6
|
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
|
|
6
7
|
import ColorButtons from "./ColorButtons";
|
|
@@ -8,7 +9,6 @@ import ColorPickerStyles from "./Styles";
|
|
|
8
9
|
import colorWheel from "./colorWheel.png";
|
|
9
10
|
import "./ColorPicker.css";
|
|
10
11
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
|
11
|
-
import CustomColorPicker from "../../common/CustomColorPicker";
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -95,10 +95,10 @@ const ColorPicker = props => {
|
|
|
95
95
|
horizontal: "top"
|
|
96
96
|
},
|
|
97
97
|
sx: classes.colorPickerPopup,
|
|
98
|
-
children: /*#__PURE__*/_jsx(
|
|
98
|
+
children: /*#__PURE__*/_jsx(ColorPickerTool, {
|
|
99
99
|
gradient: true,
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
value: activeColor,
|
|
101
|
+
onChange: handleFormSubmit
|
|
102
102
|
})
|
|
103
103
|
})]
|
|
104
104
|
});
|
|
@@ -15,8 +15,7 @@ const ColorPickerStyles = theme => ({
|
|
|
15
15
|
colorPopper: {
|
|
16
16
|
"& .MuiPaper-root": {
|
|
17
17
|
backgroundColor: theme?.palette?.editor?.background,
|
|
18
|
-
|
|
19
|
-
"@media only screen and (max-width: 600px)": {
|
|
18
|
+
'@media only screen and (max-width: 600px)': {
|
|
20
19
|
marginTop: "-40px"
|
|
21
20
|
}
|
|
22
21
|
}
|
|
@@ -2,10 +2,10 @@ import React, { useState, forwardRef, useImperativeHandle } from "react";
|
|
|
2
2
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
|
3
3
|
import { Paper, Popover } from "@mui/material";
|
|
4
4
|
import data from "@emoji-mart/data";
|
|
5
|
+
import Picker from "@emoji-mart/react";
|
|
5
6
|
import { insertEmoji } from "../../utils/emoji";
|
|
6
7
|
import ToolbarIcon from "../../common/ToolbarIcon";
|
|
7
8
|
import Icon from "../../common/Icon";
|
|
8
|
-
import EmojiPicker from "./EmojiPicker";
|
|
9
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -61,7 +61,7 @@ const EmojiButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
61
61
|
},
|
|
62
62
|
onClose: handleClose,
|
|
63
63
|
children: /*#__PURE__*/_jsx(Paper, {
|
|
64
|
-
children: /*#__PURE__*/_jsx(
|
|
64
|
+
children: /*#__PURE__*/_jsx(Picker, {
|
|
65
65
|
data: data,
|
|
66
66
|
onEmojiSelect: onEmojiSelect
|
|
67
67
|
})
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import data from "@emoji-mart/data";
|
|
2
|
-
import Picker from "@emoji-mart/react";
|
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
5
|
-
const EmojiPicker = props => {
|
|
6
|
-
const {
|
|
7
|
-
onEmojiSelect
|
|
8
|
-
} = props;
|
|
9
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
|
10
|
-
children: /*#__PURE__*/_jsx(Picker, {
|
|
11
|
-
data: data,
|
|
12
|
-
onEmojiSelect: onEmojiSelect
|
|
13
|
-
})
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export default EmojiPicker;
|
|
@@ -71,11 +71,11 @@ const FormWorkflow = props => {
|
|
|
71
71
|
children: [/*#__PURE__*/_jsx(Grid, {
|
|
72
72
|
item: true,
|
|
73
73
|
sx: classes.radioBtn,
|
|
74
|
-
children: /*#__PURE__*/
|
|
74
|
+
children: /*#__PURE__*/_jsx(RadioGroup, {
|
|
75
75
|
name: "set timing",
|
|
76
76
|
value: schedule,
|
|
77
77
|
defaultValue: 1,
|
|
78
|
-
children:
|
|
78
|
+
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
|
79
79
|
value: "immediately",
|
|
80
80
|
label: "Immediately",
|
|
81
81
|
onChange: () => {
|
|
@@ -84,16 +84,7 @@ const FormWorkflow = props => {
|
|
|
84
84
|
control: /*#__PURE__*/_jsx(Radio, {
|
|
85
85
|
size: "small"
|
|
86
86
|
})
|
|
87
|
-
})
|
|
88
|
-
value: "after",
|
|
89
|
-
label: "After",
|
|
90
|
-
onChange: () => {
|
|
91
|
-
setSchedule("after");
|
|
92
|
-
},
|
|
93
|
-
control: /*#__PURE__*/_jsx(Radio, {
|
|
94
|
-
size: "small"
|
|
95
|
-
})
|
|
96
|
-
})]
|
|
87
|
+
})
|
|
97
88
|
})
|
|
98
89
|
}), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
|
|
99
90
|
item: true,
|
|
@@ -15,7 +15,6 @@ import { gridItem } from "../../utils/gridItem";
|
|
|
15
15
|
import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
|
|
16
16
|
import { getTRBLBreakPoints, getBreakPointsValue } from "../../helper/theme";
|
|
17
17
|
import useWindowResize from "../../hooks/useWindowResize";
|
|
18
|
-
import { useTheme } from "@emotion/react";
|
|
19
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
20
19
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
20
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -76,7 +75,6 @@ const GridToolBar = ({
|
|
|
76
75
|
}) : null;
|
|
77
76
|
};
|
|
78
77
|
const Grid = props => {
|
|
79
|
-
const theme = useTheme();
|
|
80
78
|
const {
|
|
81
79
|
attributes,
|
|
82
80
|
children,
|
|
@@ -279,7 +277,7 @@ const Grid = props => {
|
|
|
279
277
|
} = getBreakPointsValue(borderRadius, size?.device) || {};
|
|
280
278
|
return /*#__PURE__*/_jsxs(GridContainer, {
|
|
281
279
|
container: true,
|
|
282
|
-
className: `grid-container ${grid} has-hover element-root
|
|
280
|
+
className: `grid-container ${grid} has-hover element-root`,
|
|
283
281
|
...attributes,
|
|
284
282
|
...sectionId,
|
|
285
283
|
sx: {
|
|
@@ -8,7 +8,6 @@ import { GridSettingsIcon } from "../../common/iconslist";
|
|
|
8
8
|
import { useEditorContext, useEditorSelection } from "../../hooks/useMouseMove";
|
|
9
9
|
import { getBreakPointsValue, getTRBLBreakPoints } from "../../helper/theme";
|
|
10
10
|
import { isEmptyNode } from "../../utils/helper";
|
|
11
|
-
import { useTheme } from "@emotion/react";
|
|
12
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
12
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
13
|
const GridItemToolbar = ({
|
|
@@ -35,7 +34,6 @@ const GridItemToolbar = ({
|
|
|
35
34
|
}) : null;
|
|
36
35
|
};
|
|
37
36
|
const GridItem = props => {
|
|
38
|
-
const theme = useTheme();
|
|
39
37
|
const {
|
|
40
38
|
attributes,
|
|
41
39
|
children,
|
|
@@ -107,7 +105,7 @@ const GridItem = props => {
|
|
|
107
105
|
return /*#__PURE__*/_jsxs(Item, {
|
|
108
106
|
item: true,
|
|
109
107
|
component: "div",
|
|
110
|
-
className: `grid-item element-root gi-top-wrpr
|
|
108
|
+
className: `grid-item element-root gi-top-wrpr`,
|
|
111
109
|
...attributes,
|
|
112
110
|
sx: {
|
|
113
111
|
width: {
|
|
@@ -121,7 +119,7 @@ const GridItem = props => {
|
|
|
121
119
|
xs: xsHidden ? "none" : "flex"
|
|
122
120
|
},
|
|
123
121
|
flexDirection: flexDirection || "column",
|
|
124
|
-
background: bgColor,
|
|
122
|
+
background: bgColor || "transparent",
|
|
125
123
|
borderColor: getBorderColor(),
|
|
126
124
|
borderWidth: borderWidth || "1px",
|
|
127
125
|
borderRadius: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import * as fIcons from "@mui/icons-material";
|
|
2
3
|
import { Box } from "@mui/material";
|
|
3
|
-
import Check from "@mui/icons-material/Check";
|
|
4
4
|
import { getBreakPointsValue } from "../../helper/theme";
|
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -23,6 +23,7 @@ const InlineIcon = props => {
|
|
|
23
23
|
right,
|
|
24
24
|
bottom
|
|
25
25
|
} = bannerSpacing || {};
|
|
26
|
+
const BtnIcon = fIcons["Check"];
|
|
26
27
|
return /*#__PURE__*/_jsxs(Box, {
|
|
27
28
|
...attributes,
|
|
28
29
|
className: "editor-icon-text",
|
|
@@ -41,7 +42,7 @@ const InlineIcon = props => {
|
|
|
41
42
|
background: bgColor || "#CCC",
|
|
42
43
|
color: textColor
|
|
43
44
|
},
|
|
44
|
-
children: [/*#__PURE__*/_jsx(
|
|
45
|
+
children: [/*#__PURE__*/_jsx(BtnIcon, {}), /*#__PURE__*/_jsx("div", {
|
|
45
46
|
contentEditable: true,
|
|
46
47
|
children: children
|
|
47
48
|
})]
|
|
@@ -9,7 +9,6 @@ import { removeLink } from "../../utils/link";
|
|
|
9
9
|
import LinkPopup from "./LinkPopup";
|
|
10
10
|
import "./styles.css";
|
|
11
11
|
import { absoluteLink } from "../../utils/helper";
|
|
12
|
-
import { useEditorContext } from "../../hooks/useMouseMove";
|
|
13
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
14
|
const Link = props => {
|
|
@@ -30,9 +29,6 @@ const Link = props => {
|
|
|
30
29
|
const path = ReactEditor.findPath(editor, element);
|
|
31
30
|
const urlPath = element.url || element.href;
|
|
32
31
|
const absLink = absoluteLink(urlPath);
|
|
33
|
-
const {
|
|
34
|
-
theme
|
|
35
|
-
} = useEditorContext();
|
|
36
32
|
const updateLink = () => {
|
|
37
33
|
Transforms.setNodes(editor, {
|
|
38
34
|
href: linkData?.url,
|
|
@@ -111,8 +107,7 @@ const Link = props => {
|
|
|
111
107
|
linkData: linkData,
|
|
112
108
|
handleClose: handleClose,
|
|
113
109
|
handleInputChange: handleInputChange,
|
|
114
|
-
handleInsertLink: updateLink
|
|
115
|
-
theme: theme
|
|
110
|
+
handleInsertLink: updateLink
|
|
116
111
|
})]
|
|
117
112
|
});
|
|
118
113
|
};
|
|
@@ -9,8 +9,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
10
|
const LinkButton = props => {
|
|
11
11
|
const {
|
|
12
|
-
editor
|
|
13
|
-
theme
|
|
12
|
+
editor
|
|
14
13
|
} = props;
|
|
15
14
|
const linkInputRef = useRef(null);
|
|
16
15
|
const [showInput, setShowInput] = useState(false);
|
|
@@ -78,8 +77,7 @@ const LinkButton = props => {
|
|
|
78
77
|
linkData: linkData,
|
|
79
78
|
handleClose: handleClose,
|
|
80
79
|
handleInputChange: handleInputChange,
|
|
81
|
-
handleInsertLink: handleInsertLink
|
|
82
|
-
theme: theme
|
|
80
|
+
handleInsertLink: handleInsertLink
|
|
83
81
|
})]
|
|
84
82
|
});
|
|
85
83
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Dialog, DialogActions, DialogContent, DialogTitle, FormControl, FormControlLabel, Grid, TextField, Button, IconButton, Typography, Checkbox } from "@mui/material";
|
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
|
4
|
-
import LinkPopupStyles from "./LinkPopupStyles";
|
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
6
|
const LinkPopup = props => {
|
|
@@ -10,10 +9,8 @@ const LinkPopup = props => {
|
|
|
10
9
|
handleClose,
|
|
11
10
|
linkData,
|
|
12
11
|
handleInputChange,
|
|
13
|
-
handleInsertLink
|
|
14
|
-
theme
|
|
12
|
+
handleInsertLink
|
|
15
13
|
} = props;
|
|
16
|
-
const classes = LinkPopupStyles(theme);
|
|
17
14
|
return /*#__PURE__*/_jsxs(Dialog, {
|
|
18
15
|
fullWidth: true,
|
|
19
16
|
open: open,
|
|
@@ -47,16 +44,13 @@ const LinkPopup = props => {
|
|
|
47
44
|
style: {
|
|
48
45
|
paddingTop: "12px"
|
|
49
46
|
},
|
|
50
|
-
className: classes.titleTypo,
|
|
51
47
|
children: /*#__PURE__*/_jsx(TextField, {
|
|
52
48
|
size: "small",
|
|
53
49
|
fullWidth: true,
|
|
54
50
|
value: linkData?.name,
|
|
55
51
|
name: "name",
|
|
56
52
|
placeholder: "Link Title",
|
|
57
|
-
onChange: handleInputChange
|
|
58
|
-
sx: classes.addLinkField,
|
|
59
|
-
className: classes.addLinkField
|
|
53
|
+
onChange: handleInputChange
|
|
60
54
|
})
|
|
61
55
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
62
56
|
item: true,
|
|
@@ -70,9 +64,7 @@ const LinkPopup = props => {
|
|
|
70
64
|
name: "url",
|
|
71
65
|
value: linkData?.url,
|
|
72
66
|
placeholder: "https://google.com",
|
|
73
|
-
onChange: handleInputChange
|
|
74
|
-
sx: classes.addLinkField,
|
|
75
|
-
className: classes.addLinkField
|
|
67
|
+
onChange: handleInputChange
|
|
76
68
|
})
|
|
77
69
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
78
70
|
item: true,
|
|
@@ -11,9 +11,7 @@ const CheckList = ({
|
|
|
11
11
|
attributes,
|
|
12
12
|
children,
|
|
13
13
|
element,
|
|
14
|
-
isEmpty
|
|
15
|
-
className,
|
|
16
|
-
style
|
|
14
|
+
isEmpty
|
|
17
15
|
}) => {
|
|
18
16
|
const editor = useSlateStatic();
|
|
19
17
|
const readOnly = useReadOnly();
|
|
@@ -32,14 +30,12 @@ const CheckList = ({
|
|
|
32
30
|
const nestedCheckList = element?.children?.length && element.children[0].type === "check-list-item";
|
|
33
31
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
34
32
|
children: /*#__PURE__*/_jsxs("div", {
|
|
35
|
-
className: className || "",
|
|
36
33
|
...attributes,
|
|
37
34
|
style: {
|
|
38
35
|
textAlign: element.alignment || "left",
|
|
39
36
|
display: "flex",
|
|
40
37
|
justifyContent: "center",
|
|
41
|
-
alignItems: "center"
|
|
42
|
-
...(style || {})
|
|
38
|
+
alignItems: "center"
|
|
43
39
|
},
|
|
44
40
|
children: [/*#__PURE__*/_jsxs("div", {
|
|
45
41
|
contentEditable: false,
|
|
@@ -117,7 +117,7 @@ const TableCell = props => {
|
|
|
117
117
|
className: `editor-table-cell ${hasSelected ? "selection" : ""}`,
|
|
118
118
|
style: {
|
|
119
119
|
position: "relative",
|
|
120
|
-
|
|
120
|
+
backgroundColor: bgColor || entireBgColor,
|
|
121
121
|
border: `3px solid ${cellBorderColor}`,
|
|
122
122
|
...(sizeProps || {})
|
|
123
123
|
},
|