@flozy/editor 4.5.8 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/dist/Editor/ChatEditor.js +8 -0
  2. package/dist/Editor/CommonEditor.js +16 -15
  3. package/dist/Editor/Editor.css +19 -1
  4. package/dist/Editor/Elements/AI/AIInput.js +4 -5
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +40 -29
  6. package/dist/Editor/Elements/AI/Styles.js +1 -1
  7. package/dist/Editor/Elements/Button/EditorButton.js +8 -4
  8. package/dist/Editor/Elements/Embed/Embed.css +1 -1
  9. package/dist/Editor/Elements/Embed/Image.js +4 -3
  10. package/dist/Editor/Elements/Embed/Video.js +9 -7
  11. package/dist/Editor/Elements/Form/Form.js +0 -1
  12. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +3 -12
  13. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +30 -0
  14. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -0
  15. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -1
  16. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +4 -0
  17. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +5 -1
  18. package/dist/Editor/Elements/FreeGrid/styles.js +82 -1
  19. package/dist/Editor/Elements/Signature/SignaturePopup.js +24 -7
  20. package/dist/Editor/Elements/Signature/Signed.js +1 -1
  21. package/dist/Editor/Elements/SimpleText/index.js +7 -8
  22. package/dist/Editor/Elements/Table/TableRow.js +1 -1
  23. package/dist/Editor/Styles/EditorStyles.js +2 -2
  24. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  25. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +35 -29
  26. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +35 -30
  27. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -4
  28. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +22 -38
  29. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -1
  30. package/dist/Editor/Toolbar/PopupTool/index.js +5 -5
  31. package/dist/Editor/common/FontLoader/FontLoader.js +6 -6
  32. package/dist/Editor/common/Icon.js +1 -1
  33. package/dist/Editor/common/LinkSettings/index.js +3 -2
  34. package/dist/Editor/common/LinkSettings/navOptions.js +4 -1
  35. package/dist/Editor/common/RnD/DragOver/index.js +0 -1
  36. package/dist/Editor/common/RnD/ElementOptions/Actions.js +14 -1
  37. package/dist/Editor/common/RnD/ElementOptions/styles.js +5 -0
  38. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -1
  39. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +53 -0
  40. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +32 -2
  41. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +2 -1
  42. package/dist/Editor/common/RnD/RnDCopy.js +2 -0
  43. package/dist/Editor/common/RnD/Utils/gridDropItem.js +5 -3
  44. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -1
  45. package/dist/Editor/common/RnD/index.js +67 -37
  46. package/dist/Editor/common/Section/index.js +11 -1
  47. package/dist/Editor/common/Section/styles.js +16 -0
  48. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +19 -0
  49. package/dist/Editor/common/iconslist.js +23 -0
  50. package/dist/Editor/helper/RnD/focusNode.js +74 -0
  51. package/dist/Editor/helper/index.js +5 -2
  52. package/dist/Editor/helper/theme.js +2 -2
  53. package/dist/Editor/hooks/useBreakpoints.js +1 -1
  54. package/dist/Editor/hooks/useDragging.js +51 -0
  55. package/dist/Editor/hooks/useMouseMove.js +5 -4
  56. package/dist/Editor/hooks/withCommon.js +1 -0
  57. package/dist/Editor/hooks/withRestrictedNodes.js +48 -0
  58. package/dist/Editor/utils/Decorators/highlightSelection.js +16 -0
  59. package/dist/Editor/utils/Decorators/index.js +3 -2
  60. package/dist/Editor/utils/RnD/RnDCtrlCmds.js +16 -1
  61. package/dist/Editor/utils/SlateUtilityFunctions.js +33 -5
  62. package/dist/Editor/utils/customHooks/useResize.js +4 -5
  63. package/dist/Editor/utils/events.js +71 -0
  64. package/dist/Editor/utils/helper.js +16 -0
  65. package/package.json +1 -1
@@ -20,6 +20,9 @@ const useFreeGridStyles = ({
20
20
  marginLeft: `calc((100% - ${MAX_DEVICE_WIDTH}px) * 0.5)`,
21
21
  "&.active-drag": {
22
22
  pointerEvents: "none",
23
+ "& *": {
24
+ pointerEvents: "none"
25
+ },
23
26
  zIndex: "9999 !important"
24
27
  },
25
28
  "&.inactive-drag": {
@@ -160,6 +163,51 @@ const useFreeGridStyles = ({
160
163
  }
161
164
  }
162
165
  },
166
+ "& .fgi_type_signature": {
167
+ height: "100%",
168
+ "& .signature-container": {
169
+ height: "100%",
170
+ "& .signature-btn-container": {
171
+ height: "100%",
172
+ display: "flex",
173
+ flexDirection: "column",
174
+ "& .sign-placeholder": {
175
+ display: "flex",
176
+ // remove hidden sign placeholder
177
+ width: "100%",
178
+ background: theme?.palette?.editor?.background,
179
+ flexGrow: 1
180
+ },
181
+ "& button": {
182
+ margin: "6px 0px"
183
+ }
184
+ }
185
+ }
186
+ },
187
+ "& .fgi_type_sign": {
188
+ width: "100%",
189
+ height: "100%",
190
+ "& .signature-signed-wrapper": {
191
+ width: "100%",
192
+ height: "100%",
193
+ "& .signature-signed-span": {
194
+ width: "100%",
195
+ height: "100%",
196
+ "& .signed-btn": {
197
+ width: "100%",
198
+ height: "100%",
199
+ display: "flex",
200
+ flexDirection: "column",
201
+ "& img": {
202
+ width: "100% !important",
203
+ maxWidth: "none !important",
204
+ height: "70% !important",
205
+ flexGrow: 1
206
+ }
207
+ }
208
+ }
209
+ }
210
+ },
163
211
  "& .fgi_type_box": {
164
212
  display: "grid",
165
213
  width: "100%",
@@ -169,9 +217,26 @@ const useFreeGridStyles = ({
169
217
  "& .freegrid-item": {
170
218
  marginLeft: "0px"
171
219
  // pointerEvents: "none",
220
+ },
221
+
222
+ "&.rnd-dragOver": {
223
+ outline: "2px solid #116dff",
224
+ "&:before": {
225
+ content: '"Attach to Box"',
226
+ position: "absolute",
227
+ top: "-36px",
228
+ left: 0,
229
+ right: 0,
230
+ margin: "0px auto",
231
+ width: "fit-content",
232
+ background: "#116dff",
233
+ padding: "8px 12px",
234
+ color: "#FFF",
235
+ fontSize: "14px",
236
+ borderRadius: "7px"
237
+ }
172
238
  }
173
239
  },
174
-
175
240
  "& .fgi_type_form": {
176
241
  "& .form-field": {
177
242
  "& input": {
@@ -252,6 +317,22 @@ const useFreeGridStyles = ({
252
317
  [theme.breakpoints.between("xs", "md")]: {
253
318
  marginLeft: `calc((100% - 320px) * 0.5)`
254
319
  }
320
+ },
321
+ "&.rnd-dragOver": {
322
+ "&:before": {
323
+ content: '"Attact to this Section"',
324
+ position: "absolute",
325
+ top: 0,
326
+ left: 0,
327
+ right: 0,
328
+ margin: "0px auto",
329
+ width: "fit-content",
330
+ background: "#116dff",
331
+ padding: "8px 12px",
332
+ color: "#FFF",
333
+ fontSize: "14px",
334
+ borderRadius: "7px"
335
+ }
255
336
  }
256
337
  }
257
338
  },
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from "react";
2
- import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment } from "@mui/material";
2
+ import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment, Box } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
4
  import DatePicker from "react-datepicker";
5
5
  import "react-datepicker/dist/react-datepicker.css";
@@ -11,6 +11,7 @@ import { useEditorContext } from "../../hooks/useMouseMove";
11
11
  import { validationMethods } from "../Form/FormElements/validations";
12
12
  import { CalenderDownIconSignature, CalenderIconSignature } from "../../common/iconListV2";
13
13
  import ColorPickerButton from "../../common/ColorPickerButton";
14
+ import { SignaturePlaceholderIcon } from "../../common/iconslist";
14
15
  import { jsx as _jsx } from "react/jsx-runtime";
15
16
  import { jsxs as _jsxs } from "react/jsx-runtime";
16
17
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -24,7 +25,8 @@ const SignaturePopup = props => {
24
25
  onSave,
25
26
  onClear,
26
27
  customProps,
27
- className
28
+ className,
29
+ onlyPopup
28
30
  } = props;
29
31
  const {
30
32
  readOnly,
@@ -52,6 +54,9 @@ const SignaturePopup = props => {
52
54
  };
53
55
  const handleClose = () => {
54
56
  setOpen(false);
57
+ if (props.handleClose) {
58
+ props.handleClose();
59
+ }
55
60
  };
56
61
  const handleSave = async () => {
57
62
  await customProps?.services("workFlowAction", {
@@ -125,16 +130,28 @@ const SignaturePopup = props => {
125
130
  isEmpty = signedData?.signature === "" && signedData?.signedText === "" || signedData?.signedBy === "" || signedData?.signedByEmail === "";
126
131
  }
127
132
  return /*#__PURE__*/_jsxs(_Fragment, {
128
- children: [/*#__PURE__*/_jsx("div", {
133
+ children: [onlyPopup ? null : /*#__PURE__*/_jsxs("div", {
129
134
  className: `signature-btn-container`,
130
- children: /*#__PURE__*/_jsx(Button, {
131
- contentEditable: false,
135
+ contentEditable: false,
136
+ children: [/*#__PURE__*/_jsxs(Box, {
137
+ className: "sign-placeholder",
138
+ children: [/*#__PURE__*/_jsx(SignaturePlaceholderIcon, {}), /*#__PURE__*/_jsx(Typography, {
139
+ variant: "body2",
140
+ style: {
141
+ color: "#A2B0B9"
142
+ },
143
+ children: "Your sign will be placed here"
144
+ })]
145
+ }), /*#__PURE__*/_jsx(Button, {
132
146
  onClick: handleOpen,
147
+ style: {
148
+ width: "fit-content"
149
+ },
133
150
  children: "Sign Here"
134
- })
151
+ })]
135
152
  }), /*#__PURE__*/_jsx(Dialog, {
136
153
  className: `${className} dialogComp`,
137
- open: open,
154
+ open: onlyPopup || open,
138
155
  onClose: handleClose,
139
156
  fullWidth: true,
140
157
  PaperProps: {
@@ -47,7 +47,7 @@ const Signed = props => {
47
47
  src: signature,
48
48
  alt: "signature",
49
49
  style: {
50
- width: "200px",
50
+ maxWidth: "200px",
51
51
  height: "auto",
52
52
  marginBottom: "4px"
53
53
  }
@@ -6,6 +6,7 @@ import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
+ import { Fragment as _Fragment } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  import { createElement as _createElement } from "react";
11
12
  const SimpleText = props => {
@@ -47,20 +48,18 @@ const SimpleText = props => {
47
48
  sx: classes.root,
48
49
  key: `para_${path.join("|")}`
49
50
  }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
50
- className: "placeholder-simple-text",
51
51
  contentEditable: false,
52
- children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs("span", {
53
- className: "placeholder-simple-text-default",
54
- contentEditable: false,
55
- children: ["Type", " ", /*#__PURE__*/_jsx("span", {
52
+ className: "placeholder-simple-text",
53
+ children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
54
+ children: ["Type ", /*#__PURE__*/_jsx("span", {
55
+ contentEditable: false,
56
56
  style: {
57
- backgroundColor: "#F2F6FA",
57
+ backgroundColor: '#F2F6FA',
58
58
  padding: "0px 2px",
59
59
  borderRadius: "2px"
60
60
  },
61
- contentEditable: false,
62
61
  children: "/"
63
- }), " ", "to browse elements"]
62
+ }), " to browse elements"]
64
63
  }) : "" : ""
65
64
  }));
66
65
  };
@@ -23,7 +23,7 @@ const TableRow = props => {
23
23
  return /*#__PURE__*/_jsx("tr", {
24
24
  ...attributes,
25
25
  style: {
26
- background: bgColor,
26
+ backgroundColor: bgColor,
27
27
  border: rowBorderColor ? `1px solid ${rowBorderColor}` : ""
28
28
  },
29
29
  children: children
@@ -215,7 +215,7 @@ const editorStyles = ({
215
215
  },
216
216
  "& .content-editable.empty": {
217
217
  "&:after": {
218
- color: placeHolderColor
218
+ color: theme?.palette?.type === "dark" ? "#99A5B6" : placeHolderColor
219
219
  }
220
220
  },
221
221
  "& .checkbox-edit": {
@@ -286,7 +286,7 @@ const editorStyles = ({
286
286
  }
287
287
  },
288
288
  "& ::selection": {
289
- color: "black",
289
+ color: "inherit",
290
290
  background: "#EAEBFE"
291
291
  }
292
292
  },
@@ -123,8 +123,7 @@ const MiniToolbar = props => {
123
123
  label,
124
124
  icon: Icon
125
125
  }) => {
126
- const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false; // for textFormat type
127
-
126
+ const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
128
127
  return /*#__PURE__*/_jsx(Tooltip, {
129
128
  arrow: true,
130
129
  title: label,
@@ -1,22 +1,28 @@
1
1
  import React from "react";
2
- import { Box, Card, CardMedia, Grid } from "@mui/material";
3
-
4
- // const Select = (props) => {
5
- // const { classes, data, onSelectTemplate } = props;
6
- // return (
7
- // <Box
8
- // className="template-card-action"
9
- // component={"div"}
10
- // sx={classes.templateCardBtnGrp}
11
- // style={{ padding: 0, background: "transparent"}}
12
- // >
13
- // <Button className="blueBtn" onClick={onSelectTemplate(data)}>
14
- // Select
15
- // </Button>
16
- // </Box>
17
- // );
18
- // };
2
+ import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
19
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ const Select = props => {
6
+ const {
7
+ classes,
8
+ data,
9
+ onSelectTemplate
10
+ } = props;
11
+ return /*#__PURE__*/_jsx(Box, {
12
+ className: "template-card-action",
13
+ component: "div",
14
+ sx: classes.templateCardBtnGrp,
15
+ style: {
16
+ padding: 0,
17
+ background: "transparent"
18
+ },
19
+ children: /*#__PURE__*/_jsx(Button, {
20
+ className: "blueBtn",
21
+ onClick: onSelectTemplate(data),
22
+ children: "Select"
23
+ })
24
+ });
25
+ };
20
26
  const ButtonTemplateCard = props => {
21
27
  const {
22
28
  classes,
@@ -28,19 +34,19 @@ const ButtonTemplateCard = props => {
28
34
  xs: 3,
29
35
  children: /*#__PURE__*/_jsx(Card, {
30
36
  sx: classes.paperOverrides,
31
- children: /*#__PURE__*/_jsx(Box, {
37
+ children: /*#__PURE__*/_jsxs(Box, {
32
38
  sx: classes.buttonCardMediaWrpr,
33
- onClick: onSelectTemplate(m),
34
- children: /*#__PURE__*/_jsx("div", {
35
- className: "img-wrapper",
36
- children: /*#__PURE__*/_jsx(CardMedia, {
37
- className: `template-card-media`,
38
- component: "div",
39
- image: m?.thumbnail,
40
- alt: m?.title,
41
- sx: classes.buttonCardMedia
42
- })
43
- })
39
+ children: [/*#__PURE__*/_jsx(CardMedia, {
40
+ className: `template-card-media`,
41
+ component: "div",
42
+ image: m?.thumbnail,
43
+ alt: m?.title,
44
+ sx: classes.buttonCardMedia
45
+ }), /*#__PURE__*/_jsx(Select, {
46
+ classes: classes,
47
+ onSelectTemplate: onSelectTemplate,
48
+ data: m
49
+ })]
44
50
  })
45
51
  })
46
52
  }, `template_${m.id}`);
@@ -1,22 +1,27 @@
1
1
  import React from "react";
2
- import { Box, Card, CardMedia, Grid } from "@mui/material";
3
-
4
- // const Select = (props) => {
5
- // const { classes, data, onSelectTemplate } = props;
6
- // return (
7
- // <Box
8
- // className="template-card-action"
9
- // component={"div"}
10
- // sx={classes.templateCardBtnGrp}
11
- // style={{background: "transparent"}}
12
- // >
13
- // <Button className="blueBtn" onClick={onSelectTemplate(data)}>
14
- // Select
15
- // </Button>
16
- // </Box>
17
- // );
18
- // };
2
+ import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
19
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
+ const Select = props => {
6
+ const {
7
+ classes,
8
+ data,
9
+ onSelectTemplate
10
+ } = props;
11
+ return /*#__PURE__*/_jsx(Box, {
12
+ className: "template-card-action",
13
+ component: "div",
14
+ sx: classes.templateCardBtnGrp,
15
+ style: {
16
+ background: "transparent"
17
+ },
18
+ children: /*#__PURE__*/_jsx(Button, {
19
+ className: "blueBtn",
20
+ onClick: onSelectTemplate(data),
21
+ children: "Select"
22
+ })
23
+ });
24
+ };
20
25
  const FullViewCard = props => {
21
26
  const {
22
27
  classes,
@@ -30,19 +35,19 @@ const FullViewCard = props => {
30
35
  children: /*#__PURE__*/_jsx(Card, {
31
36
  sx: classes.paperOverrides,
32
37
  className: "paperOverrides",
33
- children: /*#__PURE__*/_jsx(Box, {
34
- sx: classes.fullViewCardMediaWrpr,
35
- onClick: onSelectTemplate(m),
36
- children: /*#__PURE__*/_jsx("div", {
37
- className: "img-wrapper",
38
- children: /*#__PURE__*/_jsx(CardMedia, {
39
- component: "div",
40
- image: m?.thumbnail,
41
- alt: m?.title,
42
- sx: classes.fullViewCardMedia,
43
- className: height
44
- })
45
- })
38
+ children: /*#__PURE__*/_jsxs(Box, {
39
+ sx: classes.buttonCardMediaWrpr,
40
+ children: [/*#__PURE__*/_jsx(CardMedia, {
41
+ component: "div",
42
+ image: m?.thumbnail,
43
+ alt: m?.title,
44
+ sx: classes.fullViewCardMedia,
45
+ className: height
46
+ }), /*#__PURE__*/_jsx(Select, {
47
+ classes: classes,
48
+ onSelectTemplate: onSelectTemplate,
49
+ data: m
50
+ })]
46
51
  })
47
52
  })
48
53
  }, `template_${m.id}`);
@@ -13,7 +13,7 @@ import PopperHeader from "../PopperHeader";
13
13
  import MiniColorPicker from "./MiniColorPicker";
14
14
  import SelectAlignment from "./SelectAlignment";
15
15
  import SelectFontSize from "./SelectFontSize";
16
- // import InfinityAITool from "./InfinityAITool";
16
+ import InfinityAITool from "./InfinityAITool";
17
17
  import { jsx as _jsx } from "react/jsx-runtime";
18
18
  import { jsxs as _jsxs } from "react/jsx-runtime";
19
19
  const DEFAULT_COLOR = {
@@ -27,8 +27,8 @@ const MiniTextFormat = props => {
27
27
  const {
28
28
  classes,
29
29
  editor,
30
- closeMainPopup
31
- // customProps
30
+ closeMainPopup,
31
+ customProps
32
32
  } = props;
33
33
  const [anchorEl, setAnchorEl] = useState(null);
34
34
  const open = Boolean(anchorEl);
@@ -50,7 +50,7 @@ const MiniTextFormat = props => {
50
50
  xs: 12,
51
51
  children: /*#__PURE__*/_jsxs("div", {
52
52
  className: "toolWrapper",
53
- children: [/*#__PURE__*/_jsx(SelectTypography, {
53
+ children: [customProps?.hideTools?.includes("infinityAI") ? null : /*#__PURE__*/_jsx(InfinityAITool, {}), /*#__PURE__*/_jsx(SelectTypography, {
54
54
  classes: classes,
55
55
  editor: editor,
56
56
  closeMainPopup: closeMainPopup
@@ -3,9 +3,10 @@ const usePopupStyle = theme => ({
3
3
  boxShadow: "1px 2px 15px 0px #2563EB40",
4
4
  zIndex: 1300,
5
5
  marginBottom: "12px !important",
6
- border: "1px solid #D8DDE1",
7
6
  borderRadius: "6px",
7
+ border: "1px solid #D8DDE1",
8
8
  maxWidth: "100%",
9
+ // maxHeight: "40px",
9
10
  "&.fullscreen": {
10
11
  marginBottom: "0px !important",
11
12
  "& .papper-wrpr": {
@@ -481,10 +482,9 @@ const usePopupStyle = theme => ({
481
482
  }
482
483
  },
483
484
  fullViewCardMedia: {
484
- margin: "5px 0px",
485
485
  width: "100%",
486
486
  backgroundPosition: "left top",
487
- backgroundSize: "100%, auto",
487
+ backgroundSize: "100% auto",
488
488
  zIndex: 1,
489
489
  position: "relative",
490
490
  "&.fullscreen": {
@@ -499,10 +499,9 @@ const usePopupStyle = theme => ({
499
499
  }
500
500
  },
501
501
  buttonCardMedia: {
502
- margin: "5px 0px",
503
502
  width: "100%",
504
- height: "40px",
505
- backgroundPosition: "center",
503
+ height: "48px",
504
+ backgroundPosition: "left top",
506
505
  backgroundSize: "contain",
507
506
  zIndex: 1,
508
507
  position: "relative",
@@ -511,25 +510,26 @@ const usePopupStyle = theme => ({
511
510
  }
512
511
  },
513
512
  buttonCardMediaWrpr: {
514
- padding: "5px",
515
513
  position: "relative",
516
514
  margin: "8px",
517
- height: "50px",
518
- "& .img-wrapper": {
519
- "&:hover": {
520
- padding: "0px 2px 0px 2px",
521
- backgroundColor: "#E9F3FE",
522
- border: "1px solid #2563EB40",
523
- borderRadius: "5px",
524
- // height: "100%",
525
- margin: "0px"
526
- // "& .template-card-action": {
527
- // display: "flex",
528
- // },
515
+ marginBottom: "0px",
516
+ "&:hover": {
517
+ "& .template-card-action": {
518
+ display: "flex"
529
519
  }
520
+ },
521
+ "& .img-loader-wrapper": {
522
+ position: "absolute",
523
+ width: "12px",
524
+ height: "12px",
525
+ left: 0,
526
+ right: 0,
527
+ top: 0,
528
+ bottom: 0,
529
+ margin: "auto",
530
+ zIndex: 0
530
531
  }
531
532
  },
532
-
533
533
  paperOverrides: {
534
534
  "&.MuiPaper-root": {
535
535
  background: "transparent",
@@ -587,13 +587,12 @@ const usePopupStyle = theme => ({
587
587
  },
588
588
  customSelectPopoverWrapper: {
589
589
  "& .MuiPopover-paper": {
590
+ maxHeight: "140px",
590
591
  // minWidth: "130px",
591
592
  border: "1px solid #E4E8EB",
592
- maxHeight: "140px",
593
593
  background: `${theme?.palette?.editor?.background} !important`,
594
- // overflowY: "hidden",
595
- padding: "6px 12px 6px 0px",
596
594
  overflowY: "scroll",
595
+ padding: "6px 12px 6px 0px",
597
596
  "@media only screen and (max-width: 600px)": {
598
597
  marginTop: "-40px"
599
598
  }
@@ -643,21 +642,6 @@ const usePopupStyle = theme => ({
643
642
  "& fieldset": {
644
643
  border: "none !important"
645
644
  }
646
- },
647
- fullViewCardMediaWrpr: {
648
- padding: "5px",
649
- position: "relative",
650
- margin: "8px",
651
- height: "140px",
652
- "& .img-wrapper": {
653
- "&:hover": {
654
- padding: "0px 2px 0px 2px",
655
- backgroundColor: "#E9F3FE",
656
- border: "1px solid #2563EB40",
657
- borderRadius: "5px",
658
- margin: "0px"
659
- }
660
- }
661
645
  }
662
646
  });
663
647
  export default usePopupStyle;
@@ -27,7 +27,6 @@ const TextFormat = props => {
27
27
  onClose,
28
28
  closeMainPopup
29
29
  } = props;
30
- console.log("PROPS:", props);
31
30
  const [anchorEl, setAnchorEl] = useState(null);
32
31
  const [type, setType] = useState(null);
33
32
  const open = Boolean(anchorEl);
@@ -80,16 +80,16 @@ const PopupTool = props => {
80
80
  updateAnchorEl();
81
81
  }
82
82
  }, [selection]);
83
- const handleClose = () => {
84
- setAnchorEl(null);
85
- setOpen(false);
86
- setPopupType("");
87
- };
88
83
  useEffect(() => {
89
84
  if (selectedElement?.enable === 1) {
90
85
  setAnchorEl(null);
91
86
  }
92
87
  }, [selection, selectedElement?.path, selectedElement?.enable]);
88
+ const handleClose = () => {
89
+ setAnchorEl(null);
90
+ setOpen(false);
91
+ setPopupType("");
92
+ };
93
93
  return open && !openAI ? /*#__PURE__*/_jsx(ClickAwayListener, {
94
94
  onClickAway: e => {
95
95
  // close the mini toolbar, if user clicks outside the editor (in Flozy app.)
@@ -1,7 +1,7 @@
1
1
  import { useEffect } from "react";
2
2
  import WebFont from "webfontloader";
3
3
  import { useEditorContext } from "../../hooks/useMouseMove";
4
- const defaultFonts = ['PoppinsRegular', 'PoppinsBold', 'Helvetica', 'Georgia', 'Times New Roman', 'Monaco', 'Courier New', 'Qwitcher Grypen', 'EB Garamond', 'Anton', 'DM Serif Text', 'Libre Baskerville', 'Montserrat', 'Open Sans', 'Public Sans', 'Raleway', 'Space Mono', 'Bulgarian Garamond', 'Impact', 'Redacted Script', 'Great Vibes', 'Zeyada', 'Allura', 'Pinyon Script', 'Herr Von Muellerhoff', 'Dawning of a New Day', 'Coming Soon', 'Dancing Script', 'Engagement', 'Gaegu', 'Ingrid Darling', 'Kite One', 'La Belle Aurore', 'Mea Culpa', 'Meddon', 'Merriweather', 'The Girl Next Door'];
4
+ const defaultFonts = ["PoppinsRegular", "PoppinsBold", "Helvetica", "Georgia", "Times New Roman", "Monaco", "Courier New", "Qwitcher Grypen", "EB Garamond", "Anton", "DM Serif Text", "Libre Baskerville", "Montserrat", "Open Sans", "Public Sans", "Raleway", "Space Mono", "Bulgarian Garamond", "Impact", "Redacted Script", "Great Vibes", "Zeyada", "Allura", "Pinyon Script", "Herr Von Muellerhoff", "Dawning of a New Day", "Coming Soon", "Dancing Script", "Engagement", "Gaegu", "Ingrid Darling", "Kite One", "La Belle Aurore", "Mea Culpa", "Meddon", "Merriweather", "The Girl Next Door"];
5
5
  const FontLoader = props => {
6
6
  const {
7
7
  otherProps,
@@ -15,7 +15,7 @@ const FontLoader = props => {
15
15
  let retryCount = 0;
16
16
  function loadNextBatch() {
17
17
  if (currentIndex >= families?.length) {
18
- console.log('All fonts have been loaded');
18
+ console.log("All fonts have been loaded");
19
19
  return;
20
20
  }
21
21
  const batch = families?.slice(currentIndex, currentIndex + batchSize);
@@ -68,13 +68,13 @@ const FontLoader = props => {
68
68
  });
69
69
  } else {
70
70
  function correctFontArray(fontString) {
71
- let fontsArray = fontString.split(',');
71
+ let fontsArray = fontString.split(",");
72
72
  let cleanedFontsArray = [...new Set(fontsArray.map(font => font.trim()))];
73
73
  return cleanedFontsArray;
74
74
  }
75
75
  function sanitizeFontFamily(fontFamily) {
76
76
  const correctedFonts = correctFontArray(fontFamily);
77
- return correctedFonts.join(', ');
77
+ return correctedFonts.join(", ");
78
78
  }
79
79
  const elements = Array.from(document?.querySelectorAll("*"));
80
80
  const fontSet = new Set();
@@ -83,8 +83,8 @@ const FontLoader = props => {
83
83
  fontSet.add(sanitizeFontFamily(computedStyles?.fontFamily));
84
84
  });
85
85
  let families = Array.from(fontSet);
86
- families = correctFontArray(families.join(', '));
87
- families = families.map(font => font.replace(/\"/g, ''));
86
+ families = correctFontArray(families.join(", "));
87
+ families = families.map(font => font.replace(/\"/g, ""));
88
88
  loadFontsInBatches(families);
89
89
  }
90
90
  }, []);
@@ -224,7 +224,6 @@ const iconList = {
224
224
  fill: "#64748B"
225
225
  }
226
226
  }),
227
- calenderNewIcon: /*#__PURE__*/_jsx(CalendlyIcon, {}),
228
227
  freegrid: /*#__PURE__*/_jsx(CiGrid32, {
229
228
  size: 20,
230
229
  style: {
@@ -234,6 +233,7 @@ const iconList = {
234
233
  text: /*#__PURE__*/_jsx(Text, {
235
234
  stroke: "#64748B"
236
235
  }),
236
+ calenderNewIcon: /*#__PURE__*/_jsx(CalendlyIcon, {}),
237
237
  textArea: /*#__PURE__*/_jsx(TextAreaIcon, {}),
238
238
  phone: /*#__PURE__*/_jsx(Phone, {}),
239
239
  briefCase: /*#__PURE__*/_jsx(BriefCase, {}),