@flozy/editor 5.1.3 → 5.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +34 -25
- package/dist/Editor/CommonEditor.js +7 -13
- package/dist/Editor/Editor.css +10 -52
- package/dist/Editor/Elements/AI/AIInput.js +1 -0
- package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
- package/dist/Editor/Elements/AI/Styles.js +1 -7
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/Form/Form.js +2 -38
- package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
- package/dist/Editor/Elements/Form/FormPopup.js +9 -12
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
- package/dist/Editor/Elements/Grid/GridButton.js +1 -2
- package/dist/Editor/Elements/Link/LinkButton.js +1 -1
- package/dist/Editor/Elements/Signature/Signature.css +1 -1
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
- package/dist/Editor/Elements/SimpleText/index.js +1 -8
- package/dist/Editor/Elements/SimpleText/style.js +1 -8
- package/dist/Editor/Elements/Table/Styles.js +43 -25
- package/dist/Editor/Elements/Table/Table.js +138 -206
- package/dist/Editor/Elements/Table/TableCell.js +102 -355
- package/dist/Editor/Elements/Table/TablePopup.js +3 -9
- package/dist/Editor/Elements/Table/TableRow.js +2 -10
- package/dist/Editor/Styles/EditorStyles.js +1 -3
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +11 -7
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
- package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +11 -16
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -416
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -62
- package/dist/Editor/Toolbar/PopupTool/index.js +6 -5
- package/dist/Editor/Toolbar/Toolbar.js +0 -6
- package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/common/ColorPickerButton.js +2 -3
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
- package/dist/Editor/common/Icon.js +23 -24
- package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
- package/dist/Editor/common/LinkSettings/index.js +1 -2
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -151
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -108
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
- package/dist/Editor/common/Shorthands/elements.js +1 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
- package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
- package/dist/Editor/common/StyleBuilder/index.js +11 -84
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
- package/dist/Editor/common/Uploader.js +0 -8
- package/dist/Editor/common/iconListV2.js +40 -378
- package/dist/Editor/common/iconslist.js +5 -8
- package/dist/Editor/commonStyle.js +9 -117
- package/dist/Editor/helper/deserialize/index.js +1 -4
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +1 -24
- package/dist/Editor/hooks/useMouseMove.js +2 -5
- package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
- package/dist/Editor/plugins/withHTML.js +1 -17
- package/dist/Editor/plugins/withLayout.js +1 -48
- package/dist/Editor/utils/SlateUtilityFunctions.js +0 -18
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -21
- package/dist/Editor/utils/embed.js +1 -2
- package/dist/Editor/utils/events.js +1 -0
- package/dist/Editor/utils/font.js +4 -11
- package/dist/Editor/utils/formfield.js +4 -8
- package/dist/Editor/utils/helper.js +1 -34
- package/dist/Editor/utils/insertNewLine.js +1 -19
- package/dist/Editor/utils/pageSettings.js +2 -14
- package/dist/Editor/utils/serializeToText.js +0 -2
- package/dist/Editor/utils/table.js +24 -228
- package/package.json +1 -1
- package/dist/Editor/Elements/DataView/DataView.js +0 -101
- package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -59
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -140
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -40
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -59
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -26
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -38
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -74
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -64
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -106
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -174
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -37
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -111
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -62
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -36
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -160
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -190
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -42
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -179
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -100
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -227
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -70
- package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -288
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -72
- package/dist/Editor/Elements/DataView/styles.js +0 -143
- package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
- package/dist/Editor/Elements/Table/DragButton.js +0 -141
- package/dist/Editor/Elements/Table/DragStyles.js +0 -69
- package/dist/Editor/Elements/Table/Draggable.js +0 -25
- package/dist/Editor/Elements/Table/Droppable.js +0 -53
- package/dist/Editor/Elements/Table/TableTool.js +0 -101
- package/dist/Editor/Elements/Table/tableHelper.js +0 -71
- package/dist/Editor/assets/svg/TableIcons.js +0 -220
- package/dist/Editor/common/Select/index.js +0 -20
- package/dist/Editor/common/Select/styles.js +0 -17
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
- package/dist/Editor/hooks/useTable.js +0 -175
- package/dist/Editor/utils/dataView.js +0 -43
@@ -1,106 +0,0 @@
|
|
1
|
-
const useFilterSortStyles = (theme, appTheme) => ({
|
2
|
-
root: {
|
3
|
-
"& .MuiPaper-root": {
|
4
|
-
boxShadow: "0px 4px 10px 0px rgba(0, 0, 0, 0.16)",
|
5
|
-
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
6
|
-
background: appTheme?.palette?.editor?.tv_pop_bg,
|
7
|
-
color: appTheme?.palette?.editor?.tv_text_primary,
|
8
|
-
borderRadius: "12px",
|
9
|
-
[theme.breakpoints.between("xs", "md")]: {
|
10
|
-
borderRadius: "16px 16px 0px 0px",
|
11
|
-
maxHeight: "50%"
|
12
|
-
},
|
13
|
-
"& .MuiSelect-select": {
|
14
|
-
padding: "4px 8px"
|
15
|
-
},
|
16
|
-
"& .ml": {
|
17
|
-
marginLeft: "8px"
|
18
|
-
},
|
19
|
-
"& .tv-act-ico": {
|
20
|
-
color: appTheme?.palette?.editor?.tv_text,
|
21
|
-
"&.br1": {
|
22
|
-
borderRadius: "6px"
|
23
|
-
},
|
24
|
-
"&.bg": {
|
25
|
-
background: appTheme?.palette?.editor?.tv_ico_bg,
|
26
|
-
"&:hover": {
|
27
|
-
background: "rgba(100, 116, 139, 0.12)"
|
28
|
-
}
|
29
|
-
},
|
30
|
-
"& svg": {
|
31
|
-
width: "16px",
|
32
|
-
height: "16px"
|
33
|
-
}
|
34
|
-
},
|
35
|
-
"& .MuiList-root": {
|
36
|
-
padding: "4px 2px",
|
37
|
-
"& .MuiListItemButton-root": {
|
38
|
-
color: appTheme?.palette?.editor?.tv_text_primary,
|
39
|
-
padding: "2px 4px",
|
40
|
-
borderRadius: "8px",
|
41
|
-
"& .MuiListItemIcon-root": {
|
42
|
-
minWidth: "38px",
|
43
|
-
"&.needBg": {
|
44
|
-
minWidth: "20px",
|
45
|
-
width: "20px",
|
46
|
-
height: "20px",
|
47
|
-
alignItems: "center",
|
48
|
-
justifyContent: "center",
|
49
|
-
borderRadius: "4px",
|
50
|
-
marginRight: "12px",
|
51
|
-
background: appTheme?.palette?.editor?.tv_ico_bg
|
52
|
-
},
|
53
|
-
color: appTheme?.palette?.editor?.tv_text_primary,
|
54
|
-
"& svg": {
|
55
|
-
width: "16px"
|
56
|
-
}
|
57
|
-
},
|
58
|
-
"& .MuiTypography-root": {
|
59
|
-
fontSize: "14px"
|
60
|
-
},
|
61
|
-
"&:hover": {
|
62
|
-
background: appTheme?.palette?.editor?.tv_hover_bg,
|
63
|
-
color: appTheme?.palette?.editor?.tv_hover_text,
|
64
|
-
"& .MuiListItemIcon-root": {
|
65
|
-
color: appTheme?.palette?.editor?.tv_hover_text
|
66
|
-
}
|
67
|
-
}
|
68
|
-
}
|
69
|
-
},
|
70
|
-
"& .tv-cf": {
|
71
|
-
"& .MuiInputBase-root": {
|
72
|
-
color: appTheme?.palette?.editor?.tv_text_primary,
|
73
|
-
background: appTheme?.palette?.editor?.tv_ico_bg,
|
74
|
-
borderRadius: "8px",
|
75
|
-
"& svg": {
|
76
|
-
color: appTheme?.palette?.editor?.tv_text_primary
|
77
|
-
}
|
78
|
-
}
|
79
|
-
}
|
80
|
-
}
|
81
|
-
},
|
82
|
-
contentWrapper: {
|
83
|
-
padding: "0px",
|
84
|
-
"& .tv-opt-list": {
|
85
|
-
minWidth: "250px"
|
86
|
-
},
|
87
|
-
"& .opt-wrpr": {
|
88
|
-
padding: "8px 8px 8px 8px"
|
89
|
-
},
|
90
|
-
"& .fe-dv-ap-title": {
|
91
|
-
display: "flex",
|
92
|
-
fontWeight: "bold",
|
93
|
-
padding: "8px 8px 8px 8px",
|
94
|
-
justifyContent: "space-between",
|
95
|
-
fontSize: "14px",
|
96
|
-
alignItems: "center",
|
97
|
-
borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
98
|
-
marginBottom: "0px",
|
99
|
-
"& span": {
|
100
|
-
display: "flex",
|
101
|
-
alignItems: "center"
|
102
|
-
}
|
103
|
-
}
|
104
|
-
}
|
105
|
-
});
|
106
|
-
export default useFilterSortStyles;
|
@@ -1,174 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
2
|
-
import { Box, IconButton, InputBase, Menu, MenuItem } from "@mui/material";
|
3
|
-
import { useDataView } from "../Providers/DataViewProvider";
|
4
|
-
import FilterSort from "./FilterSort";
|
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
|
-
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
|
9
|
-
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
10
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
11
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
-
const FilterView = props => {
|
13
|
-
const {
|
14
|
-
classes,
|
15
|
-
onDelete,
|
16
|
-
onDuplicate,
|
17
|
-
onEnter,
|
18
|
-
readOnly
|
19
|
-
} = props;
|
20
|
-
const {
|
21
|
-
sort,
|
22
|
-
selectedRows,
|
23
|
-
onDeleteRows,
|
24
|
-
search,
|
25
|
-
onSearch,
|
26
|
-
title,
|
27
|
-
setTitle
|
28
|
-
} = useDataView();
|
29
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
30
|
-
const [anchorMoreEl, setAnchorMoreEl] = useState(null);
|
31
|
-
const [mode, setMode] = useState({});
|
32
|
-
const [toggle, setToggle] = useState(false);
|
33
|
-
const open = Boolean(anchorEl);
|
34
|
-
const openMore = Boolean(anchorMoreEl);
|
35
|
-
const handleSortClick = e => {
|
36
|
-
setAnchorEl(e?.currentTarget);
|
37
|
-
setMode({
|
38
|
-
type: "sort"
|
39
|
-
});
|
40
|
-
};
|
41
|
-
const handleMoreClick = e => {
|
42
|
-
setAnchorMoreEl(e?.currentTarget);
|
43
|
-
setMode({
|
44
|
-
type: ""
|
45
|
-
});
|
46
|
-
};
|
47
|
-
const handleDeleteRow = () => {
|
48
|
-
onDeleteRows();
|
49
|
-
};
|
50
|
-
const onClose = () => {
|
51
|
-
setAnchorEl(null);
|
52
|
-
};
|
53
|
-
const toggleSearch = () => {
|
54
|
-
setToggle(!toggle);
|
55
|
-
};
|
56
|
-
const onMenuClick = menu => () => {
|
57
|
-
switch (menu) {
|
58
|
-
case "Duplicate":
|
59
|
-
onDuplicate();
|
60
|
-
break;
|
61
|
-
case "Delete":
|
62
|
-
onDelete();
|
63
|
-
break;
|
64
|
-
default:
|
65
|
-
}
|
66
|
-
};
|
67
|
-
const handleMoreClose = () => {
|
68
|
-
setAnchorMoreEl(null);
|
69
|
-
};
|
70
|
-
const handleTitleChange = e => {
|
71
|
-
setTitle(e?.target?.value);
|
72
|
-
};
|
73
|
-
const handleEnter = e => {
|
74
|
-
if (e?.key === "Enter") {
|
75
|
-
onEnter();
|
76
|
-
}
|
77
|
-
};
|
78
|
-
return /*#__PURE__*/_jsxs(Box, {
|
79
|
-
className: "fe-tv-fv",
|
80
|
-
contentEditable: false,
|
81
|
-
sx: classes.filterView,
|
82
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
83
|
-
className: "tv-title-wrpr",
|
84
|
-
children: !readOnly ? /*#__PURE__*/_jsx(InputBase, {
|
85
|
-
sx: {
|
86
|
-
paddingBottom: "0px",
|
87
|
-
fontWeight: "bold",
|
88
|
-
fontSize: "16px"
|
89
|
-
},
|
90
|
-
size: "small",
|
91
|
-
placeholder: "Untitled",
|
92
|
-
inputProps: {
|
93
|
-
"aria-label": "Table Name",
|
94
|
-
maxLength: 100
|
95
|
-
},
|
96
|
-
value: title,
|
97
|
-
onChange: handleTitleChange,
|
98
|
-
onKeyUp: handleEnter
|
99
|
-
}) : title || "Untitled"
|
100
|
-
}), /*#__PURE__*/_jsxs(Box, {
|
101
|
-
className: "tv-fi-wrpr",
|
102
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
103
|
-
className: `tv-sb mr ${toggle ? "open" : ""}`,
|
104
|
-
children: [/*#__PURE__*/_jsx(IconButton, {
|
105
|
-
type: "button",
|
106
|
-
"aria-label": "search",
|
107
|
-
onClick: toggleSearch,
|
108
|
-
children: /*#__PURE__*/_jsx(SearchIcon, {})
|
109
|
-
}), /*#__PURE__*/_jsx(InputBase, {
|
110
|
-
sx: {
|
111
|
-
paddingBottom: "0px"
|
112
|
-
},
|
113
|
-
size: "small",
|
114
|
-
placeholder: "Search in Table",
|
115
|
-
inputProps: {
|
116
|
-
"aria-label": "search google maps"
|
117
|
-
},
|
118
|
-
value: search,
|
119
|
-
onChange: onSearch
|
120
|
-
})]
|
121
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
122
|
-
className: `mr ${sort?.length > 0 ? "active" : ""}`,
|
123
|
-
onClick: handleSortClick,
|
124
|
-
children: /*#__PURE__*/_jsx(SwapVertIcon, {})
|
125
|
-
}), /*#__PURE__*/_jsx(FilterSort, {
|
126
|
-
open: open,
|
127
|
-
anchorEl: anchorEl,
|
128
|
-
mode: mode,
|
129
|
-
onClose: onClose
|
130
|
-
}), !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
131
|
-
className: "mr",
|
132
|
-
onClick: handleMoreClick,
|
133
|
-
children: /*#__PURE__*/_jsx(MoreHorizIcon, {})
|
134
|
-
}) : null, selectedRows?.length > 0 && !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
135
|
-
className: "mr",
|
136
|
-
onClick: handleDeleteRow,
|
137
|
-
children: /*#__PURE__*/_jsx(DeleteIcon, {})
|
138
|
-
}) : null, !readOnly ? /*#__PURE__*/_jsxs(Menu, {
|
139
|
-
sx: classes.basicMenu,
|
140
|
-
className: "tv-basic-menu",
|
141
|
-
anchorEl: anchorMoreEl,
|
142
|
-
open: openMore,
|
143
|
-
onClose: handleMoreClose,
|
144
|
-
MenuListProps: {
|
145
|
-
"aria-labelledby": "basic-button"
|
146
|
-
},
|
147
|
-
anchorOrigin: {
|
148
|
-
vertical: "bottom",
|
149
|
-
horizontal: "right"
|
150
|
-
},
|
151
|
-
transformOrigin: {
|
152
|
-
vertical: "top",
|
153
|
-
horizontal: "right"
|
154
|
-
},
|
155
|
-
children: [/*#__PURE__*/_jsxs(MenuItem, {
|
156
|
-
onClick: onMenuClick("Duplicate"),
|
157
|
-
children: [" ", /*#__PURE__*/_jsx(ContentCopyIcon, {
|
158
|
-
sx: {
|
159
|
-
mr: 1
|
160
|
-
}
|
161
|
-
}), " Duplicate"]
|
162
|
-
}), /*#__PURE__*/_jsxs(MenuItem, {
|
163
|
-
onClick: onMenuClick("Delete"),
|
164
|
-
children: [" ", /*#__PURE__*/_jsx(DeleteIcon, {
|
165
|
-
sx: {
|
166
|
-
mr: 1
|
167
|
-
}
|
168
|
-
}), " Delete"]
|
169
|
-
})]
|
170
|
-
}) : null]
|
171
|
-
})]
|
172
|
-
});
|
173
|
-
};
|
174
|
-
export default FilterView;
|
@@ -1,29 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
4
|
-
const RenderFormulaCell = props => {
|
5
|
-
const {
|
6
|
-
property
|
7
|
-
} = props;
|
8
|
-
return /*#__PURE__*/_jsxs("td", {
|
9
|
-
style: {
|
10
|
-
minWidth: "200px",
|
11
|
-
textAlign: "center",
|
12
|
-
color: "#CCC"
|
13
|
-
},
|
14
|
-
children: ["Calculate ", property?.key]
|
15
|
-
});
|
16
|
-
};
|
17
|
-
const Formula = props => {
|
18
|
-
const {
|
19
|
-
properties
|
20
|
-
} = props;
|
21
|
-
return /*#__PURE__*/_jsx("tr", {
|
22
|
-
children: properties?.map((m, i) => {
|
23
|
-
return /*#__PURE__*/_jsx(RenderFormulaCell, {
|
24
|
-
property: m
|
25
|
-
}, i);
|
26
|
-
})
|
27
|
-
});
|
28
|
-
};
|
29
|
-
export default Formula;
|
@@ -1,113 +0,0 @@
|
|
1
|
-
import React, { useState } from "react";
|
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
|
-
import { colors } from "../../../Color Picker/defaultColors";
|
6
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
7
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
|
-
const DEFAULT_COLORS = colors?.filter(f => !f.includes("linear"));
|
9
|
-
const AddOptions = props => {
|
10
|
-
const {
|
11
|
-
edit,
|
12
|
-
onUpdate,
|
13
|
-
onEvent
|
14
|
-
} = props;
|
15
|
-
const [addBox, setAddBox] = useState(false);
|
16
|
-
const [value, setValue] = useState("");
|
17
|
-
const [error, setError] = useState("");
|
18
|
-
const {
|
19
|
-
options
|
20
|
-
} = edit;
|
21
|
-
const onAddBox = () => {
|
22
|
-
setAddBox(!addBox);
|
23
|
-
};
|
24
|
-
const getRandomColor = () => {
|
25
|
-
const randomIndex = Math.floor(Math.random() * DEFAULT_COLORS.length);
|
26
|
-
return DEFAULT_COLORS[randomIndex];
|
27
|
-
};
|
28
|
-
const handleEnter = e => {
|
29
|
-
const isExists = options?.find(f => f.value.toLowerCase() === value.toLowerCase());
|
30
|
-
if (e.keyCode === 13 && value?.trim()) {
|
31
|
-
if (isExists) {
|
32
|
-
setError("Option Already Exists!");
|
33
|
-
return;
|
34
|
-
}
|
35
|
-
onUpdate({
|
36
|
-
...edit,
|
37
|
-
options: [{
|
38
|
-
value: value,
|
39
|
-
color: getRandomColor()
|
40
|
-
}, ...(options || [])]
|
41
|
-
});
|
42
|
-
setValue("");
|
43
|
-
}
|
44
|
-
};
|
45
|
-
const handleChange = e => {
|
46
|
-
setValue(e?.target?.value);
|
47
|
-
setError("");
|
48
|
-
};
|
49
|
-
const handleChangeOption = optIndex => () => {
|
50
|
-
onEvent("editOption", {
|
51
|
-
edit: {
|
52
|
-
...edit,
|
53
|
-
optionIndex: optIndex
|
54
|
-
}
|
55
|
-
});
|
56
|
-
};
|
57
|
-
const onBlur = () => {
|
58
|
-
setValue("");
|
59
|
-
setAddBox(false);
|
60
|
-
setError("");
|
61
|
-
};
|
62
|
-
return edit?.type === "select" || edit?.type === "multi-select" ? /*#__PURE__*/_jsxs(Box, {
|
63
|
-
className: "fe-tv-addopt st sb mb-0",
|
64
|
-
children: [/*#__PURE__*/_jsx(List, {
|
65
|
-
className: "fe-dv-opt-list pl-0",
|
66
|
-
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
67
|
-
onClick: onAddBox,
|
68
|
-
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
69
|
-
children: /*#__PURE__*/_jsx(AddIcon, {})
|
70
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
71
|
-
primary: "Add Options"
|
72
|
-
})]
|
73
|
-
})
|
74
|
-
}), /*#__PURE__*/_jsx(Box, {
|
75
|
-
className: "fe-dv-ap-desc",
|
76
|
-
children: "Choose an option or create one"
|
77
|
-
}), addBox ? /*#__PURE__*/_jsx(Box, {
|
78
|
-
children: /*#__PURE__*/_jsx(TextField, {
|
79
|
-
className: "mt",
|
80
|
-
size: "small",
|
81
|
-
fullWidth: true,
|
82
|
-
value: value,
|
83
|
-
onKeyUp: handleEnter,
|
84
|
-
onChange: handleChange,
|
85
|
-
onBlur: onBlur,
|
86
|
-
helperText: error
|
87
|
-
})
|
88
|
-
}) : null, /*#__PURE__*/_jsx(List, {
|
89
|
-
children: options?.map((m, i) => {
|
90
|
-
return /*#__PURE__*/_jsxs(ListItemButton, {
|
91
|
-
onClick: handleChangeOption(i),
|
92
|
-
children: [/*#__PURE__*/_jsx(ListItemText, {
|
93
|
-
primary: /*#__PURE__*/_jsx(Chip, {
|
94
|
-
label: m.value,
|
95
|
-
sx: {
|
96
|
-
backgroundColor: m.color
|
97
|
-
}
|
98
|
-
})
|
99
|
-
}), /*#__PURE__*/_jsx(ListItemIcon, {
|
100
|
-
sx: {
|
101
|
-
justifyContent: "flex-end"
|
102
|
-
},
|
103
|
-
children: /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})
|
104
|
-
})]
|
105
|
-
}, i);
|
106
|
-
})
|
107
|
-
})]
|
108
|
-
}) : null;
|
109
|
-
};
|
110
|
-
AddOptions.defaultProps = {
|
111
|
-
onEvent: () => {}
|
112
|
-
};
|
113
|
-
export default AddOptions;
|
@@ -1,37 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Box, IconButton } from "@mui/material";
|
3
|
-
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import PropertyList from "./PropertyList";
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
-
const AddProperty = props => {
|
8
|
-
const {
|
9
|
-
classes,
|
10
|
-
onClose,
|
11
|
-
onEvent
|
12
|
-
} = props;
|
13
|
-
const onSelect = type => () => {
|
14
|
-
onEvent("addProperty", type);
|
15
|
-
};
|
16
|
-
return /*#__PURE__*/_jsxs(Box, {
|
17
|
-
sx: classes.addProperty,
|
18
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
19
|
-
className: "fe-dv-ap-title",
|
20
|
-
children: ["Add Property", /*#__PURE__*/_jsx(IconButton, {
|
21
|
-
className: "tv-act-ico bg br1",
|
22
|
-
size: "small",
|
23
|
-
onClick: onClose,
|
24
|
-
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
25
|
-
})]
|
26
|
-
}), /*#__PURE__*/_jsx(Box, {
|
27
|
-
className: "fe-dv-ap-opt-content mt",
|
28
|
-
children: /*#__PURE__*/_jsx(PropertyList, {
|
29
|
-
onSelect: onSelect
|
30
|
-
})
|
31
|
-
})]
|
32
|
-
});
|
33
|
-
};
|
34
|
-
AddProperty.defaultProps = {
|
35
|
-
onEvent: () => {}
|
36
|
-
};
|
37
|
-
export default AddProperty;
|
@@ -1,111 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Box, IconButton, List, ListItemButton, ListItemText, ListItemIcon } from "@mui/material";
|
3
|
-
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
5
|
-
import AddIcon from "@mui/icons-material/Add";
|
6
|
-
import { TYPE_LABELS, PROPERTY_TYPES } from "./Constants";
|
7
|
-
import { useDataView } from "../../Providers/DataViewProvider";
|
8
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
11
|
-
const AllProperties = props => {
|
12
|
-
const {
|
13
|
-
classes,
|
14
|
-
onClose,
|
15
|
-
onEvent
|
16
|
-
} = props;
|
17
|
-
const {
|
18
|
-
properties,
|
19
|
-
onAddProperty
|
20
|
-
} = useDataView();
|
21
|
-
const shownProperties = properties?.filter(f => f.visible === true);
|
22
|
-
const hiddenProperties = properties?.filter(f => f.visible === false);
|
23
|
-
const onEditProperty = data => () => {
|
24
|
-
onEvent("editProperty", {
|
25
|
-
edit: {
|
26
|
-
...data
|
27
|
-
}
|
28
|
-
});
|
29
|
-
};
|
30
|
-
const onAdd = () => {
|
31
|
-
const np = onAddProperty({
|
32
|
-
type: "text"
|
33
|
-
});
|
34
|
-
onEvent("editProperty", {
|
35
|
-
edit: {
|
36
|
-
...np
|
37
|
-
}
|
38
|
-
});
|
39
|
-
};
|
40
|
-
return /*#__PURE__*/_jsxs(Box, {
|
41
|
-
sx: classes.addProperty,
|
42
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
43
|
-
className: "fe-dv-ap-title",
|
44
|
-
children: ["Properties", /*#__PURE__*/_jsx(IconButton, {
|
45
|
-
className: "tv-act-ico bg br1",
|
46
|
-
size: "small",
|
47
|
-
onClick: onClose,
|
48
|
-
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
49
|
-
})]
|
50
|
-
}), /*#__PURE__*/_jsx(Box, {
|
51
|
-
className: "fe-dv-ap-desc",
|
52
|
-
children: "Displayed Properties"
|
53
|
-
}), /*#__PURE__*/_jsxs(Box, {
|
54
|
-
className: "fe-dv-ap-opt-content",
|
55
|
-
children: [/*#__PURE__*/_jsx(List, {
|
56
|
-
className: "fe-dv-opt-list",
|
57
|
-
children: shownProperties?.map((m, i) => {
|
58
|
-
const {
|
59
|
-
Icon
|
60
|
-
} = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
|
61
|
-
return /*#__PURE__*/_jsxs(ListItemButton, {
|
62
|
-
onClick: onEditProperty(m),
|
63
|
-
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
64
|
-
className: "needBg",
|
65
|
-
children: /*#__PURE__*/_jsx(Icon, {})
|
66
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
67
|
-
children: m?.label
|
68
|
-
}), /*#__PURE__*/_jsx(ListItemIcon, {
|
69
|
-
sx: {
|
70
|
-
justifyContent: "end"
|
71
|
-
},
|
72
|
-
children: /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})
|
73
|
-
})]
|
74
|
-
}, i);
|
75
|
-
})
|
76
|
-
}), hiddenProperties?.length > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
|
77
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
78
|
-
className: "fe-dv-ap-desc",
|
79
|
-
children: "Hidden Properties"
|
80
|
-
}), /*#__PURE__*/_jsx(List, {
|
81
|
-
className: "fe-dv-opt-list",
|
82
|
-
children: hiddenProperties?.map((m, i) => {
|
83
|
-
return /*#__PURE__*/_jsxs(ListItemButton, {
|
84
|
-
onClick: onEditProperty(m),
|
85
|
-
children: [/*#__PURE__*/_jsx(ListItemText, {
|
86
|
-
children: m?.label
|
87
|
-
}), /*#__PURE__*/_jsxs(ListItemIcon, {
|
88
|
-
sx: {
|
89
|
-
alignItems: "center"
|
90
|
-
},
|
91
|
-
children: [TYPE_LABELS[m?.type], /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})]
|
92
|
-
})]
|
93
|
-
}, i);
|
94
|
-
})
|
95
|
-
})]
|
96
|
-
}) : null, /*#__PURE__*/_jsx(List, {
|
97
|
-
className: "fe-dv-opt-list",
|
98
|
-
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
99
|
-
onClick: onAdd,
|
100
|
-
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
101
|
-
children: /*#__PURE__*/_jsx(AddIcon, {})
|
102
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
103
|
-
children: "Add New Property"
|
104
|
-
})]
|
105
|
-
})
|
106
|
-
})]
|
107
|
-
})]
|
108
|
-
});
|
109
|
-
};
|
110
|
-
AllProperties.defaultProps = {};
|
111
|
-
export default AllProperties;
|
@@ -1,62 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { Box, IconButton } from "@mui/material";
|
3
|
-
import CloseIcon from "@mui/icons-material/Close";
|
4
|
-
import PropertyList from "./PropertyList";
|
5
|
-
import { TYPE_LABELS } from "./Constants";
|
6
|
-
import ArrowBackIcon from "@mui/icons-material/ArrowBack";
|
7
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
|
-
const ChangeProperty = props => {
|
10
|
-
const {
|
11
|
-
classes,
|
12
|
-
onClose,
|
13
|
-
onEvent,
|
14
|
-
mode
|
15
|
-
} = props;
|
16
|
-
const onSelect = property => () => {
|
17
|
-
onEvent("updateProperty", {
|
18
|
-
...(mode?.edit || {}),
|
19
|
-
type: property?.type,
|
20
|
-
label: TYPE_LABELS[mode?.type] === mode?.label ? property?.label : mode?.label
|
21
|
-
});
|
22
|
-
};
|
23
|
-
const onBack = () => {
|
24
|
-
onEvent("editProperty", {
|
25
|
-
edit: {
|
26
|
-
...(mode?.edit || {})
|
27
|
-
}
|
28
|
-
});
|
29
|
-
};
|
30
|
-
return /*#__PURE__*/_jsxs(Box, {
|
31
|
-
sx: classes.addProperty,
|
32
|
-
children: [/*#__PURE__*/_jsxs(Box, {
|
33
|
-
className: "fe-dv-ap-title",
|
34
|
-
children: [/*#__PURE__*/_jsxs("span", {
|
35
|
-
children: [/*#__PURE__*/_jsx(IconButton, {
|
36
|
-
className: "tv-act-ico",
|
37
|
-
size: "small",
|
38
|
-
onClick: onBack,
|
39
|
-
children: /*#__PURE__*/_jsx(ArrowBackIcon, {})
|
40
|
-
}), "Change Property"]
|
41
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
42
|
-
className: "tv-act-ico bg br1",
|
43
|
-
size: "small",
|
44
|
-
onClick: onClose,
|
45
|
-
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
46
|
-
})]
|
47
|
-
}), /*#__PURE__*/_jsx(Box, {
|
48
|
-
className: "fe-dv-ap-desc",
|
49
|
-
children: "Select Property Type"
|
50
|
-
}), /*#__PURE__*/_jsx(Box, {
|
51
|
-
className: "fe-dv-ap-opt-content mt",
|
52
|
-
children: /*#__PURE__*/_jsx(PropertyList, {
|
53
|
-
onSelect: onSelect,
|
54
|
-
selected: mode?.edit
|
55
|
-
})
|
56
|
-
})]
|
57
|
-
});
|
58
|
-
};
|
59
|
-
ChangeProperty.defaultProps = {
|
60
|
-
onEvent: () => {}
|
61
|
-
};
|
62
|
-
export default ChangeProperty;
|
@@ -1,36 +0,0 @@
|
|
1
|
-
import React from "react";
|
2
|
-
import { List, ListItemButton, ListItemIcon, ListItemText, Box } from "@mui/material";
|
3
|
-
import { PROPERTY_TYPES } from "./Constants";
|
4
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
6
|
-
const ColumnsList = props => {
|
7
|
-
const {
|
8
|
-
properties
|
9
|
-
} = props;
|
10
|
-
const {
|
11
|
-
onSelect,
|
12
|
-
selected
|
13
|
-
} = props;
|
14
|
-
return /*#__PURE__*/_jsx(Box, {
|
15
|
-
className: "opt-wrpr",
|
16
|
-
children: /*#__PURE__*/_jsx(List, {
|
17
|
-
className: "tv-opt-list",
|
18
|
-
children: properties?.map((m, i) => {
|
19
|
-
const {
|
20
|
-
Icon
|
21
|
-
} = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
|
22
|
-
return /*#__PURE__*/_jsxs(ListItemButton, {
|
23
|
-
className: selected?.type === m?.type ? "active" : "",
|
24
|
-
onClick: onSelect(m),
|
25
|
-
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
26
|
-
children: /*#__PURE__*/_jsx(Icon, {})
|
27
|
-
}), /*#__PURE__*/_jsx(ListItemText, {
|
28
|
-
primary: m?.label
|
29
|
-
})]
|
30
|
-
}, i);
|
31
|
-
})
|
32
|
-
})
|
33
|
-
});
|
34
|
-
};
|
35
|
-
ColumnsList.defaultProps = {};
|
36
|
-
export default ColumnsList;
|