@flozy/editor 4.6.1 → 4.6.2

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.
Files changed (73) hide show
  1. package/dist/Editor/CommonEditor.js +17 -17
  2. package/dist/Editor/Editor.css +1 -32
  3. package/dist/Editor/Elements/AI/AIInput.js +5 -4
  4. package/dist/Editor/Elements/AI/PopoverAIInput.js +29 -40
  5. package/dist/Editor/Elements/AI/Styles.js +1 -1
  6. package/dist/Editor/Elements/Button/EditorButton.js +4 -8
  7. package/dist/Editor/Elements/Divider/Divider.js +8 -107
  8. package/dist/Editor/Elements/Embed/Embed.css +1 -1
  9. package/dist/Editor/Elements/Embed/Image.js +3 -4
  10. package/dist/Editor/Elements/Embed/Video.js +7 -9
  11. package/dist/Editor/Elements/Emoji/EmojiButton.js +23 -1
  12. package/dist/Editor/Elements/Form/Form.js +1 -0
  13. package/dist/Editor/Elements/Form/Workflow/FormWorkflow.js +12 -3
  14. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +3 -56
  15. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +0 -2
  16. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +3 -7
  17. package/dist/Editor/Elements/FreeGrid/Options/AddElement.js +2 -16
  18. package/dist/Editor/Elements/FreeGrid/Options/sectionItemOptions.js +2 -8
  19. package/dist/Editor/Elements/FreeGrid/styles.js +1 -82
  20. package/dist/Editor/Elements/Signature/SignaturePopup.js +7 -24
  21. package/dist/Editor/Elements/Signature/Signed.js +1 -1
  22. package/dist/Editor/Elements/SimpleText/index.js +8 -7
  23. package/dist/Editor/Elements/Table/TableRow.js +1 -1
  24. package/dist/Editor/Styles/EditorStyles.js +2 -2
  25. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -1
  26. package/dist/Editor/Toolbar/PopupTool/ButtonTemplatesCard.js +29 -35
  27. package/dist/Editor/Toolbar/PopupTool/FullViewCard.js +30 -35
  28. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -4
  29. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +38 -22
  30. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +1 -0
  31. package/dist/Editor/Toolbar/PopupTool/index.js +5 -5
  32. package/dist/Editor/common/FontLoader/FontLoader.js +6 -6
  33. package/dist/Editor/common/Icon.js +1 -1
  34. package/dist/Editor/common/LinkSettings/index.js +3 -3
  35. package/dist/Editor/common/LinkSettings/navOptions.js +1 -4
  36. package/dist/Editor/common/RnD/DragOver/index.js +1 -0
  37. package/dist/Editor/common/RnD/ElementOptions/Actions.js +2 -15
  38. package/dist/Editor/common/RnD/ElementOptions/styles.js +0 -5
  39. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -1
  40. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/index.js +2 -32
  41. package/dist/Editor/common/RnD/ElementSettings/Settings/index.js +1 -3
  42. package/dist/Editor/common/RnD/ElementSettings/settingsConstants.js +2 -5
  43. package/dist/Editor/common/RnD/RnDCopy.js +0 -2
  44. package/dist/Editor/common/RnD/Utils/gridDropItem.js +3 -5
  45. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -1
  46. package/dist/Editor/common/RnD/index.js +37 -67
  47. package/dist/Editor/common/Section/index.js +1 -11
  48. package/dist/Editor/common/Section/styles.js +0 -16
  49. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -19
  50. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +4 -19
  51. package/dist/Editor/common/SwipeableDrawer/index.js +15 -4
  52. package/dist/Editor/common/SwipeableDrawer/style.js +11 -3
  53. package/dist/Editor/common/iconslist.js +0 -23
  54. package/dist/Editor/helper/index.js +2 -5
  55. package/dist/Editor/helper/theme.js +2 -2
  56. package/dist/Editor/hooks/useBreakpoints.js +1 -1
  57. package/dist/Editor/hooks/useMouseMove.js +4 -5
  58. package/dist/Editor/hooks/withCommon.js +0 -1
  59. package/dist/Editor/utils/Decorators/index.js +2 -3
  60. package/dist/Editor/utils/RnD/RnDCtrlCmds.js +1 -16
  61. package/dist/Editor/utils/SlateUtilityFunctions.js +5 -33
  62. package/dist/Editor/utils/customHooks/useResize.js +5 -4
  63. package/dist/Editor/utils/events.js +0 -71
  64. package/dist/Editor/utils/helper.js +0 -16
  65. package/package.json +1 -1
  66. package/dist/Editor/Elements/Divider/DividerPopup.js +0 -24
  67. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +0 -53
  68. package/dist/Editor/common/RnD/ElementSettings/Settings/DividerSettings.js +0 -49
  69. package/dist/Editor/common/StyleBuilder/dividerStyles.js +0 -56
  70. package/dist/Editor/helper/RnD/focusNode.js +0 -74
  71. package/dist/Editor/hooks/useDragging.js +0 -51
  72. package/dist/Editor/hooks/withRestrictedNodes.js +0 -48
  73. package/dist/Editor/utils/Decorators/highlightSelection.js +0 -16
@@ -71,11 +71,11 @@ const FormWorkflow = props => {
71
71
  children: [/*#__PURE__*/_jsx(Grid, {
72
72
  item: true,
73
73
  sx: classes.radioBtn,
74
- children: /*#__PURE__*/_jsx(RadioGroup, {
74
+ children: /*#__PURE__*/_jsxs(RadioGroup, {
75
75
  name: "set timing",
76
76
  value: schedule,
77
77
  defaultValue: 1,
78
- children: /*#__PURE__*/_jsx(FormControlLabel, {
78
+ children: [/*#__PURE__*/_jsx(FormControlLabel, {
79
79
  value: "immediately",
80
80
  label: "Immediately",
81
81
  onChange: () => {
@@ -84,7 +84,16 @@ const FormWorkflow = props => {
84
84
  control: /*#__PURE__*/_jsx(Radio, {
85
85
  size: "small"
86
86
  })
87
- })
87
+ }), /*#__PURE__*/_jsx(FormControlLabel, {
88
+ value: "after",
89
+ label: "After",
90
+ onChange: () => {
91
+ setSchedule("after");
92
+ },
93
+ control: /*#__PURE__*/_jsx(Radio, {
94
+ size: "small"
95
+ })
96
+ })]
88
97
  })
89
98
  }), schedule === "after" && /*#__PURE__*/_jsx(Grid, {
90
99
  item: true,
@@ -47,8 +47,7 @@ const FreeGrid = props => {
47
47
  } = element;
48
48
  const {
49
49
  readOnly,
50
- customSX,
51
- hideTools
50
+ customSX
52
51
  } = customProps;
53
52
  const {
54
53
  updated_at,
@@ -207,33 +206,6 @@ const FreeGrid = props => {
207
206
  at: [...insertAt]
208
207
  });
209
208
  break;
210
- case "addSignature":
211
- Transforms.insertNodes(editor, [{
212
- type: "freegridItem",
213
- childType: "signature",
214
- children: [{
215
- type: "signature",
216
- children: [{
217
- text: ""
218
- }],
219
- data: {
220
- name: "",
221
- email: "",
222
- date: ""
223
- }
224
- }],
225
- gridArea: "3 / 1 / 4 / 2",
226
- left: 50,
227
- marginTop: 0,
228
- top: 0,
229
- width: 217,
230
- height: 173,
231
- width_xs: 217,
232
- height_xs: 173
233
- }], {
234
- at: [...insertAt]
235
- });
236
- break;
237
209
  case "addImage":
238
210
  Transforms.insertNodes(editor, [{
239
211
  type: "freegridItem",
@@ -343,26 +315,6 @@ const FreeGrid = props => {
343
315
  at: [...insertAt]
344
316
  });
345
317
  break;
346
- case "addDivider":
347
- Transforms.insertNodes(editor, [{
348
- type: "freegridItem",
349
- childType: "divider",
350
- children: [{
351
- type: "divider",
352
- children: [{
353
- text: ""
354
- }]
355
- }],
356
- gridArea: "3 / 1 / 4 / 2",
357
- left: 50,
358
- marginTop: 0,
359
- top: 0,
360
- width: 170,
361
- height: 30
362
- }], {
363
- at: [...insertAt]
364
- });
365
- break;
366
318
  default:
367
319
  }
368
320
  // focus on newly added element
@@ -405,7 +357,6 @@ const FreeGrid = props => {
405
357
  Transforms.removeNodes(editor, {
406
358
  at: Path.parent(path)
407
359
  });
408
- setSelectedElement({});
409
360
  } catch (err) {
410
361
  console.log(err);
411
362
  }
@@ -435,7 +386,6 @@ const FreeGrid = props => {
435
386
  ...getBreakPointsValue(sectionBorderRadius || {}, null, "overrideBorderRadius", true)
436
387
  }
437
388
  }, theme);
438
- const sectionTypeOptions = (itemOptions?.section || []).filter(f => (hideTools || []).indexOf(f) === -1);
439
389
  return /*#__PURE__*/_jsx(RnD, {
440
390
  id: `freegrid_container_${path.join("|")}_${updated_at}_${breakpoint}`,
441
391
  className: `
@@ -463,7 +413,7 @@ const FreeGrid = props => {
463
413
  bottomLeft: false,
464
414
  bottomRight: false
465
415
  },
466
- actions: sectionTypeOptions,
416
+ actions: itemOptions?.section || [],
467
417
  type: "parent",
468
418
  optionsProps: {
469
419
  placement: "right",
@@ -484,8 +434,7 @@ const FreeGrid = props => {
484
434
  placement: "left",
485
435
  title: "Add Element",
486
436
  props: {
487
- handleClick: handleAddElementClick,
488
- hideTools: hideTools || []
437
+ handleClick: handleAddElementClick
489
438
  }
490
439
  },
491
440
  more: {
@@ -525,8 +474,6 @@ const FreeGrid = props => {
525
474
  backgroundSize: "cover"
526
475
  },
527
476
  "data-path": path.join("|"),
528
- "data-dragoverid": path.join("|"),
529
- "data-dragovertype": "parent",
530
477
  style: {
531
478
  "--cols": `100%`,
532
479
  "--rows": `repeat(${repeatTimes}, ${ROW_HEIGHT}px)`
@@ -190,8 +190,6 @@ const FreeGridBox = props => {
190
190
  ...attributes,
191
191
  className: "fgi_type_box freegrid-container-parent",
192
192
  "data-path": path.join("|"),
193
- "data-dragoverid": path.join("|"),
194
- "data-dragovertype": "parent",
195
193
  style: {
196
194
  "--height": `${height}px`,
197
195
  "--cols": `100%`,
@@ -28,8 +28,7 @@ const FreeGridItem = props => {
28
28
  const editor = useSlateStatic();
29
29
  const path = ReactEditor.findPath(editor, element);
30
30
  const {
31
- readOnly,
32
- hideTools
31
+ readOnly
33
32
  } = customProps;
34
33
  const {
35
34
  updated_at,
@@ -212,20 +211,17 @@ const FreeGridItem = props => {
212
211
  break;
213
212
  }
214
213
  };
215
- const itemTypeOptions = (itemOptions[childType] || itemOptions?.default).filter(f => (hideTools || []).indexOf(f) === -1);
216
214
  return /*#__PURE__*/_jsx(RnD, {
217
215
  id: `freegrid_item_${path.join("|")}_${updated_at}_${breakpoint}`,
218
216
  className: `freegrid-item path-${path.length} breakpoint-${breakpoint}`,
219
217
  editor: editor,
220
218
  path: path,
221
- actions: itemTypeOptions,
219
+ actions: itemOptions[childType] || itemOptions?.default,
222
220
  settingsProps: {
223
221
  settings: "freegridItem",
224
222
  onChange: onChangeSettings,
225
- customProps,
226
- onlyPopup: true // for signature popup in DnD
223
+ customProps
227
224
  },
228
-
229
225
  style: {
230
226
  "--left": `${left || 0}px`,
231
227
  "--marginTop": `${marginTop || 0}px`,
@@ -39,29 +39,15 @@ const FREE_GRID_ELEMENTS = [{
39
39
  actionType: "addAppHeader",
40
40
  label: "App Header",
41
41
  icon: "appHeader"
42
- }, {
43
- actionType: "addSignature",
44
- label: "Signature",
45
- icon: "signature"
46
- }, {
47
- actionType: "addDivider",
48
- label: "Divider",
49
- icon: "divider"
50
42
  }];
51
43
  const AddElement = props => {
52
44
  const {
53
- handleClick,
54
- hideTools
45
+ handleClick
55
46
  } = props;
56
- const ADD_ELEMENTS = FREE_GRID_ELEMENTS.filter(f => (hideTools || []).indexOf(f.actionType) === -1);
57
47
  return /*#__PURE__*/_jsx(Box, {
58
- sx: {
59
- maxHeight: "500px",
60
- overflowY: 'auto'
61
- },
62
48
  children: /*#__PURE__*/_jsx(List, {
63
49
  className: "item-list-wrpr",
64
- children: ADD_ELEMENTS.map(m => {
50
+ children: FREE_GRID_ELEMENTS.map(m => {
65
51
  return /*#__PURE__*/_jsxs(ListItemButton, {
66
52
  className: "item-wrapper",
67
53
  onClick: handleClick(m.actionType),
@@ -7,11 +7,8 @@ const boxOptions = ["settings", "link", "saveAsTemplate", "close"];
7
7
  const appHeaderOptions = ["settings", "saveAsTemplate", "close"];
8
8
  const tableOptions = ["drag", "edit", "settings", "saveAsTemplate", "close"];
9
9
  const embedScriptOptions = ["embedScript", "saveAsTemplate", "close"];
10
- const sectionOptions = ["addElementInSection", "settings", "moveUp", "moveDown", "saveAsTemplate", "more"];
10
+ const sectionOptions = ["addElement", "settings", "moveUp", "moveDown", "saveAsTemplate", "more"];
11
11
  const formOptions = ["drag", "edit", "settings", "addFormField", "workFlow", "saveAsTemplate", "close"];
12
- const signatureOptions = ["signatureSettings", "saveAsTemplate", "close"];
13
- const signOptions = ["removeSign", "saveAsTemplate", "close"];
14
- const dividerOptions = ["settings", "saveAsTemplate", "close"];
15
12
  const itemOptions = {
16
13
  default: commonOptions,
17
14
  text: textOptions,
@@ -23,9 +20,6 @@ const itemOptions = {
23
20
  section: sectionOptions,
24
21
  table: tableOptions,
25
22
  embedScript: embedScriptOptions,
26
- video: videoOptions,
27
- signature: signatureOptions,
28
- sign: signOptions,
29
- divider: dividerOptions
23
+ video: videoOptions
30
24
  };
31
25
  export default itemOptions;
@@ -20,9 +20,6 @@ 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
- },
26
23
  zIndex: "9999 !important"
27
24
  },
28
25
  "&.inactive-drag": {
@@ -163,51 +160,6 @@ const useFreeGridStyles = ({
163
160
  }
164
161
  }
165
162
  },
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
- },
211
163
  "& .fgi_type_box": {
212
164
  display: "grid",
213
165
  width: "100%",
@@ -217,26 +169,9 @@ const useFreeGridStyles = ({
217
169
  "& .freegrid-item": {
218
170
  marginLeft: "0px"
219
171
  // 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
- }
238
172
  }
239
173
  },
174
+
240
175
  "& .fgi_type_form": {
241
176
  "& .form-field": {
242
177
  "& input": {
@@ -317,22 +252,6 @@ const useFreeGridStyles = ({
317
252
  [theme.breakpoints.between("xs", "md")]: {
318
253
  marginLeft: `calc((100% - 320px) * 0.5)`
319
254
  }
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
- }
336
255
  }
337
256
  }
338
257
  },
@@ -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, Box } from "@mui/material";
2
+ import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment } 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,7 +11,6 @@ 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";
15
14
  import { jsx as _jsx } from "react/jsx-runtime";
16
15
  import { jsxs as _jsxs } from "react/jsx-runtime";
17
16
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -25,8 +24,7 @@ const SignaturePopup = props => {
25
24
  onSave,
26
25
  onClear,
27
26
  customProps,
28
- className,
29
- onlyPopup
27
+ className
30
28
  } = props;
31
29
  const {
32
30
  readOnly,
@@ -54,9 +52,6 @@ const SignaturePopup = props => {
54
52
  };
55
53
  const handleClose = () => {
56
54
  setOpen(false);
57
- if (props.handleClose) {
58
- props.handleClose();
59
- }
60
55
  };
61
56
  const handleSave = async () => {
62
57
  await customProps?.services("workFlowAction", {
@@ -130,28 +125,16 @@ const SignaturePopup = props => {
130
125
  isEmpty = signedData?.signature === "" && signedData?.signedText === "" || signedData?.signedBy === "" || signedData?.signedByEmail === "";
131
126
  }
132
127
  return /*#__PURE__*/_jsxs(_Fragment, {
133
- children: [onlyPopup ? null : /*#__PURE__*/_jsxs("div", {
128
+ children: [/*#__PURE__*/_jsx("div", {
134
129
  className: `signature-btn-container`,
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, {
130
+ children: /*#__PURE__*/_jsx(Button, {
131
+ contentEditable: false,
146
132
  onClick: handleOpen,
147
- style: {
148
- width: "fit-content"
149
- },
150
133
  children: "Sign Here"
151
- })]
134
+ })
152
135
  }), /*#__PURE__*/_jsx(Dialog, {
153
136
  className: `${className} dialogComp`,
154
- open: onlyPopup || open,
137
+ open: open,
155
138
  onClose: handleClose,
156
139
  fullWidth: true,
157
140
  PaperProps: {
@@ -47,7 +47,7 @@ const Signed = props => {
47
47
  src: signature,
48
48
  alt: "signature",
49
49
  style: {
50
- maxWidth: "200px",
50
+ width: "200px",
51
51
  height: "auto",
52
52
  marginBottom: "4px"
53
53
  }
@@ -6,7 +6,6 @@ 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";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  import { createElement as _createElement } from "react";
12
11
  const SimpleText = props => {
@@ -48,18 +47,20 @@ const SimpleText = props => {
48
47
  sx: classes.root,
49
48
  key: `para_${path.join("|")}`
50
49
  }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
51
- contentEditable: false,
52
50
  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,
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", {
56
56
  style: {
57
- backgroundColor: '#F2F6FA',
57
+ backgroundColor: "#F2F6FA",
58
58
  padding: "0px 2px",
59
59
  borderRadius: "2px"
60
60
  },
61
+ contentEditable: false,
61
62
  children: "/"
62
- }), " to browse elements"]
63
+ }), " ", "to browse elements"]
63
64
  }) : "" : ""
64
65
  }));
65
66
  };
@@ -23,7 +23,7 @@ const TableRow = props => {
23
23
  return /*#__PURE__*/_jsx("tr", {
24
24
  ...attributes,
25
25
  style: {
26
- backgroundColor: bgColor,
26
+ background: 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: theme?.palette?.type === "dark" ? "#99A5B6" : placeHolderColor
218
+ color: placeHolderColor
219
219
  }
220
220
  },
221
221
  "& .checkbox-edit": {
@@ -286,7 +286,7 @@ const editorStyles = ({
286
286
  }
287
287
  },
288
288
  "& ::selection": {
289
- color: "inherit",
289
+ color: "black",
290
290
  background: "#EAEBFE"
291
291
  }
292
292
  },
@@ -123,7 +123,8 @@ const MiniToolbar = props => {
123
123
  label,
124
124
  icon: Icon
125
125
  }) => {
126
- const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false;
126
+ const isDisabled = popupType === type || type === "undo" ? !canUndo : type === "redo" ? !canRedo : false; // for textFormat type
127
+
127
128
  return /*#__PURE__*/_jsx(Tooltip, {
128
129
  arrow: true,
129
130
  title: label,
@@ -1,28 +1,22 @@
1
1
  import React from "react";
2
- import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
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
+ // };
3
19
  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
- };
26
20
  const ButtonTemplateCard = props => {
27
21
  const {
28
22
  classes,
@@ -34,19 +28,19 @@ const ButtonTemplateCard = props => {
34
28
  xs: 3,
35
29
  children: /*#__PURE__*/_jsx(Card, {
36
30
  sx: classes.paperOverrides,
37
- children: /*#__PURE__*/_jsxs(Box, {
31
+ children: /*#__PURE__*/_jsx(Box, {
38
32
  sx: classes.buttonCardMediaWrpr,
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
- })]
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
+ })
50
44
  })
51
45
  })
52
46
  }, `template_${m.id}`);
@@ -1,27 +1,22 @@
1
1
  import React from "react";
2
- import { Box, Button, Card, CardMedia, Grid } from "@mui/material";
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
+ // };
3
19
  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
- };
25
20
  const FullViewCard = props => {
26
21
  const {
27
22
  classes,
@@ -35,19 +30,19 @@ const FullViewCard = props => {
35
30
  children: /*#__PURE__*/_jsx(Card, {
36
31
  sx: classes.paperOverrides,
37
32
  className: "paperOverrides",
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
- })]
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
+ })
51
46
  })
52
47
  })
53
48
  }, `template_${m.id}`);