@flozy/editor 5.0.5 → 5.0.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/CommonEditor.js +6 -4
- package/dist/Editor/Editor.css +19 -1
- package/dist/Editor/Elements/Button/EditorButton.js +71 -53
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +4 -2
- package/dist/Editor/Elements/DataView/DataView.js +101 -0
- package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +128 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +25 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +26 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +38 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +28 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +37 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +66 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +62 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +158 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +176 -0
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +94 -0
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +214 -0
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +83 -0
- package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +288 -0
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +72 -0
- package/dist/Editor/Elements/DataView/styles.js +133 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
- package/dist/Editor/Elements/Signature/Signature.css +1 -1
- package/dist/Editor/Elements/Table/AddRowCol.js +1 -1
- package/dist/Editor/Elements/Table/DragButton.js +71 -68
- package/dist/Editor/Elements/Table/Styles.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +10 -7
- package/dist/Editor/Elements/Table/TableCell.js +21 -21
- package/dist/Editor/Elements/Table/tableHelper.js +4 -16
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/Toolbar.js +6 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
- package/dist/Editor/assets/svg/OpenLinkIcon.js +3 -3
- package/dist/Editor/common/Icon.js +7 -1
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/Shorthands/elements.js +13 -1
- package/dist/Editor/common/StyleBuilder/tableStyle.js +1 -1
- package/dist/Editor/common/iconslist.js +6 -3
- package/dist/Editor/hooks/useTable.js +4 -5
- package/dist/Editor/plugins/withHTML.js +18 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +16 -0
- package/dist/Editor/utils/dataView.js +43 -0
- package/dist/Editor/utils/embed.js +2 -1
- package/dist/Editor/utils/helper.js +19 -1
- package/dist/Editor/utils/insertNewLine.js +19 -1
- package/package.json +1 -1
@@ -0,0 +1,190 @@
|
|
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 KeyboardArrowRightIcon from "@mui/icons-material/KeyboardArrowRight";
|
5
|
+
import DeleteIcon from "@mui/icons-material/Delete";
|
6
|
+
import ContentCopyIcon from "@mui/icons-material/ContentCopy";
|
7
|
+
import VisibilityIcon from "@mui/icons-material/Visibility";
|
8
|
+
import VisibilityOffIcon from "@mui/icons-material/VisibilityOff";
|
9
|
+
import ArrowBackIosIcon from "@mui/icons-material/ArrowBackIos";
|
10
|
+
import { TYPE_LABELS } from "./Constants";
|
11
|
+
import AddOptions from "./AddOptions";
|
12
|
+
import FilterProperty from "./FilterProperty";
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
14
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
|
+
const EditProperty = props => {
|
16
|
+
const {
|
17
|
+
classes,
|
18
|
+
onClose,
|
19
|
+
mode,
|
20
|
+
onEvent
|
21
|
+
} = props;
|
22
|
+
const [edit, setEdit] = useState({
|
23
|
+
...(mode?.edit || {})
|
24
|
+
});
|
25
|
+
const editData = useRef({
|
26
|
+
...edit
|
27
|
+
});
|
28
|
+
useEffect(() => {
|
29
|
+
return () => {
|
30
|
+
// on un-mount update the label
|
31
|
+
if (edit?.label !== editData?.current?.label) {
|
32
|
+
onEvent("updateProperty", {
|
33
|
+
...editData?.current
|
34
|
+
}, false);
|
35
|
+
}
|
36
|
+
};
|
37
|
+
}, []);
|
38
|
+
const onChange = key => e => {
|
39
|
+
const latest = {
|
40
|
+
...edit,
|
41
|
+
[key]: e?.target?.value
|
42
|
+
};
|
43
|
+
setEdit({
|
44
|
+
...edit,
|
45
|
+
[key]: e?.target?.value
|
46
|
+
});
|
47
|
+
editData.current = {
|
48
|
+
...latest
|
49
|
+
};
|
50
|
+
};
|
51
|
+
const onChangeProperty = () => {
|
52
|
+
onEvent("changeProperty", {
|
53
|
+
edit: {
|
54
|
+
...edit
|
55
|
+
}
|
56
|
+
});
|
57
|
+
};
|
58
|
+
const onBack = () => {
|
59
|
+
onEvent("allProperties", {
|
60
|
+
edit: null
|
61
|
+
});
|
62
|
+
};
|
63
|
+
const onUpdate = data => {
|
64
|
+
const latest = {
|
65
|
+
...edit,
|
66
|
+
...data
|
67
|
+
};
|
68
|
+
setEdit({
|
69
|
+
...edit,
|
70
|
+
...data
|
71
|
+
});
|
72
|
+
editData.current = {
|
73
|
+
...latest
|
74
|
+
};
|
75
|
+
onEvent("updateProperty", {
|
76
|
+
...editData?.current
|
77
|
+
});
|
78
|
+
};
|
79
|
+
const onAction = action => () => {
|
80
|
+
switch (action) {
|
81
|
+
case "Visibilty":
|
82
|
+
onUpdate({
|
83
|
+
visible: !edit?.visible
|
84
|
+
});
|
85
|
+
onEvent("close");
|
86
|
+
break;
|
87
|
+
case "Duplicate":
|
88
|
+
onEvent("addProperty", {
|
89
|
+
type: editData?.current?.type,
|
90
|
+
overrides: {
|
91
|
+
...editData?.current
|
92
|
+
}
|
93
|
+
}, false);
|
94
|
+
onEvent("close");
|
95
|
+
break;
|
96
|
+
case "Delete":
|
97
|
+
onEvent("deleteProperty", {
|
98
|
+
...editData?.current
|
99
|
+
});
|
100
|
+
onEvent("close");
|
101
|
+
break;
|
102
|
+
default:
|
103
|
+
return;
|
104
|
+
}
|
105
|
+
};
|
106
|
+
return /*#__PURE__*/_jsxs(Box, {
|
107
|
+
sx: classes.addProperty,
|
108
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
109
|
+
className: "fe-dv-ap-title",
|
110
|
+
children: [/*#__PURE__*/_jsxs("span", {
|
111
|
+
children: [/*#__PURE__*/_jsx(IconButton, {
|
112
|
+
className: "tv-act-ico",
|
113
|
+
size: "small",
|
114
|
+
onClick: onBack,
|
115
|
+
children: /*#__PURE__*/_jsx(ArrowBackIosIcon, {})
|
116
|
+
}), "Edit Property"]
|
117
|
+
}), /*#__PURE__*/_jsx(IconButton, {
|
118
|
+
className: "tv-act-ico bg br1",
|
119
|
+
size: "small",
|
120
|
+
onClick: onClose,
|
121
|
+
children: /*#__PURE__*/_jsx(CloseIcon, {})
|
122
|
+
})]
|
123
|
+
}), /*#__PURE__*/_jsxs(Box, {
|
124
|
+
className: "fe-dv-ap-opt-content",
|
125
|
+
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
126
|
+
label: "Field Name",
|
127
|
+
labelPlacement: "top",
|
128
|
+
control: /*#__PURE__*/_jsx(TextField, {
|
129
|
+
size: "small",
|
130
|
+
value: edit?.label,
|
131
|
+
onChange: onChange("label"),
|
132
|
+
fullWidth: true,
|
133
|
+
placeholder: "Field Name"
|
134
|
+
})
|
135
|
+
}), /*#__PURE__*/_jsx(AddOptions, {
|
136
|
+
edit: edit,
|
137
|
+
onUpdate: onUpdate,
|
138
|
+
onEvent: onEvent
|
139
|
+
}), /*#__PURE__*/_jsx(FilterProperty, {
|
140
|
+
edit: edit,
|
141
|
+
onUpdate: onUpdate,
|
142
|
+
onEvent: onEvent
|
143
|
+
}), /*#__PURE__*/_jsx(List, {
|
144
|
+
className: "fe-dv-opt-list st sb",
|
145
|
+
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
146
|
+
onClick: onChangeProperty,
|
147
|
+
children: [/*#__PURE__*/_jsx(ListItemText, {
|
148
|
+
children: "Type"
|
149
|
+
}), /*#__PURE__*/_jsxs(ListItemIcon, {
|
150
|
+
sx: {
|
151
|
+
alignItems: "center"
|
152
|
+
},
|
153
|
+
children: [/*#__PURE__*/_jsx("span", {
|
154
|
+
className: "label-tp",
|
155
|
+
children: TYPE_LABELS[edit?.type]
|
156
|
+
}), /*#__PURE__*/_jsx(KeyboardArrowRightIcon, {})]
|
157
|
+
})]
|
158
|
+
})
|
159
|
+
}), /*#__PURE__*/_jsxs(List, {
|
160
|
+
className: "fe-dv-opt-list",
|
161
|
+
children: [/*#__PURE__*/_jsxs(ListItemButton, {
|
162
|
+
onClick: onAction("Visibilty"),
|
163
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
164
|
+
children: edit?.visible ? /*#__PURE__*/_jsx(VisibilityOffIcon, {}) : /*#__PURE__*/_jsx(VisibilityIcon, {})
|
165
|
+
}), /*#__PURE__*/_jsxs(ListItemText, {
|
166
|
+
children: [edit?.visible ? "Hide" : "Show", " in View"]
|
167
|
+
})]
|
168
|
+
}), /*#__PURE__*/_jsxs(ListItemButton, {
|
169
|
+
onClick: onAction("Duplicate"),
|
170
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
171
|
+
children: /*#__PURE__*/_jsx(ContentCopyIcon, {})
|
172
|
+
}), /*#__PURE__*/_jsx(ListItemText, {
|
173
|
+
children: "Duplicate Property"
|
174
|
+
})]
|
175
|
+
}), /*#__PURE__*/_jsxs(ListItemButton, {
|
176
|
+
onClick: onAction("Delete"),
|
177
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
178
|
+
children: /*#__PURE__*/_jsx(DeleteIcon, {})
|
179
|
+
}), /*#__PURE__*/_jsx(ListItemText, {
|
180
|
+
children: "Delete Property"
|
181
|
+
})]
|
182
|
+
})]
|
183
|
+
})]
|
184
|
+
})]
|
185
|
+
});
|
186
|
+
};
|
187
|
+
EditProperty.defaultProps = {
|
188
|
+
onEvent: () => {}
|
189
|
+
};
|
190
|
+
export default EditProperty;
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { List, ListItemButton, ListItemText, ListItemIcon } from "@mui/material";
|
3
|
+
import { FILTER_TYPES } from "./Constants";
|
4
|
+
import { useDataView } from "../../Providers/DataViewProvider";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
+
const FilterProperty = props => {
|
8
|
+
const {
|
9
|
+
sort
|
10
|
+
} = useDataView();
|
11
|
+
const {
|
12
|
+
edit,
|
13
|
+
onEvent
|
14
|
+
} = props;
|
15
|
+
const handleChangeOption = m => () => {
|
16
|
+
onEvent("addSort", {
|
17
|
+
...(sort[0] || {}),
|
18
|
+
newKey: edit?.key,
|
19
|
+
operator: m?.operator
|
20
|
+
});
|
21
|
+
};
|
22
|
+
return /*#__PURE__*/_jsx(List, {
|
23
|
+
className: "fe-dv-opt-list mt",
|
24
|
+
children: FILTER_TYPES?.map(({
|
25
|
+
Icon,
|
26
|
+
...m
|
27
|
+
}, i) => {
|
28
|
+
return /*#__PURE__*/_jsxs(ListItemButton, {
|
29
|
+
onClick: handleChangeOption(m),
|
30
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
31
|
+
children: /*#__PURE__*/_jsx(Icon, {})
|
32
|
+
}), /*#__PURE__*/_jsx(ListItemText, {
|
33
|
+
primary: m.label
|
34
|
+
})]
|
35
|
+
}, i);
|
36
|
+
})
|
37
|
+
});
|
38
|
+
};
|
39
|
+
FilterProperty.defaultProps = {
|
40
|
+
onEvent: () => {}
|
41
|
+
};
|
42
|
+
export default FilterProperty;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { List, ListItemButton, ListItemIcon, ListItemText } 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 PropertyList = props => {
|
7
|
+
const {
|
8
|
+
onSelect,
|
9
|
+
selected
|
10
|
+
} = props;
|
11
|
+
return /*#__PURE__*/_jsx(List, {
|
12
|
+
children: PROPERTY_TYPES?.map(({
|
13
|
+
Icon,
|
14
|
+
...rest
|
15
|
+
}, i) => {
|
16
|
+
return /*#__PURE__*/_jsxs(ListItemButton, {
|
17
|
+
className: selected?.type === rest?.type ? "active" : "",
|
18
|
+
onClick: onSelect(rest),
|
19
|
+
children: [/*#__PURE__*/_jsx(ListItemIcon, {
|
20
|
+
className: "needBg",
|
21
|
+
children: /*#__PURE__*/_jsx(Icon, {})
|
22
|
+
}), /*#__PURE__*/_jsx(ListItemText, {
|
23
|
+
primary: rest?.label
|
24
|
+
})]
|
25
|
+
}, i);
|
26
|
+
})
|
27
|
+
});
|
28
|
+
};
|
29
|
+
PropertyList.defaultProps = {};
|
30
|
+
export default PropertyList;
|
@@ -0,0 +1,110 @@
|
|
1
|
+
import React from "react";
|
2
|
+
import { Popover, SwipeableDrawer } from "@mui/material";
|
3
|
+
import useOptionsStyles from "./styles";
|
4
|
+
import AddProperty from "./AddProperty";
|
5
|
+
import EditProperty from "./EditProperty";
|
6
|
+
import ChangeProperty from "./ChangeProperty";
|
7
|
+
import AllProperties from "./AllProperties";
|
8
|
+
import EditOption from "./EditOption";
|
9
|
+
import { useTheme } from "@emotion/react";
|
10
|
+
import { useEditorContext } from "../../../../hooks/useMouseMove";
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
12
|
+
const POSITIONS = {
|
13
|
+
addProperty: {
|
14
|
+
anchorOrigin: {
|
15
|
+
vertical: "bottom",
|
16
|
+
horizontal: "right"
|
17
|
+
},
|
18
|
+
transformOrigin: {
|
19
|
+
vertical: "top",
|
20
|
+
horizontal: "right"
|
21
|
+
}
|
22
|
+
},
|
23
|
+
allProperties: {
|
24
|
+
anchorOrigin: {
|
25
|
+
vertical: "bottom",
|
26
|
+
horizontal: "right"
|
27
|
+
},
|
28
|
+
transformOrigin: {
|
29
|
+
vertical: "top",
|
30
|
+
horizontal: "right"
|
31
|
+
}
|
32
|
+
}
|
33
|
+
};
|
34
|
+
const PropertySettings = props => {
|
35
|
+
const {
|
36
|
+
theme: appTheme
|
37
|
+
} = useEditorContext();
|
38
|
+
const theme = useTheme();
|
39
|
+
const {
|
40
|
+
open,
|
41
|
+
anchorEl,
|
42
|
+
mode,
|
43
|
+
onClose,
|
44
|
+
onEvent
|
45
|
+
} = props;
|
46
|
+
const classes = useOptionsStyles(theme, appTheme);
|
47
|
+
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
48
|
+
const PoperComponent = isMobile ? SwipeableDrawer : Popover;
|
49
|
+
const renderMode = () => {
|
50
|
+
switch (mode?.type) {
|
51
|
+
case "addProperty":
|
52
|
+
return /*#__PURE__*/_jsx(AddProperty, {
|
53
|
+
classes: classes,
|
54
|
+
onClose: onClose,
|
55
|
+
onEvent: onEvent,
|
56
|
+
mode: mode
|
57
|
+
});
|
58
|
+
case "editProperty":
|
59
|
+
return /*#__PURE__*/_jsx(EditProperty, {
|
60
|
+
classes: classes,
|
61
|
+
onClose: onClose,
|
62
|
+
onEvent: onEvent,
|
63
|
+
mode: mode
|
64
|
+
});
|
65
|
+
case "changeProperty":
|
66
|
+
return /*#__PURE__*/_jsx(ChangeProperty, {
|
67
|
+
classes: classes,
|
68
|
+
onClose: onClose,
|
69
|
+
onEvent: onEvent,
|
70
|
+
mode: mode
|
71
|
+
});
|
72
|
+
case "allProperties":
|
73
|
+
return /*#__PURE__*/_jsx(AllProperties, {
|
74
|
+
classes: classes,
|
75
|
+
onClose: onClose,
|
76
|
+
onEvent: onEvent,
|
77
|
+
mode: mode
|
78
|
+
});
|
79
|
+
case "editOption":
|
80
|
+
return /*#__PURE__*/_jsx(EditOption, {
|
81
|
+
classes: classes,
|
82
|
+
onClose: onClose,
|
83
|
+
onEvent: onEvent,
|
84
|
+
mode: mode
|
85
|
+
});
|
86
|
+
default:
|
87
|
+
return null;
|
88
|
+
}
|
89
|
+
};
|
90
|
+
return /*#__PURE__*/_jsx(PoperComponent, {
|
91
|
+
open: open,
|
92
|
+
anchorEl: anchorEl,
|
93
|
+
anchorOrigin: {
|
94
|
+
vertical: "top",
|
95
|
+
horizontal: "right"
|
96
|
+
},
|
97
|
+
transformOrigin: {
|
98
|
+
vertical: "top",
|
99
|
+
horizontal: "left"
|
100
|
+
},
|
101
|
+
onClose: onClose,
|
102
|
+
anchor: "bottom",
|
103
|
+
sx: classes.popover
|
104
|
+
// override position
|
105
|
+
,
|
106
|
+
...(POSITIONS[mode?.type] || {}),
|
107
|
+
children: renderMode()
|
108
|
+
});
|
109
|
+
};
|
110
|
+
export default PropertySettings;
|
@@ -0,0 +1,176 @@
|
|
1
|
+
const useOptionsStyles = (theme, appTheme) => ({
|
2
|
+
popover: {
|
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
|
+
borderRadius: "12px",
|
7
|
+
background: appTheme?.palette?.editor?.tv_pop_bg,
|
8
|
+
color: appTheme?.palette?.editor?.tv_text_primary,
|
9
|
+
[theme.breakpoints.between("xs", "md")]: {
|
10
|
+
borderRadius: "16px 16px 0px 0px",
|
11
|
+
maxHeight: "50%"
|
12
|
+
},
|
13
|
+
"& .tv-act-ico": {
|
14
|
+
color: appTheme?.palette?.editor?.tv_text,
|
15
|
+
"&.br1": {
|
16
|
+
borderRadius: "6px"
|
17
|
+
},
|
18
|
+
"&.bg": {
|
19
|
+
background: appTheme?.palette?.editor?.tv_ico_bg,
|
20
|
+
"&:hover": {
|
21
|
+
background: "rgba(100, 116, 139, 0.12)"
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"& svg": {
|
25
|
+
width: "16px",
|
26
|
+
height: "16px"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"& .MuiInputBase-root": {
|
30
|
+
color: appTheme?.palette?.editor?.tv_text_primary,
|
31
|
+
fontSize: "14px",
|
32
|
+
background: appTheme?.palette?.editor?.tv_ico_bg,
|
33
|
+
borderRadius: "8px"
|
34
|
+
},
|
35
|
+
"& .MuiOutlinedInput-notchedOutline": {
|
36
|
+
borderRadius: "8px",
|
37
|
+
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`
|
38
|
+
},
|
39
|
+
"& .MuiList-root": {
|
40
|
+
padding: "4px 2px",
|
41
|
+
"& .MuiListItemButton-root": {
|
42
|
+
color: appTheme?.palette?.editor?.tv_text_primary,
|
43
|
+
padding: "2px 4px",
|
44
|
+
borderRadius: "8px",
|
45
|
+
"& .MuiListItemIcon-root": {
|
46
|
+
minWidth: "38px",
|
47
|
+
"&.needBg": {
|
48
|
+
minWidth: "20px",
|
49
|
+
width: "20px",
|
50
|
+
height: "20px",
|
51
|
+
alignItems: "center",
|
52
|
+
justifyContent: "center",
|
53
|
+
borderRadius: "4px",
|
54
|
+
marginRight: "12px",
|
55
|
+
background: appTheme?.palette?.editor?.tv_ico_bg
|
56
|
+
},
|
57
|
+
color: appTheme?.palette?.editor?.tv_text_primary,
|
58
|
+
"& svg": {
|
59
|
+
width: "16px"
|
60
|
+
}
|
61
|
+
},
|
62
|
+
"& .MuiTypography-root": {
|
63
|
+
fontSize: "14px"
|
64
|
+
},
|
65
|
+
"&:hover": {
|
66
|
+
background: appTheme?.palette?.editor?.tv_hover_bg,
|
67
|
+
color: appTheme?.palette?.editor?.tv_hover_text,
|
68
|
+
"& .MuiListItemIcon-root": {
|
69
|
+
color: appTheme?.palette?.editor?.tv_hover_text
|
70
|
+
}
|
71
|
+
}
|
72
|
+
}
|
73
|
+
},
|
74
|
+
"& .st": {
|
75
|
+
borderTop: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
76
|
+
marginTop: "8px",
|
77
|
+
paddingTop: "8px"
|
78
|
+
},
|
79
|
+
"& .sb": {
|
80
|
+
borderBottom: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
81
|
+
marginBottom: "8px",
|
82
|
+
paddingBottom: "8px"
|
83
|
+
},
|
84
|
+
"& .mt": {
|
85
|
+
marginTop: "8px"
|
86
|
+
},
|
87
|
+
"& .mt-1": {
|
88
|
+
marginTop: "12px"
|
89
|
+
},
|
90
|
+
"& .mb": {
|
91
|
+
marginBottom: "8px"
|
92
|
+
},
|
93
|
+
"& .mb-1": {
|
94
|
+
marginBottom: "12px"
|
95
|
+
},
|
96
|
+
"& .ml": {
|
97
|
+
marginLeft: "8px"
|
98
|
+
},
|
99
|
+
"& .mb-0": {
|
100
|
+
marginBottom: "0px"
|
101
|
+
},
|
102
|
+
"& .ml-0": {
|
103
|
+
marginLeft: "0px !important"
|
104
|
+
},
|
105
|
+
"& .pl-0": {
|
106
|
+
paddingLeft: "0px"
|
107
|
+
},
|
108
|
+
"& .label-desc": {},
|
109
|
+
"& .MuiFormControlLabel-root": {
|
110
|
+
alignItems: "flex-start",
|
111
|
+
margin: "0px 0px 0px 0px",
|
112
|
+
width: "100%",
|
113
|
+
"& .MuiFormControlLabel-label": {
|
114
|
+
marginBottom: "8px",
|
115
|
+
fontSize: "14px"
|
116
|
+
}
|
117
|
+
},
|
118
|
+
"& .label-tp": {
|
119
|
+
fontFamily: '"Roboto","Helvetica","Arial",sans-serif',
|
120
|
+
fontSize: "14px"
|
121
|
+
},
|
122
|
+
"& .MuiInputBase-input": {
|
123
|
+
height: "32px",
|
124
|
+
padding: "4px 8px"
|
125
|
+
}
|
126
|
+
}
|
127
|
+
},
|
128
|
+
addProperty: {
|
129
|
+
padding: "12px",
|
130
|
+
width: "253px",
|
131
|
+
"& .fe-dv-ap-title": {
|
132
|
+
display: "flex",
|
133
|
+
fontWeight: "bold",
|
134
|
+
padding: "0px 0px 12px 0px",
|
135
|
+
justifyContent: "space-between",
|
136
|
+
fontSize: "14px",
|
137
|
+
alignItems: "center",
|
138
|
+
borderBottom: "1px solid rgba(220, 228, 236, 1)",
|
139
|
+
marginBottom: "8px",
|
140
|
+
"& span": {
|
141
|
+
display: "flex",
|
142
|
+
alignItems: "center"
|
143
|
+
}
|
144
|
+
},
|
145
|
+
"& .fe-dv-ap-desc": {
|
146
|
+
fontSize: "12px",
|
147
|
+
color: "rgba(148, 163, 184, 1)"
|
148
|
+
},
|
149
|
+
"& .fe-dv-ap-opt-list": {
|
150
|
+
margin: "12px 0px"
|
151
|
+
},
|
152
|
+
"& .fe-tv-addopt": {
|
153
|
+
marginTop: "8px",
|
154
|
+
paddingLeft: "4px",
|
155
|
+
"& .MuiList-root": {
|
156
|
+
maxHeight: "200px",
|
157
|
+
overflowY: "auto"
|
158
|
+
},
|
159
|
+
"& .MuiFormHelperText-root": {
|
160
|
+
color: "red",
|
161
|
+
marginLeft: "2px",
|
162
|
+
marginTop: "4px"
|
163
|
+
}
|
164
|
+
},
|
165
|
+
"& .fe-tv-opt-sub-title": {
|
166
|
+
display: "flex",
|
167
|
+
alignItems: "center",
|
168
|
+
justifyContent: "space-between",
|
169
|
+
marginBottom: "8px"
|
170
|
+
},
|
171
|
+
[theme.breakpoints.between("xs", "md")]: {
|
172
|
+
width: "calc(100% - 24px)"
|
173
|
+
}
|
174
|
+
}
|
175
|
+
});
|
176
|
+
export default useOptionsStyles;
|
@@ -0,0 +1,94 @@
|
|
1
|
+
const useTableStyles = (theme, appTheme) => ({
|
2
|
+
root: {
|
3
|
+
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
4
|
+
borderRadius: "7px 7px 0px 0px",
|
5
|
+
overflowX: "auto"
|
6
|
+
},
|
7
|
+
table: {
|
8
|
+
borderCollapse: "separate",
|
9
|
+
borderSpacing: 0,
|
10
|
+
borderRadius: "7px 7px 0px 0px",
|
11
|
+
overflow: "hidden",
|
12
|
+
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
13
|
+
"& thead": {
|
14
|
+
background: appTheme?.palette?.editor?.tv_header,
|
15
|
+
height: "40px"
|
16
|
+
},
|
17
|
+
"& th": {
|
18
|
+
"& svg": {
|
19
|
+
"& .fillStroke": {
|
20
|
+
stroke: appTheme?.palette?.editor?.tv_stroke
|
21
|
+
}
|
22
|
+
}
|
23
|
+
},
|
24
|
+
"& td": {
|
25
|
+
height: "40px",
|
26
|
+
"& input": {
|
27
|
+
color: appTheme?.palette?.editor?.tv_text_primary,
|
28
|
+
background: "transparent"
|
29
|
+
}
|
30
|
+
},
|
31
|
+
"& th, tr, td": {
|
32
|
+
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`
|
33
|
+
},
|
34
|
+
"& .tv-act-btn": {
|
35
|
+
color: appTheme?.palette?.editor?.tv_text,
|
36
|
+
textTransform: "none",
|
37
|
+
"&.ico": {
|
38
|
+
"& svg": {
|
39
|
+
color: appTheme?.palette?.editor?.tv_text
|
40
|
+
}
|
41
|
+
},
|
42
|
+
"&:hover": {
|
43
|
+
color: "rgba(37, 99, 235, 1)",
|
44
|
+
"& svg": {
|
45
|
+
color: "rgba(37, 99, 235, 1)"
|
46
|
+
}
|
47
|
+
}
|
48
|
+
},
|
49
|
+
"& .la": {
|
50
|
+
justifyContent: "start"
|
51
|
+
},
|
52
|
+
"& .react-datepicker__input-container": {
|
53
|
+
"& input": {
|
54
|
+
border: "0px solid transparent"
|
55
|
+
}
|
56
|
+
},
|
57
|
+
"& .tv-ac-field": {
|
58
|
+
"&.MuiAutocomplete-root": {
|
59
|
+
"& .MuiAutocomplete-inputRoot": {
|
60
|
+
display: "flex",
|
61
|
+
flexWrap: "nowrap",
|
62
|
+
paddingTop: "3px",
|
63
|
+
paddingBottom: "3px",
|
64
|
+
paddingLeft: "3px",
|
65
|
+
maxWidth: "250px",
|
66
|
+
overflow: "hidden",
|
67
|
+
position: "relative",
|
68
|
+
"& .tv-ms-tag-wrpr": {
|
69
|
+
display: "flex",
|
70
|
+
flexWrap: "nowrap",
|
71
|
+
overflow: "auto"
|
72
|
+
},
|
73
|
+
"&.Mui-disabled": {
|
74
|
+
"& input": {
|
75
|
+
display: "none"
|
76
|
+
},
|
77
|
+
"& .tv-ms-tag-wrpr": {
|
78
|
+
"& .MuiSvgIcon-root": {
|
79
|
+
display: "none"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
}
|
83
|
+
}
|
84
|
+
}
|
85
|
+
},
|
86
|
+
"& .Mui-disabled": {
|
87
|
+
WebkitTextFillColor: "#000 !important",
|
88
|
+
"& .MuiChip-root": {
|
89
|
+
opacity: 1
|
90
|
+
}
|
91
|
+
}
|
92
|
+
}
|
93
|
+
});
|
94
|
+
export default useTableStyles;
|