@flozy/editor 4.9.1 → 4.9.3

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 (34) hide show
  1. package/dist/Editor/Editor.css +17 -4
  2. package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
  3. package/dist/Editor/Elements/AI/Styles.js +7 -1
  4. package/dist/Editor/Elements/Embed/Video.js +3 -2
  5. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  6. package/dist/Editor/Elements/Grid/GridItem.js +28 -9
  7. package/dist/Editor/Elements/Grid/Styles.js +1 -0
  8. package/dist/Editor/Elements/Search/SearchAttachment.js +27 -18
  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/index.js +6 -8
  23. package/dist/Editor/assets/svg/DocsIcon.js +77 -10
  24. package/dist/Editor/assets/svg/TableIcons.js +220 -0
  25. package/dist/Editor/assets/svg/UserIcon.js +2 -2
  26. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +27 -38
  27. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +1 -1
  28. package/dist/Editor/common/StyleBuilder/index.js +43 -57
  29. package/dist/Editor/common/StyleBuilder/tableStyle.js +92 -1
  30. package/dist/Editor/common/iconListV2.js +52 -0
  31. package/dist/Editor/hooks/useTable.js +164 -0
  32. package/dist/Editor/utils/helper.js +1 -1
  33. package/dist/Editor/utils/table.js +204 -21
  34. package/package.json +1 -1
@@ -3,7 +3,6 @@ import { Popper, Fade, Paper, ClickAwayListener } from "@mui/material";
3
3
  import { Editor, Range } from "slate";
4
4
  import { 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,7 +29,6 @@ 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
@@ -61,12 +59,12 @@ const PopupTool = props => {
61
59
 
62
60
  if (userStoppedSelection && anchorEl && !open) {
63
61
  // for table cell selection
64
- const isCellsSelected = table.isCellSelected(editor.selection);
65
- if (!isCellsSelected) {
66
- setOpen(true);
67
- setPopupType("textFormat");
68
- setIsTextSelected(true);
69
- }
62
+ // const isCellsSelected = table.isCellSelected(editor.selection);
63
+ // if (!isCellsSelected) {
64
+ setOpen(true);
65
+ setPopupType("textFormat");
66
+ setIsTextSelected(true);
67
+ // }
70
68
  } else if (!anchorEl) {
71
69
  setOpen(false);
72
70
  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
  })]
@@ -5,6 +5,7 @@ import { StyleContent } from "../../../StyleBuilder";
5
5
  import { formStyle } from "../../../StyleBuilder/formStyle";
6
6
  import { ReactEditor } from "slate-react";
7
7
  import { ExpandMoreOutlined } from "@mui/icons-material";
8
+ import { useEditorContext } from "../../../../hooks/useMouseMove";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const FormSettings = props => {
@@ -20,6 +21,9 @@ const FormSettings = props => {
20
21
  const {
21
22
  hideTools
22
23
  } = customProps || {};
24
+ const {
25
+ theme
26
+ } = useEditorContext();
23
27
  const onChange = data => {
24
28
  const currentPath = ReactEditor.findPath(editor, element);
25
29
  const updateData = {
@@ -58,6 +62,17 @@ const FormSettings = props => {
58
62
  MuiAccordion: {
59
63
  styleOverrides: {
60
64
  root: {
65
+ "& .MuiAccordionSummary-root": {
66
+ flexDirection: "row-reverse",
67
+ "& .MuiSvgIcon-root": {
68
+ color: theme?.palette?.primary?.main
69
+ },
70
+ "& .Mui-expanded": {
71
+ "& .MuiSvgIcon-root": {
72
+ color: theme?.palette?.text?.blueText
73
+ }
74
+ }
75
+ },
61
76
  padding: "0px",
62
77
  "&.Mui-expanded": {
63
78
  margin: "0"
@@ -85,7 +100,7 @@ const FormSettings = props => {
85
100
  padding: "0px"
86
101
  },
87
102
  children: /*#__PURE__*/_jsx(Typography, {
88
- variant: "h3",
103
+ variant: "body1",
89
104
  className: "settingsHeader",
90
105
  color: "primary",
91
106
  style: {
@@ -99,41 +114,15 @@ const FormSettings = props => {
99
114
  padding: "5px"
100
115
  },
101
116
  children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
102
- return /*#__PURE__*/_jsx(ThemeProvider, {
103
- theme: muiTheme,
104
- children: /*#__PURE__*/_jsxs(Accordion, {
105
- defaultExpanded: true,
106
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
107
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
108
- sx: {
109
- padding: "0px"
110
- },
111
- children: /*#__PURE__*/_jsx(Typography, {
112
- variant: "h3",
113
- className: "settingsHeader",
114
- color: "primary",
115
- style: {
116
- fontSize: "14px !important",
117
- fontWeight: "400"
118
- },
119
- children: field?.tab
120
- })
121
- }), /*#__PURE__*/_jsx(AccordionDetails, {
122
- sx: {
123
- padding: "0px"
124
- },
125
- children: /*#__PURE__*/_jsx(StyleContent, {
126
- renderTabs: [field],
127
- value: field.value,
128
- element: element,
129
- onChange: onChange,
130
- customElement: element?.children?.[0] || null,
131
- customProps: customProps,
132
- handleClose: handleClose
133
- }, `tab_${field.value}_${index}`)
134
- })]
135
- }, `accordion_${index}`)
136
- }, index);
117
+ return /*#__PURE__*/_jsx(StyleContent, {
118
+ renderTabs: [field],
119
+ value: field.value,
120
+ element: element,
121
+ onChange: onChange,
122
+ customElement: element?.children?.[0] || null,
123
+ customProps: customProps,
124
+ handleClose: handleClose
125
+ }, `tab_${field.value}_${index}`);
137
126
  })
138
127
  })]
139
128
  }, `accordion_${i}`)
@@ -146,10 +135,10 @@ const FormSettings = props => {
146
135
  children: [/*#__PURE__*/_jsx(AccordionSummary, {
147
136
  expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
148
137
  sx: {
149
- padding: "0px"
138
+ padding: "5px"
150
139
  },
151
140
  children: /*#__PURE__*/_jsx(Typography, {
152
- variant: "h3",
141
+ variant: "body1",
153
142
  className: "settingsHeader",
154
143
  color: "primary",
155
144
  style: {
@@ -23,7 +23,7 @@ const embedVideoStyle = [{
23
23
  value: "9 / 16"
24
24
  }, {
25
25
  text: "Custom",
26
- value: ""
26
+ value: "custom"
27
27
  }],
28
28
  renderOption: option => {
29
29
  return /*#__PURE__*/_jsx("span", {
@@ -5,27 +5,10 @@ import CloseIcon from "@mui/icons-material/Close";
5
5
  import useCommonStyle from "../../commonStyle";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import { ThemeProvider } from "@mui/material/styles";
8
- import { ExpandMoreOutlined, Height } from "@mui/icons-material";
8
+ import { ExpandMoreOutlined, ExpandMoreSharp } from "@mui/icons-material";
9
9
  import { jsx as _jsx } from "react/jsx-runtime";
10
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
11
  import { Fragment as _Fragment } from "react/jsx-runtime";
12
- const muiTheme = createTheme({
13
- components: {
14
- MuiAccordion: {
15
- styleOverrides: {
16
- root: {
17
- padding: "0px",
18
- "&.Mui-expanded": {
19
- margin: "0"
20
- }
21
- }
22
- },
23
- defaultProps: {
24
- elevation: 0
25
- }
26
- }
27
- }
28
- });
29
12
  export const StyleContent = props => {
30
13
  const {
31
14
  value,
@@ -95,6 +78,34 @@ const StyleBuilder = props => {
95
78
  const {
96
79
  hideTools
97
80
  } = customProps || {};
81
+ const muiTheme = createTheme({
82
+ components: {
83
+ MuiAccordion: {
84
+ styleOverrides: {
85
+ root: {
86
+ "& .MuiAccordionSummary-root": {
87
+ flexDirection: "row-reverse",
88
+ "& .MuiSvgIcon-root": {
89
+ color: theme?.palette?.primary?.main
90
+ },
91
+ "& .Mui-expanded": {
92
+ "& .MuiSvgIcon-root": {
93
+ color: theme?.palette?.text?.blueText
94
+ }
95
+ }
96
+ },
97
+ padding: "0px",
98
+ "&.Mui-expanded": {
99
+ margin: "0"
100
+ }
101
+ }
102
+ },
103
+ defaultProps: {
104
+ elevation: 0
105
+ }
106
+ }
107
+ }
108
+ });
98
109
  useEffect(() => {
99
110
  if (customProps?.onDrawerOpen) {
100
111
  customProps?.onDrawerOpen(true);
@@ -171,17 +182,17 @@ const StyleBuilder = props => {
171
182
  children: /*#__PURE__*/_jsxs(Accordion, {
172
183
  defaultExpanded: true,
173
184
  children: [/*#__PURE__*/_jsx(AccordionSummary, {
174
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
185
+ expandIcon: /*#__PURE__*/_jsx(ExpandMoreSharp, {}),
175
186
  sx: {
176
187
  padding: "0px"
177
188
  },
178
189
  children: /*#__PURE__*/_jsx(Typography, {
179
- variant: "h3",
190
+ variant: "body1",
180
191
  className: "settingsHeader",
181
192
  color: "primary",
182
193
  style: {
183
194
  fontSize: "14px !important",
184
- fontWeight: "400"
195
+ fontWeight: "400 !important"
185
196
  },
186
197
  children: m?.tab
187
198
  })
@@ -190,40 +201,14 @@ const StyleBuilder = props => {
190
201
  padding: "5px"
191
202
  },
192
203
  children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
193
- return /*#__PURE__*/_jsx(ThemeProvider, {
194
- theme: muiTheme,
195
- children: /*#__PURE__*/_jsxs(Accordion, {
196
- defaultExpanded: true,
197
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
198
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
199
- sx: {
200
- padding: "0px"
201
- },
202
- children: /*#__PURE__*/_jsx(Typography, {
203
- variant: "h3",
204
- className: "settingsHeader",
205
- color: "primary",
206
- style: {
207
- fontSize: "14px !important",
208
- fontWeight: "400"
209
- },
210
- children: field?.tab
211
- })
212
- }), /*#__PURE__*/_jsx(AccordionDetails, {
213
- sx: {
214
- padding: "0px"
215
- },
216
- children: /*#__PURE__*/_jsx(StyleContent, {
217
- renderTabs: [field],
218
- value: field.value,
219
- element: elementProps,
220
- onChange: onElementPropsChange,
221
- customProps: customProps,
222
- handleClose: handleClose
223
- }, `tab_${field.value}_${index}`)
224
- })]
225
- }, `accordion_${index}`)
226
- }, index);
204
+ return /*#__PURE__*/_jsx(StyleContent, {
205
+ renderTabs: [field],
206
+ value: field.value,
207
+ element: elementProps,
208
+ onChange: onElementPropsChange,
209
+ customProps: customProps,
210
+ handleClose: handleClose
211
+ }, `tab_${field.value}_${index}`);
227
212
  })
228
213
  })]
229
214
  }, `accordion_${i}`)
@@ -239,7 +224,7 @@ const StyleBuilder = props => {
239
224
  padding: "0px"
240
225
  },
241
226
  children: /*#__PURE__*/_jsx(Typography, {
242
- variant: "h3",
227
+ variant: "body1",
243
228
  className: "settingsHeader",
244
229
  color: "primary",
245
230
  style: {
@@ -250,7 +235,7 @@ const StyleBuilder = props => {
250
235
  })
251
236
  }), /*#__PURE__*/_jsx(AccordionDetails, {
252
237
  sx: {
253
- padding: "0px"
238
+ padding: "5px"
254
239
  },
255
240
  children: /*#__PURE__*/_jsx(StyleContent, {
256
241
  renderTabs: renderTabs,
@@ -269,6 +254,7 @@ const StyleBuilder = props => {
269
254
  sx: {
270
255
  p: 0,
271
256
  pt: 2,
257
+ pl: 1,
272
258
  justifyContent: "space-between"
273
259
  },
274
260
  children: [onDelete ? /*#__PURE__*/_jsx(Button, {