@flozy/editor 11.0.2 → 11.0.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.
@@ -109,7 +109,7 @@ const Form = props => {
109
109
  if ((readOnly || test) && formEle && formEle?.current) {
110
110
  const formData = new FormData(formEle?.current);
111
111
  setLoading(true);
112
- const response = [];
112
+ let response = [];
113
113
  let user_email = "";
114
114
  let meta_data = [];
115
115
  const validations = [];
@@ -153,15 +153,21 @@ const Form = props => {
153
153
  rules: rule?.length > 0 && rule
154
154
  });
155
155
  }
156
- const placeholder = fieldData?.name === pair[0] ? fieldData?.placeholder : "";
157
- response?.push({
158
- fieldKey: pair[0],
159
- [pair[0]]: pair[1],
160
- placeholder: placeholder,
161
- form_name: formName,
162
- tagName: tagName,
163
- uid: fieldData?.uid
164
- });
156
+ const formDataEntries = [...formData.entries()];
157
+ const childFields = element?.children?.filter(el => el?.type === "form-field");
158
+ response = [];
159
+ for (let i = 0; i < formDataEntries.length; i++) {
160
+ const [key, value] = formDataEntries[i];
161
+ const fieldData = childFields[i];
162
+ response.push({
163
+ fieldKey: key,
164
+ [key]: value,
165
+ placeholder: fieldData?.placeholder || "",
166
+ form_name: formName,
167
+ tagName: tagName,
168
+ uid: fieldData?.uid || formName
169
+ });
170
+ }
165
171
  }
166
172
  let params = {
167
173
  page_id: page_id,
@@ -311,8 +311,8 @@ const SignaturePopup = props => {
311
311
  xs: 12,
312
312
  children: /*#__PURE__*/_jsx(TextField, {
313
313
  fullWidth: true,
314
- id: "signedBy",
315
- name: "signedBy",
314
+ id: "name",
315
+ name: "name",
316
316
  placeholder: translation("Enter Name"),
317
317
  value: signedData.signedBy || ""
318
318
  // defaultValue={defaultName || ""}
@@ -320,7 +320,10 @@ const SignaturePopup = props => {
320
320
  size: "small",
321
321
  onChange: onChange,
322
322
  sx: classes.signaturePopUpNameField,
323
- autoComplete: "signedBy"
323
+ autoComplete: "name",
324
+ inputProps: {
325
+ autoComplete: "name"
326
+ }
324
327
  })
325
328
  })]
326
329
  }), /*#__PURE__*/_jsxs(Grid, {
@@ -440,8 +443,9 @@ const SignaturePopup = props => {
440
443
  item: true,
441
444
  children: /*#__PURE__*/_jsx(TextField, {
442
445
  fullWidth: true,
443
- id: "signedByEmail",
444
- name: "signedByEmail",
446
+ id: "email",
447
+ name: "email",
448
+ type: "email",
445
449
  placeholder: translation("Enter Email"),
446
450
  size: "small",
447
451
  onChange: onChange,
@@ -449,7 +453,10 @@ const SignaturePopup = props => {
449
453
  value: signedData.signedByEmail || ""
450
454
  // defaultValue={defaultEmail || ""}
451
455
  ,
452
- autoComplete: "signedByEmail"
456
+ autoComplete: "email",
457
+ inputProps: {
458
+ autoComplete: "email"
459
+ }
453
460
  })
454
461
  })]
455
462
  })]
@@ -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",
@@ -59,6 +59,12 @@ const useCommonStyle = theme => ({
59
59
  marginBottom: "7px",
60
60
  marginTop: "4px"
61
61
  },
62
+ "& .MuiPaper-root": {
63
+ border: "unset !important",
64
+ borderRadius: "0px",
65
+ height: "fit-content",
66
+ padding: "2px"
67
+ },
62
68
  "& .muiIconsListParent": {
63
69
  "& svg": {
64
70
  color: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`
@@ -573,7 +579,24 @@ const useCommonStyle = theme => ({
573
579
  },
574
580
  pageSettingPopUpRoot: {
575
581
  padding: "16px 8px 16px 10px!important",
576
- height: "100%"
582
+ height: "100%",
583
+ "& .text-field-wrapper": {
584
+ "& input:-webkit-autofill": {
585
+ WebkitBackgroundClip: "text !important",
586
+ WebkitBoxShadow: "0 0 0 1000px transparent inset !important",
587
+ WebkitTextFillColor: `${theme?.palette?.editor?.deletePopUpButtonTextColor} !important`,
588
+ transition: "background-color 600000s 0s, color 600000s 0s !important"
589
+ },
590
+ "& .MuiFilledInput-root": {
591
+ backgroundColor: "rgba(255, 255, 255, 0.5)",
592
+ "&:hover": {
593
+ backgroundColor: "rgba(255, 255, 255, 0.7)"
594
+ },
595
+ "&.Mui-focused": {
596
+ backgroundColor: "rgba(255, 255, 255, 0.9)"
597
+ }
598
+ }
599
+ }
577
600
  },
578
601
  buttonMoreIcon: {
579
602
  position: "absolute",
@@ -719,6 +742,13 @@ const useCommonStyle = theme => ({
719
742
  stroke: theme?.palette?.editor?.closeButtonSvgStroke
720
743
  }
721
744
  }
745
+ },
746
+ "& .element-toolbar": {
747
+ "& button": {
748
+ borderRadius: "50%",
749
+ background: theme?.palette?.editor?.signatureFontBtnBg,
750
+ border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`
751
+ }
722
752
  }
723
753
  }
724
754
  });
@@ -505,6 +505,7 @@ export const getBlock = props => {
505
505
  return /*#__PURE__*/_jsx("blockquote", {
506
506
  ...attributes,
507
507
  ...element.attr,
508
+ className: "blockQuoteComp",
508
509
  style: {
509
510
  // borderColor: element?.color || "transparent",
510
511
  ...getBorderColor(element?.color || "transparent", 3),
@@ -1,5 +1,5 @@
1
1
  import { Editor, Element, Path, Transforms } from "slate";
2
- import { ALLOWED_TEXT_NODES, getNode, getNodeText, getNodeWithType } from "./helper";
2
+ import { ALLOWED_TEXT_NODES, getNode, getNodeText, getNodeWithType, getSelectedText } from "./helper";
3
3
  import { removeAccordion } from "./events";
4
4
  import { ReactEditor } from "slate-react";
5
5
  const focusAccordion = (editor, upPath) => {
@@ -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.2",
3
+ "version": "11.0.4",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"