@flozy/editor 5.2.0 → 5.2.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/Elements/AI/Styles.js +1 -1
- 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/Grid/GridItem.js +21 -18
- package/dist/Editor/Elements/SimpleText/style.js +6 -1
- package/dist/Editor/Elements/Table/Styles.js +6 -3
- package/dist/Editor/Elements/Table/TableCell.js +3 -2
- package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/index.js +3 -4
- package/dist/Editor/commonStyle.js +9 -0
- package/package.json +1 -1
@@ -115,7 +115,7 @@ const Styles = theme => ({
|
|
115
115
|
overflow: "auto",
|
116
116
|
// width: "240px",
|
117
117
|
minWidth: "200px",
|
118
|
-
border: `1px solid${theme?.palette?.editor?.popUpBorderColor}`,
|
118
|
+
border: `1px solid ${theme?.palette?.editor?.popUpBorderColor}`,
|
119
119
|
padding: "6px"
|
120
120
|
},
|
121
121
|
optionWrapper: {
|
@@ -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
|
}
|
@@ -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
|
@@ -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
|
@@ -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);
|
@@ -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;
|