@flozy/editor 5.1.9 → 5.2.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/Elements/AI/PopoverAIInput.js +9 -4
- package/dist/Editor/Elements/AI/Styles.js +13 -7
- package/dist/Editor/Elements/Button/EditorButton.js +6 -1
- package/dist/Editor/Elements/Carousel/CarouselItem.js +10 -2
- package/dist/Editor/Elements/DataView/DataView.js +1 -0
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +3 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +4 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +5 -5
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +5 -3
- package/dist/Editor/Elements/DataView/styles.js +11 -5
- package/dist/Editor/Elements/Embed/Image.js +13 -1
- package/dist/Editor/Elements/Embed/Video.js +13 -1
- package/dist/Editor/Elements/Grid/GridItem.js +21 -18
- package/dist/Editor/Elements/SimpleText/style.js +6 -1
- package/dist/Editor/Elements/Table/DragButton.js +1 -0
- package/dist/Editor/Elements/Table/Styles.js +6 -3
- package/dist/Editor/Elements/Table/Table.js +8 -3
- package/dist/Editor/Elements/Table/TableCell.js +6 -3
- package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/index.js +3 -4
- package/dist/Editor/common/Icon.js +3 -1
- package/dist/Editor/common/RnD/VirtualElement/index.js +5 -1
- package/dist/Editor/commonStyle.js +9 -0
- package/package.json +1 -1
|
@@ -108,10 +108,15 @@ const updateAnchorEl = (setAnchorEl, editor, openAI, selectedElement) => {
|
|
|
108
108
|
return;
|
|
109
109
|
}
|
|
110
110
|
const selection = window.getSelection();
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
|
|
112
|
+
// if (
|
|
113
|
+
// openAI === "fromToolBar" &&
|
|
114
|
+
// selection.anchorOffset !== selection.focusOffset
|
|
115
|
+
// ) {
|
|
116
|
+
// // to fix some issue in Drag n Drop
|
|
117
|
+
// return;
|
|
118
|
+
// }
|
|
119
|
+
|
|
115
120
|
if (selection.rangeCount) {
|
|
116
121
|
let caret;
|
|
117
122
|
if (getSelectedText(editor)) {
|
|
@@ -115,7 +115,7 @@ const Styles = theme => ({
|
|
|
115
115
|
overflow: "auto",
|
|
116
116
|
// width: "240px",
|
|
117
117
|
minWidth: "200px",
|
|
118
|
-
border:
|
|
118
|
+
border: `1px solid ${theme?.palette?.editor?.popUpBorderColor}`,
|
|
119
119
|
padding: "6px"
|
|
120
120
|
},
|
|
121
121
|
optionWrapper: {
|
|
@@ -142,22 +142,28 @@ const Styles = theme => ({
|
|
|
142
142
|
gap: "8px"
|
|
143
143
|
},
|
|
144
144
|
"&:hover": {
|
|
145
|
-
backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important
|
|
145
|
+
backgroundColor: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`,
|
|
146
|
+
"& svg path": {
|
|
147
|
+
stroke: `${theme?.palette?.editor?.textColor} !important`
|
|
148
|
+
},
|
|
149
|
+
"& svg": {
|
|
150
|
+
color: `${theme?.palette?.editor?.textColor} !important`
|
|
151
|
+
}
|
|
146
152
|
},
|
|
147
153
|
"& svg path": {
|
|
148
|
-
stroke: `${theme?.palette?.editor?.
|
|
154
|
+
stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
149
155
|
},
|
|
150
156
|
"& svg": {
|
|
151
|
-
color: `${theme?.palette?.editor?.
|
|
157
|
+
color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
152
158
|
},
|
|
153
159
|
"&.active": {
|
|
154
160
|
background: `${theme?.palette?.containers?.bg3 || "#E9F3FE"}`,
|
|
155
|
-
color:
|
|
161
|
+
color: theme?.palette?.editor?.menuOptionsSelectedTextColor,
|
|
156
162
|
"& svg path": {
|
|
157
|
-
stroke:
|
|
163
|
+
stroke: theme?.palette?.editor?.menuOptionsSelectedTextColor
|
|
158
164
|
},
|
|
159
165
|
"& svg": {
|
|
160
|
-
color:
|
|
166
|
+
color: `${theme?.palette?.editor?.menuOptionsSelectedTextColor} !important`
|
|
161
167
|
}
|
|
162
168
|
}
|
|
163
169
|
},
|
|
@@ -11,6 +11,7 @@ import { handleLinkType, windowVar } from "../../utils/helper";
|
|
|
11
11
|
import LinkSettings from "../../common/LinkSettings";
|
|
12
12
|
import Icon from "../../common/Icon";
|
|
13
13
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
|
14
|
+
import useCommonStyle from "../../commonStyle";
|
|
14
15
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
16
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
16
17
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -36,6 +37,7 @@ const EditorButton = props => {
|
|
|
36
37
|
const [edit, setEdit] = useState(false);
|
|
37
38
|
const [openNav, setOpenNav] = useState(false);
|
|
38
39
|
const [openMoreOptions, setOpenMoreOptions] = useState(false);
|
|
40
|
+
const classes = useCommonStyle(appTheme);
|
|
39
41
|
const {
|
|
40
42
|
label,
|
|
41
43
|
bgColor,
|
|
@@ -136,6 +138,7 @@ const EditorButton = props => {
|
|
|
136
138
|
arrow: true,
|
|
137
139
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
138
140
|
onClick: onMenuClick("edit"),
|
|
141
|
+
sx: classes.buttonMoreOption,
|
|
139
142
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
140
143
|
icon: "pagesSettings"
|
|
141
144
|
})
|
|
@@ -145,6 +148,7 @@ const EditorButton = props => {
|
|
|
145
148
|
arrow: true,
|
|
146
149
|
children: /*#__PURE__*/_jsx(IconButton, {
|
|
147
150
|
onClick: onMenuClick("nav"),
|
|
151
|
+
sx: classes.buttonMoreOption,
|
|
148
152
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
149
153
|
icon: "link"
|
|
150
154
|
})
|
|
@@ -157,7 +161,8 @@ const EditorButton = props => {
|
|
|
157
161
|
sx: {
|
|
158
162
|
display: "inline-flex",
|
|
159
163
|
color: "rgba(0, 0, 0, 0.54)",
|
|
160
|
-
marginBottom: "0px !important"
|
|
164
|
+
marginBottom: "0px !important",
|
|
165
|
+
...classes.buttonMoreOption
|
|
161
166
|
},
|
|
162
167
|
...btnProps,
|
|
163
168
|
children: /*#__PURE__*/_jsx(Icon, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { Node, Transforms } from "slate";
|
|
3
3
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
|
4
|
-
import { Tooltip, IconButton } from "@mui/material";
|
|
4
|
+
import { Tooltip, IconButton, Box } from "@mui/material";
|
|
5
5
|
import DeleteIcon from "@mui/icons-material/Delete";
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -53,7 +53,7 @@ const CarouselItem = props => {
|
|
|
53
53
|
return /*#__PURE__*/_jsx("div", {
|
|
54
54
|
...attributes,
|
|
55
55
|
className: "carousel-item",
|
|
56
|
-
children: /*#__PURE__*/_jsxs(
|
|
56
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
57
57
|
className: "carousel-item-inner",
|
|
58
58
|
style: {
|
|
59
59
|
minHeight: "50px",
|
|
@@ -61,6 +61,14 @@ const CarouselItem = props => {
|
|
|
61
61
|
justifyContent: "center",
|
|
62
62
|
alignItems: "center"
|
|
63
63
|
},
|
|
64
|
+
sx: {
|
|
65
|
+
"& .ico-grp-ss": {
|
|
66
|
+
position: "absolute",
|
|
67
|
+
top: "0px",
|
|
68
|
+
right: "0px",
|
|
69
|
+
display: "flex"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
64
72
|
children: [children, /*#__PURE__*/_jsx(Toolbar, {})]
|
|
65
73
|
})
|
|
66
74
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import { Box, Checkbox, Popper } from "@mui/material";
|
|
3
|
+
import CheckBoxTwoToneIcon from "@mui/icons-material/CheckBoxTwoTone";
|
|
3
4
|
import DataTypes from "./DataTypes";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
@@ -58,7 +59,8 @@ const ColumnView = props => {
|
|
|
58
59
|
sx: {
|
|
59
60
|
mr: 0
|
|
60
61
|
},
|
|
61
|
-
checked: selected
|
|
62
|
+
checked: selected,
|
|
63
|
+
checkedIcon: /*#__PURE__*/_jsx(CheckBoxTwoToneIcon, {})
|
|
62
64
|
})
|
|
63
65
|
}) : null]
|
|
64
66
|
});
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { useDataView } from "../../Providers/DataViewProvider";
|
|
3
3
|
import Checkbox from "@mui/material/Checkbox";
|
|
4
|
-
import
|
|
5
|
-
import CheckCircleIcon from "@mui/icons-material/CheckCircle";
|
|
4
|
+
import Icon from "../../../../common/Icon";
|
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
6
|
const CheckType = props => {
|
|
8
7
|
const {
|
|
@@ -21,8 +20,12 @@ const CheckType = props => {
|
|
|
21
20
|
};
|
|
22
21
|
return /*#__PURE__*/_jsx(Checkbox, {
|
|
23
22
|
checked: value,
|
|
24
|
-
icon: /*#__PURE__*/_jsx(
|
|
25
|
-
|
|
23
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
|
24
|
+
icon: "checkListButton"
|
|
25
|
+
}),
|
|
26
|
+
checkedIcon: /*#__PURE__*/_jsx(Icon, {
|
|
27
|
+
icon: "checkListButtonActive"
|
|
28
|
+
}),
|
|
26
29
|
onChange: handleChange,
|
|
27
30
|
disabled: readOnly
|
|
28
31
|
}, rowIndex);
|
|
@@ -52,7 +52,7 @@ const FilterSort = props => {
|
|
|
52
52
|
children: [/*#__PURE__*/_jsx("span", {
|
|
53
53
|
children: "Sort By"
|
|
54
54
|
}), /*#__PURE__*/_jsx(IconButton, {
|
|
55
|
-
className: "tv-act-ico bg",
|
|
55
|
+
className: "tv-act-ico bg br1",
|
|
56
56
|
size: "small",
|
|
57
57
|
onClick: onClose,
|
|
58
58
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
|
@@ -50,7 +50,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
|
50
50
|
marginRight: "12px",
|
|
51
51
|
background: appTheme?.palette?.editor?.tv_ico_bg
|
|
52
52
|
},
|
|
53
|
-
color: appTheme?.palette?.editor?.
|
|
53
|
+
color: `${appTheme?.palette?.editor?.tv_text} !important`,
|
|
54
54
|
"& svg": {
|
|
55
55
|
width: "16px"
|
|
56
56
|
}
|
|
@@ -60,9 +60,9 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
|
60
60
|
},
|
|
61
61
|
"&:hover": {
|
|
62
62
|
background: appTheme?.palette?.editor?.tv_hover_bg,
|
|
63
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
|
63
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
|
64
64
|
"& .MuiListItemIcon-root": {
|
|
65
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
|
65
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
}
|
|
@@ -70,7 +70,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
|
70
70
|
"& .tv-cf": {
|
|
71
71
|
"& .MuiInputBase-root": {
|
|
72
72
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
|
73
|
-
background: appTheme?.palette?.editor?.
|
|
73
|
+
background: appTheme?.palette?.editor?.tv_input_bg,
|
|
74
74
|
borderRadius: "8px",
|
|
75
75
|
"& svg": {
|
|
76
76
|
color: appTheme?.palette?.editor?.tv_text_primary
|
|
@@ -142,7 +142,7 @@ const EditOption = props => {
|
|
|
142
142
|
})
|
|
143
143
|
})]
|
|
144
144
|
}), /*#__PURE__*/_jsx(List, {
|
|
145
|
-
className: "fe-dv-opt-list st
|
|
145
|
+
className: "fe-dv-opt-list st",
|
|
146
146
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
|
147
147
|
onClick: onDeleteOption,
|
|
148
148
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
|
@@ -29,7 +29,7 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
|
29
29
|
"& .MuiInputBase-root": {
|
|
30
30
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
|
31
31
|
fontSize: "14px",
|
|
32
|
-
background: appTheme?.palette?.editor?.
|
|
32
|
+
background: appTheme?.palette?.editor?.tv_input_bg,
|
|
33
33
|
borderRadius: "8px"
|
|
34
34
|
},
|
|
35
35
|
"& .MuiOutlinedInput-notchedOutline": {
|
|
@@ -54,7 +54,7 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
|
54
54
|
marginRight: "12px",
|
|
55
55
|
background: appTheme?.palette?.editor?.tv_ico_bg
|
|
56
56
|
},
|
|
57
|
-
color: appTheme?.palette?.editor?.
|
|
57
|
+
color: `${appTheme?.palette?.editor?.tv_text} !important`,
|
|
58
58
|
"& svg": {
|
|
59
59
|
width: "16px"
|
|
60
60
|
}
|
|
@@ -64,9 +64,9 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
|
64
64
|
},
|
|
65
65
|
"&:hover": {
|
|
66
66
|
background: appTheme?.palette?.editor?.tv_hover_bg,
|
|
67
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
|
67
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
|
68
68
|
"& .MuiListItemIcon-root": {
|
|
69
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
|
69
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
|
70
70
|
}
|
|
71
71
|
}
|
|
72
72
|
}
|
|
@@ -138,7 +138,7 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
|
138
138
|
justifyContent: "space-between",
|
|
139
139
|
fontSize: "14px",
|
|
140
140
|
alignItems: "center",
|
|
141
|
-
borderBottom:
|
|
141
|
+
borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
|
142
142
|
marginBottom: "8px",
|
|
143
143
|
"& span": {
|
|
144
144
|
display: "flex",
|
|
@@ -49,9 +49,11 @@ const multiSortRows = (rows, criteria, columnConfig) => {
|
|
|
49
49
|
break;
|
|
50
50
|
case "select":
|
|
51
51
|
case "multi-select":
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
52
|
+
if (Array.isArray(valueA) && Array.isArray(valueB)) {
|
|
53
|
+
comparison = Array.isArray(valueA) ? valueA?.map(m => m?.value).join(", ").localeCompare(valueB?.map(m => m?.value).join(", "), undefined, {
|
|
54
|
+
sensitivity: "base"
|
|
55
|
+
}) : 0;
|
|
56
|
+
}
|
|
55
57
|
break;
|
|
56
58
|
case "date":
|
|
57
59
|
comparison = sortByDate(valueA, valueB);
|
|
@@ -69,8 +69,9 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
|
69
69
|
alignItems: "center",
|
|
70
70
|
"& .MuiButtonBase-root": {
|
|
71
71
|
padding: "6px",
|
|
72
|
-
|
|
73
|
-
|
|
72
|
+
marginLeft: "4px",
|
|
73
|
+
width: "29px",
|
|
74
|
+
height: "29px",
|
|
74
75
|
"&.active": {
|
|
75
76
|
color: "rgba(37, 99, 235, 1)"
|
|
76
77
|
}
|
|
@@ -82,7 +83,8 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
|
82
83
|
transition: "width 1s",
|
|
83
84
|
"&.open": {
|
|
84
85
|
width: "fit-content",
|
|
85
|
-
border:
|
|
86
|
+
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
|
87
|
+
boxShadow: "0px 4px 18px 0px #0000000D",
|
|
86
88
|
borderRadius: "8px"
|
|
87
89
|
},
|
|
88
90
|
"& input": {
|
|
@@ -129,12 +131,16 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
|
129
131
|
fontSize: "14px",
|
|
130
132
|
"& svg": {
|
|
131
133
|
width: "16px",
|
|
132
|
-
height: "16px"
|
|
134
|
+
height: "16px",
|
|
135
|
+
color: `${appTheme?.palette?.editor?.tv_text}`
|
|
133
136
|
},
|
|
134
137
|
"&:hover": {
|
|
135
138
|
background: appTheme?.palette?.editor?.tv_hover_bg,
|
|
136
139
|
borderRadius: "8px",
|
|
137
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
|
140
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
|
141
|
+
"& svg": {
|
|
142
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
|
143
|
+
}
|
|
138
144
|
}
|
|
139
145
|
}
|
|
140
146
|
}
|
|
@@ -66,7 +66,7 @@ const ImageContent = props => {
|
|
|
66
66
|
path,
|
|
67
67
|
theme
|
|
68
68
|
} = props;
|
|
69
|
-
return !url
|
|
69
|
+
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
|
70
70
|
component: "button",
|
|
71
71
|
className: "element-empty-btn",
|
|
72
72
|
contentEditable: false,
|
|
@@ -76,6 +76,18 @@ const ImageContent = props => {
|
|
|
76
76
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
77
77
|
icon: "image"
|
|
78
78
|
}), "Add Image"]
|
|
79
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
80
|
+
sx: {
|
|
81
|
+
color: "#64748B !important",
|
|
82
|
+
"& svg": {
|
|
83
|
+
color: "#64748B"
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
component: "button",
|
|
87
|
+
className: "element-empty-btn",
|
|
88
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
89
|
+
icon: "shieldNoAccess"
|
|
90
|
+
}), "The Content is no longer available."]
|
|
79
91
|
}) : /*#__PURE__*/_jsx(Box, {
|
|
80
92
|
component: "img",
|
|
81
93
|
className: "emb-img",
|
|
@@ -70,13 +70,25 @@ const VideoPlaceholder = props => {
|
|
|
70
70
|
readOnly,
|
|
71
71
|
onSettings
|
|
72
72
|
} = props;
|
|
73
|
-
return !url
|
|
73
|
+
return !url ? !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
|
74
74
|
component: "button",
|
|
75
75
|
className: "element-empty-btn",
|
|
76
76
|
onClick: onSettings,
|
|
77
77
|
children: [/*#__PURE__*/_jsx(Icon, {
|
|
78
78
|
icon: "video"
|
|
79
79
|
}), "Embed Video or Other"]
|
|
80
|
+
}) : /*#__PURE__*/_jsxs(Box, {
|
|
81
|
+
sx: {
|
|
82
|
+
color: "#64748B !important",
|
|
83
|
+
"& svg": {
|
|
84
|
+
color: "#64748B"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
component: "button",
|
|
88
|
+
className: "element-empty-btn",
|
|
89
|
+
children: [/*#__PURE__*/_jsx(Icon, {
|
|
90
|
+
icon: "shieldNoAccess"
|
|
91
|
+
}), "The Content is no longer available."]
|
|
80
92
|
}) : /*#__PURE__*/_jsx(VideoContent, {
|
|
81
93
|
...props
|
|
82
94
|
});
|
|
@@ -45,7 +45,7 @@ const GridItemToolbar = props => {
|
|
|
45
45
|
onAddColumn,
|
|
46
46
|
columnRef
|
|
47
47
|
} = props;
|
|
48
|
-
return selected && !showTool ? /*#__PURE__*/
|
|
48
|
+
return selected && !showTool ? /*#__PURE__*/_jsx(Popper, {
|
|
49
49
|
anchorEl: columnRef?.current,
|
|
50
50
|
open: true,
|
|
51
51
|
placement: "top-end",
|
|
@@ -53,23 +53,26 @@ const GridItemToolbar = props => {
|
|
|
53
53
|
className: "gi-tool-pp",
|
|
54
54
|
disablePortal: true,
|
|
55
55
|
contentEditable: false,
|
|
56
|
-
children:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
56
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
|
57
|
+
className: "ico-grp-ss",
|
|
58
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
|
59
|
+
title: "Column Settings",
|
|
60
|
+
arrow: true,
|
|
61
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
62
|
+
size: "small",
|
|
63
|
+
onClick: onSettings,
|
|
64
|
+
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
|
65
|
+
})
|
|
66
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
|
67
|
+
title: "Add Column",
|
|
68
|
+
arrow: true,
|
|
69
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
|
70
|
+
size: "small",
|
|
71
|
+
onClick: onAddColumn,
|
|
72
|
+
children: /*#__PURE__*/_jsx(AddIcon, {})
|
|
73
|
+
})
|
|
74
|
+
})]
|
|
75
|
+
})
|
|
73
76
|
}) : null;
|
|
74
77
|
};
|
|
75
78
|
const GridItem = props => {
|
|
@@ -4,7 +4,9 @@ const TableStyles = theme => {
|
|
|
4
4
|
closeButtonSvgStroke,
|
|
5
5
|
activeColor,
|
|
6
6
|
signaturePopUpTabButtonSelectedBg,
|
|
7
|
-
signaturePopUpTabButtonSelectedSvg
|
|
7
|
+
signaturePopUpTabButtonSelectedSvg,
|
|
8
|
+
aiInputBackground,
|
|
9
|
+
buttonBorder1
|
|
8
10
|
} = theme?.palette?.editor || {};
|
|
9
11
|
return {
|
|
10
12
|
tableToolBar: {
|
|
@@ -13,8 +15,8 @@ const TableStyles = theme => {
|
|
|
13
15
|
left: 0,
|
|
14
16
|
transition: "all 0.3s",
|
|
15
17
|
"& button": {
|
|
16
|
-
backgroundColor:
|
|
17
|
-
border:
|
|
18
|
+
backgroundColor: aiInputBackground,
|
|
19
|
+
border: `1px solid ${buttonBorder1}`,
|
|
18
20
|
boxShadow: "0px 0px 10px 0px rgba(0, 0, 0, 0.16)",
|
|
19
21
|
borderRadius: "50%",
|
|
20
22
|
padding: "4px",
|
|
@@ -32,6 +34,7 @@ const TableStyles = theme => {
|
|
|
32
34
|
"&.selected": {
|
|
33
35
|
outline: `1.5px solid ${activeColor || "#2563EB"}`,
|
|
34
36
|
background: signaturePopUpTabButtonSelectedBg,
|
|
37
|
+
border: "none",
|
|
35
38
|
"& svg": {
|
|
36
39
|
"& path": {
|
|
37
40
|
stroke: signaturePopUpTabButtonSelectedSvg
|
|
@@ -106,7 +106,8 @@ const Table = props => {
|
|
|
106
106
|
} = props;
|
|
107
107
|
const classes = TableStyles(editorTheme);
|
|
108
108
|
const {
|
|
109
|
-
readOnly
|
|
109
|
+
readOnly,
|
|
110
|
+
isMobile
|
|
110
111
|
} = customProps;
|
|
111
112
|
const [openSetttings, setOpenSettings] = useState(false);
|
|
112
113
|
const [exandTools, setExpandTools] = useState(null);
|
|
@@ -219,10 +220,14 @@ const Table = props => {
|
|
|
219
220
|
handleRowDragBtns();
|
|
220
221
|
};
|
|
221
222
|
const onMouseOver = () => {
|
|
222
|
-
|
|
223
|
+
if (!isMobile) {
|
|
224
|
+
containerRef?.current?.classList.remove("hideScroll");
|
|
225
|
+
}
|
|
223
226
|
};
|
|
224
227
|
const onMouseLeave = () => {
|
|
225
|
-
|
|
228
|
+
if (!isMobile) {
|
|
229
|
+
containerRef?.current?.classList.add("hideScroll");
|
|
230
|
+
}
|
|
226
231
|
};
|
|
227
232
|
const commonAddBtnProps = {
|
|
228
233
|
tableRef,
|
|
@@ -57,7 +57,8 @@ const TableCell = props => {
|
|
|
57
57
|
entireTextColor,
|
|
58
58
|
entireFontFamily,
|
|
59
59
|
entireFontWeight,
|
|
60
|
-
entireTextSize
|
|
60
|
+
entireTextSize,
|
|
61
|
+
size: elementSize
|
|
61
62
|
} = element;
|
|
62
63
|
const [parentDOM, setParentDOM] = useState(null);
|
|
63
64
|
const editor = useSlateStatic();
|
|
@@ -275,7 +276,7 @@ const TableCell = props => {
|
|
|
275
276
|
const isCellDragging = active?.id && active?.id === cellId;
|
|
276
277
|
const isRowDragging = isCellDragging && currentDraggingType === "row";
|
|
277
278
|
const isColDragging = isCellDragging && currentDraggingType === "col";
|
|
278
|
-
const width = isHeader ? size?.width || tableSize?.cellWidth : "0px";
|
|
279
|
+
const width = isHeader ? size?.width || tableSize?.cellWidth || elementSize?.width : "0px";
|
|
279
280
|
const sizeProps = {
|
|
280
281
|
minWidth: width,
|
|
281
282
|
maxWidth: width
|
|
@@ -401,6 +402,7 @@ const TableCell = props => {
|
|
|
401
402
|
color: entireTextColor || "inherit",
|
|
402
403
|
cursor: "text",
|
|
403
404
|
verticalAlign: "top",
|
|
405
|
+
padding: "0px",
|
|
404
406
|
...(sizeProps || {})
|
|
405
407
|
},
|
|
406
408
|
...tbProps,
|
|
@@ -415,7 +417,8 @@ const TableCell = props => {
|
|
|
415
417
|
tableDOM: tableDOM
|
|
416
418
|
}) : null, /*#__PURE__*/_jsx("div", {
|
|
417
419
|
style: {
|
|
418
|
-
overflow: "auto hidden"
|
|
420
|
+
overflow: "auto hidden",
|
|
421
|
+
padding: "8px"
|
|
419
422
|
},
|
|
420
423
|
children: children
|
|
421
424
|
}), isHeader && !readOnly && tableSize?.height && !showTool ? /*#__PURE__*/_jsx(Resizer, {
|
|
@@ -77,6 +77,7 @@ const TopBanner = props => {
|
|
|
77
77
|
theme
|
|
78
78
|
} = useEditorContext();
|
|
79
79
|
const classes = TopBannerStyles(theme);
|
|
80
|
+
const renderHeaderAboveBanner = customProps?.metadata?.renderHeader ? customProps.metadata.renderHeader() : null;
|
|
80
81
|
return /*#__PURE__*/_jsxs(Box, {
|
|
81
82
|
component: "div",
|
|
82
83
|
...attributes,
|
|
@@ -87,7 +88,7 @@ const TopBanner = props => {
|
|
|
87
88
|
},
|
|
88
89
|
contentEditable: false,
|
|
89
90
|
sx: classes.root,
|
|
90
|
-
children: [/*#__PURE__*/_jsx("img", {
|
|
91
|
+
children: [renderHeaderAboveBanner, /*#__PURE__*/_jsx("img", {
|
|
91
92
|
src: url,
|
|
92
93
|
alt: "Top Banner",
|
|
93
94
|
className: "top-banner-wrpr-ele",
|
|
@@ -62,13 +62,12 @@ const PopupTool = props => {
|
|
|
62
62
|
|
|
63
63
|
if (userStoppedSelection && anchorEl && !open) {
|
|
64
64
|
// for table cell selection
|
|
65
|
-
// const isCellsSelected = table.isCellSelected(editor.selection);
|
|
66
|
-
// if (!isCellsSelected) {
|
|
67
|
-
// }
|
|
68
65
|
const isCarouselEdit = isCarouselSelected(editor);
|
|
66
|
+
// const isCellsSelected = table.isCellSelected(editor.selection) || isCarouselEdit;
|
|
69
67
|
if (isCarouselEdit) {
|
|
70
68
|
Transforms.deselect(editor);
|
|
71
|
-
}
|
|
69
|
+
}
|
|
70
|
+
if (!isCarouselEdit) {
|
|
72
71
|
setOpen(true);
|
|
73
72
|
setPopupType("textFormat");
|
|
74
73
|
setIsTextSelected(true);
|
|
@@ -12,6 +12,7 @@ import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
|
|
|
12
12
|
import EmailRoundedIcon from "@mui/icons-material/EmailRounded";
|
|
13
13
|
import InfoOutlinedIcon from "@mui/icons-material/InfoOutlined";
|
|
14
14
|
import GridOnIcon from "@mui/icons-material/GridOn";
|
|
15
|
+
import GppBadOutlinedIcon from "@mui/icons-material/GppBadOutlined";
|
|
15
16
|
import { AccordionTextFormatIcon, BoldTextFormatIcon, BulletedListTextFormatIcon, ButtonElementIcon, CarouselElementIcon, CheckListTextFormatIcon, ColorBoxElementIcon, DividerElementIcon, DocUploadElementIcon, EmbedElementIcon, EmojiElementIcon, FormElementIcon, GridElementIcon, H1, H2, H3, ImageElementIcon, ItalicTextFormatIcon, LinkIconV2, OrderedListTextFormatIcon, SignatureElementIcon, TableElementIcon, TopBannerElementIcon, UnderlineTextFormatIcon, VideoElementIcon, CalendlyIcon, LeftAlignTextFormat, CenterAlignTextFormat, RightAlignTextFormat, JustifyTextFormat, FreeGridElement, AppHeaderElement, CodeElementIcon } from "./iconListV2";
|
|
16
17
|
import MoreVertRoundedIcon from "@mui/icons-material/MoreVertRounded";
|
|
17
18
|
import SettingsIcon from "../assets/svg/SettingsIcon";
|
|
@@ -280,7 +281,8 @@ const iconList = {
|
|
|
280
281
|
deleteIcon: /*#__PURE__*/_jsx(DeleteIcon, {}),
|
|
281
282
|
brain: /*#__PURE__*/_jsx(BrainIcon, {}),
|
|
282
283
|
docsIcon: /*#__PURE__*/_jsx(DocsIcon, {}),
|
|
283
|
-
userIcon: /*#__PURE__*/_jsx(UserIcon, {})
|
|
284
|
+
userIcon: /*#__PURE__*/_jsx(UserIcon, {}),
|
|
285
|
+
shieldNoAccess: /*#__PURE__*/_jsx(GppBadOutlinedIcon, {})
|
|
284
286
|
};
|
|
285
287
|
export const icons = {
|
|
286
288
|
...iconList
|
|
@@ -141,7 +141,11 @@ const VirtualElement = props => {
|
|
|
141
141
|
sx: classes.root,
|
|
142
142
|
dangerouslySetInnerHTML: {
|
|
143
143
|
__html: getItems()
|
|
144
|
-
}
|
|
144
|
+
},
|
|
145
|
+
style: {
|
|
146
|
+
visibility: "hidden"
|
|
147
|
+
},
|
|
148
|
+
"aria-hidden": "true"
|
|
145
149
|
});
|
|
146
150
|
};
|
|
147
151
|
export default VirtualElement;
|
|
@@ -249,6 +249,15 @@ const useCommonStyle = theme => ({
|
|
|
249
249
|
border: `1px solid transparent !important`
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
+
},
|
|
253
|
+
buttonMoreOption: {
|
|
254
|
+
background: `${theme?.palette?.editor?.aiInputBackground} !important`,
|
|
255
|
+
border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
|
|
256
|
+
'& svg': {
|
|
257
|
+
'& path': {
|
|
258
|
+
stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
|
259
|
+
}
|
|
260
|
+
}
|
|
252
261
|
}
|
|
253
262
|
});
|
|
254
263
|
export default useCommonStyle;
|