@flozy/editor 5.6.3 → 5.6.5

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.
@@ -538,7 +538,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
538
538
  transformOrigin: "left top",
539
539
  transition: "all 0.3s",
540
540
  minHeight: "87%",
541
- maxWidth: pageMaxWidth ? `${parseInt(pageMaxWidth)}px !important` : "auto"
541
+ maxWidth: pageMaxWidth ? `${parseInt(pageMaxWidth)}px !important` : "auto",
542
+ paddingTop: hasTopBanner() ? '20px !important' : ''
542
543
  },
543
544
  "data-info": outsideEditorClickLabel,
544
545
  children: [/*#__PURE__*/_jsx(Editable, {
@@ -15,7 +15,7 @@ const DataViewButton = props => {
15
15
  title: "Dynamic Table",
16
16
  onClick: onClick,
17
17
  icon: /*#__PURE__*/_jsx(Icon, {
18
- icon: "dataView"
18
+ icon: "dataTable"
19
19
  }),
20
20
  icoBtnType: icoBtnType
21
21
  });
@@ -313,7 +313,9 @@ const SignaturePopup = props => {
313
313
  id: "signedBy",
314
314
  name: "signedBy",
315
315
  placeholder: "Enter Name",
316
- defaultValue: defaultName || "",
316
+ value: signedData.signedBy || ""
317
+ // defaultValue={defaultName || ""}
318
+ ,
317
319
  size: "small",
318
320
  onChange: onChange,
319
321
  sx: classes.signaturePopUpNameField
@@ -442,7 +444,8 @@ const SignaturePopup = props => {
442
444
  size: "small",
443
445
  onChange: onChange,
444
446
  sx: classes.signaturePopUpNameField,
445
- defaultValue: defaultEmail || ""
447
+ value: signedData.signedByEmail || ""
448
+ // defaultValue={defaultEmail || ""}
446
449
  })
447
450
  })]
448
451
  })]
@@ -127,6 +127,11 @@ const usePopupStyle = theme => ({
127
127
  },
128
128
  "@media only screen and (max-width: 599px)": {
129
129
  width: "330px"
130
+ },
131
+ "& .accordionIcon": {
132
+ "& p": {
133
+ textAlign: 'left'
134
+ }
130
135
  }
131
136
  },
132
137
  "& .MuiTypography-root": {
@@ -7,6 +7,7 @@ const DataTableIcon = () => {
7
7
  viewBox: "0 0 16 16",
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
+ className: "commonSvgStyle",
10
11
  children: [/*#__PURE__*/_jsx("path", {
11
12
  d: "M14.6668 7.33398V6.00065C14.6668 2.66732 13.3335 1.33398 10.0002 1.33398H6.00016C2.66683 1.33398 1.3335 2.66732 1.3335 6.00065V10.0007C1.3335 13.334 2.66683 14.6673 6.00016 14.6673H6.66683",
12
13
  stroke: "#64748B",
@@ -22,10 +22,17 @@ export const insertTopBanner = (editor, embedData) => {
22
22
  } = embedData;
23
23
  if (!url) return;
24
24
  const embed = createTopBannerNode(embedData);
25
- Transforms.insertNodes(editor, embed, {
26
- at: [0]
27
- });
28
- insertNewLine(editor);
25
+ const isTopBanner = editor?.children[0]?.type === "topbanner";
26
+ if (!isTopBanner) {
27
+ Transforms.insertNodes(editor, embed, {
28
+ at: [0]
29
+ });
30
+ insertNewLine(editor);
31
+ } else {
32
+ Transforms.setNodes(editor, embed, {
33
+ at: [0]
34
+ });
35
+ }
29
36
  } catch (err) {
30
37
  console.log(err);
31
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.6.3",
3
+ "version": "5.6.5",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"