@flozy/editor 10.7.2 → 10.7.4
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/DataTypes/Components/Select.js +120 -53
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +8 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
- package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
- package/package.json +1 -1
@@ -6,6 +6,7 @@ import { useEditorContext } from "../../../../../hooks/useMouseMove";
|
|
6
6
|
import useCompStyles from "./styles";
|
7
7
|
import { CloseIcon } from "../../../../../common/iconslist";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const AvatarIcon = props => {
|
10
11
|
const {
|
11
12
|
option,
|
@@ -41,7 +42,8 @@ export default function Select(props) {
|
|
41
42
|
placeholder = "",
|
42
43
|
disabled = false,
|
43
44
|
optionAvatar = false,
|
44
|
-
className = ""
|
45
|
+
className = "",
|
46
|
+
wrapColumn = false
|
45
47
|
} = props;
|
46
48
|
const value = Array.isArray(pValue) ? pValue : [];
|
47
49
|
const options = selectOptions?.length ? selectOptions.filter(s => s.value) : [];
|
@@ -57,7 +59,8 @@ export default function Select(props) {
|
|
57
59
|
newValue?.forEach(m => {
|
58
60
|
if (multiple) {
|
59
61
|
fv.push({
|
60
|
-
value: m.inputValue || m.value
|
62
|
+
value: m.inputValue || m.value,
|
63
|
+
...m
|
61
64
|
});
|
62
65
|
} else {
|
63
66
|
fv[0] = {
|
@@ -100,51 +103,51 @@ export default function Select(props) {
|
|
100
103
|
}
|
101
104
|
// Regular option
|
102
105
|
return option.value || "";
|
103
|
-
}
|
104
|
-
renderTags
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
106
|
+
}
|
107
|
+
// renderTags={(value, getTagProps) => {
|
108
|
+
// return (
|
109
|
+
// <Box
|
110
|
+
// className={`tv-ms-tag-wrpr ${className}`}
|
111
|
+
// sx={{
|
112
|
+
// "& svg": { marginRight: "5px", "& path": { stroke: "#000" } },
|
113
|
+
// flexWrap: wrapColumn ? "wrap" : "nowrap",
|
114
|
+
// overflowX: wrapColumn ? "hidden" : "auto",
|
115
|
+
// }}
|
116
|
+
// >
|
117
|
+
// {value?.map((option, index) => {
|
118
|
+
// const { key, ...tagProps } = getTagProps({ index }) || {};
|
119
|
+
// return option?.value ? (
|
120
|
+
// <Chip
|
121
|
+
// variant="outlined"
|
122
|
+
// label={option?.label || option?.value}
|
123
|
+
// key={key}
|
124
|
+
// {...tagProps}
|
125
|
+
// sx={{
|
126
|
+
// background:
|
127
|
+
// option?.color || appTheme?.palette?.editor?.tv_border1,
|
128
|
+
// border: "none",
|
129
|
+
// "& .MuiChip-label": {
|
130
|
+
// paddingLeft: "12px !important",
|
131
|
+
// paddingRight: disabled ? "12px !important" : "",
|
132
|
+
// },
|
133
|
+
// }}
|
134
|
+
// avatar={<AvatarIcon option={option} avatar={optionAvatar} />}
|
135
|
+
// deleteIcon={
|
136
|
+
// <CloseIcon
|
137
|
+
// style={{
|
138
|
+
// cursor: "pointer",
|
139
|
+
// display: disabled ? "none" : "",
|
140
|
+
// }}
|
141
|
+
// />
|
142
|
+
// }
|
143
|
+
// />
|
144
|
+
// ) : null;
|
145
|
+
// })}
|
146
|
+
// </Box>
|
147
|
+
// );
|
148
|
+
// }}
|
149
|
+
,
|
150
|
+
renderTags: () => null,
|
148
151
|
renderOption: (props, option) => {
|
149
152
|
const {
|
150
153
|
key,
|
@@ -168,13 +171,77 @@ export default function Select(props) {
|
|
168
171
|
},
|
169
172
|
freeSolo: true,
|
170
173
|
size: "small",
|
171
|
-
fullWidth: true
|
174
|
+
fullWidth: true
|
175
|
+
// renderInput={(params) => {
|
176
|
+
// return (
|
177
|
+
// <TextField
|
178
|
+
// fullWidth
|
179
|
+
// size="small"
|
180
|
+
// {...params}
|
181
|
+
// placeholder={placeholder}
|
182
|
+
// />
|
183
|
+
// );
|
184
|
+
// }}
|
185
|
+
,
|
172
186
|
renderInput: params => {
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
187
|
+
const {
|
188
|
+
InputProps,
|
189
|
+
...rest
|
190
|
+
} = params;
|
191
|
+
return /*#__PURE__*/_jsxs(Box, {
|
192
|
+
className: `tv-ms-tag-wrpr ${className}`,
|
193
|
+
sx: {
|
194
|
+
display: "flex",
|
195
|
+
flexWrap: wrapColumn ? "wrap" : "nowrap",
|
196
|
+
alignItems: "center",
|
197
|
+
minHeight: "40px",
|
198
|
+
padding: "2px",
|
199
|
+
gap: "4px",
|
200
|
+
"& .MuiChip-root": {
|
201
|
+
margin: "2px"
|
202
|
+
}
|
203
|
+
},
|
204
|
+
children: [value?.map((option, index) => /*#__PURE__*/_jsx(Chip, {
|
205
|
+
variant: "outlined",
|
206
|
+
label: option?.label || option?.value,
|
207
|
+
sx: {
|
208
|
+
background: option?.color || appTheme?.palette?.editor?.tv_border1,
|
209
|
+
maxWidth: '150px',
|
210
|
+
border: "none",
|
211
|
+
"& .MuiChip-label": {
|
212
|
+
paddingLeft: "12px !important",
|
213
|
+
paddingRight: disabled ? "12px !important" : ""
|
214
|
+
}
|
215
|
+
},
|
216
|
+
avatar: /*#__PURE__*/_jsx(AvatarIcon, {
|
217
|
+
option: option,
|
218
|
+
avatar: optionAvatar
|
219
|
+
}),
|
220
|
+
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {
|
221
|
+
style: {
|
222
|
+
cursor: "pointer",
|
223
|
+
display: disabled ? "none" : ""
|
224
|
+
}
|
225
|
+
}),
|
226
|
+
...InputProps?.startAdornment?.[index]?.props
|
227
|
+
}, index)), /*#__PURE__*/_jsx(TextField, {
|
228
|
+
...rest,
|
229
|
+
InputProps: {
|
230
|
+
...InputProps,
|
231
|
+
disableUnderline: true,
|
232
|
+
sx: {
|
233
|
+
minWidth: 120,
|
234
|
+
flexGrow: 1,
|
235
|
+
input: {
|
236
|
+
padding: "4px 8px"
|
237
|
+
}
|
238
|
+
}
|
239
|
+
},
|
240
|
+
size: "small",
|
241
|
+
placeholder: placeholder,
|
242
|
+
disabled: disabled,
|
243
|
+
variant: "standard"
|
244
|
+
})]
|
178
245
|
});
|
179
246
|
},
|
180
247
|
slotProps: {
|
@@ -7,8 +7,12 @@ const PersonType = props => {
|
|
7
7
|
rowIndex,
|
8
8
|
property,
|
9
9
|
value,
|
10
|
-
readOnly
|
10
|
+
readOnly,
|
11
|
+
settings
|
11
12
|
} = props;
|
13
|
+
const {
|
14
|
+
wrapColumn
|
15
|
+
} = settings;
|
12
16
|
const {
|
13
17
|
onChange,
|
14
18
|
users
|
@@ -22,9 +26,10 @@ const PersonType = props => {
|
|
22
26
|
value: value || [],
|
23
27
|
onChange: handleChange,
|
24
28
|
options: users || [],
|
25
|
-
multiple:
|
29
|
+
multiple: true,
|
26
30
|
disabled: readOnly,
|
27
|
-
optionAvatar: true
|
31
|
+
optionAvatar: true,
|
32
|
+
wrapColumn: wrapColumn
|
28
33
|
});
|
29
34
|
};
|
30
35
|
export default PersonType;
|
@@ -7,7 +7,7 @@ import Icon from "../../../../common/Icon";
|
|
7
7
|
import CloseIcon from "@mui/icons-material/Close";
|
8
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
|
-
const NEED_WRAPS = ["text", "multi-select"];
|
10
|
+
const NEED_WRAPS = ["text", "multi-select", "person"];
|
11
11
|
const EditProperty = props => {
|
12
12
|
const {
|
13
13
|
classes,
|