@flozy/editor 5.3.6 → 5.3.8

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 (102) hide show
  1. package/dist/Editor/ChatEditor.js +34 -25
  2. package/dist/Editor/CommonEditor.js +8 -16
  3. package/dist/Editor/Editor.css +11 -57
  4. package/dist/Editor/Elements/AI/AIInput.js +1 -0
  5. package/dist/Editor/Elements/AI/CustomSelect.js +11 -19
  6. package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -9
  7. package/dist/Editor/Elements/AI/Styles.js +5 -17
  8. package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
  9. package/dist/Editor/Elements/Color Picker/ColorButtons.js +3 -3
  10. package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
  11. package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
  12. package/dist/Editor/Elements/Divider/Divider.js +15 -16
  13. package/dist/Editor/Elements/Embed/Image.js +7 -23
  14. package/dist/Editor/Elements/Embed/Video.js +1 -13
  15. package/dist/Editor/Elements/Form/Form.js +2 -38
  16. package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
  17. package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
  18. package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
  19. package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
  20. package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
  21. package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
  22. package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
  23. package/dist/Editor/Elements/Form/FormPopup.js +9 -12
  24. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
  25. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
  26. package/dist/Editor/Elements/Grid/GridButton.js +2 -2
  27. package/dist/Editor/Elements/Grid/GridItem.js +36 -45
  28. package/dist/Editor/Elements/Grid/Styles.js +0 -6
  29. package/dist/Editor/Elements/Link/LinkButton.js +1 -1
  30. package/dist/Editor/Elements/Search/SearchButton.js +0 -1
  31. package/dist/Editor/Elements/Signature/Signature.css +1 -1
  32. package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
  33. package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
  34. package/dist/Editor/Elements/SimpleText/style.js +0 -10
  35. package/dist/Editor/Elements/Table/Styles.js +79 -82
  36. package/dist/Editor/Elements/Table/Table.js +140 -260
  37. package/dist/Editor/Elements/Table/TableCell.js +103 -362
  38. package/dist/Editor/Elements/Table/TablePopup.js +3 -9
  39. package/dist/Editor/Elements/Table/TableRow.js +2 -10
  40. package/dist/Editor/Styles/EditorStyles.js +1 -8
  41. package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
  42. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
  43. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
  44. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
  45. package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
  46. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
  47. package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
  48. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
  49. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
  50. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -409
  51. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -17
  52. package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
  53. package/dist/Editor/assets/svg/BrainIcon.js +2 -2
  54. package/dist/Editor/common/ColorPickerButton.js +44 -82
  55. package/dist/Editor/common/Icon.js +20 -17
  56. package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
  57. package/dist/Editor/common/LinkSettings/index.js +1 -2
  58. package/dist/Editor/common/MentionsPopup/Styles.js +8 -156
  59. package/dist/Editor/common/MentionsPopup/index.js +1 -1
  60. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
  61. package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
  62. package/dist/Editor/common/RnD/index.js +1 -1
  63. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +4 -8
  64. package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
  65. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
  66. package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
  67. package/dist/Editor/common/StyleBuilder/index.js +11 -84
  68. package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
  69. package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
  70. package/dist/Editor/common/iconListV2.js +40 -378
  71. package/dist/Editor/common/iconslist.js +14 -17
  72. package/dist/Editor/commonStyle.js +10 -130
  73. package/dist/Editor/helper/deserialize/index.js +20 -27
  74. package/dist/Editor/helper/index.js +1 -1
  75. package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
  76. package/dist/Editor/plugins/withHTML.js +10 -61
  77. package/dist/Editor/plugins/withLayout.js +0 -1
  78. package/dist/Editor/utils/SlateUtilityFunctions.js +0 -2
  79. package/dist/Editor/utils/brains.js +1 -1
  80. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
  81. package/dist/Editor/utils/customHooks/useResize.js +4 -7
  82. package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
  83. package/dist/Editor/utils/embed.js +1 -2
  84. package/dist/Editor/utils/events.js +1 -0
  85. package/dist/Editor/utils/font.js +4 -11
  86. package/dist/Editor/utils/formfield.js +4 -8
  87. package/dist/Editor/utils/helper.js +2 -55
  88. package/dist/Editor/utils/insertNewLine.js +1 -19
  89. package/dist/Editor/utils/serializeToText.js +0 -2
  90. package/dist/Editor/utils/table.js +24 -228
  91. package/package.json +1 -1
  92. package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
  93. package/dist/Editor/Elements/Table/DragButton.js +0 -142
  94. package/dist/Editor/Elements/Table/DragStyles.js +0 -70
  95. package/dist/Editor/Elements/Table/Draggable.js +0 -25
  96. package/dist/Editor/Elements/Table/Droppable.js +0 -53
  97. package/dist/Editor/Elements/Table/TableTool.js +0 -101
  98. package/dist/Editor/Elements/Table/tableHelper.js +0 -71
  99. package/dist/Editor/assets/svg/TableIcons.js +0 -220
  100. package/dist/Editor/common/Select/index.js +0 -20
  101. package/dist/Editor/common/Select/styles.js +0 -17
  102. package/dist/Editor/hooks/useTable.js +0 -207
@@ -1,287 +1,168 @@
1
- import { fontOptions, fontWeightOptions } from "../../utils/font";
1
+ import { fontOptions } from "../../utils/font";
2
2
  import Icon from "../Icon";
3
3
  import { jsx as _jsx } from "react/jsx-runtime";
4
- export const formStyle = [{
5
- tab: "Form Settings",
6
- value: "FormSetting",
7
- hasChildrenTabs: true,
4
+ const formStyle = [{
5
+ tab: "General",
6
+ value: "general",
8
7
  fields: [{
9
- tab: "General",
10
- value: "general",
11
- fields: [{
12
- label: "Form Name",
13
- key: "formName",
14
- type: "text"
15
- }, {
16
- label: "Send Form to Email",
17
- key: "email",
18
- type: "text",
19
- placeholder: "Enter Email to send the response..."
20
- }, {
21
- label: "Save Response",
22
- key: "saveResponse",
23
- type: "selectBox",
24
- placeholder: "Save Response"
25
- }]
8
+ label: "Form Name",
9
+ key: "formName",
10
+ type: "text"
26
11
  }, {
27
- tab: "Form Title",
28
- value: "formTitle",
29
- fields: [{
30
- label: "Title",
31
- key: "formTitle",
32
- type: "text"
33
- }, {
34
- label: "Font Family",
35
- key: "fontFamily",
36
- type: "textOptions",
37
- hideMetaDataOptions: true,
38
- options: fontOptions,
39
- webFont: true,
40
- width: 7,
41
- renderOption: option => {
42
- return /*#__PURE__*/_jsx("span", {
43
- style: {
44
- fontFamily: option.value
45
- },
46
- children: option.text
47
- });
48
- }
49
- }, {
50
- label: "Font Size",
51
- key: "textSize",
52
- type: "fontSize",
53
- width: 5,
54
- placeholder: "16px"
55
- }, {
56
- label: "Text Align",
57
- key: "textAlign",
58
- type: "textAlign",
59
- placeholder: "16px or 1em"
60
- }]
12
+ label: "Send Form to Email",
13
+ key: "email",
14
+ type: "text",
15
+ placeholder: "Enter Email to send the response..."
61
16
  }, {
62
- tab: "Banner Spacing",
63
- value: "bannerSpacing",
64
- fields: [{
65
- label: "Banner Spacing",
66
- key: "bannerSpacing",
67
- type: "bannerSpacing"
68
- }]
17
+ label: "Save Response",
18
+ key: "saveResponse",
19
+ type: "selectBox",
20
+ placeholder: "Save Response"
21
+ }]
22
+ }, {
23
+ tab: "Form Title",
24
+ value: "formTitle",
25
+ fields: [{
26
+ label: "Title",
27
+ key: "formTitle",
28
+ type: "text"
69
29
  }, {
70
- tab: "Border",
71
- value: "border",
72
- fields: [{
73
- label: "Border Radius",
74
- key: "borderRadius",
75
- type: "borderRadius"
76
- }, {
77
- label: "Border Width",
78
- key: "borderWidth",
79
- type: "text",
80
- placeholder: "1px"
81
- }, {
82
- label: "Border Style",
83
- key: "borderStyle",
84
- type: "textOptions",
85
- hideMetaDataOptions: true,
86
- options: [{
87
- text: "Solid",
88
- value: "solid"
89
- }, {
90
- text: "Dotted",
91
- value: "dotted"
92
- }, {
93
- text: "Dashed",
94
- value: "dashed"
95
- }],
96
- renderOption: option => {
97
- return /*#__PURE__*/_jsx("span", {
98
- children: option.text
99
- });
100
- }
101
- }]
30
+ label: "Font Family",
31
+ key: "fontFamily",
32
+ type: "textOptions",
33
+ options: fontOptions,
34
+ webFont: true,
35
+ width: 7,
36
+ renderOption: option => {
37
+ return /*#__PURE__*/_jsx("span", {
38
+ style: {
39
+ fontFamily: option.value
40
+ },
41
+ children: option.text
42
+ });
43
+ }
102
44
  }, {
103
- tab: "Colors",
104
- value: "colors",
105
- fields: [{
106
- label: "Text Color",
107
- key: "textColor",
108
- type: "color",
109
- needPreview: true
110
- }, {
111
- label: "Background Color",
112
- key: "bgColor",
113
- type: "color"
114
- }, {
115
- label: "Border Color",
116
- key: "borderColor",
117
- type: "color"
118
- }]
45
+ label: "Font Size",
46
+ key: "textSize",
47
+ type: "fontSize",
48
+ width: 5,
49
+ placeholder: "16px"
50
+ }, {
51
+ label: "Text Align",
52
+ key: "textAlign",
53
+ type: "textAlign",
54
+ placeholder: "16px or 1em"
55
+ }]
56
+ }, {
57
+ tab: "Banner Spacing",
58
+ value: "bannerSpacing",
59
+ fields: [{
60
+ label: "Banner Spacing",
61
+ key: "bannerSpacing",
62
+ type: "bannerSpacing"
63
+ }]
64
+ }, {
65
+ tab: "Border",
66
+ value: "border",
67
+ fields: [{
68
+ label: "Border Radius",
69
+ key: "borderRadius",
70
+ type: "borderRadius"
119
71
  }, {
120
- tab: "Position",
121
- value: "position",
122
- fields: [{
123
- label: "Set Postion (Vertical & Horizantal)",
124
- key: "alignment",
125
- type: "alignment"
126
- }]
72
+ label: "Border Width",
73
+ key: "borderWidth",
74
+ type: "text",
75
+ placeholder: "1px"
127
76
  }, {
128
- tab: "Background",
129
- value: "backgroundImage",
130
- fields: [{
131
- label: "URL",
132
- key: "backgroundImage",
133
- type: "text"
77
+ label: "Border Style",
78
+ key: "borderStyle",
79
+ type: "textOptions",
80
+ options: [{
81
+ text: "Solid",
82
+ value: "solid"
134
83
  }, {
135
- label: "Background Image",
136
- key: "backgroundImage",
137
- type: "backgroundImage"
138
- }]
139
- }, {
140
- tab: "Add to Boards",
141
- value: "metadatamapping",
142
- fields: [{
143
- label: "Add response to contacts board",
144
- key: "metadatamapping",
145
- type: "metadatamapping",
146
- compType: "card",
147
- content: "By default, form responses are added as separate cards on the default contact board.",
148
- value: "mappingToContactBoard",
149
- infoIcon: /*#__PURE__*/_jsx(Icon, {
150
- icon: "info"
151
- })
84
+ text: "Dotted",
85
+ value: "dotted"
152
86
  }, {
153
- label: "Create a separate board",
154
- key: "metadatamapping",
155
- type: "metadatamapping",
156
- compType: "card",
157
- content: "By default, form responses are added as separate cards on a new board (Contact Us).",
158
- value: "mappingToSeparateBoard",
159
- infoIcon: /*#__PURE__*/_jsx(Icon, {
160
- icon: "info"
161
- })
162
- }]
163
- }, {
164
- tab: "Save As Template",
165
- value: "saveAsTemplate",
166
- needActions: false,
167
- hideOnFGS: true,
168
- fields: [{
169
- label: "Template Image",
170
- key: "saveAsTemplate",
171
- type: "saveAsTemplate"
172
- }]
87
+ text: "Dashed",
88
+ value: "dashed"
89
+ }],
90
+ renderOption: option => {
91
+ return /*#__PURE__*/_jsx("span", {
92
+ children: option.text
93
+ });
94
+ }
173
95
  }]
174
96
  }, {
175
- tab: "Field Settings",
176
- value: "FieldSetting",
177
- hasChildrenTabs: true,
97
+ tab: "Colors",
98
+ value: "colors",
178
99
  fields: [{
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
- }]
197
- }, {
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
- }]
216
- }, {
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
- }]
100
+ label: "Text Color",
101
+ key: "textColor",
102
+ type: "color",
103
+ needPreview: true
226
104
  }, {
227
- tab: "Text Color",
228
- value: "TextColor",
229
- fields: [{
230
- label: "Text Color",
231
- key: "fieldTextColor",
232
- type: "color",
233
- needPreview: true
234
- }]
105
+ label: "Background Color",
106
+ key: "bgColor",
107
+ type: "color"
235
108
  }, {
236
- tab: "Background Color",
237
- value: "BackgroundColor",
238
- fields: [{
239
- label: "Background Color",
240
- key: "fieldBgColor",
241
- type: "color"
242
- }]
243
- }, {
244
- tab: "Border Color",
245
- value: "BorderColor",
246
- fields: [{
247
- label: "Border Color",
248
- key: "fieldBorderColor",
249
- type: "color"
250
- }]
109
+ label: "Border Color",
110
+ key: "borderColor",
111
+ type: "color"
112
+ }]
113
+ }, {
114
+ tab: "Position",
115
+ value: "position",
116
+ fields: [{
117
+ label: "Set Postion (Vertical & Horizantal)",
118
+ key: "alignment",
119
+ type: "alignment"
120
+ }]
121
+ }, {
122
+ tab: "Background",
123
+ value: "backgroundImage",
124
+ fields: [{
125
+ label: "URL",
126
+ key: "backgroundImage",
127
+ type: "text"
251
128
  }, {
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
- }]
129
+ label: "Background Image",
130
+ key: "backgroundImage",
131
+ type: "backgroundImage"
132
+ }]
133
+ }, {
134
+ tab: "Add to Boards",
135
+ value: "metadatamapping",
136
+ fields: [{
137
+ label: "Add response to contacts board",
138
+ key: "metadatamapping",
139
+ type: "metadatamapping",
140
+ compType: "card",
141
+ content: "By default, form responses are added as separate cards on the default contact board.",
142
+ value: "mappingToContactBoard",
143
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
144
+ icon: "info"
145
+ })
261
146
  }, {
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
- }]
147
+ label: "Create a separate board",
148
+ key: "metadatamapping",
149
+ type: "metadatamapping",
150
+ compType: "card",
151
+ content: "By default, form responses are added as separate cards on a new board (Contact Us).",
152
+ value: "mappingToSeparateBoard",
153
+ infoIcon: /*#__PURE__*/_jsx(Icon, {
154
+ icon: "info"
155
+ })
156
+ }]
157
+ }, {
158
+ tab: "Save As Template",
159
+ value: "saveAsTemplate",
160
+ needActions: false,
161
+ hideOnFGS: true,
162
+ fields: [{
163
+ label: "Template Image",
164
+ key: "saveAsTemplate",
165
+ type: "saveAsTemplate"
286
166
  }]
287
- }];
167
+ }];
168
+ export default formStyle;
@@ -1,11 +1,9 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer, Accordion, AccordionSummary, AccordionDetails, createTheme } from "@mui/material";
2
+ import { DialogTitle, DialogContent, DialogActions, Button, Grid, IconButton, Typography, Drawer, SwipeableDrawer } from "@mui/material";
3
3
  import FieldMap from "./fieldTypes";
4
4
  import CloseIcon from "@mui/icons-material/Close";
5
5
  import useCommonStyle from "../../commonStyle";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
- import { ThemeProvider } from "@mui/material/styles";
8
- import { ExpandMoreSharp } from "@mui/icons-material";
9
7
  import { jsx as _jsx } from "react/jsx-runtime";
10
8
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
9
  import { Fragment as _Fragment } from "react/jsx-runtime";
@@ -75,37 +73,6 @@ const StyleBuilder = props => {
75
73
  } = tabVal || {
76
74
  needActions: true
77
75
  };
78
- const {
79
- hideTools
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
- });
109
76
  useEffect(() => {
110
77
  if (customProps?.onDrawerOpen) {
111
78
  customProps?.onDrawerOpen(true);
@@ -173,62 +140,22 @@ const StyleBuilder = props => {
173
140
  }), /*#__PURE__*/_jsx(DialogContent, {
174
141
  sx: {
175
142
  maxHeight: isMobile ? `500px` : `${window.innerHeight - 125}px`,
176
- padding: "0px"
143
+ padding: "8px"
177
144
  },
178
145
  children: renderTabs.map((m, i) => {
179
- if (m?.hasChildrenTabs) {
180
- return /*#__PURE__*/_jsx(ThemeProvider, {
181
- theme: muiTheme,
182
- children: /*#__PURE__*/_jsxs(Accordion, {
183
- defaultExpanded: true,
184
- children: [/*#__PURE__*/_jsx(AccordionSummary, {
185
- expandIcon: /*#__PURE__*/_jsx(ExpandMoreSharp, {}),
186
- sx: {
187
- padding: "0px"
188
- },
189
- children: /*#__PURE__*/_jsx(Typography, {
190
- variant: "body1",
191
- className: "settingsHeader",
192
- color: "primary",
193
- style: {
194
- fontSize: "14px !important",
195
- fontWeight: "400 !important"
196
- },
197
- children: m?.tab
198
- })
199
- }), /*#__PURE__*/_jsx(AccordionDetails, {
200
- sx: {
201
- padding: "5px"
202
- },
203
- children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, 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}`);
212
- })
213
- })]
214
- }, `accordion_${i}`)
215
- }, i);
216
- } else {
217
- return /*#__PURE__*/_jsx(StyleContent, {
218
- renderTabs: renderTabs,
219
- value: m.value,
220
- element: elementProps,
221
- onChange: onElementPropsChange,
222
- customProps: customProps,
223
- handleClose: handleClose
224
- }, `tab_${m.value}_$${i}`);
225
- }
146
+ return /*#__PURE__*/_jsx(StyleContent, {
147
+ renderTabs: renderTabs,
148
+ value: m.value,
149
+ element: elementProps,
150
+ onChange: onElementPropsChange,
151
+ customProps: customProps,
152
+ handleClose: handleClose
153
+ }, `tab_${m.value}_$${i}`);
226
154
  })
227
155
  }), needActions ? /*#__PURE__*/_jsxs(DialogActions, {
228
156
  sx: {
229
157
  p: 0,
230
158
  pt: 2,
231
- pl: 1,
232
159
  justifyContent: "space-between"
233
160
  },
234
161
  children: [onDelete ? /*#__PURE__*/_jsx(Button, {
@@ -253,7 +180,7 @@ const StyleBuilder = props => {
253
180
  style: {
254
181
  zIndex: "1300"
255
182
  },
256
- sx: classes.sideBarDrawer,
183
+ sx: classes.bottomBarDrawer,
257
184
  children: renderDrawerMenu()
258
185
  }) : /*#__PURE__*/_jsx(Drawer, {
259
186
  open: true,
@@ -1,69 +1,35 @@
1
- import { toolbarGroups } from "../../Toolbar/toolbarGroups";
2
- import { fontOptions } from "../../utils/font";
3
- import { capitalizeFirstLetter } from "../../utils/helper";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- const allTools = toolbarGroups.flat();
6
- const fontWeight = allTools.find(f => f.format === "fontWeight");
7
- function getKey(prefix, key) {
8
- const settingKey = prefix === "col" ? `entire${capitalizeFirstLetter(key)}` : key;
9
- return `${prefix}.${settingKey}`;
10
- }
11
- function getCommonSettings(prefix) {
12
- let settings = [{
13
- label: "Font Family",
14
- key: "fontFamily",
15
- type: "textOptions",
16
- webFont: true,
17
- options: fontOptions,
18
- renderOption: option => {
19
- return /*#__PURE__*/_jsx("span", {
20
- style: {
21
- fontFamily: option.value
22
- },
23
- children: option.text
24
- });
25
- }
26
- }, {
27
- label: "Font Weight",
28
- key: "fontWeight",
29
- type: "textOptions",
30
- options: fontWeight?.options,
31
- width: 7
32
- }, {
33
- label: "Font Size",
34
- key: "textSize",
35
- type: "fontSize",
36
- width: 5,
37
- placeholder: "16px or 1em"
38
- }, {
39
- label: "Text Color",
40
- key: "textColor",
1
+ const tableStyle = [{
2
+ tab: "Table",
3
+ value: "tableSettings",
4
+ fields: [{
5
+ label: "Table Background",
6
+ key: "table.bgColor",
41
7
  type: "color"
42
8
  }, {
43
- label: "Background",
44
- key: "bgColor",
9
+ label: "Cell Border",
10
+ key: "table.borderColor",
11
+ type: "color"
12
+ }]
13
+ }, {
14
+ tab: "Row",
15
+ value: "rowSettings",
16
+ fields: [{
17
+ label: "Row Background",
18
+ key: "row.bgColor",
45
19
  type: "color"
46
20
  }, {
47
- label: "Border",
48
- key: "borderColor",
21
+ label: "Row Border",
22
+ key: "row.borderColor",
49
23
  type: "color"
50
- }];
51
-
52
- // modify keys based on setting type (prefix)
53
- settings = settings.map(s => ({
54
- ...s,
55
- key: getKey(prefix, s.key)
56
- }));
57
- return settings;
58
- }
59
- const tableStyle = [{
60
- tab: "Table",
61
- value: "tableSettings",
62
- fields: getCommonSettings("table")
24
+ }]
63
25
  }, {
64
- tab: "Selected cell",
26
+ tab: "Column",
65
27
  value: "columnSettings",
66
28
  fields: [{
29
+ label: "Entire Column Background",
30
+ key: "col.entireBgColor",
31
+ type: "color"
32
+ }, {
67
33
  label: "Selected Cell Background",
68
34
  key: "col.bgColor",
69
35
  type: "color"
@@ -82,14 +48,4 @@ const tableStyle = [{
82
48
  placeholder: "Hide on Mobile"
83
49
  }]
84
50
  }];
85
- export default tableStyle;
86
- export const tableRowStyle = [{
87
- tab: "Row",
88
- value: "rowSettings",
89
- fields: getCommonSettings("row")
90
- }];
91
- export const tableColumnStyle = [{
92
- tab: "Column",
93
- value: "columnSettings",
94
- fields: getCommonSettings("col")
95
- }];
51
+ export default tableStyle;