@flozy/editor 5.5.7 → 5.5.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 +13 -26
- package/dist/Editor/Editor.css +19 -102
- package/dist/Editor/Elements/AI/AIInput.js +1 -0
- package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
- package/dist/Editor/Elements/AI/PopoverAIInput.js +53 -59
- package/dist/Editor/Elements/AI/Styles.js +6 -24
- package/dist/Editor/Elements/Accordion/Accordion.js +1 -8
- package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
- package/dist/Editor/Elements/Button/EditorButton.js +1 -6
- package/dist/Editor/Elements/Carousel/CarouselItem.js +3 -11
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -8
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/Divider/Divider.js +20 -36
- package/dist/Editor/Elements/Embed/Image.js +16 -51
- package/dist/Editor/Elements/Embed/Video.js +3 -26
- 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/Form/Workflow/Styles.js +0 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
- package/dist/Editor/Elements/FreeGrid/breakpointConstants.js +4 -4
- package/dist/Editor/Elements/FreeGrid/styles.js +1 -1
- package/dist/Editor/Elements/Grid/GridButton.js +2 -2
- package/dist/Editor/Elements/Grid/GridItem.js +36 -47
- package/dist/Editor/Elements/Grid/Styles.js +0 -50
- 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 +52 -17
- package/dist/Editor/Elements/SimpleText/style.js +0 -15
- package/dist/Editor/Elements/Table/Styles.js +78 -88
- package/dist/Editor/Elements/Table/Table.js +140 -263
- package/dist/Editor/Elements/Table/TableCell.js +111 -365
- package/dist/Editor/Elements/Table/TablePopup.js +3 -9
- package/dist/Editor/Elements/Table/TableRow.js +2 -10
- package/dist/Editor/Elements/TopBanner/TopBanner.js +1 -2
- package/dist/Editor/MiniEditor.js +2 -21
- package/dist/Editor/Styles/EditorStyles.js +4 -13
- 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 -26
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +8 -8
- package/dist/Editor/Toolbar/Mini/Styles.js +1 -9
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +3 -7
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -6
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +15 -19
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +58 -547
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +16 -28
- package/dist/Editor/Toolbar/PopupTool/index.js +5 -3
- package/dist/Editor/Toolbar/Toolbar.js +0 -6
- package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/assets/svg/SettingsIcon.js +4 -4
- package/dist/Editor/common/ColorPickerButton.js +45 -85
- package/dist/Editor/common/DnD/Draggable.js +1 -2
- package/dist/Editor/common/FontLoader/FontLoader.js +2 -2
- package/dist/Editor/common/Icon.js +21 -54
- package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -2
- package/dist/Editor/common/ImageSelector/Styles.js +6 -47
- package/dist/Editor/common/ImageSelector/UploadStyles.js +6 -18
- 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 -142
- 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/GuideLines/styles.js +3 -3
- package/dist/Editor/common/RnD/ShadowElement.js +1 -1
- package/dist/Editor/common/RnD/VirtualElement/index.js +1 -5
- package/dist/Editor/common/RnD/index.js +3 -4
- package/dist/Editor/common/Section/index.js +3 -3
- package/dist/Editor/common/Section/styles.js +1 -5
- package/dist/Editor/common/Shorthands/elements.js +1 -13
- package/dist/Editor/common/StyleBuilder/fieldStyle.js +1 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +3 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +7 -35
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +2 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +1 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +0 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/radiusStyle.js +11 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +6 -22
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +2 -21
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -20
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -12
- package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
- package/dist/Editor/common/StyleBuilder/index.js +20 -101
- package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
- package/dist/Editor/common/SwipeableDrawer/style.js +4 -15
- package/dist/Editor/common/ToolbarIcon.js +1 -1
- package/dist/Editor/common/Uploader.js +37 -39
- package/dist/Editor/common/iconListV2.js +74 -598
- package/dist/Editor/common/iconslist.js +19 -25
- package/dist/Editor/commonStyle.js +15 -421
- package/dist/Editor/helper/deserialize/index.js +2 -31
- package/dist/Editor/helper/index.js +2 -15
- package/dist/Editor/helper/theme.js +1 -15
- package/dist/Editor/hooks/useBreakpoints.js +1 -1
- package/dist/Editor/plugins/withCustomDeleteBackward.js +1 -1
- package/dist/Editor/plugins/withEmbeds.js +26 -30
- package/dist/Editor/plugins/withHTML.js +12 -100
- package/dist/Editor/plugins/withLayout.js +0 -1
- package/dist/Editor/utils/SlateUtilityFunctions.js +11 -31
- 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 -100
- 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 +2 -2
- package/dist/Editor/Elements/DataView/DataView.js +0 -124
- package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -83
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -33
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -180
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -62
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -68
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -35
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -39
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -86
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -71
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -138
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -213
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -44
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -146
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -79
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -57
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -174
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -241
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -45
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -32
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -217
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -131
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -253
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -85
- package/dist/Editor/Elements/DataView/Layouts/colStyles.js +0 -10
- package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -277
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -88
- package/dist/Editor/Elements/DataView/styles.js +0 -169
- 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/ArrowDownIcon.js +0 -25
- package/dist/Editor/assets/svg/ArrowUpIcon.js +0 -25
- package/dist/Editor/assets/svg/CalenderIconTick.js +0 -64
- package/dist/Editor/assets/svg/ChervDown.js +0 -18
- package/dist/Editor/assets/svg/ChervUp.js +0 -18
- package/dist/Editor/assets/svg/DataTableIcon.js +0 -50
- package/dist/Editor/assets/svg/DuplicateIcon.js +0 -23
- package/dist/Editor/assets/svg/EyeIcon.js +0 -23
- package/dist/Editor/assets/svg/EyeSlash.js +0 -43
- package/dist/Editor/assets/svg/HashtagIcon.js +0 -33
- package/dist/Editor/assets/svg/PlusIcon.js +0 -23
- package/dist/Editor/assets/svg/SelectRoundedIcon.js +0 -24
- package/dist/Editor/assets/svg/SortByIcon.js +0 -33
- package/dist/Editor/assets/svg/TableIcons.js +0 -220
- package/dist/Editor/assets/svg/TickOutlined.js +0 -23
- package/dist/Editor/assets/svg/TrashCanIcon.js +0 -38
- package/dist/Editor/common/Select/index.js +0 -20
- package/dist/Editor/common/Select/styles.js +0 -17
- package/dist/Editor/helper/enforceDateFormat.js +0 -41
- package/dist/Editor/hooks/useTable.js +0 -210
- package/dist/Editor/utils/dataView.js +0 -43
@@ -22,7 +22,7 @@ const useGuideLineStyle = ({
|
|
22
22
|
backgroundColor: "#FFF",
|
23
23
|
pointerEvents: "none",
|
24
24
|
zIndex: 1,
|
25
|
-
[theme
|
25
|
+
[theme.breakpoints.between("xs", "md")]: {
|
26
26
|
left: "calc(50% - 160px)"
|
27
27
|
}
|
28
28
|
},
|
@@ -35,13 +35,13 @@ const useGuideLineStyle = ({
|
|
35
35
|
backgroundColor: "#FFF",
|
36
36
|
pointerEvents: "none",
|
37
37
|
zIndex: 1,
|
38
|
-
[theme
|
38
|
+
[theme.breakpoints.between("xs", "md")]: {
|
39
39
|
left: "calc(50% + 160px)"
|
40
40
|
}
|
41
41
|
},
|
42
42
|
"& .white-wrapper": {
|
43
43
|
overflowX: "hidden",
|
44
|
-
[theme
|
44
|
+
[theme.breakpoints.between("xs", "md")]: {
|
45
45
|
position: "absolute",
|
46
46
|
width: "calc(50% - 162px)",
|
47
47
|
height: "calc(100% - 2px)",
|
@@ -10,7 +10,7 @@ const useShadowElementStyles = ({
|
|
10
10
|
position: "relative",
|
11
11
|
backgroundColor: "rgba(0,0,0,0)",
|
12
12
|
marginLeft: `calc((100% - 980px) * 0.5)`,
|
13
|
-
[theme
|
13
|
+
[theme.breakpoints.between("xs", "md")]: {
|
14
14
|
marginLeft: `calc((100% - 320px) * 0.5)`
|
15
15
|
}
|
16
16
|
}
|
@@ -141,11 +141,7 @@ const VirtualElement = props => {
|
|
141
141
|
sx: classes.root,
|
142
142
|
dangerouslySetInnerHTML: {
|
143
143
|
__html: getItems()
|
144
|
-
}
|
145
|
-
style: {
|
146
|
-
visibility: "hidden"
|
147
|
-
},
|
148
|
-
"aria-hidden": "true"
|
144
|
+
}
|
149
145
|
});
|
150
146
|
};
|
151
147
|
export default VirtualElement;
|
@@ -18,7 +18,7 @@ import { selectText } from "../../utils/helper";
|
|
18
18
|
import { removeSign } from "./ElementSettings/OtherSettings";
|
19
19
|
import useDragging from "../../hooks/useDragging";
|
20
20
|
import { dragOverOn } from "../../helper/RnD/focusNode";
|
21
|
-
import { focusSelection, clearSelection
|
21
|
+
import { focusSelection, clearSelection } from "../../helper";
|
22
22
|
import { jsx as _jsx } from "react/jsx-runtime";
|
23
23
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
24
24
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -163,7 +163,6 @@ const RnD = props => {
|
|
163
163
|
}
|
164
164
|
switch (e.detail) {
|
165
165
|
case 1:
|
166
|
-
clearSelectionOnly(editor); //for selection removal on click outside
|
167
166
|
if (!enable) {
|
168
167
|
setSelectedElement({
|
169
168
|
path: str_path,
|
@@ -367,7 +366,7 @@ const RnD = props => {
|
|
367
366
|
// some cases
|
368
367
|
if (dragOverEle?.dataset?.dragovertype === undefined) {
|
369
368
|
// means check for parent element
|
370
|
-
dragOverEle = e?.toElement?.
|
369
|
+
dragOverEle = e?.toElement?.parentElement;
|
371
370
|
}
|
372
371
|
if (dragOverEle?.dataset?.dragovertype !== "child") {
|
373
372
|
const oldPath = dragging.dragOver;
|
@@ -534,7 +533,7 @@ const RnD = props => {
|
|
534
533
|
children: [/*#__PURE__*/_jsx("div", {
|
535
534
|
id: `opt_ref_${str_path}`,
|
536
535
|
style: {
|
537
|
-
display:
|
536
|
+
display: "block",
|
538
537
|
position: "absolute",
|
539
538
|
left: "-8px",
|
540
539
|
top: "-30px",
|
@@ -3,13 +3,13 @@ import { useTheme } from "@mui/material";
|
|
3
3
|
import { Transforms } from "slate";
|
4
4
|
import { ReactEditor, useSlateStatic } from "slate-react";
|
5
5
|
import { Box, IconButton, Popper, Tooltip } from "@mui/material";
|
6
|
+
import TuneIcon from "@mui/icons-material/Tune";
|
6
7
|
import SectionPopup from "../../Elements/Grid/SectionPopup";
|
7
8
|
import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
|
8
9
|
import DragHandle from "../DnD/DragHandleButton";
|
9
10
|
import { useEditorSelection } from "../../hooks/useMouseMove";
|
10
11
|
import SectionStyle from "./styles";
|
11
12
|
import useWindowResize from "../../hooks/useWindowResize";
|
12
|
-
import { SectionSettingIcon } from "../iconListV2";
|
13
13
|
import { jsx as _jsx } from "react/jsx-runtime";
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
15
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -72,13 +72,13 @@ const Section = props => {
|
|
72
72
|
height: "100%"
|
73
73
|
} : {
|
74
74
|
left: "-28px",
|
75
|
-
top: "
|
75
|
+
top: "3px"
|
76
76
|
},
|
77
77
|
children: /*#__PURE__*/_jsx(Tooltip, {
|
78
78
|
title: "Section Settings",
|
79
79
|
children: /*#__PURE__*/_jsx(IconButton, {
|
80
80
|
onClick: onSettings,
|
81
|
-
children: /*#__PURE__*/_jsx(
|
81
|
+
children: /*#__PURE__*/_jsx(TuneIcon, {})
|
82
82
|
})
|
83
83
|
})
|
84
84
|
}) : null;
|
@@ -13,7 +13,6 @@ import { insertDivider } from "../../utils/divider";
|
|
13
13
|
import { insertFreeGrid } from "../../utils/freegrid";
|
14
14
|
import { Transforms } from "slate";
|
15
15
|
import { insertInfinityAI } from "../../utils/infinityAI";
|
16
|
-
import { insertDataView } from "../../utils/dataView";
|
17
16
|
import SearchButton from "../../Elements/Search/SearchButton";
|
18
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
19
18
|
const ELEMENTS_LIST = [{
|
@@ -159,7 +158,7 @@ const ELEMENTS_LIST = [{
|
|
159
158
|
renderComponent: rest => /*#__PURE__*/_jsx(SearchButton, {
|
160
159
|
...rest,
|
161
160
|
element: {
|
162
|
-
name:
|
161
|
+
name: 'Brain'
|
163
162
|
},
|
164
163
|
icoBtnType: "cmd"
|
165
164
|
})
|
@@ -263,17 +262,6 @@ const ELEMENTS_LIST = [{
|
|
263
262
|
onInsert: editor => {
|
264
263
|
insertInfinityAI(editor);
|
265
264
|
}
|
266
|
-
}, {
|
267
|
-
name: "Dynamic Table",
|
268
|
-
group: "Dynamic Table",
|
269
|
-
desc: "",
|
270
|
-
type: "dataView",
|
271
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
272
|
-
icon: "dataTable"
|
273
|
-
}),
|
274
|
-
onInsert: editor => {
|
275
|
-
insertDataView(editor);
|
276
|
-
}
|
277
265
|
}];
|
278
266
|
const elements = props => {
|
279
267
|
const {
|
@@ -60,10 +60,9 @@ const BackgroundImage = props => {
|
|
60
60
|
item: true,
|
61
61
|
xs: 12,
|
62
62
|
style: {
|
63
|
-
backgroundImage: base64 ? `url(${base64})` : "none"
|
64
|
-
|
63
|
+
backgroundImage: base64 ? `url(${base64})` : "none",
|
64
|
+
height: "200px"
|
65
65
|
},
|
66
|
-
|
67
66
|
sx: classes.uploadField,
|
68
67
|
children: /*#__PURE__*/_jsx(Grid, {
|
69
68
|
className: "uploadImageSection",
|
@@ -87,7 +86,7 @@ const BackgroundImage = props => {
|
|
87
86
|
style: {
|
88
87
|
paddingLeft: "8px"
|
89
88
|
},
|
90
|
-
children: "
|
89
|
+
children: "upload your image"
|
91
90
|
})]
|
92
91
|
})
|
93
92
|
})
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box
|
2
|
+
import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box } from "@mui/material";
|
3
3
|
import { squreStyle } from "./radiusStyle";
|
4
4
|
import { getBreakPointsValue } from "../../../helper/theme";
|
5
5
|
import useWindowResize from "../../../hooks/useWindowResize";
|
6
|
-
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
8
|
const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
|
@@ -82,18 +81,7 @@ const BannerSpacing = props => {
|
|
82
81
|
onChange: handleChange
|
83
82
|
}), /*#__PURE__*/_jsx(Box, {
|
84
83
|
component: "input",
|
85
|
-
sx:
|
86
|
-
...classes.sapcingInput,
|
87
|
-
"::-webkit-outer-spin-button": {
|
88
|
-
WebkitAppearance: "none",
|
89
|
-
margin: 0
|
90
|
-
},
|
91
|
-
"::-webkit-inner-spin-button": {
|
92
|
-
WebkitAppearance: "none",
|
93
|
-
margin: 0
|
94
|
-
},
|
95
|
-
MozAppearance: "textfield"
|
96
|
-
},
|
84
|
+
sx: classes.sapcingInput,
|
97
85
|
name: "top",
|
98
86
|
value: !lockSpacing ? "" : pro_value?.top,
|
99
87
|
className: "sliderInput",
|
@@ -104,22 +92,10 @@ const BannerSpacing = props => {
|
|
104
92
|
})]
|
105
93
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
106
94
|
className: "ccheckbox-primary",
|
107
|
-
sx: {
|
108
|
-
...classes.customCheckBox
|
109
|
-
},
|
110
95
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
111
96
|
value: !lockSpacing,
|
112
97
|
checked: !lockSpacing,
|
113
|
-
onChange: onLockSpacing
|
114
|
-
variant: "outlined",
|
115
|
-
className: "checkBox",
|
116
|
-
checkedIcon: /*#__PURE__*/_jsx(IconButton, {
|
117
|
-
className: "checkedIcon",
|
118
|
-
children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
|
119
|
-
}),
|
120
|
-
icon: /*#__PURE__*/_jsx(IconButton, {
|
121
|
-
className: "unCheckedIcon"
|
122
|
-
})
|
98
|
+
onChange: onLockSpacing
|
123
99
|
}),
|
124
100
|
label: /*#__PURE__*/_jsx(Typography, {
|
125
101
|
variant: "body1",
|
@@ -159,8 +135,7 @@ const BannerSpacing = props => {
|
|
159
135
|
value: pro_value?.top,
|
160
136
|
className: "borderInput removeScroll",
|
161
137
|
style: {
|
162
|
-
...squreStyle.topRight
|
163
|
-
...classes.customPaddingInput
|
138
|
+
...squreStyle.topRight
|
164
139
|
},
|
165
140
|
onChange: handleChange,
|
166
141
|
placeholder: "0"
|
@@ -173,8 +148,7 @@ const BannerSpacing = props => {
|
|
173
148
|
value: pro_value?.right,
|
174
149
|
className: "borderInput removeScroll",
|
175
150
|
style: {
|
176
|
-
...squreStyle.bottomLeft
|
177
|
-
...classes.customPaddingInput
|
151
|
+
...squreStyle.bottomLeft
|
178
152
|
},
|
179
153
|
onChange: handleChange,
|
180
154
|
placeholder: "0"
|
@@ -187,8 +161,7 @@ const BannerSpacing = props => {
|
|
187
161
|
value: pro_value?.bottom,
|
188
162
|
className: "borderInput removeScroll",
|
189
163
|
style: {
|
190
|
-
...squreStyle.bottomRight
|
191
|
-
...classes.customPaddingInput
|
164
|
+
...squreStyle.bottomRight
|
192
165
|
},
|
193
166
|
onChange: handleChange,
|
194
167
|
placeholder: "0"
|
@@ -201,8 +174,7 @@ const BannerSpacing = props => {
|
|
201
174
|
value: pro_value?.left,
|
202
175
|
className: "borderInput removeScroll",
|
203
176
|
style: {
|
204
|
-
...squreStyle.topLeft
|
205
|
-
...classes.customPaddingInput
|
177
|
+
...squreStyle.topLeft
|
206
178
|
},
|
207
179
|
onChange: handleChange,
|
208
180
|
placeholder: "0"
|
@@ -1,9 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box
|
2
|
+
import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box } from "@mui/material";
|
3
3
|
import { radiusStyle } from "./radiusStyle";
|
4
4
|
import useWindowResize from "../../../hooks/useWindowResize";
|
5
5
|
import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
|
6
|
-
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
7
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
8
|
const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
@@ -91,22 +90,10 @@ const BorderRadius = props => {
|
|
91
90
|
})]
|
92
91
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
93
92
|
className: "ccheckbox-primary",
|
94
|
-
sx: {
|
95
|
-
...classes.customCheckBox
|
96
|
-
},
|
97
93
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
98
94
|
value: !lockRadius,
|
99
95
|
checked: !lockRadius,
|
100
|
-
onChange: onLockRadius
|
101
|
-
variant: "outlined",
|
102
|
-
className: "checkBox",
|
103
|
-
checkedIcon: /*#__PURE__*/_jsx(IconButton, {
|
104
|
-
className: "checkedIcon",
|
105
|
-
children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
|
106
|
-
}),
|
107
|
-
icon: /*#__PURE__*/_jsx(IconButton, {
|
108
|
-
className: "unCheckedIcon"
|
109
|
-
})
|
96
|
+
onChange: onLockRadius
|
110
97
|
}),
|
111
98
|
label: /*#__PURE__*/_jsx(Typography, {
|
112
99
|
variant: "body1",
|
@@ -16,7 +16,6 @@ const Color = props => {
|
|
16
16
|
hideGradient
|
17
17
|
} = data;
|
18
18
|
const [recentColors, setRecentColors] = useState({});
|
19
|
-
const getLable = label === 'Text' ? 'Select text color' : label === 'Background' ? 'Select background color' : label;
|
20
19
|
useEffect(() => {
|
21
20
|
const storedColors = JSON.parse(localStorage.getItem("recentColors"));
|
22
21
|
if (storedColors) {
|
@@ -74,7 +73,7 @@ const Color = props => {
|
|
74
73
|
}), /*#__PURE__*/_jsx(TextField, {
|
75
74
|
fullWidth: true,
|
76
75
|
value: value,
|
77
|
-
placeholder:
|
76
|
+
placeholder: `${label} color code`,
|
78
77
|
InputLabelProps: {
|
79
78
|
shrink: true
|
80
79
|
},
|
@@ -91,14 +91,12 @@ const Icons = props => {
|
|
91
91
|
overflowY: "auto",
|
92
92
|
paddingTop: "5px"
|
93
93
|
},
|
94
|
-
className: "muiIconsListParent",
|
95
94
|
children: list.map(m => {
|
96
95
|
return /*#__PURE__*/_jsx(Tooltip, {
|
97
96
|
title: m,
|
98
97
|
arrow: true,
|
99
98
|
children: /*#__PURE__*/_jsx(IconButton, {
|
100
99
|
onClick: onSelectIcon(m),
|
101
|
-
className: "muiIconsList",
|
102
100
|
children: /*#__PURE__*/_jsx(MUIIcon, {
|
103
101
|
iconName: m,
|
104
102
|
props: customProps
|
@@ -53,7 +53,7 @@ export const radiusStyle = {
|
|
53
53
|
export const squreStyle = {
|
54
54
|
topLeft: {
|
55
55
|
position: "absolute",
|
56
|
-
left: "-
|
56
|
+
left: "-35px",
|
57
57
|
top: "50%",
|
58
58
|
transform: "translateY(-50%)",
|
59
59
|
width: "30px",
|
@@ -61,7 +61,7 @@ export const squreStyle = {
|
|
61
61
|
margin: "auto",
|
62
62
|
// borderTop: `2px solid #2563eb`,
|
63
63
|
// borderLeft: `2px solid #2563eb`,
|
64
|
-
|
64
|
+
border: `none`,
|
65
65
|
// borderBottom: `none`,
|
66
66
|
fontSize: "14px",
|
67
67
|
textAlign: "center"
|
@@ -71,13 +71,13 @@ export const squreStyle = {
|
|
71
71
|
// top: "-28px",
|
72
72
|
left: "50%",
|
73
73
|
transform: "translateX(-50%)",
|
74
|
-
top: "-
|
74
|
+
top: "-35px",
|
75
75
|
width: "30px",
|
76
76
|
height: "30px",
|
77
77
|
// borderTop: `2px solid #2563eb`,
|
78
78
|
// borderRight: `2px solid #2563eb`,
|
79
|
-
|
80
|
-
|
79
|
+
border: `none`,
|
80
|
+
borderLeft: `none`,
|
81
81
|
fontSize: "14px"
|
82
82
|
},
|
83
83
|
bottomLeft: {
|
@@ -85,18 +85,18 @@ export const squreStyle = {
|
|
85
85
|
// left: "-25px",
|
86
86
|
top: "50%",
|
87
87
|
transform: "translateY(-50%)",
|
88
|
-
right: "-
|
88
|
+
right: "-35px",
|
89
89
|
width: "30px",
|
90
90
|
height: "30px",
|
91
91
|
// borderBottom: `2px solid #2563eb`,
|
92
92
|
// borderLeft: `2px solid #2563eb`,
|
93
|
-
|
94
|
-
|
93
|
+
border: `none`,
|
94
|
+
borderTop: `none`,
|
95
95
|
fontSize: "14px"
|
96
96
|
},
|
97
97
|
bottomRight: {
|
98
98
|
position: "absolute",
|
99
|
-
bottom: "-
|
99
|
+
bottom: "-35px",
|
100
100
|
// right: "-25px",
|
101
101
|
left: "50%",
|
102
102
|
transform: "translateX(-50%)",
|
@@ -104,8 +104,8 @@ export const squreStyle = {
|
|
104
104
|
height: "30px",
|
105
105
|
// borderBottom: `2px solid #2563eb`,
|
106
106
|
// borderRight: `2px solid #2563eb`,
|
107
|
-
|
108
|
-
|
107
|
+
border: "none",
|
108
|
+
borderLeft: "none",
|
109
109
|
fontSize: "14px"
|
110
110
|
}
|
111
111
|
};
|
@@ -3,8 +3,6 @@ import { Grid, Button, Typography, Select, MenuItem, TextField } from "@mui/mate
|
|
3
3
|
import CloudUploadIcon from "@mui/icons-material/CloudUpload";
|
4
4
|
import { convertBase64 } from "../../../utils/helper";
|
5
5
|
import { uploadFile } from "../../../service/fileupload";
|
6
|
-
import { useEditorContext } from "../../../hooks/useMouseMove";
|
7
|
-
import useCommonStyle from "../../../commonStyle";
|
8
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
8
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -32,10 +30,6 @@ const SaveAsTemplate = props => {
|
|
32
30
|
});
|
33
31
|
const [base64, setBase64] = useState(value);
|
34
32
|
const [uploading, setUploading] = useState(false);
|
35
|
-
const {
|
36
|
-
theme
|
37
|
-
} = useEditorContext();
|
38
|
-
const classes = useCommonStyle(theme);
|
39
33
|
const handleChange = async e => {
|
40
34
|
const file = e.target.files[0];
|
41
35
|
const strImage = await convertBase64(file);
|
@@ -82,9 +76,6 @@ const SaveAsTemplate = props => {
|
|
82
76
|
onSaveTemplate(formData, params);
|
83
77
|
handleClose();
|
84
78
|
};
|
85
|
-
if (!onSaveTemplate) {
|
86
|
-
return null;
|
87
|
-
}
|
88
79
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
89
80
|
children: [/*#__PURE__*/_jsx(Grid, {
|
90
81
|
item: true,
|
@@ -158,14 +149,9 @@ const SaveAsTemplate = props => {
|
|
158
149
|
justifyContent: "space-between",
|
159
150
|
alignItems: "center",
|
160
151
|
children: [/*#__PURE__*/_jsxs(Button, {
|
161
|
-
component: "label"
|
162
|
-
|
163
|
-
,
|
164
|
-
className: "gradientFillBtn",
|
152
|
+
component: "label",
|
153
|
+
variant: "contained",
|
165
154
|
startIcon: /*#__PURE__*/_jsx(CloudUploadIcon, {}),
|
166
|
-
sx: {
|
167
|
-
...classes.gradientFillBtn
|
168
|
-
},
|
169
155
|
children: ["Upload file", /*#__PURE__*/_jsx("input", {
|
170
156
|
type: "file",
|
171
157
|
style: {
|
@@ -208,14 +194,12 @@ const SaveAsTemplate = props => {
|
|
208
194
|
},
|
209
195
|
className: "action-btn-wrpr",
|
210
196
|
children: [/*#__PURE__*/_jsx(Button, {
|
211
|
-
className: "savebtn
|
197
|
+
className: "savebtn",
|
212
198
|
onClick: handleSave,
|
213
199
|
sx: {
|
214
|
-
fontWeight: 700
|
215
|
-
|
216
|
-
|
217
|
-
// variant="contained"
|
218
|
-
,
|
200
|
+
fontWeight: 700
|
201
|
+
},
|
202
|
+
variant: "contained",
|
219
203
|
children: saveText
|
220
204
|
}), closeText ? /*#__PURE__*/_jsx(Button, {
|
221
205
|
className: "closebtn",
|
@@ -1,8 +1,5 @@
|
|
1
1
|
import React, { useEffect, useState, useRef } from "react";
|
2
|
-
import { Grid, Checkbox, FormControlLabel, FormHelperText
|
3
|
-
import useCommonStyle from "../../../commonStyle";
|
4
|
-
import { useEditorContext } from "../../../hooks/useMouseMove";
|
5
|
-
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
2
|
+
import { Grid, Checkbox, FormControlLabel, FormHelperText } from "@mui/material";
|
6
3
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
4
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
5
|
const SelectBox = props => {
|
@@ -18,10 +15,6 @@ const SelectBox = props => {
|
|
18
15
|
} = data;
|
19
16
|
const [checkedValue, setCheckedValue] = useState(false);
|
20
17
|
const isFirstRender = useRef(true);
|
21
|
-
const {
|
22
|
-
theme
|
23
|
-
} = useEditorContext();
|
24
|
-
const classes = useCommonStyle(theme);
|
25
18
|
useEffect(() => {
|
26
19
|
if (isFirstRender.current && elementProps.element === "email" && value === undefined) {
|
27
20
|
setCheckedValue(true);
|
@@ -42,22 +35,10 @@ const SelectBox = props => {
|
|
42
35
|
marginBottom: "12px"
|
43
36
|
},
|
44
37
|
children: [/*#__PURE__*/_jsx(FormControlLabel, {
|
45
|
-
className: "ccheckbox-primary",
|
46
|
-
sx: {
|
47
|
-
...classes.customCheckBox
|
48
|
-
},
|
49
38
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
50
39
|
value: value,
|
51
40
|
checked: checkedValue,
|
52
|
-
onChange: handleChange
|
53
|
-
className: "checkBox",
|
54
|
-
checkedIcon: /*#__PURE__*/_jsx(IconButton, {
|
55
|
-
className: "checkedIcon",
|
56
|
-
children: /*#__PURE__*/_jsx(CheckedBoxCheckIcon, {})
|
57
|
-
}),
|
58
|
-
icon: /*#__PURE__*/_jsx(IconButton, {
|
59
|
-
className: "unCheckedIcon"
|
60
|
-
})
|
41
|
+
onChange: handleChange
|
61
42
|
}),
|
62
43
|
label: placeholder
|
63
44
|
}), /*#__PURE__*/_jsx(FormHelperText, {
|
@@ -11,21 +11,13 @@ const Text = props => {
|
|
11
11
|
const {
|
12
12
|
key,
|
13
13
|
placeholder,
|
14
|
-
width
|
15
|
-
required = false
|
14
|
+
width
|
16
15
|
} = data;
|
17
16
|
const [value, setValue] = useState(pro_value);
|
18
|
-
const [error, setError] = useState(false);
|
19
17
|
const handleChange = e => {
|
20
|
-
|
21
|
-
setValue(newValue);
|
22
|
-
if (required && !newValue.trim()) {
|
23
|
-
setError(true);
|
24
|
-
} else {
|
25
|
-
setError(false);
|
26
|
-
}
|
18
|
+
setValue(e.target.value);
|
27
19
|
onChange({
|
28
|
-
[key]:
|
20
|
+
[key]: e.target.value
|
29
21
|
});
|
30
22
|
};
|
31
23
|
return /*#__PURE__*/_jsxs(Grid, {
|
@@ -47,15 +39,7 @@ const Text = props => {
|
|
47
39
|
value: value,
|
48
40
|
onChange: handleChange,
|
49
41
|
size: "small",
|
50
|
-
fullWidth: true
|
51
|
-
required: required,
|
52
|
-
error: error,
|
53
|
-
helperText: error ? 'This field is required' : '',
|
54
|
-
sx: {
|
55
|
-
'& .MuiFormHelperText-root': {
|
56
|
-
color: '#d32f2f !important'
|
57
|
-
}
|
58
|
-
}
|
42
|
+
fullWidth: true
|
59
43
|
})]
|
60
44
|
});
|
61
45
|
};
|
@@ -5,9 +5,6 @@ import useWindowResize from "../../../hooks/useWindowResize";
|
|
5
5
|
import { useEditorContext } from "../../../hooks/useMouseMove";
|
6
6
|
import FontFamilyAutocomplete from "../../../Toolbar/FormatTools/FontFamilyAutocomplete";
|
7
7
|
import { useSlate } from "slate-react";
|
8
|
-
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
9
|
-
|
10
|
-
// hideMetaDataOptions -- pass true to hide metadata option in select field
|
11
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
12
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
13
10
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
@@ -29,8 +26,7 @@ const TextOptions = props => {
|
|
29
26
|
options,
|
30
27
|
renderOption,
|
31
28
|
width,
|
32
|
-
webFont = false
|
33
|
-
hideMetaDataOptions = false
|
29
|
+
webFont = false
|
34
30
|
} = data;
|
35
31
|
const {
|
36
32
|
fontFamilies
|
@@ -39,7 +35,7 @@ const TextOptions = props => {
|
|
39
35
|
const [size] = useWindowResize();
|
40
36
|
const value = isBreakpoint ? getBreakPointsValue(val, size?.device) : val;
|
41
37
|
const metaDataMappingOptions = metaMappings?.boards || [];
|
42
|
-
const updatedOption =
|
38
|
+
const updatedOption = elementProps?.metadatamapping ? [...options, ...metaDataMappingOptions] : webFont ? fontFamilies?.options : options;
|
43
39
|
const handleChange = (e, d) => {
|
44
40
|
if (isBreakpoint) {
|
45
41
|
onChange({
|
@@ -91,12 +87,6 @@ const TextOptions = props => {
|
|
91
87
|
marginBottom: "16px"
|
92
88
|
},
|
93
89
|
sx: classes.textOptions,
|
94
|
-
IconComponent: KeyboardArrowDownRoundedIcon,
|
95
|
-
MenuProps: {
|
96
|
-
sx: {
|
97
|
-
...classes.textOptionsList
|
98
|
-
}
|
99
|
-
},
|
100
90
|
children: updatedOption?.map((m, i) => {
|
101
91
|
return m?.value === "listSubHeader" ? /*#__PURE__*/_jsx(ListSubheader, {
|
102
92
|
children: m?.label
|