@flozy/editor 9.0.4 → 9.0.7
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/ChatEditor.js +2 -2
- package/dist/Editor/CommonEditor.js +41 -11
- package/dist/Editor/Editor.css +15 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +5 -4
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +3 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +6 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +19 -9
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +32 -2
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +126 -29
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +3 -3
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +1 -1
- package/dist/Editor/Elements/DataView/styles.js +8 -8
- package/dist/Editor/Elements/Grid/GridItem.js +1 -2
- package/dist/Editor/Elements/Link/Link.js +70 -43
- package/dist/Editor/Elements/SimpleText/index.js +0 -1
- package/dist/Editor/Elements/Variables/Style.js +28 -2
- package/dist/Editor/Elements/Variables/VariableButton.js +7 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +9 -8
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +13 -11
- package/dist/Editor/common/CustomDialog/index.js +90 -0
- package/dist/Editor/common/CustomDialog/styles.js +80 -0
- package/dist/Editor/common/DnD/Draggable.js +0 -1
- package/dist/Editor/common/ImageSelector/UploadStyles.js +0 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +5 -4
- package/dist/Editor/commonStyle.js +59 -4
- package/dist/Editor/plugins/withHTML.js +1 -1
- package/dist/Editor/utils/helper.js +13 -1
- package/dist/Editor/utils/link.js +1 -1
- package/package.json +5 -2
@@ -11,7 +11,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
11
11
|
},
|
12
12
|
"& table th": {
|
13
13
|
cursor: "pointer",
|
14
|
-
|
14
|
+
minWidth: "200px"
|
15
15
|
},
|
16
16
|
"& table, th, td": {
|
17
17
|
border: "1px solid black",
|
@@ -48,7 +48,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
48
48
|
"& .tv-ck-box": {
|
49
49
|
"& svg": {
|
50
50
|
color: appTheme?.palette?.editor?.tv_border,
|
51
|
-
|
51
|
+
"& rect": {
|
52
52
|
fill: appTheme?.palette?.editor?.tv_chk_box_fill,
|
53
53
|
stroke: appTheme?.palette?.editor?.tv_chk_box_stroke
|
54
54
|
}
|
@@ -56,9 +56,9 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
56
56
|
"&.Mui-checked": {
|
57
57
|
"& svg": {
|
58
58
|
color: "rgba(37, 99, 235, 1)",
|
59
|
-
|
59
|
+
"& rect": {
|
60
60
|
fill: appTheme?.palette?.editor?.activeColor,
|
61
|
-
stroke:
|
61
|
+
stroke: "none"
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}
|
@@ -94,7 +94,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
94
94
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
95
95
|
boxShadow: "0px 4px 18px 0px #0000000D",
|
96
96
|
borderRadius: "8px",
|
97
|
-
minWidth:
|
97
|
+
minWidth: "148px"
|
98
98
|
},
|
99
99
|
"& input": {
|
100
100
|
paddingBottom: "0px",
|
@@ -140,12 +140,12 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
140
140
|
width: "150px",
|
141
141
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
142
142
|
borderRadius: "8px",
|
143
|
-
fontFamily:
|
143
|
+
fontFamily: "Inter !important",
|
144
144
|
background: appTheme?.palette?.editor?.tv_pop_bg,
|
145
145
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
146
146
|
"& .MuiButtonBase-root": {
|
147
147
|
fontSize: "14px",
|
148
|
-
padding:
|
148
|
+
padding: "6px 8px",
|
149
149
|
"& svg": {
|
150
150
|
width: "16px",
|
151
151
|
height: "16px",
|
@@ -157,7 +157,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
157
157
|
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
158
158
|
"& svg": {
|
159
159
|
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
160
|
-
|
160
|
+
"& path": {
|
161
161
|
stroke: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
162
162
|
}
|
163
163
|
}
|
@@ -50,8 +50,7 @@ const GridItemToolbar = props => {
|
|
50
50
|
open: true,
|
51
51
|
placement: "top-end",
|
52
52
|
sx: classes.popTools,
|
53
|
-
className: "gi-tool-pp",
|
54
|
-
disablePortal: true,
|
53
|
+
className: "gi-tool-pp hide-popper-on-overlap",
|
55
54
|
contentEditable: false,
|
56
55
|
children: /*#__PURE__*/_jsxs(Box, {
|
57
56
|
className: "ico-grp-ss",
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, { useState } from "react";
|
1
|
+
import React, { useRef, useState } from "react";
|
2
2
|
import { Node, Transforms } from "slate";
|
3
|
-
import { ReactEditor,
|
4
|
-
import { Box, IconButton, Tooltip } from "@mui/material";
|
3
|
+
import { ReactEditor, useSelected, useSlateStatic } from "slate-react";
|
4
|
+
import { Box, IconButton, Popper, Tooltip } from "@mui/material";
|
5
5
|
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
6
6
|
import EditIcon from "@mui/icons-material/Edit";
|
7
7
|
import LinkOffIcon from "@mui/icons-material/LinkOff";
|
@@ -11,6 +11,62 @@ import { getLinkType, handleLinkType } from "../../utils/helper";
|
|
11
11
|
import LinkSettings from "../../common/LinkSettings";
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
|
+
const Toolbar = props => {
|
15
|
+
const {
|
16
|
+
urlPath,
|
17
|
+
linkType,
|
18
|
+
showInNewTab,
|
19
|
+
selected,
|
20
|
+
linkRef,
|
21
|
+
onEditLink,
|
22
|
+
editor
|
23
|
+
} = props;
|
24
|
+
const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
|
25
|
+
const navType = getLinkType(linkType, urlPath);
|
26
|
+
const hideOpenLink = navType === "page" || !navType;
|
27
|
+
return selected ? /*#__PURE__*/_jsx(Popper, {
|
28
|
+
anchorEl: linkRef?.current,
|
29
|
+
open: true,
|
30
|
+
placement: "top-start",
|
31
|
+
className: "hide-popper-on-overlap",
|
32
|
+
contentEditable: false,
|
33
|
+
style: {
|
34
|
+
zIndex: 1000
|
35
|
+
},
|
36
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
37
|
+
className: "element-toolbar hr",
|
38
|
+
style: {
|
39
|
+
width: "150px",
|
40
|
+
display: "flex",
|
41
|
+
position: "unset"
|
42
|
+
},
|
43
|
+
component: "div",
|
44
|
+
children: [hideOpenLink ? null : /*#__PURE__*/_jsx(Tooltip, {
|
45
|
+
title: "Open",
|
46
|
+
children: /*#__PURE__*/_jsx(Box, {
|
47
|
+
sx: {
|
48
|
+
display: "inline-flex",
|
49
|
+
color: "rgba(0, 0, 0, 0.54)"
|
50
|
+
},
|
51
|
+
...btnProps,
|
52
|
+
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
53
|
+
})
|
54
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
55
|
+
title: "Edit",
|
56
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
57
|
+
onClick: onEditLink,
|
58
|
+
children: /*#__PURE__*/_jsx(EditIcon, {})
|
59
|
+
})
|
60
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
61
|
+
title: "Remove",
|
62
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
63
|
+
onClick: () => removeLink(editor),
|
64
|
+
children: /*#__PURE__*/_jsx(LinkOffIcon, {})
|
65
|
+
})
|
66
|
+
})]
|
67
|
+
})
|
68
|
+
}) : null;
|
69
|
+
};
|
14
70
|
const linkStyles = () => ({
|
15
71
|
linkBtn: {
|
16
72
|
border: "none",
|
@@ -40,7 +96,6 @@ const Link = props => {
|
|
40
96
|
} = customProps;
|
41
97
|
const editor = useSlateStatic();
|
42
98
|
const selected = useSelected();
|
43
|
-
const focused = useFocused();
|
44
99
|
const [showInput, setShowInput] = useState(false);
|
45
100
|
const [linkData, setLinkData] = useState({
|
46
101
|
name: "",
|
@@ -53,6 +108,7 @@ const Link = props => {
|
|
53
108
|
const showInNewTab = element?.showInNewTab || element?.target;
|
54
109
|
const linkType = element?.linkType;
|
55
110
|
const classes = linkStyles();
|
111
|
+
const linkRef = useRef(null);
|
56
112
|
const updateLink = data => {
|
57
113
|
Transforms.setNodes(editor, data, {
|
58
114
|
at: path
|
@@ -77,54 +133,25 @@ const Link = props => {
|
|
77
133
|
const handleClose = () => {
|
78
134
|
setShowInput(false);
|
79
135
|
};
|
80
|
-
const Toolbar = () => {
|
81
|
-
const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
|
82
|
-
const navType = getLinkType(linkType, urlPath);
|
83
|
-
const hideOpenLink = navType === "page" || !navType;
|
84
|
-
return selected && focused ? /*#__PURE__*/_jsxs("div", {
|
85
|
-
className: "element-toolbar hr",
|
86
|
-
contentEditable: false,
|
87
|
-
style: {
|
88
|
-
width: "150px",
|
89
|
-
top: "100%",
|
90
|
-
left: "0px",
|
91
|
-
display: "flex"
|
92
|
-
},
|
93
|
-
children: [hideOpenLink ? null : /*#__PURE__*/_jsx(Tooltip, {
|
94
|
-
title: "Open",
|
95
|
-
children: /*#__PURE__*/_jsx(Box, {
|
96
|
-
sx: {
|
97
|
-
display: "inline-flex",
|
98
|
-
color: "rgba(0, 0, 0, 0.54)"
|
99
|
-
},
|
100
|
-
...btnProps,
|
101
|
-
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
102
|
-
})
|
103
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
104
|
-
title: "Edit",
|
105
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
106
|
-
onClick: onEditLink,
|
107
|
-
children: /*#__PURE__*/_jsx(EditIcon, {})
|
108
|
-
})
|
109
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
110
|
-
title: "Remove",
|
111
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
112
|
-
onClick: () => removeLink(editor),
|
113
|
-
children: /*#__PURE__*/_jsx(LinkOffIcon, {})
|
114
|
-
})
|
115
|
-
})]
|
116
|
-
}) : null;
|
117
|
-
};
|
118
136
|
const buttonProps = handleLinkType(urlPath, linkType, readOnly, showInNewTab === "_blank");
|
119
137
|
return /*#__PURE__*/_jsxs("div", {
|
120
138
|
className: "link",
|
139
|
+
ref: linkRef,
|
121
140
|
children: [/*#__PURE__*/_jsx(Box, {
|
122
141
|
...attributes,
|
123
142
|
...element.attr,
|
124
143
|
sx: classes.linkBtn,
|
125
144
|
...buttonProps,
|
126
145
|
children: children
|
127
|
-
}), /*#__PURE__*/_jsx(Toolbar, {
|
146
|
+
}), /*#__PURE__*/_jsx(Toolbar, {
|
147
|
+
urlPath: urlPath,
|
148
|
+
linkType: linkType,
|
149
|
+
showInNewTab: showInNewTab,
|
150
|
+
selected: selected,
|
151
|
+
linkRef: linkRef,
|
152
|
+
onEditLink: onEditLink,
|
153
|
+
editor: editor
|
154
|
+
}), showInput ? /*#__PURE__*/_jsx(LinkSettings, {
|
128
155
|
handleClose: handleClose,
|
129
156
|
onSave: ({
|
130
157
|
linkType,
|
@@ -5,7 +5,6 @@ import { Box } from "@mui/material";
|
|
5
5
|
import { isTextSelected } from "../../utils/helper";
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
7
|
import SimpleTextStyle from "./style";
|
8
|
-
import { getBreakpointLineSpacing } from "../../helper/theme";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
11
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const VariableStyles =
|
1
|
+
const VariableStyles = theme => ({
|
2
2
|
variablesItem: {
|
3
3
|
color: "#2563EB",
|
4
4
|
background: "#EEEEEE"
|
@@ -37,8 +37,34 @@ const VariableStyles = () => ({
|
|
37
37
|
"& .MuiMenuItem-root": {
|
38
38
|
color: "#64748B"
|
39
39
|
},
|
40
|
+
"& .MuiPaper-root": {
|
41
|
+
borderRadius: '8px',
|
42
|
+
backgroundColor: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
|
43
|
+
marginTop: '5px',
|
44
|
+
"@media only screen and (max-width: 599px)": {
|
45
|
+
padding: '10px 0px'
|
46
|
+
}
|
47
|
+
},
|
48
|
+
"& .MuiList-root": {
|
49
|
+
padding: '0px'
|
50
|
+
},
|
51
|
+
"& .MuiButtonBase-root": {
|
52
|
+
margin: '6px',
|
53
|
+
borderRadius: '8px',
|
54
|
+
padding: '6px 14px',
|
55
|
+
fontSize: '14px',
|
56
|
+
fontWeight: '400',
|
57
|
+
color: theme?.palette?.editor?.deletePopUpButtonTextColor,
|
58
|
+
"&:hover": {
|
59
|
+
background: `${theme?.palette?.editor?.menuOptionHoverBackground} !important`
|
60
|
+
},
|
61
|
+
"@media only screen and (max-width: 599px)": {
|
62
|
+
minHeight: '30px',
|
63
|
+
margin: '0px 6px'
|
64
|
+
}
|
65
|
+
},
|
40
66
|
"& .Mui-selected": {
|
41
|
-
backgroundColor:
|
67
|
+
backgroundColor: 'unset !important'
|
42
68
|
}
|
43
69
|
}
|
44
70
|
});
|
@@ -3,11 +3,15 @@ import { useSlateStatic } from "slate-react";
|
|
3
3
|
import { MenuItem, Select } from "@mui/material";
|
4
4
|
import { insertVariables } from "../../utils/variables";
|
5
5
|
import VariableStyles from "./Style";
|
6
|
-
import
|
6
|
+
import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
|
7
|
+
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const VariableButton = props => {
|
10
|
-
const
|
11
|
+
const {
|
12
|
+
theme
|
13
|
+
} = useEditorContext();
|
14
|
+
const classes = VariableStyles(theme);
|
11
15
|
const editor = useSlateStatic();
|
12
16
|
const {
|
13
17
|
options
|
@@ -24,7 +28,7 @@ const VariableButton = props => {
|
|
24
28
|
value: "",
|
25
29
|
sx: classes.variableBtn,
|
26
30
|
onChange: updateVariable,
|
27
|
-
IconComponent: () => /*#__PURE__*/_jsx(
|
31
|
+
IconComponent: () => /*#__PURE__*/_jsx(KeyboardArrowDownRoundedIcon, {}),
|
28
32
|
MenuProps: {
|
29
33
|
sx: classes.variableMenuItem,
|
30
34
|
PaperProps: {
|
@@ -2,8 +2,6 @@ import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { TextField, IconButton } from "@mui/material";
|
3
3
|
import { addMarkData, activeMark, isBlockActive } from "../../utils/SlateUtilityFunctions.js";
|
4
4
|
import { headingMap, sizeMap } from "../../utils/font.js";
|
5
|
-
import ExpandLessRoundedIcon from "@mui/icons-material/ExpandLessRounded";
|
6
|
-
import ExpandMoreRoundedIcon from "@mui/icons-material/ExpandMoreRounded";
|
7
5
|
import { getBreakPointsValue } from "../../helper/theme.js";
|
8
6
|
import useWindowResize from "../../hooks/useWindowResize.js";
|
9
7
|
import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
|
@@ -3,17 +3,18 @@ import { Grid, Tabs, Tab, CircularProgress } from "@mui/material";
|
|
3
3
|
import TemplateCard from "./TemplateCard";
|
4
4
|
import FullViewCard from "./FullViewCard";
|
5
5
|
import ButtonTemplateCard from "./ButtonTemplatesCard";
|
6
|
+
|
7
|
+
// const CATEGORIES_SORT_INDEX = {
|
8
|
+
// Brief: 1,
|
9
|
+
// Buttons: 2,
|
10
|
+
// Banners: 3,
|
11
|
+
// Tables: 4,
|
12
|
+
// Contract: 5,
|
13
|
+
// Proposal: 6,
|
14
|
+
// };
|
6
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
8
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
-
const CATEGORIES_SORT_INDEX = {
|
10
|
-
Brief: 1,
|
11
|
-
Buttons: 2,
|
12
|
-
Banners: 3,
|
13
|
-
Tables: 4,
|
14
|
-
Contract: 5,
|
15
|
-
Proposal: 6
|
16
|
-
};
|
17
18
|
const Categories = props => {
|
18
19
|
const {
|
19
20
|
value,
|
@@ -424,12 +424,9 @@ const usePopupStyle = theme => ({
|
|
424
424
|
fontFamilyListOptions: {
|
425
425
|
"& .MuiAutocomplete-listbox": {
|
426
426
|
padding: "0px",
|
427
|
-
"&::-webkit-scrollbar-thumb": {
|
428
|
-
|
429
|
-
},
|
430
|
-
"&::-webkit-scrollbar-track": {
|
431
|
-
visibility: "hidden"
|
432
|
-
},
|
427
|
+
// "&::-webkit-scrollbar-thumb": {
|
428
|
+
// background: `none !important`,
|
429
|
+
// },
|
433
430
|
"&::-webkit-scrollbar-thumb": {
|
434
431
|
background: `${theme?.palette?.editor?.brainPopupScroll} !important`
|
435
432
|
},
|
@@ -869,14 +866,19 @@ const usePopupStyle = theme => ({
|
|
869
866
|
overflow: "auto",
|
870
867
|
backgroundColor: theme?.palette?.editor?.background,
|
871
868
|
borderRadius: "14px !important",
|
872
|
-
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important
|
869
|
+
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder} !important`,
|
870
|
+
minWidth: "fit-content",
|
871
|
+
"@media only screen and (max-width: 599px)": {
|
872
|
+
left: "0px !important"
|
873
|
+
}
|
873
874
|
},
|
874
875
|
"& .popup_tabs": {
|
875
|
-
backgroundColor: theme?.palette?.editor?.inputFieldBgColor
|
876
|
-
"@media only screen and (max-width:
|
877
|
-
|
878
|
-
}
|
876
|
+
backgroundColor: theme?.palette?.editor?.inputFieldBgColor
|
877
|
+
// "@media only screen and (max-width: 599px)": {
|
878
|
+
// width: "100% !important",
|
879
|
+
// },
|
879
880
|
},
|
881
|
+
|
880
882
|
"& .popup_tabs-header": {
|
881
883
|
fontFamily: "Inter, sans-serif",
|
882
884
|
fontWeight: 700,
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import { Button, Dialog, DialogActions, DialogContent, Grid, SwipeableDrawer, Typography, useMediaQuery } from "@mui/material";
|
2
|
+
import PropTypes from "prop-types";
|
3
|
+
import { useEditorContext } from "../../hooks/useMouseMove";
|
4
|
+
import CustomDialogStyles from "./styles";
|
5
|
+
import { forwardRef, useImperativeHandle, useState } from "react";
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
9
|
+
const CustomDialog = (props, ref) => {
|
10
|
+
const {
|
11
|
+
content,
|
12
|
+
confirmText,
|
13
|
+
cancelText,
|
14
|
+
onConfirm
|
15
|
+
} = props;
|
16
|
+
const [open, setOpen] = useState(false);
|
17
|
+
const isMobile = useMediaQuery("(max-width:899px)");
|
18
|
+
const {
|
19
|
+
theme
|
20
|
+
} = useEditorContext();
|
21
|
+
const classes = CustomDialogStyles(theme);
|
22
|
+
useImperativeHandle(ref, () => ({
|
23
|
+
handleOpen: () => setOpen(true),
|
24
|
+
handleClose: () => setOpen(false)
|
25
|
+
}));
|
26
|
+
const DialogueContent = () => /*#__PURE__*/_jsxs(_Fragment, {
|
27
|
+
children: [/*#__PURE__*/_jsx(DialogContent, {
|
28
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
29
|
+
children: content
|
30
|
+
})
|
31
|
+
}), /*#__PURE__*/_jsxs(DialogActions, {
|
32
|
+
children: [/*#__PURE__*/_jsx(Button, {
|
33
|
+
className: "closeBtn",
|
34
|
+
onClick: () => setOpen(false),
|
35
|
+
children: cancelText
|
36
|
+
}), /*#__PURE__*/_jsx(Button, {
|
37
|
+
className: "confirmBtn",
|
38
|
+
onClick: () => {
|
39
|
+
onConfirm();
|
40
|
+
setOpen(false);
|
41
|
+
},
|
42
|
+
children: confirmText
|
43
|
+
})]
|
44
|
+
})]
|
45
|
+
});
|
46
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
47
|
+
children: !isMobile ? /*#__PURE__*/_jsx(Dialog, {
|
48
|
+
className: `${classes.MuiBackdropRoot}`,
|
49
|
+
open: open,
|
50
|
+
onClose: () => setOpen(false),
|
51
|
+
fullWidth: true,
|
52
|
+
maxWidth: "sm",
|
53
|
+
sx: classes.CustomDialogu,
|
54
|
+
children: /*#__PURE__*/_jsx(DialogueContent, {})
|
55
|
+
}) : /*#__PURE__*/_jsxs(SwipeableDrawer, {
|
56
|
+
open: open,
|
57
|
+
anchor: "bottom",
|
58
|
+
onClose: () => setOpen(false),
|
59
|
+
style: {
|
60
|
+
zIndex: "1300"
|
61
|
+
},
|
62
|
+
sx: classes.CustomDialogu,
|
63
|
+
disableBackdropTransition: true,
|
64
|
+
disableSwipeToOpen: true,
|
65
|
+
children: [/*#__PURE__*/_jsx(Grid, {
|
66
|
+
container: true,
|
67
|
+
justifyContent: "center",
|
68
|
+
className: "pullerRoot",
|
69
|
+
children: /*#__PURE__*/_jsx(Grid, {
|
70
|
+
item: true,
|
71
|
+
className: "pullerGrid"
|
72
|
+
})
|
73
|
+
}), /*#__PURE__*/_jsx(DialogueContent, {})]
|
74
|
+
})
|
75
|
+
});
|
76
|
+
};
|
77
|
+
const CustomDialogComponent = /*#__PURE__*/forwardRef(CustomDialog);
|
78
|
+
CustomDialogComponent.defaultProps = {
|
79
|
+
content: "Are you sure you want to proceed?",
|
80
|
+
confirmText: "Confirm",
|
81
|
+
cancelText: "Cancel",
|
82
|
+
onConfirm: () => console.warn("onConfirm not provided")
|
83
|
+
};
|
84
|
+
CustomDialogComponent.propTypes = {
|
85
|
+
content: PropTypes.string,
|
86
|
+
confirmText: PropTypes.string,
|
87
|
+
cancelText: PropTypes.string,
|
88
|
+
onConfirm: PropTypes.func
|
89
|
+
};
|
90
|
+
export { CustomDialogComponent };
|
@@ -0,0 +1,80 @@
|
|
1
|
+
const CustomDialogStyles = theme => ({
|
2
|
+
MuiBackdropRoot: {
|
3
|
+
opacity: "1",
|
4
|
+
transition: "opacity 225ms cubic-bezier(0.4, 0, 0.2, 1) 0ms"
|
5
|
+
},
|
6
|
+
CustomDialogu: {
|
7
|
+
"& .MuiPaper-root": {
|
8
|
+
borderRadius: "12px 12px 0px 0px",
|
9
|
+
backgroundColor: `${theme?.palette?.greyshades?.light9} !important`,
|
10
|
+
"@media only screen and (min-width: 899px)": {
|
11
|
+
maxWidth: "400px",
|
12
|
+
border: `1px solid ${theme?.palette?.editor?.customDialogueBorder}`,
|
13
|
+
borderRadius: "12px"
|
14
|
+
}
|
15
|
+
},
|
16
|
+
"& .MuiDialogContent-root": {
|
17
|
+
padding: "20px 24px 8px 24px",
|
18
|
+
"& .MuiTypography-root": {
|
19
|
+
textAlign: "center",
|
20
|
+
fontFamily: "Inter, sans-serif",
|
21
|
+
fontSize: "14px",
|
22
|
+
fontWeight: 500,
|
23
|
+
color: theme?.palette?.editor?.textColor
|
24
|
+
}
|
25
|
+
},
|
26
|
+
"& .confirmBtn": {
|
27
|
+
backgroundColor: "#2563EB",
|
28
|
+
padding: "8px 12px",
|
29
|
+
color: "#ffffff",
|
30
|
+
fontWeight: 600,
|
31
|
+
fontSize: "14px",
|
32
|
+
opacity: 1,
|
33
|
+
borderRadius: "8px",
|
34
|
+
textTransform: "math-auto",
|
35
|
+
height: "36px",
|
36
|
+
padding: "0px 12px",
|
37
|
+
minWidth: "90px",
|
38
|
+
"&:hover": {
|
39
|
+
backgroundColor: "#2563EB"
|
40
|
+
},
|
41
|
+
"@media only screen and (max-width: 899px)": {
|
42
|
+
width: "50%"
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"& .MuiDialogActions-root": {
|
46
|
+
justifyContent: "center",
|
47
|
+
paddingBottom: "20px"
|
48
|
+
},
|
49
|
+
"& .closeBtn": {
|
50
|
+
padding: "8px 12px",
|
51
|
+
color: theme?.palette?.editor?.customDialogueCloseBtnColor,
|
52
|
+
fontWeight: 600,
|
53
|
+
fontSize: "14px",
|
54
|
+
opacity: 1,
|
55
|
+
borderRadius: "8px",
|
56
|
+
textTransform: "math-auto",
|
57
|
+
height: "36px",
|
58
|
+
padding: "0px 12px",
|
59
|
+
minWidth: "90px",
|
60
|
+
backgroundColor: theme?.palette?.editor?.closeButtonBackground,
|
61
|
+
border: `1px solid ${theme?.palette?.editor?.customDialogueCloseBtnBorder}`,
|
62
|
+
"&:hover": {
|
63
|
+
backgroundColor: theme?.palette?.editor?.closeButtonBackground
|
64
|
+
},
|
65
|
+
"@media only screen and (max-width: 899px)": {
|
66
|
+
width: "50%"
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"& .pullerRoot": {
|
70
|
+
padding: "8px 0"
|
71
|
+
},
|
72
|
+
"& .pullerGrid": {
|
73
|
+
width: "40px",
|
74
|
+
height: "5px",
|
75
|
+
backgroundColor: "#ccc",
|
76
|
+
borderRadius: "10px"
|
77
|
+
}
|
78
|
+
}
|
79
|
+
});
|
80
|
+
export default CustomDialogStyles;
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React, { useEffect } from "react";
|
2
2
|
import { useDraggable } from "@dnd-kit/core";
|
3
3
|
import { Box } from "@mui/material";
|
4
|
-
import DragIndicatorIcon from "@mui/icons-material/DragIndicator";
|
5
4
|
import { SectionDragIcon } from "../iconListV2";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
6
|
const Draggable = props => {
|
@@ -53,9 +53,9 @@ const usePopupStyles = theme => ({
|
|
53
53
|
"& button": {
|
54
54
|
color: theme?.palette?.editor?.textColor
|
55
55
|
},
|
56
|
-
"@media only screen and (min-width: 899px)": {
|
57
|
-
|
58
|
-
},
|
56
|
+
// "@media only screen and (min-width: 899px)": {
|
57
|
+
// maxHeight: "400px",
|
58
|
+
// },
|
59
59
|
"& .orderedListIcon, .bulletedListTextIcon, .checkedListTextIcon, .accordianIconSvgTextFormat": {
|
60
60
|
width: "20px !important"
|
61
61
|
},
|
@@ -2,10 +2,11 @@ import { Transforms, Node, Path } from "slate";
|
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { handleNegativeInteger } from "../../../utils/helper";
|
4
4
|
export const ROW_HEIGHT = 50;
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
|
6
|
+
// const MARGIN_OF = {
|
7
|
+
// xs: 160,
|
8
|
+
// lg: 490,
|
9
|
+
// };
|
9
10
|
|
10
11
|
/**
|
11
12
|
* This method will update the grid template rows of parent section based on height
|