@flozy/editor 5.4.6 → 5.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +7 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +22 -5
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +21 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +2 -1
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +7 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +9 -4
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -1
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +7 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +43 -11
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +17 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +20 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +8 -1
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +27 -4
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +5 -2
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +3 -3
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +20 -8
- package/dist/Editor/Elements/DataView/styles.js +10 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +1 -1
- package/dist/Editor/assets/svg/ChervDown.js +18 -0
- package/dist/Editor/assets/svg/ChervUp.js +18 -0
- package/dist/Editor/assets/svg/PlusIcon.js +2 -2
- package/dist/Editor/common/Icon.js +5 -1
- package/dist/Editor/common/iconslist.js +2 -2
- package/dist/Editor/helper/deserialize/index.js +2 -1
- package/dist/Editor/plugins/withHTML.js +38 -11
- package/package.json +1 -1
@@ -1,8 +1,8 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { Box, Checkbox, Popper, useTheme } from "@mui/material";
|
3
|
-
import CheckBoxTwoToneIcon from "@mui/icons-material/CheckBoxTwoTone";
|
4
3
|
import DataTypes from "./DataTypes";
|
5
4
|
import useColumnStyles from "./colStyles";
|
5
|
+
import Icon from "../../../common/Icon";
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
8
|
const ColumnView = props => {
|
@@ -70,7 +70,12 @@ const ColumnView = props => {
|
|
70
70
|
mr: 0
|
71
71
|
},
|
72
72
|
checked: selected,
|
73
|
-
|
73
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
74
|
+
icon: "uncheckedIcon"
|
75
|
+
}),
|
76
|
+
checkedIcon: /*#__PURE__*/_jsx(Icon, {
|
77
|
+
icon: "checkedIcon"
|
78
|
+
})
|
74
79
|
})
|
75
80
|
}, popperRefresh) : null]
|
76
81
|
});
|
@@ -4,6 +4,7 @@ import Autocomplete from "@mui/material/Autocomplete";
|
|
4
4
|
import { Avatar, Box, Chip, useTheme } from "@mui/material";
|
5
5
|
import { useEditorContext } from "../../../../../hooks/useMouseMove";
|
6
6
|
import useCompStyles from "./styles";
|
7
|
+
import { CloseIcon } from "../../../../../common/iconslist";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
const AvatarIcon = props => {
|
9
10
|
const {
|
@@ -102,6 +103,14 @@ export default function Select(props) {
|
|
102
103
|
renderTags: (value, getTagProps) => {
|
103
104
|
return /*#__PURE__*/_jsx(Box, {
|
104
105
|
className: "tv-ms-tag-wrpr",
|
106
|
+
sx: {
|
107
|
+
'& svg': {
|
108
|
+
marginRight: '5px',
|
109
|
+
'& path': {
|
110
|
+
stroke: "#000"
|
111
|
+
}
|
112
|
+
}
|
113
|
+
},
|
105
114
|
children: value?.map((option, index) => {
|
106
115
|
const {
|
107
116
|
key,
|
@@ -114,13 +123,17 @@ export default function Select(props) {
|
|
114
123
|
label: option?.label || option?.value,
|
115
124
|
...tagProps,
|
116
125
|
sx: {
|
117
|
-
background: option?.color ||
|
118
|
-
border: "none"
|
126
|
+
background: option?.color || appTheme?.palette?.editor?.tv_border1,
|
127
|
+
border: "none",
|
128
|
+
'& .MuiChip-label': {
|
129
|
+
paddingLeft: '12px !important'
|
130
|
+
}
|
119
131
|
},
|
120
132
|
avatar: /*#__PURE__*/_jsx(AvatarIcon, {
|
121
133
|
option: option,
|
122
134
|
avatar: optionAvatar
|
123
|
-
})
|
135
|
+
}),
|
136
|
+
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {})
|
124
137
|
}, key) : null;
|
125
138
|
})
|
126
139
|
});
|
@@ -135,12 +148,16 @@ export default function Select(props) {
|
|
135
148
|
children: /*#__PURE__*/_jsx(Chip, {
|
136
149
|
label: option.label || option.value || "",
|
137
150
|
sx: {
|
138
|
-
background: option.color ||
|
151
|
+
background: option.color || appTheme?.palette?.editor?.tv_border1,
|
152
|
+
'& .MuiChip-label': {
|
153
|
+
paddingLeft: '12px !important'
|
154
|
+
}
|
139
155
|
},
|
140
156
|
avatar: /*#__PURE__*/_jsx(AvatarIcon, {
|
141
157
|
option: option,
|
142
158
|
avatar: optionAvatar
|
143
|
-
})
|
159
|
+
}),
|
160
|
+
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {})
|
144
161
|
})
|
145
162
|
}, key);
|
146
163
|
},
|
@@ -23,6 +23,27 @@ const SimpleSelect = props => {
|
|
23
23
|
IconComponent: KeyboardArrowDownRoundedIcon,
|
24
24
|
fullWidth: true,
|
25
25
|
size: "small",
|
26
|
+
sx: {
|
27
|
+
color: appTheme?.palette?.editor?.tv_text,
|
28
|
+
fontSize: '14px !important',
|
29
|
+
marginTop: '4px !important',
|
30
|
+
padding: '3px 0px !important',
|
31
|
+
background: 'transparent !important',
|
32
|
+
'& .MuiOutlinedInput-root': {
|
33
|
+
height: '34px !important',
|
34
|
+
background: 'transparent !important'
|
35
|
+
},
|
36
|
+
'& .MuiOutlinedInput-notchedOutline': {
|
37
|
+
border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder} !important`,
|
38
|
+
boxShadow: '0px 4px 18px 0px #0000000D !important',
|
39
|
+
background: 'transparent !important'
|
40
|
+
},
|
41
|
+
"&:hover .MuiOutlinedInput-notchedOutline": {
|
42
|
+
border: `1px solid ${appTheme?.palette?.editor?.inputFieldBorder} !important`,
|
43
|
+
boxShadow: '0px 4px 18px 0px #0000000D !important',
|
44
|
+
background: 'transparent !important'
|
45
|
+
}
|
46
|
+
},
|
26
47
|
MenuProps: {
|
27
48
|
PaperProps: {
|
28
49
|
sx: classes.simpleselect,
|
@@ -2,7 +2,8 @@ const useCompStyles = (theme, appTheme) => ({
|
|
2
2
|
simpleselect: {
|
3
3
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
4
4
|
background: appTheme?.palette?.editor?.tv_pop_bg,
|
5
|
-
color: appTheme?.palette?.editor?.
|
5
|
+
color: appTheme?.palette?.editor?.tv_text,
|
6
|
+
fontSize: '14px',
|
6
7
|
borderRadius: "8px",
|
7
8
|
[theme?.breakpoints?.between("xs", "md")]: {},
|
8
9
|
"& ul": {
|
@@ -55,6 +55,13 @@ const FilterSort = props => {
|
|
55
55
|
className: "tv-act-ico bg br1",
|
56
56
|
size: "small",
|
57
57
|
onClick: onClose,
|
58
|
+
sx: {
|
59
|
+
'& svg': {
|
60
|
+
'& path': {
|
61
|
+
strokeWidth: 0
|
62
|
+
}
|
63
|
+
}
|
64
|
+
},
|
58
65
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
59
66
|
})]
|
60
67
|
}), renderMode()]
|
@@ -5,7 +5,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
5
5
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
6
6
|
background: appTheme?.palette?.editor?.tv_pop_bg,
|
7
7
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
8
|
-
borderRadius: "20px",
|
8
|
+
borderRadius: "20px !important",
|
9
9
|
fontFamily: 'Inter !important',
|
10
10
|
[theme?.breakpoints?.between("xs", "md")]: {
|
11
11
|
borderRadius: "16px 16px 0px 0px",
|
@@ -87,6 +87,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
87
87
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
88
88
|
// background: appTheme?.palette?.editor?.tv_input_bg,
|
89
89
|
borderRadius: "8px",
|
90
|
+
maxHeight: '34px !important',
|
90
91
|
"& svg": {
|
91
92
|
color: appTheme?.palette?.editor?.tv_text_primary
|
92
93
|
}
|
@@ -98,11 +99,15 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
98
99
|
padding: '13px 16px 16px 20px',
|
99
100
|
"& .tv-opt-list": {
|
100
101
|
minWidth: "230px",
|
102
|
+
'& .bgic': {
|
103
|
+
background: appTheme?.palette?.editor?.tv_ico_bg,
|
104
|
+
padding: '2px',
|
105
|
+
borderRadius: '4px'
|
106
|
+
},
|
101
107
|
'& .MuiListItemIcon-root': {
|
102
108
|
'& svg': {
|
103
|
-
|
104
|
-
|
105
|
-
borderRadius: '4px',
|
109
|
+
width: '14px',
|
110
|
+
height: '14px',
|
106
111
|
'& path': {
|
107
112
|
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
108
113
|
}
|
@@ -2,7 +2,6 @@ import React, { useState } from "react";
|
|
2
2
|
import { Box, IconButton, InputBase, Menu, MenuItem } from "@mui/material";
|
3
3
|
import { useDataView } from "../Providers/DataViewProvider";
|
4
4
|
import FilterSort from "./FilterSort";
|
5
|
-
import DeleteIcon from "@mui/icons-material/Delete";
|
6
5
|
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
|
7
6
|
import Icon from "../../../common/Icon";
|
8
7
|
import { useEditorContext } from "../../../hooks/useMouseMove";
|
@@ -4,7 +4,7 @@ import { colors } from "../../../Color Picker/defaultColors";
|
|
4
4
|
import Icon from "../../../../common/Icon";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
-
const DEFAULT_COLORS = colors?.filter(f => !f.includes("linear"));
|
7
|
+
const DEFAULT_COLORS = colors?.filter(f => !(f.includes("linear") || f === "#000000"));
|
8
8
|
const AddOptions = props => {
|
9
9
|
const {
|
10
10
|
edit,
|
@@ -59,7 +59,7 @@ const AddOptions = props => {
|
|
59
59
|
setError("");
|
60
60
|
};
|
61
61
|
return edit?.type === "select" || edit?.type === "multi-select" ? /*#__PURE__*/_jsxs(Box, {
|
62
|
-
className: "fe-tv-addopt
|
62
|
+
className: "fe-tv-addopt sb mb-0",
|
63
63
|
children: [/*#__PURE__*/_jsx(List, {
|
64
64
|
className: "fe-dv-opt-list pl-0",
|
65
65
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
@@ -21,6 +21,13 @@ const AddProperty = props => {
|
|
21
21
|
className: "tv-act-ico bg br1",
|
22
22
|
size: "small",
|
23
23
|
onClick: onClose,
|
24
|
+
sx: {
|
25
|
+
'& svg': {
|
26
|
+
'& path': {
|
27
|
+
strokeWidth: 0
|
28
|
+
}
|
29
|
+
}
|
30
|
+
},
|
24
31
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
25
32
|
})]
|
26
33
|
}), /*#__PURE__*/_jsx(Box, {
|
@@ -1,9 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon } from "@mui/material";
|
2
|
+
import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon, Divider } from "@mui/material";
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import
|
5
|
-
import AddIcon from "@mui/icons-material/Add";
|
6
|
-
import { TYPE_LABELS, PROPERTY_TYPES } from "./Constants";
|
4
|
+
import { PROPERTY_TYPES, TYPE_ICONS } from "./Constants";
|
7
5
|
import { useDataView } from "../../Providers/DataViewProvider";
|
8
6
|
import Icon from "../../../../common/Icon";
|
9
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -46,6 +44,13 @@ const AllProperties = props => {
|
|
46
44
|
className: "tv-act-ico bg br1",
|
47
45
|
size: "small",
|
48
46
|
onClick: onClose,
|
47
|
+
sx: {
|
48
|
+
'& svg': {
|
49
|
+
'& path': {
|
50
|
+
strokeWidth: 0
|
51
|
+
}
|
52
|
+
}
|
53
|
+
},
|
49
54
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
50
55
|
})]
|
51
56
|
}), /*#__PURE__*/_jsx(Box, {
|
@@ -63,6 +68,12 @@ const AllProperties = props => {
|
|
63
68
|
onClick: onEditProperty(m),
|
64
69
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
65
70
|
className: "needBg",
|
71
|
+
sx: {
|
72
|
+
'& svg': {
|
73
|
+
width: '14px !important',
|
74
|
+
height: '14px !important'
|
75
|
+
}
|
76
|
+
},
|
66
77
|
children: /*#__PURE__*/_jsx(Icon, {
|
67
78
|
icon: iconType
|
68
79
|
})
|
@@ -72,7 +83,9 @@ const AllProperties = props => {
|
|
72
83
|
sx: {
|
73
84
|
justifyContent: "end"
|
74
85
|
},
|
75
|
-
children: /*#__PURE__*/_jsx(
|
86
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
87
|
+
icon: 'rightArrow'
|
88
|
+
})
|
76
89
|
})]
|
77
90
|
}, i);
|
78
91
|
})
|
@@ -85,23 +98,42 @@ const AllProperties = props => {
|
|
85
98
|
children: hiddenProperties?.map((m, i) => {
|
86
99
|
return /*#__PURE__*/_jsxs(ListItemButton, {
|
87
100
|
onClick: onEditProperty(m),
|
88
|
-
children: [/*#__PURE__*/_jsx(
|
101
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
102
|
+
className: "needBg",
|
103
|
+
sx: {
|
104
|
+
alignItems: "center",
|
105
|
+
'& svg': {
|
106
|
+
width: '14px !important',
|
107
|
+
height: '14px !important'
|
108
|
+
}
|
109
|
+
},
|
110
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
111
|
+
icon: TYPE_ICONS[m?.type]
|
112
|
+
})
|
113
|
+
}), /*#__PURE__*/_jsx(ListItemText, {
|
89
114
|
children: m?.label
|
90
|
-
}), /*#__PURE__*/
|
115
|
+
}), /*#__PURE__*/_jsx(ListItemIcon, {
|
91
116
|
sx: {
|
92
|
-
alignItems: "center"
|
117
|
+
alignItems: "center",
|
118
|
+
justifyContent: 'flex-end'
|
93
119
|
},
|
94
|
-
children:
|
120
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
121
|
+
icon: 'rightArrow'
|
122
|
+
})
|
95
123
|
})]
|
96
124
|
}, i);
|
97
125
|
})
|
98
126
|
})]
|
99
|
-
}) : null, /*#__PURE__*/_jsx(
|
127
|
+
}) : null, /*#__PURE__*/_jsx(Divider, {
|
128
|
+
className: "divider_sty"
|
129
|
+
}), /*#__PURE__*/_jsx(List, {
|
100
130
|
className: "fe-dv-opt-list",
|
101
131
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
102
132
|
onClick: onAdd,
|
103
133
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
104
|
-
children: /*#__PURE__*/_jsx(
|
134
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
135
|
+
icon: 'plusIcon'
|
136
|
+
})
|
105
137
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
106
138
|
children: "Add New Property"
|
107
139
|
})]
|
@@ -34,6 +34,16 @@ const ChangeProperty = props => {
|
|
34
34
|
className: "tv-act-ico",
|
35
35
|
size: "small",
|
36
36
|
onClick: onBack,
|
37
|
+
sx: {
|
38
|
+
paddingLeft: '0px',
|
39
|
+
'&:hover': {
|
40
|
+
background: 'transparent !important'
|
41
|
+
},
|
42
|
+
'& svg': {
|
43
|
+
width: '14px !important',
|
44
|
+
height: '14px !important'
|
45
|
+
}
|
46
|
+
},
|
37
47
|
children: /*#__PURE__*/_jsx(Icon, {
|
38
48
|
icon: 'leftArrow'
|
39
49
|
})
|
@@ -42,6 +52,13 @@ const ChangeProperty = props => {
|
|
42
52
|
className: "tv-act-ico bg br1",
|
43
53
|
size: "small",
|
44
54
|
onClick: onClose,
|
55
|
+
sx: {
|
56
|
+
'& svg': {
|
57
|
+
'& path': {
|
58
|
+
strokeWidth: 0
|
59
|
+
}
|
60
|
+
}
|
61
|
+
},
|
45
62
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
46
63
|
})]
|
47
64
|
}), /*#__PURE__*/_jsx(Box, {
|
@@ -24,8 +24,26 @@ const ColumnsList = props => {
|
|
24
24
|
className: selected?.type === m?.type ? "active" : "",
|
25
25
|
onClick: onSelect(m),
|
26
26
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
27
|
-
|
28
|
-
|
27
|
+
sx: {
|
28
|
+
background: 'none'
|
29
|
+
},
|
30
|
+
children: /*#__PURE__*/_jsx(Box, {
|
31
|
+
className: "bgic",
|
32
|
+
sx: {
|
33
|
+
marginRight: '5px',
|
34
|
+
borderRadius: '4px',
|
35
|
+
display: 'flex',
|
36
|
+
alignItems: 'center',
|
37
|
+
padding: '2px',
|
38
|
+
'& svg': {
|
39
|
+
width: '16px',
|
40
|
+
height: '16px',
|
41
|
+
padding: '0px !important'
|
42
|
+
}
|
43
|
+
},
|
44
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
45
|
+
icon: iconType
|
46
|
+
})
|
29
47
|
})
|
30
48
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
31
49
|
primary: m?.label
|
@@ -108,8 +108,15 @@ const EditOption = props => {
|
|
108
108
|
})
|
109
109
|
}), "Edit Option"]
|
110
110
|
}), /*#__PURE__*/_jsx(IconButton, {
|
111
|
-
className: "tv-act-ico bg",
|
111
|
+
className: "tv-act-ico bg br1",
|
112
112
|
size: "small",
|
113
|
+
sx: {
|
114
|
+
'& svg': {
|
115
|
+
'& path': {
|
116
|
+
strokeWidth: 0
|
117
|
+
}
|
118
|
+
}
|
119
|
+
},
|
113
120
|
onClick: onClose,
|
114
121
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
115
122
|
})]
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
|
-
import { Box, IconButton, TextField, List, ListItemButton, ListItemText, ListItemIcon, FormControlLabel } from "@mui/material";
|
3
|
-
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
|
2
|
+
import { Box, IconButton, TextField, List, ListItemButton, ListItemText, ListItemIcon, FormControlLabel, Divider } from "@mui/material";
|
5
3
|
import { TYPE_ICONS, TYPE_LABELS } from "./Constants";
|
6
4
|
import AddOptions from "./AddOptions";
|
7
5
|
import FilterProperty from "./FilterProperty";
|
8
6
|
import Icon from "../../../../common/Icon";
|
7
|
+
import CloseIcon from "@mui/icons-material/Close";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
10
|
const EditProperty = props => {
|
@@ -108,12 +107,31 @@ const EditProperty = props => {
|
|
108
107
|
className: "tv-act-ico",
|
109
108
|
size: "small",
|
110
109
|
onClick: onBack,
|
111
|
-
|
110
|
+
sx: {
|
111
|
+
paddingLeft: '0px',
|
112
|
+
'&:hover': {
|
113
|
+
background: 'transparent !important'
|
114
|
+
},
|
115
|
+
'& svg': {
|
116
|
+
width: '14px !important',
|
117
|
+
height: '14px !important'
|
118
|
+
}
|
119
|
+
},
|
120
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
121
|
+
icon: 'leftArrow'
|
122
|
+
})
|
112
123
|
}), "Edit Property"]
|
113
124
|
}), /*#__PURE__*/_jsx(IconButton, {
|
114
125
|
className: "tv-act-ico bg br1",
|
115
126
|
size: "small",
|
116
127
|
onClick: onClose,
|
128
|
+
sx: {
|
129
|
+
'& svg': {
|
130
|
+
'& path': {
|
131
|
+
strokeWidth: 0
|
132
|
+
}
|
133
|
+
}
|
134
|
+
},
|
117
135
|
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
118
136
|
})]
|
119
137
|
}), /*#__PURE__*/_jsxs(Box, {
|
@@ -136,6 +154,9 @@ const EditProperty = props => {
|
|
136
154
|
}), /*#__PURE__*/_jsx(List, {
|
137
155
|
className: "fe-dv-opt-list st",
|
138
156
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
157
|
+
sx: {
|
158
|
+
paddingBottom: '12px'
|
159
|
+
},
|
139
160
|
onClick: onChangeProperty,
|
140
161
|
children: [/*#__PURE__*/_jsx(ListItemText, {
|
141
162
|
children: "Type"
|
@@ -168,6 +189,8 @@ const EditProperty = props => {
|
|
168
189
|
})]
|
169
190
|
})]
|
170
191
|
})
|
192
|
+
}), /*#__PURE__*/_jsx(Divider, {
|
193
|
+
className: "divider_sty"
|
171
194
|
}), /*#__PURE__*/_jsx(AddOptions, {
|
172
195
|
edit: edit,
|
173
196
|
onUpdate: onUpdate,
|
@@ -3,7 +3,7 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
3
3
|
"& .MuiPaper-root": {
|
4
4
|
boxShadow: "0px 4px 10px 0px rgba(0, 0, 0, 0.16)",
|
5
5
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
6
|
-
borderRadius: "20px",
|
6
|
+
borderRadius: "20px !important",
|
7
7
|
background: appTheme?.palette?.editor?.tv_pop_bg,
|
8
8
|
fontFamily: 'Inter !important',
|
9
9
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
@@ -68,7 +68,7 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
68
68
|
},
|
69
69
|
color: `${appTheme?.palette?.editor?.tv_text} !important`,
|
70
70
|
"& svg": {
|
71
|
-
width: "16px",
|
71
|
+
// width: "16px",
|
72
72
|
'& path': {
|
73
73
|
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
74
74
|
}
|
@@ -154,6 +154,9 @@ const useOptionsStyles = (theme, appTheme) => ({
|
|
154
154
|
addProperty: {
|
155
155
|
padding: "12px",
|
156
156
|
width: "253px",
|
157
|
+
"& .divider_sty": {
|
158
|
+
borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`
|
159
|
+
},
|
157
160
|
"& .fe-dv-ap-title": {
|
158
161
|
display: "flex",
|
159
162
|
fontWeight: "600",
|
@@ -57,11 +57,11 @@ const useTableStyles = (theme, appTheme) => ({
|
|
57
57
|
}
|
58
58
|
},
|
59
59
|
"&:hover": {
|
60
|
-
color:
|
60
|
+
color: appTheme?.palette?.editor?.tv_hover_text,
|
61
61
|
"& svg": {
|
62
|
-
color:
|
62
|
+
color: appTheme?.palette?.editor?.tv_hover_text,
|
63
63
|
'& path': {
|
64
|
-
stroke:
|
64
|
+
stroke: appTheme?.palette?.editor?.tv_hover_text
|
65
65
|
}
|
66
66
|
}
|
67
67
|
}
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Box, Button, useTheme } from "@mui/material";
|
3
|
-
import KeyboardArrowUpIcon from "@mui/icons-material/KeyboardArrowUp";
|
4
|
-
import KeyboardArrowDownIcon from "@mui/icons-material/KeyboardArrowDown";
|
5
3
|
import { useDataView } from "../Providers/DataViewProvider";
|
6
4
|
import PropertySettings from "./Options";
|
7
5
|
import { PROPERTY_TYPES } from "./Options/Constants";
|
@@ -16,14 +14,28 @@ const SortIcon = props => {
|
|
16
14
|
const {
|
17
15
|
sortBy
|
18
16
|
} = props;
|
19
|
-
return sortBy ? sortBy === "asc" ? /*#__PURE__*/_jsx(
|
17
|
+
return sortBy ? sortBy === "asc" ? /*#__PURE__*/_jsx(Box, {
|
20
18
|
sx: {
|
21
|
-
|
22
|
-
|
23
|
-
|
19
|
+
'& svg': {
|
20
|
+
'& path': {
|
21
|
+
stroke: "rgba(37, 99, 235, 1) !important"
|
22
|
+
}
|
23
|
+
}
|
24
|
+
},
|
25
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
26
|
+
icon: 'chervUp'
|
27
|
+
})
|
28
|
+
}) : /*#__PURE__*/_jsx(Box, {
|
24
29
|
sx: {
|
25
|
-
|
26
|
-
|
30
|
+
'& svg': {
|
31
|
+
'& path': {
|
32
|
+
stroke: "rgba(37, 99, 235, 1) !important"
|
33
|
+
}
|
34
|
+
}
|
35
|
+
},
|
36
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
37
|
+
icon: 'chervDown'
|
38
|
+
})
|
27
39
|
}) : null;
|
28
40
|
};
|
29
41
|
const TableView = props => {
|
@@ -47,11 +47,19 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
47
47
|
},
|
48
48
|
"& .tv-ck-box": {
|
49
49
|
"& svg": {
|
50
|
-
color: appTheme?.palette?.editor?.tv_border
|
50
|
+
color: appTheme?.palette?.editor?.tv_border,
|
51
|
+
'& rect': {
|
52
|
+
fill: appTheme?.palette?.editor?.tv_chk_box_fill,
|
53
|
+
stroke: appTheme?.palette?.editor?.tv_chk_box_stroke
|
54
|
+
}
|
51
55
|
},
|
52
56
|
"&.Mui-checked": {
|
53
57
|
"& svg": {
|
54
|
-
color: "rgba(37, 99, 235, 1)"
|
58
|
+
color: "rgba(37, 99, 235, 1)",
|
59
|
+
'& rect': {
|
60
|
+
fill: appTheme?.palette?.editor?.activeColor,
|
61
|
+
stroke: 'none'
|
62
|
+
}
|
55
63
|
}
|
56
64
|
}
|
57
65
|
}
|
@@ -939,7 +939,7 @@ const usePopupStyle = theme => ({
|
|
939
939
|
},
|
940
940
|
colorPopper: {
|
941
941
|
"& .MuiPaper-root": {
|
942
|
-
backgroundColor: theme?.palette?.editor?.
|
942
|
+
backgroundColor: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
|
943
943
|
borderRadius: "7px !important",
|
944
944
|
"@media only screen and (max-width: 600px)": {
|
945
945
|
marginTop: "-40px"
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
const ChervDown = () => {
|
3
|
+
return /*#__PURE__*/_jsx("svg", {
|
4
|
+
width: "14",
|
5
|
+
height: "14",
|
6
|
+
viewBox: "0 0 9 6",
|
7
|
+
fill: "none",
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9
|
+
children: /*#__PURE__*/_jsx("path", {
|
10
|
+
d: "M1 1.2002L4.5 4.49731L8 1.2002",
|
11
|
+
stroke: "#2563EB",
|
12
|
+
strokeWidth: "1.2",
|
13
|
+
strokeLinecap: "round",
|
14
|
+
strokeLinejoin: "round"
|
15
|
+
})
|
16
|
+
});
|
17
|
+
};
|
18
|
+
export default ChervDown;
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
+
const ChervUp = () => {
|
3
|
+
return /*#__PURE__*/_jsx("svg", {
|
4
|
+
width: "14",
|
5
|
+
height: "14",
|
6
|
+
viewBox: "0 0 9 6",
|
7
|
+
fill: "none",
|
8
|
+
xmlns: "http://www.w3.org/2000/svg",
|
9
|
+
children: /*#__PURE__*/_jsx("path", {
|
10
|
+
d: "M8 4.80371L4.5 1.50659L1 4.80371",
|
11
|
+
stroke: "#94A3B8",
|
12
|
+
strokeWidth: "1.2",
|
13
|
+
strokeLinecap: "round",
|
14
|
+
strokeLinejoin: "round"
|
15
|
+
})
|
16
|
+
});
|
17
|
+
};
|
18
|
+
export default ChervUp;
|
@@ -2,8 +2,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
3
|
const PlusIcon = () => {
|
4
4
|
return /*#__PURE__*/_jsxs("svg", {
|
5
|
-
width: "
|
6
|
-
height: "
|
5
|
+
width: "22",
|
6
|
+
height: "22",
|
7
7
|
viewBox: "0 0 18 18",
|
8
8
|
fill: "none",
|
9
9
|
xmlns: "http://www.w3.org/2000/svg",
|
@@ -40,6 +40,8 @@ import DuplicateIcon from "../assets/svg/DuplicateIcon";
|
|
40
40
|
import EyeIcon from "../assets/svg/EyeIcon";
|
41
41
|
import TrashIcon from "../assets/svg/TrashCanIcon";
|
42
42
|
import DataTableIcon from "../assets/svg/DataTableIcon";
|
43
|
+
import ChervDown from "../assets/svg/ChervDown";
|
44
|
+
import ChervUp from "../assets/svg/ChervUp";
|
43
45
|
import { jsx as _jsx } from "react/jsx-runtime";
|
44
46
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
45
47
|
const iconList = {
|
@@ -308,7 +310,9 @@ const iconList = {
|
|
308
310
|
arrowDown: /*#__PURE__*/_jsx(ArrowDownIcon, {}),
|
309
311
|
duplicateIcon: /*#__PURE__*/_jsx(DuplicateIcon, {}),
|
310
312
|
trashIcon: /*#__PURE__*/_jsx(TrashIcon, {}),
|
311
|
-
dataTable: /*#__PURE__*/_jsx(DataTableIcon, {})
|
313
|
+
dataTable: /*#__PURE__*/_jsx(DataTableIcon, {}),
|
314
|
+
chervUp: /*#__PURE__*/_jsx(ChervUp, {}),
|
315
|
+
chervDown: /*#__PURE__*/_jsx(ChervDown, {})
|
312
316
|
};
|
313
317
|
export const icons = {
|
314
318
|
...iconList
|
@@ -1581,10 +1581,10 @@ export const CheckListButtonActive = () => /*#__PURE__*/_jsxs("svg", {
|
|
1581
1581
|
id: "Gradient1",
|
1582
1582
|
children: [/*#__PURE__*/_jsx("stop", {
|
1583
1583
|
offset: "0%",
|
1584
|
-
stopColor: "#
|
1584
|
+
stopColor: "#8361FD"
|
1585
1585
|
}), /*#__PURE__*/_jsx("stop", {
|
1586
1586
|
offset: "50%",
|
1587
|
-
stopColor: "#
|
1587
|
+
stopColor: "#2F63ED"
|
1588
1588
|
})]
|
1589
1589
|
})
|
1590
1590
|
}), /*#__PURE__*/_jsx("rect", {
|
@@ -160,10 +160,11 @@ const TEXT_TAGS = {
|
|
160
160
|
|
161
161
|
const deserialize = el => {
|
162
162
|
if (el.nodeType === 3) {
|
163
|
+
// if there is any line-breaks
|
163
164
|
const match = /\r|\n/.exec(el.textContent);
|
164
165
|
const text = el.textContent.replace(/\r|\n/g, "").trim();
|
165
166
|
return match && !text ? null : {
|
166
|
-
text
|
167
|
+
text,
|
167
168
|
...getInlineTextStyles(el.parentNode)
|
168
169
|
};
|
169
170
|
} else if (el.nodeType !== 1) {
|
@@ -4,6 +4,43 @@ import { decodeAndParseBase64 } from "../utils/helper";
|
|
4
4
|
const avoidDefaultInsert = ["table", "grid"];
|
5
5
|
const NON_TEXT_TAGS = ["ol", "ul", "img", "table", "video", "a", "button", "GOOGLE-SHEETS-HTML-ORIGIN"];
|
6
6
|
const ALLOWED_TEXT_NODES = ["paragraph", "title", "headingOne", "headingTwo", "headingThree"];
|
7
|
+
const parseCopiedHTML = html => {
|
8
|
+
const parsed = new DOMParser().parseFromString(html, "text/html");
|
9
|
+
|
10
|
+
// if ol, ul are inside li, remove and push ol,ul after that li to maintain format between our slate list and external source list's json
|
11
|
+
parsed.querySelectorAll("li > ul, li > ol").forEach(list => {
|
12
|
+
// Find the parent li
|
13
|
+
const parentLi = list.parentElement;
|
14
|
+
|
15
|
+
// Move the list after the parent li
|
16
|
+
parentLi.after(list);
|
17
|
+
});
|
18
|
+
|
19
|
+
// to handle google docs list
|
20
|
+
parsed.querySelectorAll("li p, li div").forEach(element => {
|
21
|
+
const parent = element.parentNode;
|
22
|
+
// Move all child nodes of <p> or <div> to its parent <li>
|
23
|
+
while (element.firstChild) {
|
24
|
+
parent.insertBefore(element.firstChild, element);
|
25
|
+
}
|
26
|
+
// Remove the <p> or <div> element
|
27
|
+
parent.removeChild(element);
|
28
|
+
});
|
29
|
+
|
30
|
+
// claude.ai, copy list inbetween, some li tags are not wrapped with ul or ol
|
31
|
+
parsed.querySelectorAll("li").forEach(li => {
|
32
|
+
// Check if the parent of <li> is not a <ul> or <ol>
|
33
|
+
if (!li.parentElement || li.parentElement.tagName !== "UL" && li.parentElement.tagName !== "OL") {
|
34
|
+
// Create a <ul> element
|
35
|
+
const ul = document.createElement("ul");
|
36
|
+
// Append the <li> to the <ul>
|
37
|
+
ul.appendChild(li.cloneNode(true)); // Clone the <li>
|
38
|
+
// Replace the original <li> in the DOM with the <ul>
|
39
|
+
li.replaceWith(ul);
|
40
|
+
}
|
41
|
+
});
|
42
|
+
return parsed;
|
43
|
+
};
|
7
44
|
const loopChildren = (children = [], defaultInsert) => {
|
8
45
|
if (!children?.length) {
|
9
46
|
return defaultInsert;
|
@@ -193,18 +230,8 @@ const withHtml = editor => {
|
|
193
230
|
insertData(data);
|
194
231
|
}
|
195
232
|
} else if (html) {
|
196
|
-
const parsed =
|
197
|
-
|
198
|
-
// if ol, ul are inside li, remove and push ol,ul after that li to maintain format between our slate list and external source list's json
|
199
|
-
parsed.querySelectorAll("li > ul, li > ol").forEach(list => {
|
200
|
-
// Find the parent li
|
201
|
-
const parentLi = list.parentElement;
|
202
|
-
|
203
|
-
// Move the list after the parent li
|
204
|
-
parentLi.after(list);
|
205
|
-
});
|
233
|
+
const parsed = parseCopiedHTML(html);
|
206
234
|
const rootElement = parsed.body;
|
207
|
-
console.log("rootElement", rootElement);
|
208
235
|
const isNonText = rootElement ? rootElement?.querySelector(NON_TEXT_TAGS.toString()) : false;
|
209
236
|
const isGoogleSheet = parsed.body.querySelector("google-sheets-html-origin");
|
210
237
|
if (isGoogleSheet) {
|