@flozy/editor 11.0.6 → 11.0.7

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.
@@ -95,9 +95,4 @@
95
95
 
96
96
  .disablePointerEvent {
97
97
  pointer-events: none;
98
- }
99
-
100
- .cursorStabilityElement {
101
- pointer-events: none;
102
- user-select: none;
103
98
  }
@@ -1,7 +1,7 @@
1
1
  import React, { useState } from "react";
2
2
  import { signedTextFonts } from "../../../utils/font";
3
3
  import { Grid, Button, TextField, InputAdornment, IconButton, Typography } from "@mui/material";
4
- import ClearRoundedIcon from '@mui/icons-material/ClearRounded';
4
+ import ClearRoundedIcon from "@mui/icons-material/ClearRounded";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
7
7
  const TypeSignature = props => {
@@ -80,7 +80,8 @@ const TypeSignature = props => {
80
80
  children: /*#__PURE__*/_jsx(ClearRoundedIcon, {})
81
81
  })
82
82
  })
83
- }
83
+ },
84
+ autoComplete: "typeName"
84
85
  })
85
86
  })
86
87
  })
@@ -92,9 +92,17 @@ const SignaturePopup = props => {
92
92
  };
93
93
  const onChange = e => {
94
94
  e?.stopPropagation();
95
+ const {
96
+ name,
97
+ value
98
+ } = e.target;
99
+ const fieldMap = {
100
+ name: "signedBy",
101
+ email: "signedByEmail"
102
+ };
95
103
  setSignedData({
96
104
  ...signedData,
97
- [e.target.name]: e.target.value
105
+ [fieldMap[name] || name]: value
98
106
  });
99
107
  };
100
108
  const onBrushSize = val => () => {
@@ -319,7 +327,8 @@ const SignaturePopup = props => {
319
327
  ,
320
328
  size: "small",
321
329
  onChange: onChange,
322
- sx: classes.signaturePopUpNameField
330
+ sx: classes.signaturePopUpNameField,
331
+ autoComplete: "signedBy"
323
332
  })
324
333
  })]
325
334
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -447,6 +456,8 @@ const SignaturePopup = props => {
447
456
  sx: classes.signaturePopUpNameField,
448
457
  value: signedData.signedByEmail || ""
449
458
  // defaultValue={defaultEmail || ""}
459
+ ,
460
+ autoComplete: "signedByEmail"
450
461
  })
451
462
  })]
452
463
  })]
@@ -49,10 +49,7 @@ const SimpleText = props => {
49
49
  className: `simple-text ${nextType}`,
50
50
  sx: classes.root,
51
51
  key: `para_${path.join("|")}`
52
- }, children, /*#__PURE__*/_jsx("span", {
53
- contentEditable: false,
54
- className: "cursorStabilityElement"
55
- }), openAI ? null : /*#__PURE__*/_jsx("span", {
52
+ }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
56
53
  contentEditable: false,
57
54
  className: "placeholder-simple-text",
58
55
  children: isEmptyEditor ? editorPlaceholder || translation("writeSomethingPlaceHolder") : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
@@ -14,6 +14,9 @@ const editorStyles = ({
14
14
  "*": {
15
15
  boxSizing: "border-box"
16
16
  },
17
+ "& .blockQuoteComp": {
18
+ backgroundColor: `${theme?.palette?.editor?.colorBoxBg} !important`
19
+ },
17
20
  "&.iframe-editor": {
18
21
  "& .mini-tool-wrpr-ei": {
19
22
  display: "none"
@@ -35,6 +35,7 @@ const Text = props => {
35
35
  return /*#__PURE__*/_jsxs(Grid, {
36
36
  item: true,
37
37
  xs: width || 12,
38
+ className: "text-field-wrapper",
38
39
  children: [/*#__PURE__*/_jsx(Typography, {
39
40
  variant: "body1",
40
41
  color: "primary",
@@ -54,10 +54,10 @@ const useCommonStyle = theme => ({
54
54
  marginTop: "4px"
55
55
  },
56
56
  "& .MuiPaper-root": {
57
- border: 'unset !important',
58
- borderRadius: '0px',
59
- height: 'fit-content',
60
- padding: '2px'
57
+ border: "unset !important",
58
+ borderRadius: "0px",
59
+ height: "fit-content",
60
+ padding: "2px"
61
61
  },
62
62
  "& .muiIconsListParent": {
63
63
  "& svg": {
@@ -73,7 +73,7 @@ const useCommonStyle = theme => ({
73
73
  "& .MuiGrid-root>.MuiGrid-item": {
74
74
  paddingRight: "0px !important",
75
75
  fontFamily: "Inter, sans-serif",
76
- height: 'fit-content'
76
+ height: "fit-content"
77
77
  },
78
78
  "& .MuiInputBase-root": {
79
79
  borderRadius: "10px",
@@ -134,14 +134,14 @@ const useCommonStyle = theme => ({
134
134
  borderRadius: "10px",
135
135
  width: "52px !important",
136
136
  marginLeft: "10px",
137
- height: '36px !important'
137
+ height: "36px !important"
138
138
  },
139
139
  "& .spacingSlider": {
140
140
  width: "calc(100% - 18px)"
141
141
  }
142
142
  },
143
- '& .MuiFormHelperText-root': {
144
- margin: '4px 0px 0px 0px',
143
+ "& .MuiFormHelperText-root": {
144
+ margin: "4px 0px 0px 0px",
145
145
  color: theme?.palette?.editor?.closeButtonSvgStroke,
146
146
  fontFamily: "Inter, sans-serif"
147
147
  }
@@ -403,14 +403,14 @@ const useCommonStyle = theme => ({
403
403
  padding: "8px 12px",
404
404
  fontSize: "12px",
405
405
  color: theme?.palette?.editor?.menuOptionTextColor,
406
- fontWeight: '500',
406
+ fontWeight: "500",
407
407
  fontFamily: "Inter, sans-serif",
408
- minHeight: '36px',
408
+ minHeight: "36px",
409
409
  "&:hover": {
410
410
  backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground
411
411
  }
412
412
  },
413
- '& .Mui-selected': {
413
+ "& .Mui-selected": {
414
414
  background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
415
415
  },
416
416
  "& .MuiListSubheader-root": {
@@ -419,16 +419,16 @@ const useCommonStyle = theme => ({
419
419
  fontSize: "12px"
420
420
  },
421
421
  "& .MuiPaper-root": {
422
- borderRadius: '8px',
423
- padding: '0px',
422
+ borderRadius: "8px",
423
+ padding: "0px",
424
424
  background: `${theme?.palette?.editor?.textWeightPopUpBackground} !important`
425
425
  },
426
- '& .MuiButtonBase-root': {
427
- margin: '4px',
428
- borderRadius: '6px'
426
+ "& .MuiButtonBase-root": {
427
+ margin: "4px",
428
+ borderRadius: "6px"
429
429
  },
430
- '& .MuiList-root': {
431
- padding: '0px'
430
+ "& .MuiList-root": {
431
+ padding: "0px"
432
432
  }
433
433
  },
434
434
  datePicker: {
@@ -530,7 +530,24 @@ const useCommonStyle = theme => ({
530
530
  },
531
531
  pageSettingPopUpRoot: {
532
532
  padding: "16px 8px 16px 10px!important",
533
- height: "100%"
533
+ height: "100%",
534
+ "& .text-field-wrapper": {
535
+ "& input:-webkit-autofill": {
536
+ WebkitBackgroundClip: "text !important",
537
+ WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
538
+ WebkitTextFillColor: `${theme?.palette?.editor?.deletePopUpButtonTextColor} !important`,
539
+ transition: "background-color 600000s 0s, color 600000s 0s !important"
540
+ },
541
+ "& .MuiFilledInput-root": {
542
+ backgroundColor: "rgba(255, 255, 255, 0.5)",
543
+ "&:hover": {
544
+ backgroundColor: "rgba(255, 255, 255, 0.7)"
545
+ },
546
+ "&.Mui-focused": {
547
+ backgroundColor: "rgba(255, 255, 255, 0.9)"
548
+ }
549
+ }
550
+ }
534
551
  },
535
552
  buttonMoreIcon: {
536
553
  position: "absolute",
@@ -541,11 +558,11 @@ const useCommonStyle = theme => ({
541
558
  buttonMoreOption: {
542
559
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
543
560
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
544
- padding: '4px !important',
545
- '& svg': {
546
- width: '18px !important',
547
- height: '18px !important',
548
- '& path': {
561
+ padding: "4px !important",
562
+ "& svg": {
563
+ width: "18px !important",
564
+ height: "18px !important",
565
+ "& path": {
549
566
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
550
567
  }
551
568
  }
@@ -553,8 +570,8 @@ const useCommonStyle = theme => ({
553
570
  buttonMoreOption2: {
554
571
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
555
572
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
556
- '& svg': {
557
- '& path': {
573
+ "& svg": {
574
+ "& path": {
558
575
  fill: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
559
576
  }
560
577
  }
@@ -562,11 +579,11 @@ const useCommonStyle = theme => ({
562
579
  buttonMoreOption3: {
563
580
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
564
581
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
565
- padding: '5px !important',
566
- '& svg': {
567
- width: '16px !important',
568
- height: '16px !important',
569
- '& path': {
582
+ padding: "5px !important",
583
+ "& svg": {
584
+ width: "16px !important",
585
+ height: "16px !important",
586
+ "& path": {
570
587
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
571
588
  }
572
589
  }
@@ -574,37 +591,37 @@ const useCommonStyle = theme => ({
574
591
  resizeButton: {
575
592
  background: theme?.palette?.editor?.aiInputBackground,
576
593
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1}`,
577
- padding: '5px !important',
578
- borderRadius: '50% !important',
579
- '& svg': {
580
- width: '18px',
581
- height: '18px',
582
- '& path': {
594
+ padding: "5px !important",
595
+ borderRadius: "50% !important",
596
+ "& svg": {
597
+ width: "18px",
598
+ height: "18px",
599
+ "& path": {
583
600
  fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
584
601
  }
585
602
  },
586
- '&:hover': {
603
+ "&:hover": {
587
604
  background: theme?.palette?.editor?.aiInputBackground
588
605
  }
589
606
  },
590
607
  gradientFillBtn: {
591
608
  background: `linear-gradient(112.61deg, #2C63ED 19.3%, #8360FD 88.14%) !important`,
592
- textTransform: 'math-auto !important',
593
- color: '#FFFFFF !important',
594
- padding: '0px 12px !important',
595
- height: '32px',
596
- borderRadius: '8px',
597
- fontWeight: '500',
598
- fontSize: '14px'
609
+ textTransform: "math-auto !important",
610
+ color: "#FFFFFF !important",
611
+ padding: "0px 12px !important",
612
+ height: "32px",
613
+ borderRadius: "8px",
614
+ fontWeight: "500",
615
+ fontSize: "14px"
599
616
  },
600
617
  emptyThumbBtn: {
601
618
  background: `${theme?.palette?.editor?.sectionSettingIconHover} !important`,
602
619
  color: `${theme?.palette?.editor?.textColor} !important`,
603
- fontSize: '14px !important',
604
- '& svg': {
605
- width: '20px !important',
606
- height: '20px !important',
607
- '& path': {
620
+ fontSize: "14px !important",
621
+ "& svg": {
622
+ width: "20px !important",
623
+ height: "20px !important",
624
+ "& path": {
608
625
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
609
626
  }
610
627
  }
@@ -676,6 +693,13 @@ const useCommonStyle = theme => ({
676
693
  stroke: theme?.palette?.editor?.closeButtonSvgStroke
677
694
  }
678
695
  }
696
+ },
697
+ "& .element-toolbar": {
698
+ "& button": {
699
+ borderRadius: "50%",
700
+ background: theme?.palette?.editor?.signatureFontBtnBg,
701
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`
702
+ }
679
703
  }
680
704
  }
681
705
  });
@@ -355,6 +355,7 @@ export const getBlock = props => {
355
355
  return /*#__PURE__*/_jsx("blockquote", {
356
356
  ...attributes,
357
357
  ...element.attr,
358
+ className: "blockQuoteComp",
358
359
  style: {
359
360
  // borderColor: element?.color || "transparent",
360
361
  ...getBorderColor(element?.color || "transparent", 3),
@@ -13,8 +13,8 @@ export const formField = data => {
13
13
  text: ""
14
14
  }],
15
15
  field_type: "text",
16
- bgColor: data?.bgColor ? data?.bgColor : "rgba(255, 255, 255, 1)",
17
- borderColor: data?.borderColor ? data?.borderColor : "#ccc",
16
+ bgColor: data?.bgColor ? data?.bgColor : "",
17
+ borderColor: data?.borderColor ? data?.borderColor : "",
18
18
  bannerSpacing: {
19
19
  left: 16,
20
20
  right: 16,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "11.0.6",
3
+ "version": "11.0.7",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"