@flozy/editor 4.9.2 → 4.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. package/dist/Editor/Editor.css +16 -9
  2. package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
  3. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -3
  4. package/dist/Editor/Elements/AI/Styles.js +7 -1
  5. package/dist/Editor/Elements/Carousel/Carousel.js +3 -0
  6. package/dist/Editor/Elements/Divider/Divider.js +4 -2
  7. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  8. package/dist/Editor/Elements/Search/SearchAttachment.js +32 -26
  9. package/dist/Editor/Elements/Search/SearchButton.js +66 -9
  10. package/dist/Editor/Elements/Search/SearchList.js +87 -75
  11. package/dist/Editor/Elements/Table/AddRowCol.js +76 -0
  12. package/dist/Editor/Elements/Table/DragButton.js +134 -0
  13. package/dist/Editor/Elements/Table/DragStyles.js +43 -0
  14. package/dist/Editor/Elements/Table/Draggable.js +25 -0
  15. package/dist/Editor/Elements/Table/Droppable.js +53 -0
  16. package/dist/Editor/Elements/Table/Styles.js +23 -41
  17. package/dist/Editor/Elements/Table/Table.js +185 -137
  18. package/dist/Editor/Elements/Table/TableCell.js +339 -101
  19. package/dist/Editor/Elements/Table/TablePopup.js +9 -3
  20. package/dist/Editor/Elements/Table/TableRow.js +10 -2
  21. package/dist/Editor/Elements/Table/TableTool.js +101 -0
  22. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +1 -2
  23. package/dist/Editor/Toolbar/PopupTool/index.js +19 -19
  24. package/dist/Editor/assets/svg/DocsIcon.js +77 -10
  25. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  26. package/dist/Editor/assets/svg/UserIcon.js +2 -2
  27. package/dist/Editor/common/MentionsPopup/Styles.js +1 -1
  28. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +9 -35
  29. package/dist/Editor/common/StyleBuilder/formStyle.js +101 -69
  30. package/dist/Editor/common/StyleBuilder/index.js +8 -34
  31. package/dist/Editor/common/StyleBuilder/tableStyle.js +92 -1
  32. package/dist/Editor/common/iconListV2.js +52 -0
  33. package/dist/Editor/hooks/useEditorScroll.js +1 -1
  34. package/dist/Editor/hooks/useTable.js +164 -0
  35. package/dist/Editor/utils/helper.js +1 -1
  36. package/dist/Editor/utils/table.js +204 -21
  37. package/package.json +1 -1
@@ -1,9 +1,8 @@
1
- import React, { useEffect, useState } from "react";
1
+ import React, { useCallback, useEffect, useState } from "react";
2
2
  import { Popper, Fade, Paper, ClickAwayListener } from "@mui/material";
3
3
  import { Editor, Range } from "slate";
4
- import { useSlate } from "slate-react";
4
+ import { ReactEditor, useSlate } from "slate-react";
5
5
  import useDrag from "../../hooks/useDrag";
6
- import { TableUtil } from "../../utils/table";
7
6
  import useWindowResize from "../../hooks/useWindowResize";
8
7
  import MiniTextFormat from "./MiniTextFormat";
9
8
  import { useEditorContext } from "../../hooks/useMouseMove";
@@ -30,21 +29,22 @@ const PopupTool = props => {
30
29
  } = editor;
31
30
  const [event] = useDrag(anchorEl);
32
31
  const id = open ? "popup-edit-tool" : "";
33
- const table = new TableUtil(editor);
34
32
  const [size] = useWindowResize();
35
33
  const {
36
34
  selectedElement
37
35
  } = useEditorContext();
38
- const updateAnchorEl = () => {
36
+ const updateAnchorEl = useCallback(() => {
39
37
  try {
40
- const domSelection = window.getSelection();
41
- const domRange = domSelection?.getRangeAt(0);
42
- const {
43
- startOffset,
44
- endOffset
45
- } = domRange || {};
46
- if (startOffset !== endOffset) {
38
+ const isHavingSelection = selection && !Range.isCollapsed(selection);
39
+ if (isHavingSelection) {
40
+ const domRange = ReactEditor.toDOMRange(editor, editor.selection);
41
+ const editorContainer = document.querySelector("#slate-wrapper-scroll-container")?.getBoundingClientRect();
47
42
  const rect = domRange.getBoundingClientRect();
43
+ const isOutside = rect.bottom < editorContainer.top || rect.top > editorContainer.bottom;
44
+ if (isOutside) {
45
+ rect.y = -500; // hide the popper
46
+ }
47
+
48
48
  setAnchorEl({
49
49
  clientWidth: rect.width,
50
50
  clientHeight: rect.height,
@@ -54,19 +54,19 @@ const PopupTool = props => {
54
54
  } catch (err) {
55
55
  console.log(err);
56
56
  }
57
- };
57
+ }, [selection]);
58
58
  useEditorScroll(editorWrapper, updateAnchorEl);
59
59
  useEffect(() => {
60
60
  const userStoppedSelection = size?.device === "xs" ? true : event === "end"; // for mobile, when user starts the selection, we are gonna show the popup tool
61
61
 
62
62
  if (userStoppedSelection && anchorEl && !open) {
63
63
  // for table cell selection
64
- const isCellsSelected = table.isCellSelected(editor.selection);
65
- if (!isCellsSelected) {
66
- setOpen(true);
67
- setPopupType("textFormat");
68
- setIsTextSelected(true);
69
- }
64
+ // const isCellsSelected = table.isCellSelected(editor.selection);
65
+ // if (!isCellsSelected) {
66
+ setOpen(true);
67
+ setPopupType("textFormat");
68
+ setIsTextSelected(true);
69
+ // }
70
70
  } else if (!anchorEl) {
71
71
  setOpen(false);
72
72
  setPopupType("");
@@ -8,30 +8,97 @@ const DocsIcon = props => {
8
8
  fill: "none",
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  children: [/*#__PURE__*/_jsx("path", {
11
- d: "M8.32593 1.07031V4.26079C8.32593 4.47233 8.41151 4.67521 8.56385 4.82479C8.71619 4.97437 8.92281 5.05841 9.13825 5.05841H12.3875",
12
- stroke: "#778599",
11
+ d: "M8.07324 1V4.14286C8.07324 4.35124 8.15602 4.55109 8.30337 4.69844C8.45072 4.84579 8.65057 4.92857 8.85896 4.92857H12.0018",
12
+ stroke: "url(#paint0_linear_6885_49189)",
13
13
  strokeLinecap: "round",
14
14
  strokeLinejoin: "round"
15
15
  }), /*#__PURE__*/_jsx("path", {
16
- d: "M10.7626 15.4275H2.63941C2.20853 15.4275 1.7953 15.2594 1.49062 14.9602C1.18594 14.6611 1.01477 14.2553 1.01477 13.8322V2.66555C1.01477 2.24247 1.18594 1.83671 1.49062 1.53755C1.7953 1.23838 2.20853 1.07031 2.63941 1.07031H8.32567L12.3873 5.05841V13.8322C12.3873 14.2553 12.2161 14.6611 11.9114 14.9602C11.6067 15.2594 11.1935 15.4275 10.7626 15.4275Z",
17
- stroke: "#778599",
16
+ d: "M10.4286 15.1429H2.57143C2.15466 15.1429 1.75496 14.9773 1.46026 14.6826C1.16556 14.3879 1 13.9882 1 13.5714V2.57143C1 2.15466 1.16556 1.75496 1.46026 1.46026C1.75496 1.16556 2.15466 1 2.57143 1H8.07143L12 4.92857V13.5714C12 13.9882 11.8344 14.3879 11.5397 14.6826C11.245 14.9773 10.8453 15.1429 10.4286 15.1429Z",
17
+ stroke: "url(#paint1_linear_6885_49189)",
18
18
  strokeLinecap: "round",
19
19
  strokeLinejoin: "round"
20
20
  }), /*#__PURE__*/_jsx("path", {
21
- d: "M4.26416 5.85547H5.07648",
22
- stroke: "#778599",
21
+ d: "M4.14014 5.71289H4.92585",
22
+ stroke: "url(#paint2_linear_6885_49189)",
23
23
  strokeLinecap: "round",
24
24
  strokeLinejoin: "round"
25
25
  }), /*#__PURE__*/_jsx("path", {
26
- d: "M4.26416 9.04688H9.13809",
27
- stroke: "#778599",
26
+ d: "M4.14014 8.85742H8.85442",
27
+ stroke: "url(#paint3_linear_6885_49189)",
28
28
  strokeLinecap: "round",
29
29
  strokeLinejoin: "round"
30
30
  }), /*#__PURE__*/_jsx("path", {
31
- d: "M4.26416 12.2383H9.13809",
32
- stroke: "#778599",
31
+ d: "M4.14014 12H8.85442",
32
+ stroke: "url(#paint4_linear_6885_49189)",
33
33
  strokeLinecap: "round",
34
34
  strokeLinejoin: "round"
35
+ }), /*#__PURE__*/_jsxs("defs", {
36
+ children: [/*#__PURE__*/_jsxs("linearGradient", {
37
+ id: "paint0_linear_6885_49189",
38
+ x1: "10.0375",
39
+ y1: "1",
40
+ x2: "10.0375",
41
+ y2: "4.92857",
42
+ gradientUnits: "userSpaceOnUse",
43
+ children: [/*#__PURE__*/_jsx("stop", {
44
+ stopColor: "#2563EB"
45
+ }), /*#__PURE__*/_jsx("stop", {
46
+ offset: "1",
47
+ stopColor: "#8360FD"
48
+ })]
49
+ }), /*#__PURE__*/_jsxs("linearGradient", {
50
+ id: "paint1_linear_6885_49189",
51
+ x1: "6.5",
52
+ y1: "1",
53
+ x2: "6.5",
54
+ y2: "15.1429",
55
+ gradientUnits: "userSpaceOnUse",
56
+ children: [/*#__PURE__*/_jsx("stop", {
57
+ stopColor: "#2563EB"
58
+ }), /*#__PURE__*/_jsx("stop", {
59
+ offset: "1",
60
+ stopColor: "#8360FD"
61
+ })]
62
+ }), /*#__PURE__*/_jsxs("linearGradient", {
63
+ id: "paint2_linear_6885_49189",
64
+ x1: "4.53299",
65
+ y1: "5.71289",
66
+ x2: "4.53299",
67
+ y2: "6.71289",
68
+ gradientUnits: "userSpaceOnUse",
69
+ children: [/*#__PURE__*/_jsx("stop", {
70
+ stopColor: "#2563EB"
71
+ }), /*#__PURE__*/_jsx("stop", {
72
+ offset: "1",
73
+ stopColor: "#8360FD"
74
+ })]
75
+ }), /*#__PURE__*/_jsxs("linearGradient", {
76
+ id: "paint3_linear_6885_49189",
77
+ x1: "6.49728",
78
+ y1: "8.85742",
79
+ x2: "6.49728",
80
+ y2: "9.85742",
81
+ gradientUnits: "userSpaceOnUse",
82
+ children: [/*#__PURE__*/_jsx("stop", {
83
+ stopColor: "#2563EB"
84
+ }), /*#__PURE__*/_jsx("stop", {
85
+ offset: "1",
86
+ stopColor: "#8360FD"
87
+ })]
88
+ }), /*#__PURE__*/_jsxs("linearGradient", {
89
+ id: "paint4_linear_6885_49189",
90
+ x1: "6.49728",
91
+ y1: "12",
92
+ x2: "6.49728",
93
+ y2: "13",
94
+ gradientUnits: "userSpaceOnUse",
95
+ children: [/*#__PURE__*/_jsx("stop", {
96
+ stopColor: "#2563EB"
97
+ }), /*#__PURE__*/_jsx("stop", {
98
+ offset: "1",
99
+ stopColor: "#8360FD"
100
+ })]
101
+ })]
35
102
  })]
36
103
  });
37
104
  };
@@ -0,0 +1,220 @@
1
+ import React from "react";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { jsxs as _jsxs } from "react/jsx-runtime";
4
+ export function PaintIcon() {
5
+ return /*#__PURE__*/_jsxs("svg", {
6
+ width: "22",
7
+ height: "22",
8
+ viewBox: "0 0 22 22",
9
+ fill: "none",
10
+ xmlns: "http://www.w3.org/2000/svg",
11
+ children: [/*#__PURE__*/_jsx("path", {
12
+ d: "M6.42594 16.4984L2.75011 12.8226C1.52177 11.5943 1.52177 10.3751 2.75011 9.14676L8.87344 3.02344L15.6109 9.76097C15.9501 10.1001 15.9501 10.6501 15.6109 10.9893L10.0926 16.5076C8.88261 17.7176 7.65427 17.7176 6.42594 16.4984Z",
13
+ stroke: "#64748B",
14
+ strokeWidth: "1.5",
15
+ strokeMiterlimit: "10",
16
+ strokeLinecap: "round",
17
+ strokeLinejoin: "round"
18
+ }), /*#__PURE__*/_jsx("path", {
19
+ d: "M7.65405 1.78906L8.88239 3.01736",
20
+ stroke: "#64748B",
21
+ strokeWidth: "1.5",
22
+ strokeMiterlimit: "10",
23
+ strokeLinecap: "round",
24
+ strokeLinejoin: "round"
25
+ }), /*#__PURE__*/_jsx("path", {
26
+ d: "M1.89746 10.9253L15.7575 10.3203",
27
+ stroke: "#64748B",
28
+ strokeWidth: "1.5",
29
+ strokeMiterlimit: "10",
30
+ strokeLinecap: "round",
31
+ strokeLinejoin: "round"
32
+ }), /*#__PURE__*/_jsx("path", {
33
+ d: "M2.75 20.168H14.6667",
34
+ stroke: "#64748B",
35
+ strokeWidth: "1.5",
36
+ strokeMiterlimit: "10",
37
+ strokeLinecap: "round",
38
+ strokeLinejoin: "round"
39
+ }), /*#__PURE__*/_jsx("path", {
40
+ d: "M17.2791 13.75C17.2791 13.75 15.5833 15.5925 15.5833 16.72C15.5833 17.655 16.3441 18.4158 17.2791 18.4158C18.2141 18.4158 18.9749 17.655 18.9749 16.72C18.9749 15.5925 17.2791 13.75 17.2791 13.75Z",
41
+ stroke: "#64748B",
42
+ strokeWidth: "1.5",
43
+ strokeLinecap: "round",
44
+ strokeLinejoin: "round"
45
+ })]
46
+ });
47
+ }
48
+ export function DuplicateIcon() {
49
+ return /*#__PURE__*/_jsxs("svg", {
50
+ width: "19",
51
+ height: "19",
52
+ viewBox: "0 0 19 19",
53
+ fill: "none",
54
+ xmlns: "http://www.w3.org/2000/svg",
55
+ children: [/*#__PURE__*/_jsx("path", {
56
+ d: "M12.6666 10.2112V13.5362C12.6666 16.307 11.5583 17.4154 8.78742 17.4154H5.46242C2.69159 17.4154 1.58325 16.307 1.58325 13.5362V10.2112C1.58325 7.44036 2.69159 6.33203 5.46242 6.33203H8.78742C11.5583 6.33203 12.6666 7.44036 12.6666 10.2112Z",
57
+ stroke: "#64748B",
58
+ strokeWidth: "1.5",
59
+ strokeLinecap: "round",
60
+ strokeLinejoin: "round"
61
+ }), /*#__PURE__*/_jsx("path", {
62
+ d: "M17.4166 5.4612V8.7862C17.4166 11.557 16.3083 12.6654 13.5374 12.6654H12.6666V10.2112C12.6666 7.44036 11.5583 6.33203 8.78742 6.33203H6.33325V5.4612C6.33325 2.69036 7.44158 1.58203 10.2124 1.58203H13.5374C16.3083 1.58203 17.4166 2.69036 17.4166 5.4612Z",
63
+ stroke: "#64748B",
64
+ strokeWidth: "1.5",
65
+ strokeLinecap: "round",
66
+ strokeLinejoin: "round"
67
+ })]
68
+ });
69
+ }
70
+ export function AboveArrow() {
71
+ return /*#__PURE__*/_jsxs("svg", {
72
+ width: "22",
73
+ height: "22",
74
+ viewBox: "0 0 22 22",
75
+ fill: "none",
76
+ xmlns: "http://www.w3.org/2000/svg",
77
+ children: [/*#__PURE__*/_jsx("path", {
78
+ d: "M16.5642 8.77344L11 3.20927L5.43588 8.77344",
79
+ stroke: "#64748B",
80
+ strokeWidth: "1.5",
81
+ strokeMiterlimit: "10",
82
+ strokeLinecap: "round",
83
+ strokeLinejoin: "round"
84
+ }), /*#__PURE__*/_jsx("path", {
85
+ d: "M11 18.793L11 3.36547",
86
+ stroke: "#64748B",
87
+ strokeWidth: "1.5",
88
+ strokeMiterlimit: "10",
89
+ strokeLinecap: "round",
90
+ strokeLinejoin: "round"
91
+ })]
92
+ });
93
+ }
94
+ export function BelowArrow() {
95
+ return /*#__PURE__*/_jsxs("svg", {
96
+ width: "22",
97
+ height: "22",
98
+ viewBox: "0 0 22 22",
99
+ fill: "none",
100
+ xmlns: "http://www.w3.org/2000/svg",
101
+ children: [/*#__PURE__*/_jsx("path", {
102
+ d: "M16.5642 13.2266L11 18.7907L5.43588 13.2266",
103
+ stroke: "#64748B",
104
+ strokeWidth: "1.5",
105
+ strokeMiterlimit: "10",
106
+ strokeLinecap: "round",
107
+ strokeLinejoin: "round"
108
+ }), /*#__PURE__*/_jsx("path", {
109
+ d: "M11 3.20703L11 18.6345",
110
+ stroke: "#64748B",
111
+ strokeWidth: "1.5",
112
+ strokeMiterlimit: "10",
113
+ strokeLinecap: "round",
114
+ strokeLinejoin: "round"
115
+ })]
116
+ });
117
+ }
118
+ export function RightArrow() {
119
+ return /*#__PURE__*/_jsxs("svg", {
120
+ width: "22",
121
+ height: "22",
122
+ viewBox: "0 0 22 22",
123
+ fill: "none",
124
+ xmlns: "http://www.w3.org/2000/svg",
125
+ children: [/*#__PURE__*/_jsx("path", {
126
+ d: "M13.2275 16.5625L18.7917 10.9983L13.2275 5.43417",
127
+ stroke: "#64748B",
128
+ strokeWidth: "1.5",
129
+ strokeMiterlimit: "10",
130
+ strokeLinecap: "round",
131
+ strokeLinejoin: "round"
132
+ }), /*#__PURE__*/_jsx("path", {
133
+ d: "M3.20825 11H18.6358",
134
+ stroke: "#64748B",
135
+ strokeWidth: "1.5",
136
+ strokeMiterlimit: "10",
137
+ strokeLinecap: "round",
138
+ strokeLinejoin: "round"
139
+ })]
140
+ });
141
+ }
142
+ export function LeftArrow() {
143
+ return /*#__PURE__*/_jsxs("svg", {
144
+ width: "22",
145
+ height: "22",
146
+ viewBox: "0 0 22 22",
147
+ fill: "none",
148
+ xmlns: "http://www.w3.org/2000/svg",
149
+ children: [/*#__PURE__*/_jsx("path", {
150
+ d: "M8.77246 16.5625L3.20829 10.9983L8.77246 5.43417",
151
+ stroke: "#64748B",
152
+ strokeWidth: "1.5",
153
+ strokeMiterlimit: "10",
154
+ strokeLinecap: "round",
155
+ strokeLinejoin: "round"
156
+ }), /*#__PURE__*/_jsx("path", {
157
+ d: "M18.7917 11L3.36425 11",
158
+ stroke: "#64748B",
159
+ strokeWidth: "1.5",
160
+ strokeMiterlimit: "10",
161
+ strokeLinecap: "round",
162
+ strokeLinejoin: "round"
163
+ })]
164
+ });
165
+ }
166
+ export function SettingsIcon() {
167
+ return /*#__PURE__*/_jsxs("svg", {
168
+ width: "20",
169
+ height: "20",
170
+ viewBox: "0 0 20 20",
171
+ fill: "none",
172
+ xmlns: "http://www.w3.org/2000/svg",
173
+ children: [/*#__PURE__*/_jsx("path", {
174
+ d: "M10 12.5C11.3807 12.5 12.5 11.3807 12.5 10C12.5 8.61929 11.3807 7.5 10 7.5C8.61929 7.5 7.5 8.61929 7.5 10C7.5 11.3807 8.61929 12.5 10 12.5Z",
175
+ stroke: "#0F172A",
176
+ strokeWidth: "1.5",
177
+ strokeMiterlimit: "10",
178
+ strokeLinecap: "round",
179
+ strokeLinejoin: "round"
180
+ }), /*#__PURE__*/_jsx("path", {
181
+ d: "M1.66675 10.7339V9.26718C1.66675 8.40052 2.37508 7.68385 3.25008 7.68385C4.75841 7.68385 5.37508 6.61718 4.61675 5.30885C4.18341 4.55885 4.44175 3.58385 5.20008 3.15052L6.64175 2.32552C7.30008 1.93385 8.15008 2.16718 8.54175 2.82552L8.63341 2.98385C9.38341 4.29218 10.6167 4.29218 11.3751 2.98385L11.4667 2.82552C11.8584 2.16718 12.7084 1.93385 13.3667 2.32552L14.8084 3.15052C15.5667 3.58385 15.8251 4.55885 15.3917 5.30885C14.6334 6.61718 15.2501 7.68385 16.7584 7.68385C17.6251 7.68385 18.3417 8.39218 18.3417 9.26718V10.7339C18.3417 11.6005 17.6334 12.3172 16.7584 12.3172C15.2501 12.3172 14.6334 13.3838 15.3917 14.6922C15.8251 15.4505 15.5667 16.4172 14.8084 16.8505L13.3667 17.6755C12.7084 18.0672 11.8584 17.8339 11.4667 17.1755L11.3751 17.0172C10.6251 15.7089 9.39175 15.7089 8.63341 17.0172L8.54175 17.1755C8.15008 17.8339 7.30008 18.0672 6.64175 17.6755L5.20008 16.8505C4.44175 16.4172 4.18341 15.4422 4.61675 14.6922C5.37508 13.3838 4.75841 12.3172 3.25008 12.3172C2.37508 12.3172 1.66675 11.6005 1.66675 10.7339Z",
182
+ stroke: "#0F172A",
183
+ strokeWidth: "1.5",
184
+ strokeMiterlimit: "10",
185
+ strokeLinecap: "round",
186
+ strokeLinejoin: "round"
187
+ })]
188
+ });
189
+ }
190
+ export function MoreIcon() {
191
+ return /*#__PURE__*/_jsxs("svg", {
192
+ width: "18",
193
+ height: "4",
194
+ viewBox: "0 0 18 4",
195
+ fill: "none",
196
+ xmlns: "http://www.w3.org/2000/svg",
197
+ children: [/*#__PURE__*/_jsx("path", {
198
+ d: "M9.99846 2.00034C9.99846 1.44825 9.55081 1.00069 8.99862 1.00069C8.44642 1.00069 7.99878 1.44825 7.99878 2.00034C7.99878 2.55244 8.44642 3 8.99862 3C9.55081 3 9.99846 2.55244 9.99846 2.00034Z",
199
+ fill: "#0F172A",
200
+ stroke: "#0F172A",
201
+ strokeWidth: "1.5",
202
+ strokeLinecap: "round",
203
+ strokeLinejoin: "round"
204
+ }), /*#__PURE__*/_jsx("path", {
205
+ d: "M16.9972 2.00034C16.9972 1.44825 16.5496 1.00069 15.9974 1.00069C15.4452 1.00069 14.9976 1.44825 14.9976 2.00034C14.9976 2.55244 15.4452 3 15.9974 3C16.5496 3 16.9972 2.55244 16.9972 2.00034Z",
206
+ fill: "#0F172A",
207
+ stroke: "#0F172A",
208
+ strokeWidth: "1.5",
209
+ strokeLinecap: "round",
210
+ strokeLinejoin: "round"
211
+ }), /*#__PURE__*/_jsx("path", {
212
+ d: "M2.99968 2.00034C2.99968 1.44825 2.55203 1.00069 1.99984 1.00069C1.44764 1.00069 1 1.44825 1 2.00034C1 2.55244 1.44764 3 1.99984 3C2.55203 3 2.99968 2.55244 2.99968 2.00034Z",
213
+ fill: "#0F172A",
214
+ stroke: "#0F172A",
215
+ strokeWidth: "1.5",
216
+ strokeLinecap: "round",
217
+ strokeLinejoin: "round"
218
+ })]
219
+ });
220
+ }
@@ -9,12 +9,12 @@ const UserIcon = props => {
9
9
  xmlns: "http://www.w3.org/2000/svg",
10
10
  children: [/*#__PURE__*/_jsx("path", {
11
11
  d: "M6 6C7.38071 6 8.5 4.88071 8.5 3.5C8.5 2.11929 7.38071 1 6 1C4.61929 1 3.5 2.11929 3.5 3.5C3.5 4.88071 4.61929 6 6 6Z",
12
- stroke: "#84818A",
12
+ stroke: "#64748B",
13
13
  strokeLinecap: "round",
14
14
  strokeLinejoin: "round"
15
15
  }), /*#__PURE__*/_jsx("path", {
16
16
  d: "M10.295 11C10.295 9.065 8.36995 7.5 5.99995 7.5C3.62995 7.5 1.70496 9.065 1.70496 11",
17
- stroke: "#84818A",
17
+ stroke: "#64748B",
18
18
  strokeLinecap: "round",
19
19
  strokeLinejoin: "round"
20
20
  })]
@@ -12,7 +12,7 @@ const usePopupStyles = theme => ({
12
12
  background: `${theme?.palette?.editor?.miniToolBarBackground} !important`,
13
13
  "& .MuiBox-root": {
14
14
  "& .renderComp": {
15
- padding: "2px 0px",
15
+ padding: "2px 0px 2px 1px",
16
16
  background: "transparent !important"
17
17
  },
18
18
  "& button": {
@@ -128,41 +128,15 @@ const FormSettings = props => {
128
128
  }, `accordion_${i}`)
129
129
  }, i);
130
130
  } else {
131
- return /*#__PURE__*/_jsx(ThemeProvider, {
132
- theme: muiTheme,
133
- children: /*#__PURE__*/_jsxs(Accordion, {
134
- defaultExpanded: true,
135
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
136
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
137
- sx: {
138
- padding: "5px"
139
- },
140
- children: /*#__PURE__*/_jsx(Typography, {
141
- variant: "body1",
142
- className: "settingsHeader",
143
- color: "primary",
144
- style: {
145
- fontSize: "14px !important",
146
- fontWeight: "400"
147
- },
148
- children: m?.tab
149
- })
150
- }), /*#__PURE__*/_jsx(AccordionDetails, {
151
- sx: {
152
- padding: "0px"
153
- },
154
- children: /*#__PURE__*/_jsx(StyleContent, {
155
- renderTabs: styleMaps,
156
- value: m.value,
157
- element: element,
158
- customElement: element?.children?.[0] || null,
159
- onChange: onChange,
160
- customProps: customProps,
161
- handleClose: handleClose
162
- }, `tab_${m.value}_$${i}`)
163
- })]
164
- }, `accordion_${i}`)
165
- }, i);
131
+ return /*#__PURE__*/_jsx(StyleContent, {
132
+ renderTabs: styleMaps,
133
+ value: m.value,
134
+ element: element,
135
+ customElement: element?.children?.[0] || null,
136
+ onChange: onChange,
137
+ customProps: customProps,
138
+ handleClose: handleClose
139
+ }, `tab_${m.value}_$${i}`);
166
140
  }
167
141
  })
168
142
  });
@@ -174,82 +174,114 @@ export const formStyle = [{
174
174
  }, {
175
175
  tab: "Field Settings",
176
176
  value: "FieldSetting",
177
- hasChildrenTabs: false,
177
+ hasChildrenTabs: true,
178
178
  fields: [{
179
- label: "Font Family",
180
- key: "fieldFontFamily",
181
- type: "textOptions",
182
- hideMetaDataOptions: true,
183
- options: fontOptions,
184
- webFont: true,
185
- renderOption: option => {
186
- return /*#__PURE__*/_jsx("span", {
187
- style: {
188
- fontFamily: option.value
189
- },
190
- children: option.text
191
- });
192
- }
179
+ tab: "Font Family",
180
+ value: "FontFamily",
181
+ fields: [{
182
+ label: "Font Family",
183
+ key: "fieldFontFamily",
184
+ type: "textOptions",
185
+ hideMetaDataOptions: true,
186
+ options: fontOptions,
187
+ webFont: true,
188
+ renderOption: option => {
189
+ return /*#__PURE__*/_jsx("span", {
190
+ style: {
191
+ fontFamily: option.value
192
+ },
193
+ children: option.text
194
+ });
195
+ }
196
+ }]
193
197
  }, {
194
- label: "Font Weight",
195
- key: "fieldFontWeight",
196
- type: "textOptions",
197
- width: 5,
198
- options: fontWeightOptions,
199
- hideMetaDataOptions: true,
200
- renderOption: option => {
201
- return /*#__PURE__*/_jsx("span", {
202
- style: {
203
- fontWeight: option.value
204
- },
205
- children: option.text
206
- });
207
- }
198
+ tab: "Font Weight",
199
+ value: "FontWeight",
200
+ fields: [{
201
+ label: "Font Weight",
202
+ key: "fieldFontWeight",
203
+ type: "textOptions",
204
+ width: 5,
205
+ options: fontWeightOptions,
206
+ hideMetaDataOptions: true,
207
+ renderOption: option => {
208
+ return /*#__PURE__*/_jsx("span", {
209
+ style: {
210
+ fontWeight: option.value
211
+ },
212
+ children: option.text
213
+ });
214
+ }
215
+ }]
208
216
  }, {
209
- label: "Font Size",
210
- key: "fieldTextSize",
211
- type: "fontSize",
212
- width: 5,
213
- placeholder: "16px"
217
+ tab: "Font Size",
218
+ value: "FontSize",
219
+ fields: [{
220
+ label: "Font Size",
221
+ key: "fieldTextSize",
222
+ type: "fontSize",
223
+ width: 5,
224
+ placeholder: "16px"
225
+ }]
214
226
  }, {
215
- label: "Text Color",
216
- key: "fieldTextColor",
217
- type: "color",
218
- needPreview: true
227
+ tab: "Text Color",
228
+ value: "TextColor",
229
+ fields: [{
230
+ label: "Text Color",
231
+ key: "fieldTextColor",
232
+ type: "color",
233
+ needPreview: true
234
+ }]
219
235
  }, {
220
- label: "Background Color",
221
- key: "fieldBgColor",
222
- type: "color"
236
+ tab: "Background Color",
237
+ value: "BackgroundColor",
238
+ fields: [{
239
+ label: "Background Color",
240
+ key: "fieldBgColor",
241
+ type: "color"
242
+ }]
223
243
  }, {
224
- label: "Border Color",
225
- key: "fieldBorderColor",
226
- type: "color"
244
+ tab: "Border Color",
245
+ value: "BorderColor",
246
+ fields: [{
247
+ label: "Border Color",
248
+ key: "fieldBorderColor",
249
+ type: "color"
250
+ }]
227
251
  }, {
228
- label: "Border Width",
229
- key: "fieldBorderWidth",
230
- type: "text",
231
- width: 5,
232
- placeholder: "1px"
252
+ tab: "Border Width",
253
+ value: "BorderWidth",
254
+ fields: [{
255
+ label: "Border Width",
256
+ key: "fieldBorderWidth",
257
+ type: "text",
258
+ width: 5,
259
+ placeholder: "1px"
260
+ }]
233
261
  }, {
234
- label: "Border Style",
235
- key: "fieldBorderStyle",
236
- type: "textOptions",
237
- hideMetaDataOptions: true,
238
- width: 5,
239
- options: [{
240
- text: "Solid",
241
- value: "solid"
242
- }, {
243
- text: "Dotted",
244
- value: "dotted"
245
- }, {
246
- text: "Dashed",
247
- value: "dashed"
248
- }],
249
- renderOption: option => {
250
- return /*#__PURE__*/_jsx("span", {
251
- children: option.text
252
- });
253
- }
262
+ tab: "Border Style",
263
+ value: "BorderStyle",
264
+ fields: [{
265
+ label: "Border Style",
266
+ key: "fieldBorderStyle",
267
+ type: "textOptions",
268
+ hideMetaDataOptions: true,
269
+ width: 5,
270
+ options: [{
271
+ text: "Solid",
272
+ value: "solid"
273
+ }, {
274
+ text: "Dotted",
275
+ value: "dotted"
276
+ }, {
277
+ text: "Dashed",
278
+ value: "dashed"
279
+ }],
280
+ renderOption: option => {
281
+ return /*#__PURE__*/_jsx("span", {
282
+ children: option.text
283
+ });
284
+ }
285
+ }]
254
286
  }]
255
287
  }];