@flozy/editor 5.4.4 → 5.4.6
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/CustomSelect.js +1 -2
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -3
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +15 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +2 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +2 -1
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +17 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +38 -11
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +55 -15
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +7 -7
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +5 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +5 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +21 -21
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +7 -4
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +49 -21
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +51 -16
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +22 -3
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +19 -5
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +5 -0
- package/dist/Editor/Elements/DataView/styles.js +10 -3
- package/dist/Editor/Elements/Table/Styles.js +7 -0
- package/dist/Editor/Elements/Table/Table.js +10 -5
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +5 -2
- package/dist/Editor/Toolbar/Mini/Styles.js +5 -0
- package/dist/Editor/assets/svg/ArrowDownIcon.js +25 -0
- package/dist/Editor/assets/svg/ArrowUpIcon.js +25 -0
- package/dist/Editor/assets/svg/CalenderIconTick.js +64 -0
- package/dist/Editor/assets/svg/DataTableIcon.js +50 -0
- package/dist/Editor/assets/svg/DuplicateIcon.js +23 -0
- package/dist/Editor/assets/svg/EyeIcon.js +23 -0
- package/dist/Editor/assets/svg/EyeSlash.js +43 -0
- package/dist/Editor/assets/svg/HashtagIcon.js +33 -0
- package/dist/Editor/assets/svg/PlusIcon.js +23 -0
- package/dist/Editor/assets/svg/SelectRoundedIcon.js +24 -0
- package/dist/Editor/assets/svg/SortByIcon.js +33 -0
- package/dist/Editor/assets/svg/TickOutlined.js +23 -0
- package/dist/Editor/assets/svg/TrashCanIcon.js +38 -0
- package/dist/Editor/common/Icon.js +30 -4
- package/dist/Editor/common/RnD/index.js +2 -2
- package/dist/Editor/common/Shorthands/elements.js +1 -1
- package/dist/Editor/common/iconListV2.js +47 -79
- package/dist/Editor/helper/deserialize/index.js +28 -1
- package/dist/Editor/hooks/useBreakpoints.js +1 -1
- package/dist/Editor/plugins/withHTML.js +14 -4
- package/package.json +1 -1
@@ -11,11 +11,10 @@ function CustomSelect({
|
|
11
11
|
show,
|
12
12
|
btnProps = {}
|
13
13
|
}) {
|
14
|
-
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
15
14
|
if (show) {
|
16
15
|
return /*#__PURE__*/_jsx(Box, {
|
17
16
|
component: "div",
|
18
|
-
sx:
|
17
|
+
sx: classes.customSelectContainer,
|
19
18
|
className: "customSelectContainer",
|
20
19
|
children: options?.map((groupOption, index) => {
|
21
20
|
const {
|
@@ -62,7 +62,7 @@ const getNextLine = editor => {
|
|
62
62
|
} = editor;
|
63
63
|
const {
|
64
64
|
focus
|
65
|
-
} = selection;
|
65
|
+
} = selection || {};
|
66
66
|
if (focus?.path?.length > 0) {
|
67
67
|
const {
|
68
68
|
text = ""
|
@@ -123,10 +123,10 @@ const updateAnchorEl = (setAnchorEl, editor, openAI, selectedElement) => {
|
|
123
123
|
} = editor || {};
|
124
124
|
const isHavingSelection = selection && !Range.isCollapsed(selection) && getSelectedText(editor).trim();
|
125
125
|
const caret = isHavingSelection ? getSlateDom(editor, editor.selection) : getNextLineDom(editor);
|
126
|
-
const caretPos = caret?.getBoundingClientRect();
|
126
|
+
const caretPos = caret?.getBoundingClientRect() || {};
|
127
127
|
const editorContainer = document.querySelector("#slate-wrapper-scroll-container")?.getBoundingClientRect();
|
128
128
|
const sectionEle = selectedElement?.anchorEl || document.querySelector(".ed-section-inner");
|
129
|
-
const selectedSectionRect = sectionEle?.getBoundingClientRect();
|
129
|
+
const selectedSectionRect = sectionEle?.getBoundingClientRect() || {};
|
130
130
|
const isAIInputReachTop = caretPos.height + caretPos.y <= editorContainer.y;
|
131
131
|
const yValue = isAIInputReachTop ? "-500" : caretPos.y; // -500 is to hide the AI input if the toolbar reached the top
|
132
132
|
|
@@ -19,12 +19,23 @@ const ColumnView = props => {
|
|
19
19
|
const DataType = DataTypes[property?.type] || DataTypes["text"];
|
20
20
|
const anchorRef = useRef(null);
|
21
21
|
const [anchorEl, setAnchorEl] = useState(null);
|
22
|
+
const [popperRefresh, setPopperRefresh] = useState(new Date().getTime());
|
22
23
|
const open = Boolean(anchorEl);
|
23
24
|
const classes = useColumnStyles(theme);
|
25
|
+
const parentRef = useRef(null);
|
24
26
|
useEffect(() => {
|
25
|
-
if (anchorRef?.current)
|
26
|
-
|
27
|
-
|
27
|
+
if (!anchorRef?.current) return;
|
28
|
+
setAnchorEl(anchorRef?.current);
|
29
|
+
parentRef.current = anchorRef?.current.closest(".tv-d-wrapper");
|
30
|
+
const resizeObserver = new ResizeObserver(() => {
|
31
|
+
if (parentRef?.current) {
|
32
|
+
setPopperRefresh(new Date().getTime());
|
33
|
+
}
|
34
|
+
});
|
35
|
+
resizeObserver.observe(parentRef.current);
|
36
|
+
return () => {
|
37
|
+
resizeObserver.disconnect();
|
38
|
+
};
|
28
39
|
}, [anchorRef?.current]);
|
29
40
|
const handleSelect = id => e => {
|
30
41
|
onSelect(id, e.target.checked);
|
@@ -61,7 +72,7 @@ const ColumnView = props => {
|
|
61
72
|
checked: selected,
|
62
73
|
checkedIcon: /*#__PURE__*/_jsx(CheckBoxTwoToneIcon, {})
|
63
74
|
})
|
64
|
-
}) : null]
|
75
|
+
}, popperRefresh) : null]
|
65
76
|
});
|
66
77
|
};
|
67
78
|
export default ColumnView;
|
@@ -34,7 +34,7 @@ export default function Select(props) {
|
|
34
34
|
const {
|
35
35
|
value: pValue,
|
36
36
|
onChange,
|
37
|
-
options,
|
37
|
+
options: selectOptions,
|
38
38
|
multiple = false,
|
39
39
|
limitTags = 2,
|
40
40
|
placeholder = "",
|
@@ -42,6 +42,7 @@ export default function Select(props) {
|
|
42
42
|
optionAvatar = false
|
43
43
|
} = props;
|
44
44
|
const value = Array.isArray(pValue) ? pValue : [];
|
45
|
+
const options = selectOptions?.length ? selectOptions.filter(s => s.value) : [];
|
45
46
|
return /*#__PURE__*/_jsx(Autocomplete, {
|
46
47
|
disabled: disabled,
|
47
48
|
className: "tv-ac-field",
|
@@ -2,6 +2,7 @@ import React from "react";
|
|
2
2
|
import { MenuItem, Select, useTheme } from "@mui/material";
|
3
3
|
import { useEditorContext } from "../../../../../hooks/useMouseMove";
|
4
4
|
import useCompStyles from "./styles";
|
5
|
+
import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
|
5
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
7
|
const SimpleSelect = props => {
|
7
8
|
const theme = useTheme();
|
@@ -15,11 +16,11 @@ const SimpleSelect = props => {
|
|
15
16
|
handleChange,
|
16
17
|
disabled = false
|
17
18
|
} = props;
|
18
|
-
console.log(classes);
|
19
19
|
return /*#__PURE__*/_jsx(Select, {
|
20
20
|
disabled: disabled,
|
21
21
|
value: value,
|
22
22
|
onChange: handleChange,
|
23
|
+
IconComponent: KeyboardArrowDownRoundedIcon,
|
23
24
|
fullWidth: true,
|
24
25
|
size: "small",
|
25
26
|
MenuProps: {
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Box, List, ListItem, ListItemButton, ListItemIcon, ListItemText } from "@mui/material";
|
3
3
|
import { useDataView } from "../../../Providers/DataViewProvider";
|
4
|
-
import DeleteIcon from "@mui/icons-material/Delete";
|
5
4
|
import ChooseSort from "./ChooseSort";
|
6
5
|
import ChooseField from "./ChooseField";
|
7
6
|
import ColumnsList from "../../Options/ColumnsList";
|
7
|
+
import Icon from "../../../../../common/Icon";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
10
|
const SortOptions = props => {
|
@@ -37,16 +37,19 @@ const SortOptions = props => {
|
|
37
37
|
return sort?.length > 0 ? /*#__PURE__*/_jsxs(List, {
|
38
38
|
className: "tv-opt-list",
|
39
39
|
sx: {
|
40
|
-
|
40
|
+
padding: '0px !important'
|
41
41
|
},
|
42
42
|
children: [sort?.map((m, i) => {
|
43
43
|
return /*#__PURE__*/_jsx(ListItem, {
|
44
44
|
sx: {
|
45
|
-
justifyContent: "space-between"
|
45
|
+
justifyContent: "space-between",
|
46
|
+
paddingLeft: 0,
|
47
|
+
paddingRight: 0
|
46
48
|
},
|
47
49
|
children: /*#__PURE__*/_jsxs(Box, {
|
48
50
|
sx: {
|
49
|
-
display: "flex"
|
51
|
+
display: "flex",
|
52
|
+
padding: 0
|
50
53
|
},
|
51
54
|
children: [/*#__PURE__*/_jsx(ChooseField, {
|
52
55
|
sort: m,
|
@@ -61,7 +64,16 @@ const SortOptions = props => {
|
|
61
64
|
}), /*#__PURE__*/_jsxs(ListItemButton, {
|
62
65
|
onClick: handleDelete,
|
63
66
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
64
|
-
|
67
|
+
sx: {
|
68
|
+
minWidth: '25px !important',
|
69
|
+
'& svg': {
|
70
|
+
background: 'transparent !important',
|
71
|
+
padding: '0 !important'
|
72
|
+
}
|
73
|
+
},
|
74
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
75
|
+
icon: 'trashIcon'
|
76
|
+
})
|
65
77
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
66
78
|
children: "Delete Sort"
|
67
79
|
})]
|
@@ -5,7 +5,8 @@ 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: "
|
8
|
+
borderRadius: "20px",
|
9
|
+
fontFamily: 'Inter !important',
|
9
10
|
[theme?.breakpoints?.between("xs", "md")]: {
|
10
11
|
borderRadius: "16px 16px 0px 0px",
|
11
12
|
maxHeight: "50%"
|
@@ -51,18 +52,32 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
51
52
|
background: appTheme?.palette?.editor?.tv_ico_bg
|
52
53
|
},
|
53
54
|
color: `${appTheme?.palette?.editor?.tv_text} !important`,
|
54
|
-
"& svg": {
|
55
|
-
|
55
|
+
// "& svg": {
|
56
|
+
// width: "16px",
|
57
|
+
// },
|
58
|
+
'& svg': {
|
59
|
+
width: '14px',
|
60
|
+
height: '14px',
|
61
|
+
'& path': {
|
62
|
+
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
63
|
+
}
|
56
64
|
}
|
57
65
|
},
|
58
66
|
"& .MuiTypography-root": {
|
59
|
-
fontSize: "14px"
|
67
|
+
fontSize: "14px",
|
68
|
+
fontFamily: 'Inter'
|
60
69
|
},
|
61
70
|
"&:hover": {
|
62
71
|
background: appTheme?.palette?.editor?.tv_hover_bg,
|
63
72
|
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
64
73
|
"& .MuiListItemIcon-root": {
|
65
|
-
color: `${appTheme?.palette?.editor?.tv_hover_text} !important
|
74
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
75
|
+
"& svg": {
|
76
|
+
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
77
|
+
'& path': {
|
78
|
+
stroke: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
79
|
+
}
|
80
|
+
}
|
66
81
|
}
|
67
82
|
}
|
68
83
|
}
|
@@ -70,7 +85,7 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
70
85
|
"& .tv-cf": {
|
71
86
|
"& .MuiInputBase-root": {
|
72
87
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
73
|
-
background: appTheme?.palette?.editor?.tv_input_bg,
|
88
|
+
// background: appTheme?.palette?.editor?.tv_input_bg,
|
74
89
|
borderRadius: "8px",
|
75
90
|
"& svg": {
|
76
91
|
color: appTheme?.palette?.editor?.tv_text_primary
|
@@ -80,25 +95,37 @@ const useFilterSortStyles = (theme, appTheme) => ({
|
|
80
95
|
}
|
81
96
|
},
|
82
97
|
contentWrapper: {
|
83
|
-
padding:
|
98
|
+
padding: '13px 16px 16px 20px',
|
84
99
|
"& .tv-opt-list": {
|
85
|
-
minWidth: "
|
100
|
+
minWidth: "230px",
|
101
|
+
'& .MuiListItemIcon-root': {
|
102
|
+
'& svg': {
|
103
|
+
background: appTheme?.palette?.editor?.tv_ico_bg,
|
104
|
+
padding: '6px',
|
105
|
+
borderRadius: '4px',
|
106
|
+
'& path': {
|
107
|
+
stroke: appTheme?.palette?.editor?.closeButtonSvgStroke
|
108
|
+
}
|
109
|
+
}
|
110
|
+
}
|
86
111
|
},
|
87
112
|
"& .opt-wrpr": {
|
88
|
-
padding: "8px
|
113
|
+
padding: "8px 0px 0px 0px"
|
89
114
|
},
|
90
115
|
"& .fe-dv-ap-title": {
|
91
116
|
display: "flex",
|
92
117
|
fontWeight: "bold",
|
93
|
-
padding: "8px 8px 8px 8px",
|
94
118
|
justifyContent: "space-between",
|
119
|
+
fontFamily: 'Inter',
|
95
120
|
fontSize: "14px",
|
96
121
|
alignItems: "center",
|
97
122
|
borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
98
123
|
marginBottom: "0px",
|
124
|
+
padding: "0px 0px 8px 0px",
|
99
125
|
"& span": {
|
100
126
|
display: "flex",
|
101
|
-
alignItems: "center"
|
127
|
+
alignItems: "center",
|
128
|
+
fontFamily: 'Inter'
|
102
129
|
}
|
103
130
|
}
|
104
131
|
}
|
@@ -3,10 +3,9 @@ import { Box, IconButton, InputBase, Menu, MenuItem } from "@mui/material";
|
|
3
3
|
import { useDataView } from "../Providers/DataViewProvider";
|
4
4
|
import FilterSort from "./FilterSort";
|
5
5
|
import DeleteIcon from "@mui/icons-material/Delete";
|
6
|
-
import SearchIcon from "@mui/icons-material/Search";
|
7
|
-
import SwapVertIcon from "@mui/icons-material/SwapVert";
|
8
6
|
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
|
9
|
-
import
|
7
|
+
import Icon from "../../../common/Icon";
|
8
|
+
import { useEditorContext } from "../../../hooks/useMouseMove";
|
10
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
11
|
const FilterView = props => {
|
@@ -32,6 +31,9 @@ const FilterView = props => {
|
|
32
31
|
const [toggle, setToggle] = useState(false);
|
33
32
|
const open = Boolean(anchorEl);
|
34
33
|
const openMore = Boolean(anchorMoreEl);
|
34
|
+
const {
|
35
|
+
theme
|
36
|
+
} = useEditorContext();
|
35
37
|
const handleSortClick = e => {
|
36
38
|
setAnchorEl(e?.currentTarget);
|
37
39
|
setMode({
|
@@ -99,13 +101,27 @@ const FilterView = props => {
|
|
99
101
|
}) : title || "Untitled"
|
100
102
|
}), /*#__PURE__*/_jsxs(Box, {
|
101
103
|
className: "tv-fi-wrpr",
|
104
|
+
sx: {
|
105
|
+
alignItems: 'center'
|
106
|
+
},
|
102
107
|
children: [/*#__PURE__*/_jsxs(Box, {
|
103
108
|
className: `tv-sb mr ${toggle ? "open" : ""}`,
|
109
|
+
sx: {
|
110
|
+
minHeight: '32px'
|
111
|
+
},
|
104
112
|
children: [/*#__PURE__*/_jsx(IconButton, {
|
105
113
|
type: "button",
|
114
|
+
sx: {
|
115
|
+
'& svg': {
|
116
|
+
width: '14px',
|
117
|
+
height: '14px'
|
118
|
+
}
|
119
|
+
},
|
106
120
|
"aria-label": "search",
|
107
121
|
onClick: toggleSearch,
|
108
|
-
children: /*#__PURE__*/_jsx(
|
122
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
123
|
+
icon: "SearchIcon"
|
124
|
+
})
|
109
125
|
}), /*#__PURE__*/_jsx(InputBase, {
|
110
126
|
sx: {
|
111
127
|
paddingBottom: "0px"
|
@@ -119,9 +135,16 @@ const FilterView = props => {
|
|
119
135
|
onChange: onSearch
|
120
136
|
})]
|
121
137
|
}), /*#__PURE__*/_jsx(IconButton, {
|
122
|
-
className: `
|
138
|
+
className: ` ${sort?.length > 0 ? "active" : ""}`,
|
123
139
|
onClick: handleSortClick,
|
124
|
-
|
140
|
+
sx: {
|
141
|
+
'& svg': {
|
142
|
+
strokeWidth: 1.2
|
143
|
+
}
|
144
|
+
},
|
145
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
146
|
+
icon: 'sortBy'
|
147
|
+
})
|
125
148
|
}), /*#__PURE__*/_jsx(FilterSort, {
|
126
149
|
open: open,
|
127
150
|
anchorEl: anchorEl,
|
@@ -129,12 +152,19 @@ const FilterView = props => {
|
|
129
152
|
onClose: onClose
|
130
153
|
}), !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
131
154
|
className: "mr",
|
155
|
+
sx: {
|
156
|
+
'& svg': {
|
157
|
+
fill: theme?.palette?.editor?.tv_stroke
|
158
|
+
}
|
159
|
+
},
|
132
160
|
onClick: handleMoreClick,
|
133
161
|
children: /*#__PURE__*/_jsx(MoreHorizIcon, {})
|
134
162
|
}) : null, selectedRows?.length > 0 && !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
135
163
|
className: "mr",
|
136
164
|
onClick: handleDeleteRow,
|
137
|
-
children: /*#__PURE__*/_jsx(
|
165
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
166
|
+
icon: 'trashIcon'
|
167
|
+
})
|
138
168
|
}) : null, !readOnly ? /*#__PURE__*/_jsxs(Menu, {
|
139
169
|
sx: classes.basicMenu,
|
140
170
|
className: "tv-basic-menu",
|
@@ -154,18 +184,28 @@ const FilterView = props => {
|
|
154
184
|
},
|
155
185
|
children: [/*#__PURE__*/_jsxs(MenuItem, {
|
156
186
|
onClick: onMenuClick("Duplicate"),
|
157
|
-
children: [" ", /*#__PURE__*/_jsx(
|
187
|
+
children: [" ", /*#__PURE__*/_jsx(Box, {
|
158
188
|
sx: {
|
159
|
-
|
160
|
-
|
161
|
-
|
189
|
+
marginRight: '5px',
|
190
|
+
display: ' flex',
|
191
|
+
alignItems: 'center'
|
192
|
+
},
|
193
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
194
|
+
icon: 'duplicateIcon'
|
195
|
+
})
|
196
|
+
}), "Duplicate"]
|
162
197
|
}), /*#__PURE__*/_jsxs(MenuItem, {
|
163
198
|
onClick: onMenuClick("Delete"),
|
164
|
-
children: [" ", /*#__PURE__*/_jsx(
|
199
|
+
children: [" ", /*#__PURE__*/_jsx(Box, {
|
165
200
|
sx: {
|
166
|
-
|
167
|
-
|
168
|
-
|
201
|
+
marginRight: '5px',
|
202
|
+
display: ' flex',
|
203
|
+
alignItems: 'center'
|
204
|
+
},
|
205
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
206
|
+
icon: 'trashIcon'
|
207
|
+
})
|
208
|
+
}), "Delete"]
|
169
209
|
})]
|
170
210
|
}) : null]
|
171
211
|
})]
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Box, List, ListItemButton, ListItemText, ListItemIcon, TextField, Chip } from "@mui/material";
|
3
|
-
import AddIcon from "@mui/icons-material/Add";
|
4
|
-
import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
5
3
|
import { colors } from "../../../Color Picker/defaultColors";
|
4
|
+
import Icon from "../../../../common/Icon";
|
6
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
7
|
const DEFAULT_COLORS = colors?.filter(f => !f.includes("linear"));
|
@@ -66,14 +65,13 @@ const AddOptions = props => {
|
|
66
65
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
67
66
|
onClick: onAddBox,
|
68
67
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
69
|
-
children: /*#__PURE__*/_jsx(
|
68
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
69
|
+
icon: 'plusIcon'
|
70
|
+
})
|
70
71
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
71
72
|
primary: "Add Options"
|
72
73
|
})]
|
73
74
|
})
|
74
|
-
}), /*#__PURE__*/_jsx(Box, {
|
75
|
-
className: "fe-dv-ap-desc",
|
76
|
-
children: "Choose an option or create one"
|
77
75
|
}), addBox ? /*#__PURE__*/_jsx(Box, {
|
78
76
|
children: /*#__PURE__*/_jsx(TextField, {
|
79
77
|
className: "mt",
|
@@ -100,7 +98,9 @@ const AddOptions = props => {
|
|
100
98
|
sx: {
|
101
99
|
justifyContent: "flex-end"
|
102
100
|
},
|
103
|
-
children: /*#__PURE__*/_jsx(
|
101
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
102
|
+
icon: 'rightArrow'
|
103
|
+
})
|
104
104
|
})]
|
105
105
|
}, i);
|
106
106
|
})
|
@@ -5,6 +5,7 @@ import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
|
5
5
|
import AddIcon from "@mui/icons-material/Add";
|
6
6
|
import { TYPE_LABELS, PROPERTY_TYPES } from "./Constants";
|
7
7
|
import { useDataView } from "../../Providers/DataViewProvider";
|
8
|
+
import Icon from "../../../../common/Icon";
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
11
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -56,13 +57,15 @@ const AllProperties = props => {
|
|
56
57
|
className: "fe-dv-opt-list",
|
57
58
|
children: shownProperties?.map((m, i) => {
|
58
59
|
const {
|
59
|
-
Icon
|
60
|
+
Icon: iconType
|
60
61
|
} = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
|
61
62
|
return /*#__PURE__*/_jsxs(ListItemButton, {
|
62
63
|
onClick: onEditProperty(m),
|
63
64
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
64
65
|
className: "needBg",
|
65
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
66
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
67
|
+
icon: iconType
|
68
|
+
})
|
66
69
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
67
70
|
children: m?.label
|
68
71
|
}), /*#__PURE__*/_jsx(ListItemIcon, {
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
2
2
|
import { Box, IconButton } from "@mui/material";
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
4
4
|
import PropertyList from "./PropertyList";
|
5
|
-
import
|
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 ChangeProperty = props => {
|
@@ -34,7 +34,9 @@ const ChangeProperty = props => {
|
|
34
34
|
className: "tv-act-ico",
|
35
35
|
size: "small",
|
36
36
|
onClick: onBack,
|
37
|
-
children: /*#__PURE__*/_jsx(
|
37
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
38
|
+
icon: 'leftArrow'
|
39
|
+
})
|
38
40
|
}), "Change Property"]
|
39
41
|
}), /*#__PURE__*/_jsx(IconButton, {
|
40
42
|
className: "tv-act-ico bg br1",
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { List, ListItemButton, ListItemIcon, ListItemText, Box } from "@mui/material";
|
3
3
|
import { PROPERTY_TYPES } from "./Constants";
|
4
|
+
import Icon from "../../../../common/Icon";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
7
|
const ColumnsList = props => {
|
@@ -17,13 +18,15 @@ const ColumnsList = props => {
|
|
17
18
|
className: "tv-opt-list",
|
18
19
|
children: properties?.map((m, i) => {
|
19
20
|
const {
|
20
|
-
Icon
|
21
|
+
Icon: iconType
|
21
22
|
} = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
|
22
23
|
return /*#__PURE__*/_jsxs(ListItemButton, {
|
23
24
|
className: selected?.type === m?.type ? "active" : "",
|
24
25
|
onClick: onSelect(m),
|
25
26
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
26
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
27
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
28
|
+
icon: iconType
|
29
|
+
})
|
27
30
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
28
31
|
primary: m?.label
|
29
32
|
})]
|
@@ -1,12 +1,3 @@
|
|
1
|
-
import NotesIcon from "@mui/icons-material/Notes";
|
2
|
-
import TagIcon from "@mui/icons-material/Tag";
|
3
|
-
import ArrowDropDownCircleIcon from "@mui/icons-material/ArrowDropDownCircle";
|
4
|
-
import ChecklistIcon from "@mui/icons-material/Checklist";
|
5
|
-
import InsertInvitationIcon from "@mui/icons-material/InsertInvitation";
|
6
|
-
import PersonIcon from "@mui/icons-material/Person";
|
7
|
-
import CheckCircleOutlineIcon from "@mui/icons-material/CheckCircleOutline";
|
8
|
-
import ArrowUpwardIcon from "@mui/icons-material/ArrowUpward";
|
9
|
-
import ArrowDownwardIcon from "@mui/icons-material/ArrowDownward";
|
10
1
|
// import FilterListIcon from "@mui/icons-material/FilterList";
|
11
2
|
|
12
3
|
export const TYPE_LABELS = {
|
@@ -18,6 +9,15 @@ export const TYPE_LABELS = {
|
|
18
9
|
person: "Person",
|
19
10
|
check: "Checkbox"
|
20
11
|
};
|
12
|
+
export const TYPE_ICONS = {
|
13
|
+
text: 'text',
|
14
|
+
number: 'hashtagIcon',
|
15
|
+
select: 'selectRounded',
|
16
|
+
"multi-select": 'check-list-item',
|
17
|
+
date: 'calenderNewIcon',
|
18
|
+
person: 'userIcon',
|
19
|
+
check: 'tickOutline'
|
20
|
+
};
|
21
21
|
export const PROPERTY_DEFAULTS = {
|
22
22
|
text: {
|
23
23
|
label: TYPE_LABELS?.text,
|
@@ -51,43 +51,43 @@ export const PROPERTY_DEFAULTS = {
|
|
51
51
|
export const PROPERTY_TYPES = [{
|
52
52
|
type: "text",
|
53
53
|
label: TYPE_LABELS.text,
|
54
|
-
Icon:
|
54
|
+
Icon: 'text'
|
55
55
|
}, {
|
56
56
|
type: "number",
|
57
57
|
label: TYPE_LABELS.number,
|
58
|
-
Icon:
|
58
|
+
Icon: 'hashtagIcon'
|
59
59
|
}, {
|
60
60
|
type: "select",
|
61
61
|
label: TYPE_LABELS.select,
|
62
|
-
Icon:
|
62
|
+
Icon: 'selectRounded'
|
63
63
|
}, {
|
64
64
|
type: "multi-select",
|
65
65
|
label: TYPE_LABELS["multi-select"],
|
66
|
-
Icon:
|
66
|
+
Icon: 'check-list-item'
|
67
67
|
}, {
|
68
68
|
type: "date",
|
69
69
|
label: TYPE_LABELS.date,
|
70
|
-
Icon:
|
71
|
-
}, {
|
72
|
-
type: "check",
|
73
|
-
label: TYPE_LABELS.check,
|
74
|
-
Icon: CheckCircleOutlineIcon
|
70
|
+
Icon: 'calenderNewIcon'
|
75
71
|
}, {
|
76
72
|
type: "person",
|
77
73
|
label: TYPE_LABELS.person,
|
78
|
-
Icon:
|
74
|
+
Icon: 'userIcon'
|
75
|
+
}, {
|
76
|
+
type: "check",
|
77
|
+
label: TYPE_LABELS.check,
|
78
|
+
Icon: 'tickOutline'
|
79
79
|
}];
|
80
80
|
export const FILTER_TYPES = [{
|
81
81
|
type: "sort",
|
82
82
|
operator: "asc",
|
83
83
|
label: "Sort Ascending",
|
84
84
|
value: "",
|
85
|
-
Icon:
|
85
|
+
Icon: 'arrowUp'
|
86
86
|
}, {
|
87
87
|
type: "sort",
|
88
88
|
operator: "desc",
|
89
89
|
label: "Sort Descending",
|
90
|
-
Icon:
|
90
|
+
Icon: 'arrowDown'
|
91
91
|
}
|
92
92
|
// {
|
93
93
|
// type: "filter",
|
@@ -1,11 +1,10 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { Box, IconButton, TextField, List, ListItemButton, ListItemIcon, ListItemText, FormControlLabel } from "@mui/material";
|
3
3
|
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
5
|
-
import DeleteIcon from "@mui/icons-material/Delete";
|
6
4
|
import ColorButtons from "../../../Color Picker/ColorButtons";
|
7
5
|
import ColorPickerStyles from "../../../Color Picker/Styles";
|
8
6
|
import { DEFAULT_OPTION_COLORS } from "./Constants";
|
7
|
+
import Icon from "../../../../common/Icon";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
10
|
const EditOption = props => {
|
@@ -104,7 +103,9 @@ const EditOption = props => {
|
|
104
103
|
className: "tv-act-ico",
|
105
104
|
size: "small",
|
106
105
|
onClick: onBack,
|
107
|
-
children: /*#__PURE__*/_jsx(
|
106
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
107
|
+
icon: 'leftArrow'
|
108
|
+
})
|
108
109
|
}), "Edit Option"]
|
109
110
|
}), /*#__PURE__*/_jsx(IconButton, {
|
110
111
|
className: "tv-act-ico bg",
|
@@ -146,7 +147,9 @@ const EditOption = props => {
|
|
146
147
|
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
147
148
|
onClick: onDeleteOption,
|
148
149
|
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
149
|
-
children: /*#__PURE__*/_jsx(
|
150
|
+
children: /*#__PURE__*/_jsx(Icon, {
|
151
|
+
icon: 'trashIcon'
|
152
|
+
})
|
150
153
|
}), /*#__PURE__*/_jsx(ListItemText, {
|
151
154
|
children: "Delete Option"
|
152
155
|
})]
|