@flozy/editor 10.3.9 → 10.4.0
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/CommonEditor.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +7 -20
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +1 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
- package/dist/Editor/Elements/Embed/Image.js +2 -3
- package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
- package/dist/Editor/Elements/Form/Form.js +168 -181
- package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -3
- package/dist/Editor/Elements/Form/FormField.js +4 -10
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -5
- package/dist/Editor/Elements/FreeGrid/Options/More.js +1 -1
- package/dist/Editor/Elements/FreeGrid/styles.js +7 -61
- package/dist/Editor/Elements/List/CheckList.js +2 -3
- package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
- package/dist/Editor/Elements/Search/SearchButton.js +8 -9
- package/dist/Editor/Elements/Search/SearchList.js +7 -9
- package/dist/Editor/Elements/SimpleText/index.js +1 -6
- package/dist/Editor/Elements/Table/TableCell.js +3 -7
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +18 -43
- package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
- package/dist/Editor/common/Icon.js +1 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +8 -34
- package/dist/Editor/common/LinkSettings/index.js +69 -85
- package/dist/Editor/common/LinkSettings/style.js +30 -245
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -13
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +4 -4
- package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -147
- package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
- package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -121
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +6 -0
- package/dist/Editor/common/Select/index.js +0 -2
- package/dist/Editor/common/Shorthands/elements.js +11 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/iconListV2.js +6 -101
- package/dist/Editor/common/iconslist.js +0 -3
- package/dist/Editor/commonStyle.js +1 -70
- package/dist/Editor/hooks/useMouseMove.js +5 -2
- package/dist/Editor/utils/SlateUtilityFunctions.js +10 -12
- package/dist/Editor/utils/form.js +4 -4
- package/dist/Editor/utils/formfield.js +2 -8
- package/package.json +1 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -452
- package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
- package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
- package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
- package/dist/Editor/common/SnackBar/index.js +0 -43
@@ -1,452 +0,0 @@
|
|
1
|
-
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
2
|
-
import Autocomplete from "@mui/material/Autocomplete";
|
3
|
-
import Box from "@mui/material/Box";
|
4
|
-
import Chip from "@mui/material/Chip";
|
5
|
-
import Divider from "@mui/material/Divider";
|
6
|
-
import Popover from "@mui/material/Popover";
|
7
|
-
import TextField from "@mui/material/TextField";
|
8
|
-
import Typography from "@mui/material/Typography";
|
9
|
-
import List from "@mui/material/List";
|
10
|
-
import ListItem from "@mui/material/ListItem";
|
11
|
-
import ListItemButton from "@mui/material/ListItemButton";
|
12
|
-
import IconButton from "@mui/material/IconButton";
|
13
|
-
import SwipeableDrawer from "@mui/material/SwipeableDrawer";
|
14
|
-
import Tooltip from "@mui/material/Tooltip";
|
15
|
-
import { CloseIcon } from "../../../../../common/iconslist";
|
16
|
-
import { useEditorContext } from "../../../../../hooks/useMouseMove";
|
17
|
-
import Icon from "../../../../../common/Icon";
|
18
|
-
import { colors } from "../../../../Color Picker/defaultColors";
|
19
|
-
import PropertySettings from "../../Options";
|
20
|
-
import SnackbarAlert from "../../../../../common/SnackBar";
|
21
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
22
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
23
|
-
const EXCLUDED_COLORS = new Set(["#000000", "#0F172A", "#2563EB", "#FFFFFF", "#64748B"]);
|
24
|
-
const DEFAULT_COLORS = colors?.filter(f => !f?.includes("linear") && !EXCLUDED_COLORS?.has(f));
|
25
|
-
const generateRandomColor = () => {
|
26
|
-
const randomIndex = Math.floor(Math.random() * DEFAULT_COLORS?.length);
|
27
|
-
return DEFAULT_COLORS[randomIndex];
|
28
|
-
};
|
29
|
-
const MultiSelectWithPopover = props => {
|
30
|
-
const {
|
31
|
-
options = [],
|
32
|
-
value,
|
33
|
-
onChange,
|
34
|
-
onUpdate,
|
35
|
-
property,
|
36
|
-
wrapColumn = false
|
37
|
-
} = props;
|
38
|
-
const [anchorEl, setAnchorEl] = useState(null);
|
39
|
-
const [anchorElOption, setAnchorElOption] = useState(null);
|
40
|
-
const [currentIndex, setCurrentIndex] = useState(null);
|
41
|
-
const [selectedOptions, setSelectedOptions] = useState(value);
|
42
|
-
const [availableOptions, setAvailableOptions] = useState(options);
|
43
|
-
const [showSnackBar, setShowSnackBar] = useState(false);
|
44
|
-
const [chipColor, setChipColor] = useState(generateRandomColor());
|
45
|
-
const [inputValue, setInputValue] = useState("");
|
46
|
-
const {
|
47
|
-
theme
|
48
|
-
} = useEditorContext();
|
49
|
-
const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
|
50
|
-
const PopoverComponent = isMobile ? SwipeableDrawer : Popover;
|
51
|
-
const mode = useMemo(() => ({
|
52
|
-
type: "editOptionMulti",
|
53
|
-
edit: {
|
54
|
-
label: "Multi Select",
|
55
|
-
visible: true,
|
56
|
-
key: property,
|
57
|
-
type: "multi-select",
|
58
|
-
options: options || [],
|
59
|
-
optionIndex: currentIndex,
|
60
|
-
hideBackButton: true
|
61
|
-
}
|
62
|
-
}), [options, property, currentIndex]);
|
63
|
-
const customScrollStyles = {
|
64
|
-
scrollbarWidth: "thin",
|
65
|
-
scrollbarColor: `${theme?.palette?.editor?.brainPopupScroll} transparent`,
|
66
|
-
"&::-webkit-scrollbar": {
|
67
|
-
width: "6px"
|
68
|
-
},
|
69
|
-
"&::-webkit-scrollbar-thumb": {
|
70
|
-
backgroundColor: theme?.palette?.editor?.brainPopupScroll,
|
71
|
-
borderRadius: "3px"
|
72
|
-
},
|
73
|
-
"&::-webkit-scrollbar-track": {
|
74
|
-
display: "none"
|
75
|
-
}
|
76
|
-
};
|
77
|
-
useEffect(() => {
|
78
|
-
if (inputValue?.trim() && !chipColor) {
|
79
|
-
setChipColor(generateRandomColor());
|
80
|
-
}
|
81
|
-
}, [inputValue, chipColor]);
|
82
|
-
useEffect(() => {
|
83
|
-
if (JSON.stringify(options) !== JSON.stringify(availableOptions)) {
|
84
|
-
setAvailableOptions(options);
|
85
|
-
}
|
86
|
-
}, [options, availableOptions]);
|
87
|
-
const handleOpenPopover = useCallback(event => {
|
88
|
-
setAnchorEl(event.currentTarget);
|
89
|
-
}, []);
|
90
|
-
const handleClosePopover = useCallback(e => {
|
91
|
-
e?.stopPropagation();
|
92
|
-
setAnchorEl(null);
|
93
|
-
}, []);
|
94
|
-
const handleAddOption = newValue => {
|
95
|
-
const trimmedValue = newValue?.trim();
|
96
|
-
if (!trimmedValue) return;
|
97
|
-
const newOption = {
|
98
|
-
value: trimmedValue,
|
99
|
-
color: chipColor
|
100
|
-
};
|
101
|
-
if (!availableOptions?.some(opt => opt?.value === trimmedValue)) {
|
102
|
-
setAvailableOptions(prev => [...prev, newOption]);
|
103
|
-
setSelectedOptions(prev => [...prev, newOption]);
|
104
|
-
onUpdate([newOption, ...availableOptions]);
|
105
|
-
}
|
106
|
-
setInputValue("");
|
107
|
-
setChipColor("");
|
108
|
-
};
|
109
|
-
const onClose = () => {
|
110
|
-
setAnchorEl(anchorElOption);
|
111
|
-
setAnchorElOption(null);
|
112
|
-
};
|
113
|
-
const onEditOption = (type, data) => {
|
114
|
-
const updateData = data?.edit ? data?.edit?.options : data?.options;
|
115
|
-
onUpdate(updateData);
|
116
|
-
if (data?.edit?.options) {
|
117
|
-
const updatedSelectedOptions = selectedOptions?.filter(selOption => updateData?.some(availOption => availOption?.value === selOption?.value && availOption?.color === selOption?.color));
|
118
|
-
setSelectedOptions(updatedSelectedOptions);
|
119
|
-
onClose();
|
120
|
-
}
|
121
|
-
};
|
122
|
-
const handleEditOption = (e, index) => {
|
123
|
-
e.stopPropagation();
|
124
|
-
setCurrentIndex(index);
|
125
|
-
setAnchorElOption(anchorEl);
|
126
|
-
setAnchorEl(null);
|
127
|
-
};
|
128
|
-
const handleSelectOption = option => {
|
129
|
-
if (!selectedOptions?.some(opt => opt?.value === option?.value)) {
|
130
|
-
const updatedOptions = [...selectedOptions, option];
|
131
|
-
setSelectedOptions(updatedOptions);
|
132
|
-
onChange(updatedOptions);
|
133
|
-
} else {
|
134
|
-
setShowSnackBar(true);
|
135
|
-
}
|
136
|
-
};
|
137
|
-
const handleClearSelection = () => {
|
138
|
-
setSelectedOptions([]);
|
139
|
-
};
|
140
|
-
const handleDeleteChip = (event, option) => {
|
141
|
-
event.stopPropagation();
|
142
|
-
setSelectedOptions(prev => {
|
143
|
-
const updatedOptions = prev.filter(selected => selected?.value !== option?.value);
|
144
|
-
onChange(updatedOptions);
|
145
|
-
return updatedOptions;
|
146
|
-
});
|
147
|
-
};
|
148
|
-
const filteredOptions = availableOptions?.filter(option => option?.value?.toLowerCase()?.includes(inputValue?.toLowerCase()));
|
149
|
-
const isExactMatch = availableOptions?.some(opt => opt?.value?.toLowerCase() === inputValue?.toLowerCase());
|
150
|
-
const open = Boolean(anchorEl);
|
151
|
-
const openEditOption = Boolean(anchorElOption);
|
152
|
-
const id = open ? "autocomplete-popover" : undefined;
|
153
|
-
return /*#__PURE__*/_jsxs("div", {
|
154
|
-
children: [/*#__PURE__*/_jsx(Box, {
|
155
|
-
sx: {
|
156
|
-
display: "flex",
|
157
|
-
flexWrap: wrapColumn ? "wrap" : "nowrap",
|
158
|
-
overflowX: wrapColumn ? "hidden" : "auto",
|
159
|
-
gap: 0.5,
|
160
|
-
padding: "8px",
|
161
|
-
cursor: "pointer"
|
162
|
-
},
|
163
|
-
onClick: handleOpenPopover,
|
164
|
-
children: selectedOptions?.map((option, index) => /*#__PURE__*/_jsx(Chip, {
|
165
|
-
label: option?.value,
|
166
|
-
onDelete: event => {
|
167
|
-
handleDeleteChip(event, option);
|
168
|
-
},
|
169
|
-
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
|
170
|
-
variant: "filled",
|
171
|
-
sx: {
|
172
|
-
backgroundColor: option?.color,
|
173
|
-
color: '#0F172A',
|
174
|
-
"& .MuiChip-deleteIcon": {
|
175
|
-
flexShrink: 0,
|
176
|
-
"& path": {
|
177
|
-
stroke: '#0F172A !important'
|
178
|
-
}
|
179
|
-
},
|
180
|
-
"&:hover": {
|
181
|
-
opacity: 0.8
|
182
|
-
}
|
183
|
-
}
|
184
|
-
}, index))
|
185
|
-
}), /*#__PURE__*/_jsx(PopoverComponent, {
|
186
|
-
id: id,
|
187
|
-
open: open,
|
188
|
-
anchorEl: anchorEl,
|
189
|
-
anchor: "bottom",
|
190
|
-
onClose: e => handleClosePopover(e),
|
191
|
-
anchorOrigin: {
|
192
|
-
vertical: "top",
|
193
|
-
horizontal: "left"
|
194
|
-
},
|
195
|
-
transformOrigin: {
|
196
|
-
vertical: "top",
|
197
|
-
horizontal: "left"
|
198
|
-
},
|
199
|
-
sx: {
|
200
|
-
"& .MuiPaper-root": {
|
201
|
-
borderRadius: "20px",
|
202
|
-
background: theme?.palette?.editor?.textFormatBgColor,
|
203
|
-
border: `1px solid ${theme?.palette?.editor?.popUpBorderColor}`,
|
204
|
-
boxShadow: "0px 4px 10px 0px #00000029"
|
205
|
-
}
|
206
|
-
},
|
207
|
-
disableAutoFocus: true,
|
208
|
-
disableEnforceFocus: true,
|
209
|
-
disableRestoreFocus: true,
|
210
|
-
children: /*#__PURE__*/_jsxs(Box, {
|
211
|
-
sx: {
|
212
|
-
width: isMobile ? "100%" : 300
|
213
|
-
},
|
214
|
-
children: [/*#__PURE__*/_jsx(Autocomplete, {
|
215
|
-
multiple: true,
|
216
|
-
freeSolo: true,
|
217
|
-
disablePortal: true,
|
218
|
-
PopperComponent: () => null,
|
219
|
-
sx: {
|
220
|
-
"& .MuiFormControl-root": {
|
221
|
-
maxHeight: "250px",
|
222
|
-
overflowY: "auto",
|
223
|
-
overflowX: "hidden",
|
224
|
-
pr: '12px',
|
225
|
-
pl: '12px',
|
226
|
-
marginTop: '12px',
|
227
|
-
...customScrollStyles
|
228
|
-
}
|
229
|
-
},
|
230
|
-
disableClearable: true,
|
231
|
-
options: [],
|
232
|
-
getOptionLabel: option => options?.value || "",
|
233
|
-
value: selectedOptions,
|
234
|
-
onChange: (event, newValues) => {
|
235
|
-
const addedOptions = newValues?.filter(value => typeof value === "object" || typeof value === "string" && value?.trim() !== "")?.map(value => typeof value === "string" ? {
|
236
|
-
value,
|
237
|
-
color: chipColor
|
238
|
-
} : value);
|
239
|
-
const isDuplicate = addedOptions?.some(newOpt => (selectedOptions || [])?.some(opt => opt.value === newOpt.value));
|
240
|
-
if (!isDuplicate) {
|
241
|
-
setSelectedOptions([...selectedOptions, ...addedOptions]);
|
242
|
-
}
|
243
|
-
},
|
244
|
-
inputValue: inputValue,
|
245
|
-
onInputChange: (event, newInputValue) => setInputValue(newInputValue),
|
246
|
-
onKeyDown: event => {
|
247
|
-
if (event.key === "Enter" && inputValue.trim()) {
|
248
|
-
event.preventDefault();
|
249
|
-
handleAddOption(inputValue);
|
250
|
-
}
|
251
|
-
},
|
252
|
-
filterOptions: (options, params) => options?.filter(option => option?.value?.toLowerCase()?.includes(params?.inputValue?.toLowerCase())),
|
253
|
-
renderInput: params => /*#__PURE__*/_jsx(TextField, {
|
254
|
-
...params,
|
255
|
-
variant: "standard",
|
256
|
-
InputProps: {
|
257
|
-
...params.InputProps,
|
258
|
-
disableUnderline: true,
|
259
|
-
sx: {
|
260
|
-
display: "flex",
|
261
|
-
flexWrap: "wrap",
|
262
|
-
fontFamily: "Inter",
|
263
|
-
fontWeight: 400,
|
264
|
-
fontSize: "12px",
|
265
|
-
color: theme?.palette?.editor?.secondaryTextColor,
|
266
|
-
"&::placeholder": {
|
267
|
-
color: theme?.palette?.editor?.secondaryTextColor
|
268
|
-
},
|
269
|
-
"& .MuiAutocomplete-input": {
|
270
|
-
minWidth: "100px !important"
|
271
|
-
}
|
272
|
-
},
|
273
|
-
endAdornment: /*#__PURE__*/_jsx(Tooltip, {
|
274
|
-
arrow: true,
|
275
|
-
title: "Clear Selected",
|
276
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
277
|
-
onClick: handleClearSelection,
|
278
|
-
sx: {
|
279
|
-
padding: 0,
|
280
|
-
minWidth: "unset",
|
281
|
-
"& .MuiSvgIcon-root": {
|
282
|
-
fontSize: 20
|
283
|
-
},
|
284
|
-
'& rect': {
|
285
|
-
fill: theme?.palette?.editor?.closeButtonSvgStroke
|
286
|
-
},
|
287
|
-
'&:hover': {
|
288
|
-
backgroundColor: 'transparent'
|
289
|
-
}
|
290
|
-
},
|
291
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
292
|
-
icon: "resetIconNew"
|
293
|
-
})
|
294
|
-
})
|
295
|
-
})
|
296
|
-
},
|
297
|
-
sx: {
|
298
|
-
backgroundColor: "transparent",
|
299
|
-
fontFamily: 'Inter',
|
300
|
-
fontWeight: 400,
|
301
|
-
fontSize: '12px'
|
302
|
-
},
|
303
|
-
placeholder: "Create new one..."
|
304
|
-
}),
|
305
|
-
renderTags: (tagValues, getTagProps) => tagValues.map((option, index) => /*#__PURE__*/_jsx(Chip, {
|
306
|
-
variant: "filled",
|
307
|
-
label: option?.value,
|
308
|
-
...getTagProps({
|
309
|
-
index
|
310
|
-
}),
|
311
|
-
onDelete: event => {
|
312
|
-
handleDeleteChip(event, option);
|
313
|
-
},
|
314
|
-
deleteIcon: /*#__PURE__*/_jsx(CloseIcon, {}),
|
315
|
-
sx: {
|
316
|
-
backgroundColor: option?.color,
|
317
|
-
color: '#0F172A',
|
318
|
-
"& .MuiChip-deleteIcon": {
|
319
|
-
flexShrink: 0,
|
320
|
-
"& path": {
|
321
|
-
stroke: '#0F172A !important'
|
322
|
-
}
|
323
|
-
},
|
324
|
-
"&:hover": {
|
325
|
-
opacity: 0.8
|
326
|
-
}
|
327
|
-
}
|
328
|
-
}, index))
|
329
|
-
}), /*#__PURE__*/_jsx(Divider, {
|
330
|
-
sx: {
|
331
|
-
mt: '12px',
|
332
|
-
borderBottom: `1px solid ${theme?.palette?.editor?.popUpBorderColor}`,
|
333
|
-
boxShadow: theme?.palette?.editor?.dividerDropShadow
|
334
|
-
}
|
335
|
-
}), /*#__PURE__*/_jsx(Box, {
|
336
|
-
sx: {
|
337
|
-
pl: '4px'
|
338
|
-
},
|
339
|
-
children: /*#__PURE__*/_jsxs(List, {
|
340
|
-
sx: {
|
341
|
-
maxHeight: "250px",
|
342
|
-
overflowY: "auto",
|
343
|
-
...customScrollStyles
|
344
|
-
},
|
345
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
346
|
-
sx: {
|
347
|
-
mb: 1,
|
348
|
-
pl: '8px',
|
349
|
-
color: theme?.palette?.editor?.secondaryTextColor,
|
350
|
-
fontFamily: 'Inter',
|
351
|
-
fontWeight: 400,
|
352
|
-
fontSize: '12px'
|
353
|
-
},
|
354
|
-
children: "Choose an option or create one"
|
355
|
-
}), filteredOptions?.map((option, index) => /*#__PURE__*/_jsx(ListItem, {
|
356
|
-
sx: {
|
357
|
-
padding: 0
|
358
|
-
},
|
359
|
-
disablePadding: true,
|
360
|
-
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
361
|
-
onClick: () => handleSelectOption(option),
|
362
|
-
sx: {
|
363
|
-
paddingTop: "4px",
|
364
|
-
paddingBottom: "4px",
|
365
|
-
justifyContent: 'space-between',
|
366
|
-
'&:hover': {
|
367
|
-
'& path': {
|
368
|
-
stroke: theme?.palette?.editor?.activeColor
|
369
|
-
},
|
370
|
-
borderRadius: '12px'
|
371
|
-
}
|
372
|
-
},
|
373
|
-
children: [/*#__PURE__*/_jsx(Chip, {
|
374
|
-
label: option?.value,
|
375
|
-
sx: {
|
376
|
-
backgroundColor: option?.color,
|
377
|
-
color: '#0F172A',
|
378
|
-
fontWeight: 500,
|
379
|
-
fontSize: "12px",
|
380
|
-
fontFamily: "Inter",
|
381
|
-
padding: "4px 12px",
|
382
|
-
borderRadius: "16px",
|
383
|
-
maxWidth: "180px",
|
384
|
-
whiteSpace: "nowrap",
|
385
|
-
overflow: "hidden",
|
386
|
-
textOverflow: "ellipsis"
|
387
|
-
}
|
388
|
-
}), /*#__PURE__*/_jsx(IconButton, {
|
389
|
-
size: "small",
|
390
|
-
sx: {
|
391
|
-
'& path': {
|
392
|
-
stroke: theme?.palette?.editor?.closeButtonSvgStroke
|
393
|
-
},
|
394
|
-
'&:hover': {
|
395
|
-
backgroundColor: 'transparent'
|
396
|
-
}
|
397
|
-
},
|
398
|
-
onClick: e => handleEditOption(e, index),
|
399
|
-
children: /*#__PURE__*/_jsx(Icon, {
|
400
|
-
icon: "rightArrow"
|
401
|
-
})
|
402
|
-
})]
|
403
|
-
})
|
404
|
-
}, index)), inputValue?.trim() && !isExactMatch && /*#__PURE__*/_jsx(ListItem, {
|
405
|
-
disablePadding: true,
|
406
|
-
children: /*#__PURE__*/_jsxs(ListItemButton, {
|
407
|
-
onClick: () => handleAddOption(inputValue),
|
408
|
-
sx: {
|
409
|
-
display: "flex",
|
410
|
-
alignItems: "center"
|
411
|
-
},
|
412
|
-
children: [/*#__PURE__*/_jsx(Typography, {
|
413
|
-
sx: {
|
414
|
-
color: theme?.palette?.editor?.secondaryTextColor,
|
415
|
-
marginRight: "6px",
|
416
|
-
fontSize: "14px",
|
417
|
-
fontFamily: "Inter"
|
418
|
-
},
|
419
|
-
children: "Create"
|
420
|
-
}), /*#__PURE__*/_jsx(Chip, {
|
421
|
-
label: `${inputValue}`,
|
422
|
-
sx: {
|
423
|
-
backgroundColor: chipColor,
|
424
|
-
color: '#0F172A',
|
425
|
-
fontWeight: 500,
|
426
|
-
fontSize: "12px",
|
427
|
-
fontFamily: "Inter",
|
428
|
-
borderRadius: "16px",
|
429
|
-
maxWidth: "180px",
|
430
|
-
whiteSpace: "nowrap",
|
431
|
-
overflow: "hidden",
|
432
|
-
textOverflow: "ellipsis"
|
433
|
-
}
|
434
|
-
})]
|
435
|
-
})
|
436
|
-
})]
|
437
|
-
})
|
438
|
-
})]
|
439
|
-
})
|
440
|
-
}), openEditOption ? /*#__PURE__*/_jsx(PropertySettings, {
|
441
|
-
open: openEditOption,
|
442
|
-
anchorEl: anchorElOption,
|
443
|
-
mode: mode,
|
444
|
-
onClose: onClose,
|
445
|
-
onEvent: onEditOption
|
446
|
-
}) : null, showSnackBar ? /*#__PURE__*/_jsx(SnackbarAlert, {
|
447
|
-
message: "Option already selected!",
|
448
|
-
setShowSnackBar: setShowSnackBar
|
449
|
-
}) : null]
|
450
|
-
});
|
451
|
-
};
|
452
|
-
export default MultiSelectWithPopover;
|
@@ -1,89 +0,0 @@
|
|
1
|
-
const Styles = theme => ({
|
2
|
-
root: {
|
3
|
-
"& .MuiPaper-root": {
|
4
|
-
borderRadius: "12px",
|
5
|
-
backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
|
6
|
-
border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder}`,
|
7
|
-
overflow: "hidden"
|
8
|
-
},
|
9
|
-
"& textarea": {
|
10
|
-
backgroundColor: theme?.palette?.editor?.inputFieldBgColor,
|
11
|
-
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
|
12
|
-
borderRadius: "12px",
|
13
|
-
padding: "10px !important",
|
14
|
-
color: theme?.palette?.editor?.textColor,
|
15
|
-
boxShadow: "0px 4px 18px 0px #00000014",
|
16
|
-
"&:focus": {
|
17
|
-
border: `1px solid #2563EB`,
|
18
|
-
boxShadow: "0px 4px 18px 0px #2563EB1F",
|
19
|
-
outline: "none"
|
20
|
-
},
|
21
|
-
"&:focus-visible": {
|
22
|
-
border: `1px solid #2563EB`,
|
23
|
-
boxShadow: "0px 4px 18px 0px #2563EB1F",
|
24
|
-
outline: "none"
|
25
|
-
}
|
26
|
-
},
|
27
|
-
"& .MuiDialogTitle-root": {
|
28
|
-
padding: "20px 24px 16px 24px"
|
29
|
-
},
|
30
|
-
"& .title": {
|
31
|
-
color: theme?.palette?.editor?.textColor,
|
32
|
-
fontWeight: 600,
|
33
|
-
fontSize: "20px",
|
34
|
-
fontFamily: "Inter, sans-serif"
|
35
|
-
},
|
36
|
-
"& .close-popupbtn": {
|
37
|
-
background: theme?.palette?.editor?.closeButtonBgColor,
|
38
|
-
color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`,
|
39
|
-
"& svg": {
|
40
|
-
color: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
|
41
|
-
}
|
42
|
-
},
|
43
|
-
"& .divider": {
|
44
|
-
margin: "0px 24px",
|
45
|
-
background: theme?.palette?.editor?.deviderBgColor
|
46
|
-
},
|
47
|
-
"& .save-btn": {
|
48
|
-
backgroundColor: "#2563EB",
|
49
|
-
color: "#ffffff",
|
50
|
-
fontWeight: 600,
|
51
|
-
fontSize: "14px",
|
52
|
-
opacity: 1,
|
53
|
-
borderRadius: "8px",
|
54
|
-
textTransform: "math-auto",
|
55
|
-
height: "36px",
|
56
|
-
padding: "0px 12px",
|
57
|
-
minWidth: "90px",
|
58
|
-
"&:hover": {
|
59
|
-
backgroundColor: "#2563EB"
|
60
|
-
},
|
61
|
-
"@media only screen and (max-width: 899px)": {
|
62
|
-
width: "50%"
|
63
|
-
}
|
64
|
-
},
|
65
|
-
"& .clear-btn": {
|
66
|
-
padding: "8px 12px",
|
67
|
-
color: theme?.palette?.editor?.customDialogueCloseBtnColor,
|
68
|
-
fontWeight: 600,
|
69
|
-
fontSize: "14px",
|
70
|
-
opacity: 1,
|
71
|
-
borderRadius: "8px",
|
72
|
-
textTransform: "math-auto",
|
73
|
-
height: "36px",
|
74
|
-
minWidth: "90px",
|
75
|
-
backgroundColor: theme?.palette?.editor?.closeButtonBackground,
|
76
|
-
border: `1px solid ${theme?.palette?.editor?.customDialogueCloseBtnBorder}`,
|
77
|
-
"&:hover": {
|
78
|
-
backgroundColor: theme?.palette?.editor?.closeButtonBackground
|
79
|
-
},
|
80
|
-
"@media only screen and (max-width: 899px)": {
|
81
|
-
width: "50%"
|
82
|
-
}
|
83
|
-
},
|
84
|
-
"& .MuiDialogActions-root": {
|
85
|
-
padding: "0px 22px 16px 0px"
|
86
|
-
}
|
87
|
-
}
|
88
|
-
});
|
89
|
-
export default Styles;
|
@@ -1,31 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
const ClearAllIcon = () => /*#__PURE__*/_jsxs("svg", {
|
4
|
-
xmlns: "http://www.w3.org/2000/svg",
|
5
|
-
width: "20",
|
6
|
-
height: "20",
|
7
|
-
viewBox: "0 0 20 20",
|
8
|
-
children: [/*#__PURE__*/_jsx("rect", {
|
9
|
-
x: "4",
|
10
|
-
y: "5",
|
11
|
-
width: "12",
|
12
|
-
height: "2",
|
13
|
-
rx: "1",
|
14
|
-
fill: "currentColor"
|
15
|
-
}), /*#__PURE__*/_jsx("rect", {
|
16
|
-
x: "4",
|
17
|
-
y: "9",
|
18
|
-
width: "10",
|
19
|
-
height: "2",
|
20
|
-
rx: "1",
|
21
|
-
fill: "currentColor"
|
22
|
-
}), /*#__PURE__*/_jsx("rect", {
|
23
|
-
x: "4",
|
24
|
-
y: "13",
|
25
|
-
width: "12",
|
26
|
-
height: "2",
|
27
|
-
rx: "1",
|
28
|
-
fill: "currentColor"
|
29
|
-
})]
|
30
|
-
});
|
31
|
-
export default ClearAllIcon;
|
@@ -1,23 +0,0 @@
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
2
|
-
import { jsxs as _jsxs } from "react/jsx-runtime";
|
3
|
-
const ResetIconNew = () => {
|
4
|
-
return /*#__PURE__*/_jsxs("svg", {
|
5
|
-
width: "17",
|
6
|
-
height: "17",
|
7
|
-
viewBox: "0 0 17 17",
|
8
|
-
fill: "none",
|
9
|
-
xmlns: "http://www.w3.org/2000/svg",
|
10
|
-
children: [/*#__PURE__*/_jsx("circle", {
|
11
|
-
cx: "8.10105",
|
12
|
-
cy: "8.10234",
|
13
|
-
r: "8",
|
14
|
-
transform: "rotate(-89.2717 8.10105 8.10234)",
|
15
|
-
fill: "#2563EB",
|
16
|
-
fillOpacity: "0.16"
|
17
|
-
}), /*#__PURE__*/_jsx("path", {
|
18
|
-
d: "M12.7169 8.22222V8.22222C12.7168 8.2323 12.7289 8.23752 12.7361 8.2305L13.3823 7.6035C13.6597 7.33434 14.0843 7.33974 14.3547 7.61586C14.6252 7.89199 14.6198 8.31458 14.3424 8.58375L12.6992 10.1595C12.3035 10.5389 11.6762 10.5291 11.2926 10.1375L9.71318 8.5249C9.57796 8.38683 9.51173 8.20874 9.51381 8.04516C9.51606 7.86794 9.58679 7.69159 9.72531 7.57064C10.0027 7.30148 10.4273 7.30688 10.6977 7.583L11.3182 8.21649C11.3288 8.22729 11.3471 8.21993 11.3473 8.20481V8.20481C11.374 6.10545 9.67017 4.36586 7.56099 4.33905C5.45182 4.31224 3.70429 6.00795 3.6776 8.10731C3.65091 10.2067 5.35477 11.9463 7.46394 11.9731C7.84743 11.9779 8.14493 12.2817 8.14007 12.6634C8.13522 13.0451 7.8301 13.3412 7.44661 13.3363C4.57046 13.2997 2.27161 10.9527 2.30801 8.0899C2.3444 5.22714 4.70217 2.93927 7.57832 2.97583C10.4408 3.01222 12.7533 5.35946 12.7169 8.22222Z",
|
19
|
-
fill: "#2563EB"
|
20
|
-
})]
|
21
|
-
});
|
22
|
-
};
|
23
|
-
export default ResetIconNew;
|
@@ -1,43 +0,0 @@
|
|
1
|
-
import Snackbar from "@mui/material/Snackbar";
|
2
|
-
import Alert from "@mui/material/Alert";
|
3
|
-
import { useState } from "react";
|
4
|
-
import { useEditorContext } from "../../hooks/useMouseMove";
|
5
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
-
const SnackbarAlert = ({
|
7
|
-
message,
|
8
|
-
setShowSnackBar,
|
9
|
-
severity = "info"
|
10
|
-
}) => {
|
11
|
-
const [open, setOpen] = useState(!!message);
|
12
|
-
const {
|
13
|
-
theme
|
14
|
-
} = useEditorContext();
|
15
|
-
return /*#__PURE__*/_jsx(Snackbar, {
|
16
|
-
open: open,
|
17
|
-
autoHideDuration: 3000,
|
18
|
-
onClose: () => {
|
19
|
-
setOpen(false);
|
20
|
-
setShowSnackBar(false);
|
21
|
-
},
|
22
|
-
anchorOrigin: {
|
23
|
-
vertical: "top",
|
24
|
-
horizontal: "right"
|
25
|
-
},
|
26
|
-
children: /*#__PURE__*/_jsx(Alert, {
|
27
|
-
severity: severity,
|
28
|
-
onClose: () => {
|
29
|
-
setOpen(false);
|
30
|
-
setShowSnackBar(false);
|
31
|
-
},
|
32
|
-
sx: {
|
33
|
-
background: theme?.palette?.primary?.gradientBtn,
|
34
|
-
color: "#FFFFFF",
|
35
|
-
"& .MuiAlert-icon": {
|
36
|
-
color: "#FFFFFF"
|
37
|
-
}
|
38
|
-
},
|
39
|
-
children: message
|
40
|
-
})
|
41
|
-
});
|
42
|
-
};
|
43
|
-
export default SnackbarAlert;
|