@flozy/editor 5.1.4 → 5.1.6
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +25 -34
- package/dist/Editor/CommonEditor.js +15 -9
- package/dist/Editor/Editor.css +56 -12
- package/dist/Editor/Elements/AI/AIInput.js +0 -1
- package/dist/Editor/Elements/AI/CustomSelect.js +17 -10
- package/dist/Editor/Elements/AI/Styles.js +7 -1
- package/dist/Editor/Elements/Button/EditorButton.js +1 -1
- package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -1
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +7 -5
- package/dist/Editor/Elements/Color Picker/Styles.js +7 -3
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/DataView/DataView.js +101 -0
- package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +140 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +59 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +26 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +38 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +35 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +17 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +29 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +38 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +74 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +64 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +106 -0
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +174 -0
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +29 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +113 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +37 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +111 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +62 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +36 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +101 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +160 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +190 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +42 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +30 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +110 -0
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +179 -0
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +100 -0
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +70 -0
- package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +288 -0
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +72 -0
- package/dist/Editor/Elements/DataView/styles.js +143 -0
- package/dist/Editor/Elements/Divider/Divider.js +15 -14
- package/dist/Editor/Elements/Form/Form.js +38 -2
- package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormDate.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormEmail.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormText.js +7 -1
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +6 -1
- package/dist/Editor/Elements/Form/FormPopup.js +12 -9
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +20 -1
- package/dist/Editor/Elements/Grid/GridButton.js +2 -1
- package/dist/Editor/Elements/Grid/GridItem.js +12 -0
- package/dist/Editor/Elements/Link/LinkButton.js +1 -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 +13 -48
- package/dist/Editor/Elements/SimpleText/index.js +8 -1
- package/dist/Editor/Elements/SimpleText/style.js +8 -1
- package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
- package/dist/Editor/Elements/Table/DragButton.js +141 -0
- package/dist/Editor/Elements/Table/DragStyles.js +70 -0
- package/dist/Editor/Elements/Table/Draggable.js +25 -0
- package/dist/Editor/Elements/Table/Droppable.js +53 -0
- package/dist/Editor/Elements/Table/Styles.js +25 -43
- package/dist/Editor/Elements/Table/Table.js +205 -138
- package/dist/Editor/Elements/Table/TableCell.js +355 -102
- package/dist/Editor/Elements/Table/TablePopup.js +9 -3
- package/dist/Editor/Elements/Table/TableRow.js +10 -2
- package/dist/Editor/Elements/Table/TableTool.js +101 -0
- package/dist/Editor/Elements/Table/tableHelper.js +71 -0
- package/dist/Editor/Styles/EditorStyles.js +3 -1
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -11
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +10 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +0 -2
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
- package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +16 -11
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +416 -49
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +62 -8
- package/dist/Editor/Toolbar/PopupTool/index.js +5 -6
- package/dist/Editor/Toolbar/Toolbar.js +6 -0
- package/dist/Editor/Toolbar/toolbarGroups.js +4 -0
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/assets/svg/TableIcons.js +220 -0
- package/dist/Editor/common/ColorPickerButton.js +3 -2
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
- package/dist/Editor/common/Icon.js +24 -23
- package/dist/Editor/common/LinkSettings/NavComponents.js +2 -1
- package/dist/Editor/common/LinkSettings/index.js +2 -1
- package/dist/Editor/common/MentionsPopup/Styles.js +151 -3
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +108 -12
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
- package/dist/Editor/common/Select/index.js +20 -0
- package/dist/Editor/common/Select/styles.js +17 -0
- package/dist/Editor/common/Shorthands/elements.js +13 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +8 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +7 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +5 -2
- package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
- package/dist/Editor/common/StyleBuilder/index.js +84 -11
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
- package/dist/Editor/common/StyleBuilder/tableStyle.js +69 -25
- package/dist/Editor/common/SwipeableDrawer/style.js +15 -4
- package/dist/Editor/common/Uploader.js +8 -0
- package/dist/Editor/common/iconListV2.js +378 -40
- package/dist/Editor/common/iconslist.js +23 -17
- package/dist/Editor/commonStyle.js +126 -9
- package/dist/Editor/helper/deserialize/index.js +4 -1
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +24 -1
- package/dist/Editor/hooks/useMouseMove.js +5 -2
- package/dist/Editor/hooks/useTable.js +195 -0
- package/dist/Editor/plugins/withCustomDeleteBackward.js +3 -2
- package/dist/Editor/plugins/withHTML.js +17 -1
- package/dist/Editor/plugins/withLayout.js +48 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +18 -0
- package/dist/Editor/utils/button.js +4 -4
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +21 -0
- package/dist/Editor/utils/dataView.js +43 -0
- package/dist/Editor/utils/embed.js +2 -1
- package/dist/Editor/utils/events.js +0 -1
- package/dist/Editor/utils/font.js +11 -4
- package/dist/Editor/utils/formfield.js +8 -4
- package/dist/Editor/utils/helper.js +67 -2
- package/dist/Editor/utils/insertNewLine.js +19 -1
- package/dist/Editor/utils/pageSettings.js +14 -2
- package/dist/Editor/utils/serializeToText.js +2 -0
- package/dist/Editor/utils/table.js +228 -24
- package/package.json +1 -1
@@ -1,5 +1,6 @@
|
|
1
1
|
import React, { useState, useRef, useEffect } from "react";
|
2
2
|
import { Transforms } from "slate";
|
3
|
+
import { Node } from "slate";
|
3
4
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
4
5
|
import { IconButton, Tooltip, Grid, Menu, MenuItem, CircularProgress, Box, Typography, useTheme } from "@mui/material";
|
5
6
|
import DeleteIcon from "@mui/icons-material/Delete";
|
@@ -48,7 +49,15 @@ const Form = props => {
|
|
48
49
|
textSize,
|
49
50
|
fontFamily,
|
50
51
|
textAlign,
|
51
|
-
alignment
|
52
|
+
alignment,
|
53
|
+
fieldFontFamily,
|
54
|
+
fieldFontWeight,
|
55
|
+
fieldTextSize,
|
56
|
+
fieldTextColor,
|
57
|
+
fieldBgColor,
|
58
|
+
fieldBorderColor,
|
59
|
+
fieldBorderWidth,
|
60
|
+
fieldBorderStyle
|
52
61
|
} = element;
|
53
62
|
const btnR = buttonProps?.borderRadius || {};
|
54
63
|
const btnSpacing = buttonProps?.bannerSpacing || {};
|
@@ -190,6 +199,24 @@ const Form = props => {
|
|
190
199
|
}, {
|
191
200
|
at: path
|
192
201
|
});
|
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
|
+
}
|
193
220
|
onClose();
|
194
221
|
};
|
195
222
|
const onClose = () => {
|
@@ -198,7 +225,16 @@ const Form = props => {
|
|
198
225
|
const onAddFormField = () => {
|
199
226
|
try {
|
200
227
|
Transforms.insertNodes(editor, {
|
201
|
-
...formField(
|
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
|
+
})
|
202
238
|
}, {
|
203
239
|
at: [...path, children.length]
|
204
240
|
});
|
@@ -16,6 +16,9 @@ const FormCheckbox = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -46,7 +49,10 @@ const FormCheckbox = props => {
|
|
46
49
|
},
|
47
50
|
borderStyle: borderStyle || "solid",
|
48
51
|
color: textColor || "#000",
|
49
|
-
background: bgColor || "transparent"
|
52
|
+
background: bgColor || "transparent",
|
53
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
+
fontSize: textSize || "inherit",
|
55
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
50
56
|
}
|
51
57
|
})
|
52
58
|
});
|
@@ -16,6 +16,9 @@ const FormDate = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -47,7 +50,10 @@ const FormDate = props => {
|
|
47
50
|
borderStyle: borderStyle || "solid",
|
48
51
|
color: textColor || "#000",
|
49
52
|
background: bgColor || "transparent",
|
50
|
-
paddingRight: '85px !important'
|
53
|
+
paddingRight: '85px !important',
|
54
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
55
|
+
fontSize: textSize || "inherit",
|
56
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
51
57
|
}
|
52
58
|
})
|
53
59
|
});
|
@@ -16,6 +16,9 @@ const FormEmail = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -47,7 +50,10 @@ const FormEmail = props => {
|
|
47
50
|
},
|
48
51
|
borderStyle: borderStyle || "solid",
|
49
52
|
color: textColor || "#000",
|
50
|
-
background: bgColor || "transparent"
|
53
|
+
background: bgColor || "transparent",
|
54
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
55
|
+
fontSize: textSize || "inherit",
|
56
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
51
57
|
}
|
52
58
|
})
|
53
59
|
});
|
@@ -16,6 +16,9 @@ const FormNumbers = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -63,7 +66,10 @@ const FormNumbers = props => {
|
|
63
66
|
},
|
64
67
|
borderStyle: borderStyle || "solid",
|
65
68
|
color: textColor || "#000",
|
66
|
-
background: bgColor || "transparent"
|
69
|
+
background: bgColor || "transparent",
|
70
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
71
|
+
fontSize: textSize || "inherit",
|
72
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
67
73
|
}
|
68
74
|
})
|
69
75
|
});
|
@@ -16,6 +16,9 @@ const FormRadioButton = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -46,7 +49,10 @@ const FormRadioButton = props => {
|
|
46
49
|
},
|
47
50
|
borderStyle: borderStyle || "solid",
|
48
51
|
color: textColor || "#000",
|
49
|
-
background: bgColor || "transparent"
|
52
|
+
background: bgColor || "transparent",
|
53
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
+
fontSize: textSize || "inherit",
|
55
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
50
56
|
}
|
51
57
|
})
|
52
58
|
});
|
@@ -16,6 +16,9 @@ const FormText = props => {
|
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
18
|
lockSpacing,
|
19
|
+
textSize,
|
20
|
+
fontFamily,
|
21
|
+
fontWeight,
|
19
22
|
...rest
|
20
23
|
} = fieldProps;
|
21
24
|
const onChange = e => {
|
@@ -45,7 +48,10 @@ const FormText = props => {
|
|
45
48
|
},
|
46
49
|
borderStyle: borderStyle || "solid",
|
47
50
|
color: textColor || "#000",
|
48
|
-
background: bgColor || "transparent"
|
51
|
+
background: bgColor || "transparent",
|
52
|
+
fontSize: textSize || "inherit",
|
53
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
54
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
49
55
|
}
|
50
56
|
})
|
51
57
|
});
|
@@ -15,6 +15,9 @@ const FormTextArea = props => {
|
|
15
15
|
borderColor,
|
16
16
|
textColor,
|
17
17
|
bgColor,
|
18
|
+
textSize,
|
19
|
+
fontFamily,
|
20
|
+
fontWeight,
|
18
21
|
...rest
|
19
22
|
} = fieldProps;
|
20
23
|
const onChange = e => {
|
@@ -45,7 +48,9 @@ const FormTextArea = props => {
|
|
45
48
|
borderStyle: borderStyle || "solid",
|
46
49
|
color: `${textColor || "#000"} !important`,
|
47
50
|
background: `${bgColor || "transparent"} !important`,
|
48
|
-
fontSize:
|
51
|
+
fontSize: textSize || "14px",
|
52
|
+
fontFamily: fontFamily || "PoppinsRegular",
|
53
|
+
fontWeight: `${fontWeight} !important` || "400 !important"
|
49
54
|
}
|
50
55
|
})
|
51
56
|
});
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import StyleBuilder from "../../common/StyleBuilder";
|
3
|
-
import formStyle from "../../common/StyleBuilder/formStyle";
|
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";
|
5
6
|
const FormPopup = props => {
|
6
7
|
const {
|
7
8
|
element,
|
@@ -9,14 +10,16 @@ const FormPopup = props => {
|
|
9
10
|
onClose,
|
10
11
|
customProps
|
11
12
|
} = props;
|
12
|
-
return /*#__PURE__*/_jsx(
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
13
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
14
|
+
children: /*#__PURE__*/_jsx(StyleBuilder, {
|
15
|
+
title: "Form",
|
16
|
+
type: "formStyle",
|
17
|
+
element: element,
|
18
|
+
onSave: onSave,
|
19
|
+
onClose: onClose,
|
20
|
+
renderTabs: formStyle,
|
21
|
+
customProps: customProps
|
22
|
+
})
|
20
23
|
});
|
21
24
|
};
|
22
25
|
export default FormPopup;
|
@@ -144,8 +144,27 @@ 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];
|
147
157
|
Transforms.insertNodes(editor, {
|
148
|
-
...formField(
|
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
|
+
})
|
149
168
|
}, {
|
150
169
|
at: [...path, 0, 0]
|
151
170
|
});
|
@@ -4,6 +4,7 @@ import { insertGrid, insertPlainGrid } from "../../utils/grid";
|
|
4
4
|
import { GridIcon } from "../../common/iconslist";
|
5
5
|
import ToolbarIcon from "../../common/ToolbarIcon";
|
6
6
|
import GridStyles from "./Styles";
|
7
|
+
import { GridElement } from "../../common/iconListV2";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -46,7 +47,7 @@ const GridButton = props => {
|
|
46
47
|
children: [/*#__PURE__*/_jsx(ToolbarIcon, {
|
47
48
|
title: "Column",
|
48
49
|
onClick: onButtonClick,
|
49
|
-
icon: /*#__PURE__*/_jsx(
|
50
|
+
icon: /*#__PURE__*/_jsx(GridElement, {}),
|
50
51
|
icoBtnType: icoBtnType
|
51
52
|
}), /*#__PURE__*/_jsxs(Dialog, {
|
52
53
|
open: open,
|
@@ -51,6 +51,18 @@ const GridItemToolbar = props => {
|
|
51
51
|
placement: "top-end",
|
52
52
|
sx: classes.popTools,
|
53
53
|
className: "gi-tool-pp",
|
54
|
+
container: columnRef?.current,
|
55
|
+
modifiers: [{
|
56
|
+
name: "preventOverflow",
|
57
|
+
options: {
|
58
|
+
boundary: "clippingParents" // Ensure it respects parent boundaries
|
59
|
+
}
|
60
|
+
}, {
|
61
|
+
name: "hide",
|
62
|
+
options: {
|
63
|
+
padding: 8 // Adjust padding for visibility
|
64
|
+
}
|
65
|
+
}],
|
54
66
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
55
67
|
title: "Column Settings",
|
56
68
|
arrow: true,
|
@@ -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" : ""} ${isActive ? "btnActive" : ""}`,
|
67
|
+
className: `${showInput ? "clicked btnActive" : ""} ${isActive ? "btnActive" : ""}`,
|
68
68
|
format: "link",
|
69
69
|
onClick: toggleLink,
|
70
70
|
children: /*#__PURE__*/_jsx(Icon, {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { signedTextFonts } from "../../../utils/font";
|
3
3
|
import { Grid, Button, TextField, InputAdornment, IconButton, Typography } from "@mui/material";
|
4
|
-
import
|
4
|
+
import ClearRoundedIcon from '@mui/icons-material/ClearRounded';
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
7
|
const TypeSignature = props => {
|
@@ -73,7 +73,7 @@ const TypeSignature = props => {
|
|
73
73
|
position: "end",
|
74
74
|
children: /*#__PURE__*/_jsx(IconButton, {
|
75
75
|
onClick: () => setName(""),
|
76
|
-
children: /*#__PURE__*/_jsx(
|
76
|
+
children: /*#__PURE__*/_jsx(ClearRoundedIcon, {})
|
77
77
|
})
|
78
78
|
})
|
79
79
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { Dialog, DialogTitle, DialogContent, DialogActions, Button, IconButton, Grid, TextField, Typography, Tabs, Tab, InputAdornment, Box } from "@mui/material";
|
3
|
-
import
|
3
|
+
import CloseRoundedIcon from "@mui/icons-material/CloseRounded";
|
4
4
|
import DatePicker from "react-datepicker";
|
5
5
|
import "react-datepicker/dist/react-datepicker.css";
|
6
6
|
import SignatureOptions from "./SignatureOptions";
|
@@ -158,7 +158,7 @@ const SignaturePopup = props => {
|
|
158
158
|
sx: {
|
159
159
|
borderRadius: "8px",
|
160
160
|
boxShadow: "0px 4px 10px 0px #00000029",
|
161
|
-
maxWidth: "
|
161
|
+
maxWidth: "530px"
|
162
162
|
}
|
163
163
|
},
|
164
164
|
sx: classes.signaturePopup,
|
@@ -200,7 +200,7 @@ const SignaturePopup = props => {
|
|
200
200
|
children: /*#__PURE__*/_jsx(IconButton, {
|
201
201
|
onClick: handleClose,
|
202
202
|
className: "close-popupbtn",
|
203
|
-
children: /*#__PURE__*/_jsx(
|
203
|
+
children: /*#__PURE__*/_jsx(CloseRoundedIcon, {})
|
204
204
|
})
|
205
205
|
})]
|
206
206
|
})
|
@@ -316,25 +316,7 @@ const SignaturePopup = props => {
|
|
316
316
|
defaultValue: defaultName || "",
|
317
317
|
size: "small",
|
318
318
|
onChange: onChange,
|
319
|
-
sx:
|
320
|
-
"& .MuiOutlinedInput-root": {
|
321
|
-
borderRadius: "10px",
|
322
|
-
"& fieldset": {
|
323
|
-
border: "1px solid #D8DDE1"
|
324
|
-
}
|
325
|
-
// '&:hover fieldset': {
|
326
|
-
// borderColor: 'yourHoverColor',
|
327
|
-
// },
|
328
|
-
// '&.Mui-focused fieldset': {
|
329
|
-
// borderColor: 'yourFocusedColor',
|
330
|
-
// },
|
331
|
-
},
|
332
|
-
|
333
|
-
"& .MuiInputBase-input::placeholder": {
|
334
|
-
fontFamily: '"Inter", sans-serif"',
|
335
|
-
fontSize: "14px"
|
336
|
-
}
|
337
|
-
}
|
319
|
+
sx: classes.signaturePopUpNameField
|
338
320
|
})
|
339
321
|
})]
|
340
322
|
}), /*#__PURE__*/_jsxs(Grid, {
|
@@ -459,25 +441,7 @@ const SignaturePopup = props => {
|
|
459
441
|
placeholder: "Enter Email",
|
460
442
|
size: "small",
|
461
443
|
onChange: onChange,
|
462
|
-
sx:
|
463
|
-
"& .MuiOutlinedInput-root": {
|
464
|
-
borderRadius: "10px",
|
465
|
-
"& fieldset": {
|
466
|
-
border: "1px solid #D8DDE1"
|
467
|
-
}
|
468
|
-
// '&:hover fieldset': {
|
469
|
-
// borderColor: 'yourHoverColor',
|
470
|
-
// },
|
471
|
-
// '&.Mui-focused fieldset': {
|
472
|
-
// borderColor: 'yourFocusedColor',
|
473
|
-
// },
|
474
|
-
},
|
475
|
-
|
476
|
-
"& .MuiInputBase-input::placeholder": {
|
477
|
-
fontFamily: '"Inter", sans-serif"',
|
478
|
-
fontSize: "14px"
|
479
|
-
}
|
480
|
-
},
|
444
|
+
sx: classes.signaturePopUpNameField,
|
481
445
|
defaultValue: defaultEmail || ""
|
482
446
|
})
|
483
447
|
})]
|
@@ -507,7 +471,8 @@ const SignaturePopup = props => {
|
|
507
471
|
classes: classes,
|
508
472
|
value: brush.color,
|
509
473
|
onSave: onBrushColor,
|
510
|
-
recentColors: []
|
474
|
+
recentColors: [],
|
475
|
+
hideGradient: true
|
511
476
|
}), /*#__PURE__*/_jsx("span", {
|
512
477
|
style: {
|
513
478
|
marginLeft: "10px",
|
@@ -530,13 +495,13 @@ const SignaturePopup = props => {
|
|
530
495
|
className: brush.size === m ? "activeBrush" : "",
|
531
496
|
children: /*#__PURE__*/_jsx("span", {
|
532
497
|
style: {
|
533
|
-
width:
|
534
|
-
height:
|
498
|
+
width: 17 + m,
|
499
|
+
height: 17 + m
|
535
500
|
},
|
536
501
|
children: /*#__PURE__*/_jsx(PencilIcon, {
|
537
502
|
style: {
|
538
|
-
width:
|
539
|
-
height:
|
503
|
+
width: 17 + m,
|
504
|
+
height: 17 + m
|
540
505
|
}
|
541
506
|
})
|
542
507
|
})
|
@@ -547,11 +512,11 @@ const SignaturePopup = props => {
|
|
547
512
|
}) : null, /*#__PURE__*/_jsxs(_Fragment, {
|
548
513
|
children: [!readOnly ? /*#__PURE__*/_jsx(Button, {
|
549
514
|
onClick: handleClear,
|
550
|
-
className:
|
515
|
+
className: `secondaryBtn actionBtn deleteBtn deleteButtonSignature`,
|
551
516
|
children: "Delete"
|
552
517
|
}) : null, /*#__PURE__*/_jsx(Button, {
|
553
518
|
onClick: handleSave,
|
554
|
-
className: `primaryBtn actionBtn ${isEmpty ? "disabled" : ""}`,
|
519
|
+
className: `primaryBtn actionBtn ${isEmpty ? "disabled disabledSaveBtn" : ""}`,
|
555
520
|
disabled: isEmpty,
|
556
521
|
children: "Save"
|
557
522
|
})]
|
@@ -5,6 +5,7 @@ import { getPageSettings } from "../../utils/pageSettings";
|
|
5
5
|
import { isTextSelected } from "../../utils/helper";
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
7
|
import SimpleTextStyle from "./style";
|
8
|
+
import { getBreakpointLineSpacing } from "../../helper/theme";
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
10
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -32,8 +33,14 @@ const SimpleText = props => {
|
|
32
33
|
const {
|
33
34
|
pageColor
|
34
35
|
} = pageSt?.pageProps || {};
|
36
|
+
const {
|
37
|
+
activeBreakPoint
|
38
|
+
} = useEditorContext();
|
39
|
+
const lineHeight = element?.children[0]?.lineHeight;
|
40
|
+
const lineH = getBreakpointLineSpacing(lineHeight, activeBreakPoint);
|
35
41
|
const classes = SimpleTextStyle({
|
36
|
-
pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF"
|
42
|
+
pageColor: pageColor || theme?.palette?.editor?.background || "#FFFFFF",
|
43
|
+
lineHeight: lineH
|
37
44
|
});
|
38
45
|
const selected = useSelected();
|
39
46
|
const path = ReactEditor.findPath(editor, element);
|
@@ -1,10 +1,17 @@
|
|
1
1
|
import { invertColor } from "../../helper";
|
2
2
|
const SimpleTextStyle = ({
|
3
|
-
pageColor
|
3
|
+
pageColor,
|
4
|
+
lineHeight
|
4
5
|
}) => ({
|
5
6
|
root: {
|
6
7
|
position: "relative",
|
7
8
|
padding: "0px",
|
9
|
+
lineHeight: lineHeight,
|
10
|
+
"&.signature": {
|
11
|
+
"& .placeholder-simple-text": {
|
12
|
+
opacity: 0
|
13
|
+
}
|
14
|
+
},
|
8
15
|
"& .placeholder-simple-text": {
|
9
16
|
color: "#94A3B8",
|
10
17
|
background: "transparent",
|
@@ -0,0 +1,77 @@
|
|
1
|
+
import { Button } from "@mui/material";
|
2
|
+
import { useMemo, useState } from "react";
|
3
|
+
import useTable from "../../hooks/useTable";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
const showAddButton = (addType, tableNode, hoverPath) => {
|
6
|
+
const [row, col] = hoverPath && hoverPath?.length ? hoverPath.slice(-2) : [];
|
7
|
+
if (addType === "row") {
|
8
|
+
return tableNode?.rows - 1 === row;
|
9
|
+
} else {
|
10
|
+
return tableNode?.columns - 1 === col;
|
11
|
+
}
|
12
|
+
};
|
13
|
+
const ADD_COL_BTN_WIDTH = 20;
|
14
|
+
function AddRowCol(props) {
|
15
|
+
const {
|
16
|
+
tableRef,
|
17
|
+
containerRef,
|
18
|
+
addType,
|
19
|
+
tableNode,
|
20
|
+
onAdd,
|
21
|
+
readOnly
|
22
|
+
} = props;
|
23
|
+
const {
|
24
|
+
hoverPath
|
25
|
+
} = useTable();
|
26
|
+
const [hoveringAddBtn, setHoveringAddBtn] = useState(false);
|
27
|
+
const {
|
28
|
+
tableResizing
|
29
|
+
} = useTable();
|
30
|
+
const {
|
31
|
+
clientHeight,
|
32
|
+
scrollWidth
|
33
|
+
} = tableRef?.current || {};
|
34
|
+
const {
|
35
|
+
clientWidth: containerWidth
|
36
|
+
} = containerRef?.current || {};
|
37
|
+
const buttonStyle = useMemo(() => {
|
38
|
+
if (addType === "row") {
|
39
|
+
const isScrollEnabled = scrollWidth > containerWidth;
|
40
|
+
const width = isScrollEnabled ? containerWidth - ADD_COL_BTN_WIDTH : scrollWidth;
|
41
|
+
return {
|
42
|
+
width
|
43
|
+
};
|
44
|
+
} else {
|
45
|
+
return {
|
46
|
+
height: "100%",
|
47
|
+
marginLeft: "3px"
|
48
|
+
};
|
49
|
+
}
|
50
|
+
}, [scrollWidth, clientHeight, containerWidth, tableResizing]);
|
51
|
+
const showAdd = showAddButton(addType, tableNode, hoverPath);
|
52
|
+
const onMouseEnter = () => setHoveringAddBtn(true);
|
53
|
+
const onMouseLeave = () => setHoveringAddBtn(false);
|
54
|
+
const showBtn = (showAdd || hoveringAddBtn) && !tableResizing && !readOnly;
|
55
|
+
return /*#__PURE__*/_jsx("div", {
|
56
|
+
onMouseEnter: onMouseEnter,
|
57
|
+
onMouseLeave: onMouseLeave,
|
58
|
+
contentEditable: false,
|
59
|
+
children: /*#__PURE__*/_jsx(Button, {
|
60
|
+
sx: {
|
61
|
+
fontSize: "14px",
|
62
|
+
border: "1px dashed #8DA8E3",
|
63
|
+
color: "#2563EB !important",
|
64
|
+
padding: "0px 4px",
|
65
|
+
minWidth: "unset",
|
66
|
+
lineHeight: "18px",
|
67
|
+
fontWeight: "normal !important",
|
68
|
+
...buttonStyle,
|
69
|
+
opacity: showBtn ? 1 : 0
|
70
|
+
},
|
71
|
+
disabled: !showBtn,
|
72
|
+
onClick: onAdd,
|
73
|
+
children: "+"
|
74
|
+
})
|
75
|
+
});
|
76
|
+
}
|
77
|
+
export default AddRowCol;
|