@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.
- package/dist/Editor/ChatEditor.js +34 -25
- package/dist/Editor/CommonEditor.js +8 -16
- package/dist/Editor/Editor.css +11 -57
- package/dist/Editor/Elements/AI/AIInput.js +1 -0
- package/dist/Editor/Elements/AI/CustomSelect.js +11 -19
- package/dist/Editor/Elements/AI/PopoverAIInput.js +4 -9
- package/dist/Editor/Elements/AI/Styles.js +5 -17
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +3 -3
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/Divider/Divider.js +15 -16
- package/dist/Editor/Elements/Embed/Image.js +7 -23
- package/dist/Editor/Elements/Embed/Video.js +1 -13
- package/dist/Editor/Elements/Form/Form.js +2 -38
- package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
- package/dist/Editor/Elements/Form/FormPopup.js +9 -12
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
- package/dist/Editor/Elements/Grid/GridButton.js +2 -2
- package/dist/Editor/Elements/Grid/GridItem.js +36 -45
- package/dist/Editor/Elements/Grid/Styles.js +0 -6
- package/dist/Editor/Elements/Link/LinkButton.js +1 -1
- package/dist/Editor/Elements/Search/SearchButton.js +0 -1
- package/dist/Editor/Elements/Signature/Signature.css +1 -1
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
- package/dist/Editor/Elements/SimpleText/style.js +0 -10
- package/dist/Editor/Elements/Table/Styles.js +79 -82
- package/dist/Editor/Elements/Table/Table.js +140 -260
- package/dist/Editor/Elements/Table/TableCell.js +103 -362
- package/dist/Editor/Elements/Table/TablePopup.js +3 -9
- package/dist/Editor/Elements/Table/TableRow.js +2 -10
- package/dist/Editor/Styles/EditorStyles.js +1 -8
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +12 -7
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
- package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -409
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -17
- package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/common/ColorPickerButton.js +44 -82
- package/dist/Editor/common/Icon.js +20 -17
- package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
- package/dist/Editor/common/LinkSettings/index.js +1 -2
- package/dist/Editor/common/MentionsPopup/Styles.js +8 -156
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -107
- package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
- package/dist/Editor/common/RnD/index.js +1 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +4 -8
- package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
- package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
- package/dist/Editor/common/StyleBuilder/index.js +11 -84
- package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
- package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
- package/dist/Editor/common/iconListV2.js +40 -378
- package/dist/Editor/common/iconslist.js +14 -17
- package/dist/Editor/commonStyle.js +10 -130
- package/dist/Editor/helper/deserialize/index.js +20 -27
- package/dist/Editor/helper/index.js +1 -1
- package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
- package/dist/Editor/plugins/withHTML.js +10 -61
- package/dist/Editor/plugins/withLayout.js +0 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +0 -2
- package/dist/Editor/utils/brains.js +1 -1
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +1 -26
- package/dist/Editor/utils/customHooks/useResize.js +4 -7
- package/dist/Editor/utils/customHooks/useTableResize.js +2 -6
- package/dist/Editor/utils/embed.js +1 -2
- package/dist/Editor/utils/events.js +1 -0
- package/dist/Editor/utils/font.js +4 -11
- package/dist/Editor/utils/formfield.js +4 -8
- package/dist/Editor/utils/helper.js +2 -55
- package/dist/Editor/utils/insertNewLine.js +1 -19
- package/dist/Editor/utils/serializeToText.js +0 -2
- package/dist/Editor/utils/table.js +24 -228
- package/package.json +1 -1
- package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
- package/dist/Editor/Elements/Table/DragButton.js +0 -142
- package/dist/Editor/Elements/Table/DragStyles.js +0 -70
- package/dist/Editor/Elements/Table/Draggable.js +0 -25
- package/dist/Editor/Elements/Table/Droppable.js +0 -53
- package/dist/Editor/Elements/Table/TableTool.js +0 -101
- package/dist/Editor/Elements/Table/tableHelper.js +0 -71
- package/dist/Editor/assets/svg/TableIcons.js +0 -220
- package/dist/Editor/common/Select/index.js +0 -20
- package/dist/Editor/common/Select/styles.js +0 -17
- package/dist/Editor/hooks/useTable.js +0 -207
@@ -18,9 +18,9 @@ const Divider = props => {
|
|
18
18
|
theme
|
19
19
|
} = useEditorContext();
|
20
20
|
const {
|
21
|
-
borderColor = theme?.palette?.primary?.main ||
|
22
|
-
borderWidth =
|
23
|
-
borderStyle =
|
21
|
+
borderColor = theme?.palette?.primary?.main || '#0F172A',
|
22
|
+
borderWidth = '1px',
|
23
|
+
borderStyle = 'solid'
|
24
24
|
} = element;
|
25
25
|
const {
|
26
26
|
readOnly
|
@@ -33,7 +33,7 @@ const Divider = props => {
|
|
33
33
|
} = useEditorContext();
|
34
34
|
const [showTool] = useEditorSelection(editor);
|
35
35
|
const selected = hoverPath === path.join(",");
|
36
|
-
const width = borderWidth?.includes(
|
36
|
+
const width = borderWidth?.includes('px') ? borderWidth : `${borderWidth}px`;
|
37
37
|
const onSettings = () => {
|
38
38
|
setOpenSettings(true);
|
39
39
|
};
|
@@ -44,15 +44,15 @@ const Divider = props => {
|
|
44
44
|
onSettings
|
45
45
|
}) => {
|
46
46
|
const hoverStyles = readOnly ? {
|
47
|
-
|
48
|
-
background: theme?.palette?.type ===
|
47
|
+
'&.MuiIconButton-root:hover': {
|
48
|
+
background: theme?.palette?.type === 'dark' ? `${theme?.palette?.greyshades?.light8} !important` : `${theme?.palette?.containers?.card} !important`
|
49
49
|
}
|
50
50
|
} : {};
|
51
51
|
return /*#__PURE__*/_jsx("div", {
|
52
52
|
contentEditable: false,
|
53
53
|
className: "divider-settings",
|
54
54
|
style: {
|
55
|
-
top: "-
|
55
|
+
top: "-20px",
|
56
56
|
left: 0
|
57
57
|
},
|
58
58
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
@@ -61,11 +61,11 @@ const Divider = props => {
|
|
61
61
|
children: /*#__PURE__*/_jsx(IconButton, {
|
62
62
|
size: "small",
|
63
63
|
sx: {
|
64
|
-
background: theme?.palette?.type ===
|
65
|
-
border: theme?.palette?.type ===
|
66
|
-
boxShadow:
|
67
|
-
borderRadius:
|
68
|
-
|
64
|
+
background: theme?.palette?.type === 'dark' ? theme?.palette?.greyshades?.light8 : theme?.palette?.containers?.card,
|
65
|
+
border: theme?.palette?.type === 'dark' ? '1px solid #E4E8EB33' : 'none',
|
66
|
+
boxShadow: '0px 0px 4px 0px #00000040',
|
67
|
+
borderRadius: '50%',
|
68
|
+
'& svg': {
|
69
69
|
stroke: theme?.palette?.text?.secondary3
|
70
70
|
},
|
71
71
|
...hoverStyles
|
@@ -103,15 +103,14 @@ const Divider = props => {
|
|
103
103
|
className: `dividerComponent`,
|
104
104
|
style: {
|
105
105
|
userSelect: "none",
|
106
|
-
position:
|
106
|
+
position: 'relative'
|
107
107
|
},
|
108
108
|
contentEditable: false,
|
109
109
|
children: [!readOnly && /*#__PURE__*/_jsx("div", {
|
110
110
|
className: `element-root element-selector`,
|
111
111
|
contentEditable: false,
|
112
112
|
style: {
|
113
|
-
zIndex: 1000
|
114
|
-
left: "0%"
|
113
|
+
zIndex: 1000
|
115
114
|
},
|
116
115
|
children: /*#__PURE__*/_jsx(DividerToolbar, {
|
117
116
|
selected: selected,
|
@@ -127,7 +126,7 @@ const Divider = props => {
|
|
127
126
|
borderTop: !borderColor?.includes("linear") ? `${width} ${borderStyle} ${borderColor}` : `transparent`,
|
128
127
|
backgroundImage: borderColor?.includes("linear") ? borderColor : "none",
|
129
128
|
height: borderColor?.includes("linear") ? borderWidth : undefined,
|
130
|
-
marginTop:
|
129
|
+
marginTop: '15px'
|
131
130
|
}
|
132
131
|
}), /*#__PURE__*/_jsx("span", {
|
133
132
|
style: {
|
@@ -19,15 +19,15 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
const ToolBar = ({
|
20
20
|
isEmpty,
|
21
21
|
onSettings,
|
22
|
-
setOpenNav
|
23
|
-
topM
|
22
|
+
setOpenNav
|
24
23
|
}) => {
|
25
24
|
return !isEmpty ? /*#__PURE__*/_jsxs("div", {
|
26
25
|
className: "element-toolbar visible-on-hover",
|
27
26
|
contentEditable: false,
|
28
27
|
style: {
|
29
|
-
top: "
|
30
|
-
|
28
|
+
top: "0px",
|
29
|
+
right: "0px",
|
30
|
+
left: "auto",
|
31
31
|
margin: "0px"
|
32
32
|
},
|
33
33
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
@@ -66,7 +66,7 @@ const ImageContent = props => {
|
|
66
66
|
path,
|
67
67
|
theme
|
68
68
|
} = props;
|
69
|
-
return !url
|
69
|
+
return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
70
70
|
component: "button",
|
71
71
|
className: "element-empty-btn",
|
72
72
|
contentEditable: false,
|
@@ -76,18 +76,6 @@ const ImageContent = props => {
|
|
76
76
|
children: [/*#__PURE__*/_jsx(Icon, {
|
77
77
|
icon: "image"
|
78
78
|
}), "Add Image"]
|
79
|
-
}) : /*#__PURE__*/_jsxs(Box, {
|
80
|
-
sx: {
|
81
|
-
color: "#64748B !important",
|
82
|
-
"& svg": {
|
83
|
-
color: "#64748B"
|
84
|
-
}
|
85
|
-
},
|
86
|
-
component: "button",
|
87
|
-
className: "element-empty-btn",
|
88
|
-
children: [/*#__PURE__*/_jsx(Icon, {
|
89
|
-
icon: "shieldNoAccess"
|
90
|
-
}), "The Content is no longer available."]
|
91
79
|
}) : /*#__PURE__*/_jsx(Box, {
|
92
80
|
component: "img",
|
93
81
|
className: "emb-img",
|
@@ -167,10 +155,7 @@ const Image = props => {
|
|
167
155
|
}, {
|
168
156
|
at: path
|
169
157
|
});
|
170
|
-
}
|
171
|
-
MW: 32,
|
172
|
-
MH: 32,
|
173
|
-
MP: 2
|
158
|
+
}
|
174
159
|
});
|
175
160
|
const arr = Array.from(Node.elements(editor));
|
176
161
|
const ele = arr.find(([elem]) => element === elem);
|
@@ -292,8 +277,7 @@ const Image = props => {
|
|
292
277
|
children: [!readOnly && /*#__PURE__*/_jsx(ToolBar, {
|
293
278
|
isEmpty: isEmpty,
|
294
279
|
onSettings: onSettings,
|
295
|
-
setOpenNav: setOpenNav
|
296
|
-
topM: size.width < 100
|
280
|
+
setOpenNav: setOpenNav
|
297
281
|
}), /*#__PURE__*/_jsx(ImageContent, {
|
298
282
|
...element,
|
299
283
|
readOnly: readOnly,
|
@@ -70,25 +70,13 @@ const VideoPlaceholder = props => {
|
|
70
70
|
readOnly,
|
71
71
|
onSettings
|
72
72
|
} = props;
|
73
|
-
return !url
|
73
|
+
return !url && !readOnly ? /*#__PURE__*/_jsxs(Box, {
|
74
74
|
component: "button",
|
75
75
|
className: "element-empty-btn",
|
76
76
|
onClick: onSettings,
|
77
77
|
children: [/*#__PURE__*/_jsx(Icon, {
|
78
78
|
icon: "video"
|
79
79
|
}), "Embed Video or Other"]
|
80
|
-
}) : /*#__PURE__*/_jsxs(Box, {
|
81
|
-
sx: {
|
82
|
-
color: "#64748B !important",
|
83
|
-
"& svg": {
|
84
|
-
color: "#64748B"
|
85
|
-
}
|
86
|
-
},
|
87
|
-
component: "button",
|
88
|
-
className: "element-empty-btn",
|
89
|
-
children: [/*#__PURE__*/_jsx(Icon, {
|
90
|
-
icon: "shieldNoAccess"
|
91
|
-
}), "The Content is no longer available."]
|
92
80
|
}) : /*#__PURE__*/_jsx(VideoContent, {
|
93
81
|
...props
|
94
82
|
});
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
2
2
|
import { Transforms } from "slate";
|
3
|
-
import { Node } from "slate";
|
4
3
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
5
4
|
import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
|
6
5
|
import DeleteIcon from "@mui/icons-material/Delete";
|
@@ -49,15 +48,7 @@ const Form = props => {
|
|
49
48
|
textSize,
|
50
49
|
fontFamily,
|
51
50
|
textAlign,
|
52
|
-
alignment
|
53
|
-
fieldFontFamily,
|
54
|
-
fieldFontWeight,
|
55
|
-
fieldTextSize,
|
56
|
-
fieldTextColor,
|
57
|
-
fieldBgColor,
|
58
|
-
fieldBorderColor,
|
59
|
-
fieldBorderWidth,
|
60
|
-
fieldBorderStyle
|
51
|
+
alignment
|
61
52
|
} = element;
|
62
53
|
const btnR = buttonProps?.borderRadius || {};
|
63
54
|
const btnSpacing = buttonProps?.bannerSpacing || {};
|
@@ -199,24 +190,6 @@ const Form = props => {
|
|
199
190
|
}, {
|
200
191
|
at: path
|
201
192
|
});
|
202
|
-
// adding form field style to the current form node
|
203
|
-
const currentNode = Node.get(editor, path);
|
204
|
-
if (currentNode) {
|
205
|
-
currentNode.children.forEach((item, index) => {
|
206
|
-
Transforms.setNodes(editor, {
|
207
|
-
bgColor: data?.fieldBgColor ? data?.fieldBgColor : "rgba(255, 255, 255, 1)",
|
208
|
-
borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : "#ccc",
|
209
|
-
borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : "",
|
210
|
-
borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : "",
|
211
|
-
textColor: data?.fieldTextColor ? data?.fieldTextColor : "",
|
212
|
-
fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : "",
|
213
|
-
textSize: data?.fieldTextSize ? data?.fieldTextSize : "",
|
214
|
-
fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : ""
|
215
|
-
}, {
|
216
|
-
at: [...path, index]
|
217
|
-
});
|
218
|
-
});
|
219
|
-
}
|
220
193
|
onClose();
|
221
194
|
};
|
222
195
|
const onClose = () => {
|
@@ -225,16 +198,7 @@ const Form = props => {
|
|
225
198
|
const onAddFormField = () => {
|
226
199
|
try {
|
227
200
|
Transforms.insertNodes(editor, {
|
228
|
-
...formField(
|
229
|
-
fontFamily: fieldFontFamily,
|
230
|
-
fontWeight: fieldFontWeight,
|
231
|
-
textSize: fieldTextSize,
|
232
|
-
textColor: fieldTextColor,
|
233
|
-
bgColor: fieldBgColor,
|
234
|
-
borderColor: fieldBorderColor,
|
235
|
-
borderWidth: fieldBorderWidth,
|
236
|
-
borderStyle: fieldBorderStyle
|
237
|
-
})
|
201
|
+
...formField()
|
238
202
|
}, {
|
239
203
|
at: [...path, children.length]
|
240
204
|
});
|
@@ -16,9 +16,6 @@ const FormCheckbox = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -49,10 +46,7 @@ const FormCheckbox = props => {
|
|
49
46
|
},
|
50
47
|
borderStyle: borderStyle || "solid",
|
51
48
|
color: textColor || "#000",
|
52
|
-
background: bgColor || "transparent"
|
53
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
-
fontSize: textSize || "inherit",
|
55
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
49
|
+
background: bgColor || "transparent"
|
56
50
|
}
|
57
51
|
})
|
58
52
|
});
|
@@ -16,9 +16,6 @@ const FormDate = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -50,10 +47,7 @@ const FormDate = props => {
|
|
50
47
|
borderStyle: borderStyle || "solid",
|
51
48
|
color: textColor || "#000",
|
52
49
|
background: bgColor || "transparent",
|
53
|
-
paddingRight: '85px !important'
|
54
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
55
|
-
fontSize: textSize || "inherit",
|
56
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
50
|
+
paddingRight: '85px !important'
|
57
51
|
}
|
58
52
|
})
|
59
53
|
});
|
@@ -16,9 +16,6 @@ const FormEmail = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -50,10 +47,7 @@ const FormEmail = props => {
|
|
50
47
|
},
|
51
48
|
borderStyle: borderStyle || "solid",
|
52
49
|
color: textColor || "#000",
|
53
|
-
background: bgColor || "transparent"
|
54
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
55
|
-
fontSize: textSize || "inherit",
|
56
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
50
|
+
background: bgColor || "transparent"
|
57
51
|
}
|
58
52
|
})
|
59
53
|
});
|
@@ -16,9 +16,6 @@ const FormNumbers = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -66,10 +63,7 @@ const FormNumbers = props => {
|
|
66
63
|
},
|
67
64
|
borderStyle: borderStyle || "solid",
|
68
65
|
color: textColor || "#000",
|
69
|
-
background: bgColor || "transparent"
|
70
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
71
|
-
fontSize: textSize || "inherit",
|
72
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
66
|
+
background: bgColor || "transparent"
|
73
67
|
}
|
74
68
|
})
|
75
69
|
});
|
@@ -16,9 +16,6 @@ const FormRadioButton = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -49,10 +46,7 @@ const FormRadioButton = props => {
|
|
49
46
|
},
|
50
47
|
borderStyle: borderStyle || "solid",
|
51
48
|
color: textColor || "#000",
|
52
|
-
background: bgColor || "transparent"
|
53
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
-
fontSize: textSize || "inherit",
|
55
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
49
|
+
background: bgColor || "transparent"
|
56
50
|
}
|
57
51
|
})
|
58
52
|
});
|
@@ -16,9 +16,6 @@ const FormText = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
-
textSize,
|
20
|
-
fontFamily,
|
21
|
-
fontWeight,
|
22
19
|
...rest
|
23
20
|
} = fieldProps;
|
24
21
|
const onChange = e => {
|
@@ -48,10 +45,7 @@ const FormText = props => {
|
|
48
45
|
},
|
49
46
|
borderStyle: borderStyle || "solid",
|
50
47
|
color: textColor || "#000",
|
51
|
-
background: bgColor || "transparent"
|
52
|
-
fontSize: textSize || "inherit",
|
53
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
48
|
+
background: bgColor || "transparent"
|
55
49
|
}
|
56
50
|
})
|
57
51
|
});
|
@@ -15,9 +15,6 @@ const FormTextArea = props => {
|
|
15
15
|
borderColor,
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
|
-
textSize,
|
19
|
-
fontFamily,
|
20
|
-
fontWeight,
|
21
18
|
...rest
|
22
19
|
} = fieldProps;
|
23
20
|
const onChange = e => {
|
@@ -48,9 +45,7 @@ const FormTextArea = props => {
|
|
48
45
|
borderStyle: borderStyle || "solid",
|
49
46
|
color: `${textColor || "#000"} !important`,
|
50
47
|
background: `${bgColor || "transparent"} !important`,
|
51
|
-
fontSize:
|
52
|
-
fontFamily: fontFamily || "PoppinsRegular",
|
53
|
-
fontWeight: `${fontWeight} !important` || "400 !important"
|
48
|
+
fontSize: '14px'
|
54
49
|
}
|
55
50
|
})
|
56
51
|
});
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import StyleBuilder from "../../common/StyleBuilder";
|
3
|
-
import
|
3
|
+
import formStyle from "../../common/StyleBuilder/formStyle";
|
4
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
6
5
|
const FormPopup = props => {
|
7
6
|
const {
|
8
7
|
element,
|
@@ -10,16 +9,14 @@ const FormPopup = props => {
|
|
10
9
|
onClose,
|
11
10
|
customProps
|
12
11
|
} = props;
|
13
|
-
return /*#__PURE__*/_jsx(
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
customProps: customProps
|
22
|
-
})
|
12
|
+
return /*#__PURE__*/_jsx(StyleBuilder, {
|
13
|
+
title: "Form",
|
14
|
+
type: "formStyle",
|
15
|
+
element: element,
|
16
|
+
onSave: onSave,
|
17
|
+
onClose: onClose,
|
18
|
+
renderTabs: formStyle,
|
19
|
+
customProps: customProps
|
23
20
|
});
|
24
21
|
};
|
25
22
|
export default FormPopup;
|
@@ -144,27 +144,8 @@ const FreeGridItem = props => {
|
|
144
144
|
};
|
145
145
|
const onAddFormField = () => {
|
146
146
|
try {
|
147
|
-
const {
|
148
|
-
fieldFontFamily,
|
149
|
-
fieldFontWeight,
|
150
|
-
fieldTextSize,
|
151
|
-
fieldTextColor,
|
152
|
-
fieldBgColor,
|
153
|
-
fieldBorderColor,
|
154
|
-
fieldBorderWidth,
|
155
|
-
fieldBorderStyle
|
156
|
-
} = element?.children[0];
|
157
147
|
Transforms.insertNodes(editor, {
|
158
|
-
...formField(
|
159
|
-
fontFamily: fieldFontFamily ? fieldFontFamily : "",
|
160
|
-
fontWeight: fieldFontWeight ? fieldFontWeight : "",
|
161
|
-
textSize: fieldTextSize ? fieldTextSize : "",
|
162
|
-
textColor: fieldTextColor ? fieldTextColor : "",
|
163
|
-
bgColor: fieldBgColor ? fieldBgColor : "",
|
164
|
-
borderColor: fieldBorderColor ? fieldBorderColor : "",
|
165
|
-
borderWidth: fieldBorderWidth ? fieldBorderWidth : "",
|
166
|
-
borderStyle: fieldBorderStyle ? fieldBorderStyle : ""
|
167
|
-
})
|
148
|
+
...formField()
|
168
149
|
}, {
|
169
150
|
at: [...path, 0, 0]
|
170
151
|
});
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Button, Dialog, DialogContent, DialogTitle, Grid, Tooltip, Box } from "@mui/material";
|
3
3
|
import { insertGrid, insertPlainGrid } from "../../utils/grid";
|
4
|
+
import { GridIcon } from "../../common/iconslist";
|
4
5
|
import ToolbarIcon from "../../common/ToolbarIcon";
|
5
6
|
import GridStyles from "./Styles";
|
6
|
-
import { GridElement } from "../../common/iconListV2";
|
7
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -46,7 +46,7 @@ const GridButton = props => {
|
|
46
46
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
47
47
|
title: "Column",
|
48
48
|
onClick: onButtonClick,
|
49
|
-
icon: /*#__PURE__*/_jsx(
|
49
|
+
icon: /*#__PURE__*/_jsx(GridIcon, {}),
|
50
50
|
icoBtnType: icoBtnType
|
51
51
|
}), /*#__PURE__*/_jsxs(Dialog, {
|
52
52
|
open: open,
|
@@ -45,34 +45,29 @@ const GridItemToolbar = props => {
|
|
45
45
|
onAddColumn,
|
46
46
|
columnRef
|
47
47
|
} = props;
|
48
|
-
return selected && !showTool ? /*#__PURE__*/
|
48
|
+
return selected && !showTool ? /*#__PURE__*/_jsxs(Popper, {
|
49
49
|
anchorEl: columnRef?.current,
|
50
50
|
open: true,
|
51
51
|
placement: "top-end",
|
52
52
|
sx: classes.popTools,
|
53
53
|
className: "gi-tool-pp",
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
onClick: onAddColumn,
|
72
|
-
children: /*#__PURE__*/_jsx(AddIcon, {})
|
73
|
-
})
|
74
|
-
})]
|
75
|
-
})
|
54
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
55
|
+
title: "Column Settings",
|
56
|
+
arrow: true,
|
57
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
58
|
+
size: "small",
|
59
|
+
onClick: onSettings,
|
60
|
+
children: /*#__PURE__*/_jsx(GridSettingsIcon, {})
|
61
|
+
})
|
62
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
63
|
+
title: "Add Column",
|
64
|
+
arrow: true,
|
65
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
66
|
+
size: "small",
|
67
|
+
onClick: onAddColumn,
|
68
|
+
children: /*#__PURE__*/_jsx(AddIcon, {})
|
69
|
+
})
|
70
|
+
})]
|
76
71
|
}) : null;
|
77
72
|
};
|
78
73
|
const GridItem = props => {
|
@@ -298,26 +293,24 @@ const GridItem = props => {
|
|
298
293
|
},
|
299
294
|
"data-path": path.join(","),
|
300
295
|
"data-info": "handle-outside-editor-click",
|
301
|
-
children: [!readOnly && /*#__PURE__*/_jsxs(
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
children: " "
|
320
|
-
})]
|
296
|
+
children: [!readOnly && /*#__PURE__*/_jsxs("div", {
|
297
|
+
className: `element-selector ${selected ? "selected" : ""}`,
|
298
|
+
contentEditable: false,
|
299
|
+
style: {
|
300
|
+
zIndex: 1000
|
301
|
+
},
|
302
|
+
children: [/*#__PURE__*/_jsx("div", {
|
303
|
+
className: "element-selector-dots tl",
|
304
|
+
children: " "
|
305
|
+
}), /*#__PURE__*/_jsx("div", {
|
306
|
+
className: "element-selector-dots tr",
|
307
|
+
children: " "
|
308
|
+
}), /*#__PURE__*/_jsx("div", {
|
309
|
+
className: "element-selector-dots bl",
|
310
|
+
children: " "
|
311
|
+
}), /*#__PURE__*/_jsx("div", {
|
312
|
+
className: "element-selector-dots br",
|
313
|
+
children: " "
|
321
314
|
}), /*#__PURE__*/_jsx(GridItemToolbar, {
|
322
315
|
classes: classes,
|
323
316
|
selected: selected,
|
@@ -358,14 +351,12 @@ const GridItem = props => {
|
|
358
351
|
onMouseDown: onMouseDown,
|
359
352
|
height: "auto"
|
360
353
|
}) : null, /*#__PURE__*/_jsxs(Dialog, {
|
361
|
-
sx: classes.dialog,
|
362
354
|
open: Boolean(alert),
|
363
355
|
onClose: handleClose,
|
364
356
|
children: [/*#__PURE__*/_jsx(DialogContent, {
|
365
357
|
children: alert
|
366
358
|
}), /*#__PURE__*/_jsx(DialogActions, {
|
367
359
|
children: /*#__PURE__*/_jsx(Button, {
|
368
|
-
variant: "contained",
|
369
360
|
onClick: handleClose,
|
370
361
|
children: "Close"
|
371
362
|
})
|
@@ -106,12 +106,6 @@ const GridStyles = (theme, appTheme) => ({
|
|
106
106
|
}
|
107
107
|
}
|
108
108
|
}
|
109
|
-
},
|
110
|
-
dialog: {
|
111
|
-
"& .MuiPaper-root": {
|
112
|
-
background: appTheme?.palette?.editor?.background,
|
113
|
-
color: appTheme?.palette?.editor?.textColor
|
114
|
-
}
|
115
109
|
}
|
116
110
|
});
|
117
111
|
export default GridStyles;
|
@@ -64,7 +64,7 @@ const LinkButton = props => {
|
|
64
64
|
title: "Link",
|
65
65
|
arrow: true,
|
66
66
|
children: /*#__PURE__*/_jsx(IconButton, {
|
67
|
-
className: `${showInput ? "clicked
|
67
|
+
className: `${showInput ? "clicked" : ""} ${isActive ? "btnActive" : ""}`,
|
68
68
|
format: "link",
|
69
69
|
onClick: toggleLink,
|
70
70
|
children: /*#__PURE__*/_jsx(Icon, {
|