@flozy/editor 5.3.9 → 5.4.0
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 +25 -34
- package/dist/Editor/CommonEditor.js +29 -15
- package/dist/Editor/Editor.css +100 -18
- package/dist/Editor/Elements/AI/AIInput.js +0 -1
- package/dist/Editor/Elements/AI/CustomSelect.js +19 -11
- package/dist/Editor/Elements/AI/PopoverAIInput.js +58 -52
- package/dist/Editor/Elements/AI/Styles.js +24 -6
- package/dist/Editor/Elements/Accordion/Accordion.js +8 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +6 -6
- package/dist/Editor/Elements/Button/EditorButton.js +9 -2
- package/dist/Editor/Elements/Carousel/CarouselItem.js +11 -3
- 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 +124 -0
- package/dist/Editor/Elements/DataView/DataViewButton.js +23 -0
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +67 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +33 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +162 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +40 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +67 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +35 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +39 -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 +60 -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 +112 -0
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +227 -0
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +80 -0
- package/dist/Editor/Elements/DataView/Layouts/colStyles.js +10 -0
- package/dist/Editor/Elements/DataView/Layouts/index.js +25 -0
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +281 -0
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +15 -0
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +74 -0
- package/dist/Editor/Elements/DataView/styles.js +154 -0
- package/dist/Editor/Elements/Divider/Divider.js +36 -20
- package/dist/Editor/Elements/Embed/Image.js +51 -16
- package/dist/Editor/Elements/Embed/Video.js +26 -3
- package/dist/Editor/Elements/Form/Form.js +39 -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/FreeGrid/breakpointConstants.js +4 -4
- package/dist/Editor/Elements/FreeGrid/styles.js +2 -1
- package/dist/Editor/Elements/Grid/GridButton.js +2 -2
- package/dist/Editor/Elements/Grid/GridItem.js +47 -36
- package/dist/Editor/Elements/Grid/Styles.js +50 -0
- package/dist/Editor/Elements/Link/LinkButton.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +2 -1
- package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
- package/dist/Editor/Elements/Search/SearchButton.js +1 -0
- 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 +17 -52
- package/dist/Editor/Elements/SimpleText/index.js +8 -1
- package/dist/Editor/Elements/SimpleText/style.js +20 -1
- package/dist/Editor/Elements/Table/AddRowCol.js +77 -0
- package/dist/Editor/Elements/Table/DragButton.js +142 -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 +82 -79
- package/dist/Editor/Elements/Table/Table.js +258 -140
- package/dist/Editor/Elements/Table/TableCell.js +365 -111
- 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/Elements/TopBanner/TopBanner.js +2 -1
- package/dist/Editor/MiniEditor.js +15 -1
- package/dist/Editor/Styles/EditorStyles.js +13 -4
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +10 -0
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +7 -12
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +26 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +3 -0
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +5 -5
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +3 -6
- package/dist/Editor/Toolbar/Mini/Styles.js +4 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/InfinityAITool.js +7 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +6 -4
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +19 -15
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +555 -57
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +73 -16
- package/dist/Editor/Toolbar/PopupTool/index.js +3 -5
- 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/SettingsIcon.js +4 -4
- package/dist/Editor/assets/svg/TableIcons.js +220 -0
- package/dist/Editor/common/ColorPickerButton.js +85 -45
- package/dist/Editor/common/DnD/Draggable.js +2 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
- package/dist/Editor/common/Icon.js +23 -20
- package/dist/Editor/common/ImageSelector/Options/Upload.js +2 -1
- package/dist/Editor/common/ImageSelector/Styles.js +47 -6
- package/dist/Editor/common/ImageSelector/UploadStyles.js +18 -6
- 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 +143 -8
- 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/GuideLines/styles.js +3 -3
- package/dist/Editor/common/RnD/ShadowElement.js +1 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +14 -2
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +9 -6
- package/dist/Editor/common/RnD/VirtualElement/index.js +5 -1
- package/dist/Editor/common/RnD/index.js +3 -2
- package/dist/Editor/common/Section/index.js +3 -3
- package/dist/Editor/common/Section/styles.js +5 -1
- 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/fieldStyle.js +2 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +9 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +35 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +10 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +2 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +1 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +2 -0
- 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 +11 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/saveAsTemplate.js +22 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/selectBox.js +21 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +20 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +12 -2
- package/dist/Editor/common/StyleBuilder/formStyle.js +268 -149
- package/dist/Editor/common/StyleBuilder/index.js +101 -20
- 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/ToolbarIcon.js +1 -1
- package/dist/Editor/common/Uploader.js +46 -36
- package/dist/Editor/common/iconListV2.js +616 -60
- package/dist/Editor/common/iconslist.js +23 -17
- package/dist/Editor/commonStyle.js +417 -11
- package/dist/Editor/helper/deserialize/index.js +4 -1
- package/dist/Editor/helper/enforceDateFormat.js +41 -0
- package/dist/Editor/helper/index.js +17 -4
- package/dist/Editor/helper/theme.js +24 -1
- package/dist/Editor/hooks/useMouseMove.js +5 -2
- package/dist/Editor/hooks/useTable.js +210 -0
- package/dist/Editor/plugins/withCustomDeleteBackward.js +36 -4
- package/dist/Editor/plugins/withEmbeds.js +30 -26
- package/dist/Editor/plugins/withHTML.js +61 -10
- package/dist/Editor/plugins/withLayout.js +1 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +39 -12
- package/dist/Editor/utils/brains.js +1 -1
- package/dist/Editor/utils/button.js +4 -4
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +26 -1
- package/dist/Editor/utils/customHooks/useResize.js +7 -4
- package/dist/Editor/utils/customHooks/useTableResize.js +6 -2
- 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 +103 -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 +2 -2
@@ -97,7 +97,7 @@ const MentionsPopup = /*#__PURE__*/forwardRef((props, ref) => {
|
|
97
97
|
id: `cmd-li-ind-${index}}`,
|
98
98
|
component: "div",
|
99
99
|
onClick: handleClick(char, i),
|
100
|
-
className: `${i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
|
100
|
+
className: `${type !== 'elements' && i === index ? "active" : " "} ${char.renderComponent ? "renderComp" : ""}`,
|
101
101
|
sx: classes.listItem,
|
102
102
|
ref: i === index ? papperRef : null,
|
103
103
|
children: char.renderComponent ? char.renderComponent({
|
@@ -1,10 +1,13 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Transforms, Node } from "slate";
|
3
|
-
import { Box } from "@mui/material";
|
3
|
+
import { Accordion, AccordionDetails, AccordionSummary, Box, createTheme, ThemeProvider, Typography } from "@mui/material";
|
4
4
|
import { StyleContent } from "../../../StyleBuilder";
|
5
|
-
import formStyle from "../../../StyleBuilder/formStyle";
|
5
|
+
import { formStyle } from "../../../StyleBuilder/formStyle";
|
6
6
|
import { ReactEditor } from "slate-react";
|
7
|
+
import { ExpandMoreOutlined } from "@mui/icons-material";
|
8
|
+
import { useEditorContext } from "../../../../hooks/useMouseMove";
|
7
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
11
|
const FormSettings = props => {
|
9
12
|
const {
|
10
13
|
editor,
|
@@ -14,7 +17,13 @@ const FormSettings = props => {
|
|
14
17
|
const item_path = path?.split("|").map(m => parseInt(m));
|
15
18
|
const element_path = [...item_path];
|
16
19
|
const element = Node.get(editor, element_path);
|
17
|
-
const styleMaps = formStyle
|
20
|
+
const styleMaps = formStyle;
|
21
|
+
const {
|
22
|
+
hideTools
|
23
|
+
} = customProps || {};
|
24
|
+
const {
|
25
|
+
theme
|
26
|
+
} = useEditorContext();
|
18
27
|
const onChange = data => {
|
19
28
|
const currentPath = ReactEditor.findPath(editor, element);
|
20
29
|
const updateData = {
|
@@ -26,23 +35,110 @@ const FormSettings = props => {
|
|
26
35
|
}, {
|
27
36
|
at: [...currentPath, 0]
|
28
37
|
});
|
38
|
+
// adding form field style to the current form node
|
39
|
+
const currentNode = Node.get(editor, element_path);
|
40
|
+
if (currentNode) {
|
41
|
+
currentNode?.children[0]?.children?.forEach((item, index) => {
|
42
|
+
Transforms.setNodes(editor, {
|
43
|
+
bgColor: data?.fieldBgColor ? data?.fieldBgColor : item?.bgColor,
|
44
|
+
borderColor: data?.fieldBorderColor ? data?.fieldBorderColor : item?.borderColor,
|
45
|
+
borderStyle: data?.fieldBorderStyle ? data?.fieldBorderStyle : item?.borderStyle,
|
46
|
+
borderWidth: data?.fieldBorderWidth ? data?.fieldBorderWidth : item?.borderWidth,
|
47
|
+
textColor: data?.fieldTextColor ? data?.fieldTextColor : item?.textColor,
|
48
|
+
fontFamily: data?.fieldFontFamily ? data?.fieldFontFamily : item?.fontFamily,
|
49
|
+
textSize: data?.fieldTextSize ? data?.fieldTextSize : item?.textSize,
|
50
|
+
fontWeight: data?.fieldFontWeight ? data?.fieldFontWeight : item?.fontWeight
|
51
|
+
}, {
|
52
|
+
at: [...currentPath, 0, index]
|
53
|
+
});
|
54
|
+
});
|
55
|
+
}
|
29
56
|
};
|
30
57
|
const handleClose = () => {
|
31
58
|
console.log("close");
|
32
59
|
};
|
60
|
+
const muiTheme = createTheme({
|
61
|
+
components: {
|
62
|
+
MuiAccordion: {
|
63
|
+
styleOverrides: {
|
64
|
+
root: {
|
65
|
+
background: theme?.palette?.editor?.miniToolBarBackground,
|
66
|
+
"& .MuiAccordionSummary-root": {
|
67
|
+
flexDirection: "row-reverse",
|
68
|
+
"& .MuiSvgIcon-root": {
|
69
|
+
color: theme?.palette?.primary?.main
|
70
|
+
},
|
71
|
+
"& .Mui-expanded": {
|
72
|
+
"& .MuiSvgIcon-root": {
|
73
|
+
color: theme?.palette?.text?.blueText
|
74
|
+
}
|
75
|
+
}
|
76
|
+
},
|
77
|
+
padding: "0px",
|
78
|
+
"&.Mui-expanded": {
|
79
|
+
margin: "0"
|
80
|
+
}
|
81
|
+
}
|
82
|
+
},
|
83
|
+
defaultProps: {
|
84
|
+
elevation: 0
|
85
|
+
}
|
86
|
+
}
|
87
|
+
}
|
88
|
+
});
|
33
89
|
return /*#__PURE__*/_jsx(Box, {
|
34
90
|
component: "div",
|
35
91
|
className: "item-w",
|
36
92
|
children: styleMaps?.map((m, i) => {
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
93
|
+
if (m?.hasChildrenTabs) {
|
94
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
95
|
+
theme: muiTheme,
|
96
|
+
children: /*#__PURE__*/_jsxs(Accordion, {
|
97
|
+
defaultExpanded: true,
|
98
|
+
children: [/*#__PURE__*/_jsx(AccordionSummary, {
|
99
|
+
expandIcon: /*#__PURE__*/_jsx(ExpandMoreOutlined, {}),
|
100
|
+
sx: {
|
101
|
+
padding: "0px"
|
102
|
+
},
|
103
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
104
|
+
variant: "body1",
|
105
|
+
className: "settingsHeader",
|
106
|
+
color: "primary",
|
107
|
+
style: {
|
108
|
+
fontSize: "14px !important",
|
109
|
+
fontWeight: "400"
|
110
|
+
},
|
111
|
+
children: m?.tab
|
112
|
+
})
|
113
|
+
}), /*#__PURE__*/_jsx(AccordionDetails, {
|
114
|
+
sx: {
|
115
|
+
padding: "5px"
|
116
|
+
},
|
117
|
+
children: m?.fields.filter(f => (hideTools || []).indexOf(f.value) === -1).map((field, index) => {
|
118
|
+
return /*#__PURE__*/_jsx(StyleContent, {
|
119
|
+
renderTabs: [field],
|
120
|
+
value: field.value,
|
121
|
+
element: element,
|
122
|
+
onChange: onChange,
|
123
|
+
customElement: element?.children?.[0] || null,
|
124
|
+
customProps: customProps,
|
125
|
+
handleClose: handleClose
|
126
|
+
}, `tab_${field.value}_${index}`);
|
127
|
+
})
|
128
|
+
})]
|
129
|
+
}, `accordion_${i}`)
|
130
|
+
}, i);
|
131
|
+
} else {
|
132
|
+
return /*#__PURE__*/_jsx(StyleContent, {
|
133
|
+
renderTabs: styleMaps,
|
134
|
+
value: m.value,
|
135
|
+
element: element,
|
136
|
+
customElement: element?.children?.[0] || null,
|
137
|
+
onChange: onChange,
|
138
|
+
customProps: customProps,
|
139
|
+
handleClose: handleClose
|
140
|
+
}, `tab_${m.value}_$${i}`);
|
141
|
+
}
|
46
142
|
})
|
47
143
|
});
|
48
144
|
};
|
@@ -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
|
}
|
@@ -3,24 +3,35 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
|
|
3
3
|
import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
|
4
4
|
import useSwitchViewport from "./styles";
|
5
5
|
import { useEffect } from "react";
|
6
|
+
import { useEditorContext } from "../../../hooks/useMouseMove";
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
9
|
const SwitchViewport = props => {
|
9
10
|
const {
|
10
11
|
breakpoint,
|
11
|
-
onChange
|
12
|
+
onChange,
|
13
|
+
show
|
12
14
|
} = props;
|
13
15
|
const classes = useSwitchViewport();
|
16
|
+
const {
|
17
|
+
setSelectedElement,
|
18
|
+
setActiveBreakPoint
|
19
|
+
} = useEditorContext();
|
14
20
|
useEffect(() => {
|
15
|
-
|
21
|
+
// to reset selection on viewport changes - FS-6589
|
22
|
+
setSelectedElement({});
|
16
23
|
}, [breakpoint]);
|
17
24
|
return /*#__PURE__*/_jsxs(Box, {
|
18
25
|
sx: classes.root,
|
26
|
+
style: {
|
27
|
+
display: show ? "block" : "none"
|
28
|
+
},
|
19
29
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
20
30
|
title: "Desktop View",
|
21
31
|
children: /*#__PURE__*/_jsx(IconButton, {
|
22
32
|
className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
|
23
33
|
onClick: () => {
|
34
|
+
setActiveBreakPoint("");
|
24
35
|
onChange("");
|
25
36
|
},
|
26
37
|
children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
|
@@ -30,6 +41,7 @@ const SwitchViewport = props => {
|
|
30
41
|
children: /*#__PURE__*/_jsx(IconButton, {
|
31
42
|
className: `${breakpoint === "xs" ? "active" : ""}`,
|
32
43
|
onClick: () => {
|
44
|
+
setActiveBreakPoint("xs");
|
33
45
|
onChange("xs");
|
34
46
|
},
|
35
47
|
children: /*#__PURE__*/_jsx(PhoneIphoneIcon, {})
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Transforms, Node, Path } from "slate";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
|
+
import { handleNegativeInteger } from "../../../utils/helper";
|
3
4
|
export const ROW_HEIGHT = 50;
|
4
5
|
const MARGIN_OF = {
|
5
6
|
xs: 160,
|
@@ -75,7 +76,7 @@ const reRenderChildNodes = (editor, path) => {
|
|
75
76
|
console.log(err);
|
76
77
|
}
|
77
78
|
};
|
78
|
-
function isContainerElement(editor, moveTopath, props) {
|
79
|
+
function isContainerElement(editor, moveTopath, props, appenBp) {
|
79
80
|
try {
|
80
81
|
const {
|
81
82
|
path,
|
@@ -91,6 +92,7 @@ function isContainerElement(editor, moveTopath, props) {
|
|
91
92
|
parentNode = Node.get(editor, Path.parent(dragItemPath));
|
92
93
|
}
|
93
94
|
const moveToNode = Node.get(editor, moveTopath);
|
95
|
+
const leftOfMoveToNode = moveToNode[`left${appenBp}`];
|
94
96
|
if (moveToNode.type === "freegridBox") {
|
95
97
|
if (parentNode.type === "freegridBox") {
|
96
98
|
// same box
|
@@ -98,10 +100,10 @@ function isContainerElement(editor, moveTopath, props) {
|
|
98
100
|
return props.calX;
|
99
101
|
} else {
|
100
102
|
// for different box
|
101
|
-
return parseInt(props.x - window.innerWidth / 2 + MARGIN_OF[props.breakpoint] - props.diffX -
|
103
|
+
return parseInt(props.x - window.innerWidth / 2 + MARGIN_OF[props.breakpoint] - props.diffX - leftOfMoveToNode);
|
102
104
|
}
|
103
105
|
} else {
|
104
|
-
return props.calX -
|
106
|
+
return props.calX - leftOfMoveToNode;
|
105
107
|
}
|
106
108
|
} else if (moveToNode.type === "freegrid") {
|
107
109
|
if (parentNode.type === "freegridBox") {
|
@@ -133,14 +135,16 @@ export function onDropItem(props, parentClass) {
|
|
133
135
|
const from = parentPath.split("|").map(m => parseInt(m));
|
134
136
|
let newPath = [];
|
135
137
|
newPath = moveTo;
|
136
|
-
const
|
138
|
+
const appenBp = breakpoint === "lg" ? "" : `_${breakpoint}`;
|
139
|
+
const cCalx = isContainerElement(editor, moveTo, props, appenBp);
|
140
|
+
|
137
141
|
// const posX = parseInt(
|
138
142
|
// cx - window.innerWidth / 2 + MARGIN_OF[breakpoint] - diffX
|
139
143
|
// );
|
140
144
|
const toSectionNode = Node.get(editor, newPath);
|
141
145
|
const addToSectionDOM = ReactEditor.toDOMNode(editor, toSectionNode);
|
142
146
|
const rect = addToSectionDOM.getBoundingClientRect();
|
143
|
-
const y = endPosition.y - startPosition.diffY - rect.top;
|
147
|
+
const y = handleNegativeInteger(endPosition.y - startPosition.diffY - rect.top);
|
144
148
|
|
145
149
|
// Calculate grid position
|
146
150
|
const row = Math.floor(y / ROW_HEIGHT) + 1;
|
@@ -150,7 +154,6 @@ export function onDropItem(props, parentClass) {
|
|
150
154
|
|
151
155
|
// Update grid area
|
152
156
|
const gridArea = `${row} / 1 / ${row + 1} / 2`;
|
153
|
-
const appenBp = breakpoint === "lg" ? "" : `_${breakpoint}`;
|
154
157
|
Transforms.setNodes(editor, {
|
155
158
|
[`gridArea${appenBp}`]: gridArea,
|
156
159
|
[`left${appenBp}`]: cCalx,
|
@@ -141,7 +141,11 @@ const VirtualElement = props => {
|
|
141
141
|
sx: classes.root,
|
142
142
|
dangerouslySetInnerHTML: {
|
143
143
|
__html: getItems()
|
144
|
-
}
|
144
|
+
},
|
145
|
+
style: {
|
146
|
+
visibility: "hidden"
|
147
|
+
},
|
148
|
+
"aria-hidden": "true"
|
145
149
|
});
|
146
150
|
};
|
147
151
|
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 } from "../../helper";
|
21
|
+
import { focusSelection, clearSelection, clearSelectionOnly } 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,6 +163,7 @@ const RnD = props => {
|
|
163
163
|
}
|
164
164
|
switch (e.detail) {
|
165
165
|
case 1:
|
166
|
+
clearSelectionOnly(editor); //for selection removal on click outside
|
166
167
|
if (!enable) {
|
167
168
|
setSelectedElement({
|
168
169
|
path: str_path,
|
@@ -533,7 +534,7 @@ const RnD = props => {
|
|
533
534
|
children: [/*#__PURE__*/_jsx("div", {
|
534
535
|
id: `opt_ref_${str_path}`,
|
535
536
|
style: {
|
536
|
-
display: "block",
|
537
|
+
display: readOnly ? "none" : "block",
|
537
538
|
position: "absolute",
|
538
539
|
left: "-8px",
|
539
540
|
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";
|
7
6
|
import SectionPopup from "../../Elements/Grid/SectionPopup";
|
8
7
|
import { getBreakPointsValue, getTRBLBreakPoints, groupByBreakpoint } from "../../helper/theme";
|
9
8
|
import DragHandle from "../DnD/DragHandleButton";
|
10
9
|
import { useEditorSelection } from "../../hooks/useMouseMove";
|
11
10
|
import SectionStyle from "./styles";
|
12
11
|
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: "1px"
|
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(SectionSettingIcon, {})
|
82
82
|
})
|
83
83
|
})
|
84
84
|
}) : null;
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { Select as Core } from "@mui/material";
|
2
|
+
import SelectStyles from "./styles";
|
3
|
+
import { useEditorContext } from "../../hooks/useMouseMove";
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
5
|
+
function Select(props) {
|
6
|
+
const {
|
7
|
+
children,
|
8
|
+
...rest
|
9
|
+
} = props;
|
10
|
+
const {
|
11
|
+
theme
|
12
|
+
} = useEditorContext();
|
13
|
+
const classes = SelectStyles(theme);
|
14
|
+
return /*#__PURE__*/_jsx(Core, {
|
15
|
+
MenuProps: classes.MenuProps,
|
16
|
+
...rest,
|
17
|
+
children: children
|
18
|
+
});
|
19
|
+
}
|
20
|
+
export default Select;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
const SelectStyles = (theme = {}) => {
|
2
|
+
const {
|
3
|
+
textColor,
|
4
|
+
background
|
5
|
+
} = theme?.palette?.editor || {};
|
6
|
+
return {
|
7
|
+
MenuProps: {
|
8
|
+
PaperProps: {
|
9
|
+
sx: {
|
10
|
+
color: textColor,
|
11
|
+
background
|
12
|
+
}
|
13
|
+
}
|
14
|
+
}
|
15
|
+
};
|
16
|
+
};
|
17
|
+
export default SelectStyles;
|
@@ -13,6 +13,7 @@ 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";
|
16
17
|
import SearchButton from "../../Elements/Search/SearchButton";
|
17
18
|
import { jsx as _jsx } from "react/jsx-runtime";
|
18
19
|
const ELEMENTS_LIST = [{
|
@@ -158,7 +159,7 @@ const ELEMENTS_LIST = [{
|
|
158
159
|
renderComponent: rest => /*#__PURE__*/_jsx(SearchButton, {
|
159
160
|
...rest,
|
160
161
|
element: {
|
161
|
-
name:
|
162
|
+
name: "Brain"
|
162
163
|
},
|
163
164
|
icoBtnType: "cmd"
|
164
165
|
})
|
@@ -262,6 +263,17 @@ const ELEMENTS_LIST = [{
|
|
262
263
|
onInsert: editor => {
|
263
264
|
insertInfinityAI(editor);
|
264
265
|
}
|
266
|
+
}, {
|
267
|
+
name: "Dynamic Table",
|
268
|
+
group: "Dynamic Table",
|
269
|
+
desc: "",
|
270
|
+
type: "dataView",
|
271
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
272
|
+
icon: "dataView"
|
273
|
+
}),
|
274
|
+
onInsert: editor => {
|
275
|
+
insertDataView(editor);
|
276
|
+
}
|
265
277
|
}];
|
266
278
|
const elements = props => {
|
267
279
|
const {
|
@@ -60,9 +60,10 @@ const BackgroundImage = props => {
|
|
60
60
|
item: true,
|
61
61
|
xs: 12,
|
62
62
|
style: {
|
63
|
-
backgroundImage: base64 ? `url(${base64})` : "none"
|
64
|
-
height: "200px"
|
63
|
+
backgroundImage: base64 ? `url(${base64})` : "none"
|
64
|
+
// height: "200px",
|
65
65
|
},
|
66
|
+
|
66
67
|
sx: classes.uploadField,
|
67
68
|
children: /*#__PURE__*/_jsx(Grid, {
|
68
69
|
className: "uploadImageSection",
|
@@ -72,6 +73,11 @@ const BackgroundImage = props => {
|
|
72
73
|
children: "REMOVE"
|
73
74
|
}) : /*#__PURE__*/_jsx(Grid, {
|
74
75
|
className: "uploadImageText",
|
76
|
+
sx: {
|
77
|
+
padding: 0,
|
78
|
+
background: `${theme?.palette?.editor?.inputFieldBgColor}`,
|
79
|
+
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
|
80
|
+
},
|
75
81
|
children: /*#__PURE__*/_jsxs(Button, {
|
76
82
|
component: "label",
|
77
83
|
variant: "text",
|
@@ -86,7 +92,7 @@ const BackgroundImage = props => {
|
|
86
92
|
style: {
|
87
93
|
paddingLeft: "8px"
|
88
94
|
},
|
89
|
-
children: "
|
95
|
+
children: "Upload a image"
|
90
96
|
})]
|
91
97
|
})
|
92
98
|
})
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box } from "@mui/material";
|
2
|
+
import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box, IconButton } 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";
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
9
|
const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
|
@@ -81,7 +82,18 @@ const BannerSpacing = props => {
|
|
81
82
|
onChange: handleChange
|
82
83
|
}), /*#__PURE__*/_jsx(Box, {
|
83
84
|
component: "input",
|
84
|
-
sx:
|
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
|
+
},
|
85
97
|
name: "top",
|
86
98
|
value: !lockSpacing ? "" : pro_value?.top,
|
87
99
|
className: "sliderInput",
|
@@ -92,10 +104,22 @@ const BannerSpacing = props => {
|
|
92
104
|
})]
|
93
105
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
94
106
|
className: "ccheckbox-primary",
|
107
|
+
sx: {
|
108
|
+
...classes.customCheckBox
|
109
|
+
},
|
95
110
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
96
111
|
value: !lockSpacing,
|
97
112
|
checked: !lockSpacing,
|
98
|
-
onChange: onLockSpacing
|
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
|
+
})
|
99
123
|
}),
|
100
124
|
label: /*#__PURE__*/_jsx(Typography, {
|
101
125
|
variant: "body1",
|
@@ -135,7 +159,8 @@ const BannerSpacing = props => {
|
|
135
159
|
value: pro_value?.top,
|
136
160
|
className: "borderInput removeScroll",
|
137
161
|
style: {
|
138
|
-
...squreStyle.topRight
|
162
|
+
...squreStyle.topRight,
|
163
|
+
...classes.customPaddingInput
|
139
164
|
},
|
140
165
|
onChange: handleChange,
|
141
166
|
placeholder: "0"
|
@@ -148,7 +173,8 @@ const BannerSpacing = props => {
|
|
148
173
|
value: pro_value?.right,
|
149
174
|
className: "borderInput removeScroll",
|
150
175
|
style: {
|
151
|
-
...squreStyle.bottomLeft
|
176
|
+
...squreStyle.bottomLeft,
|
177
|
+
...classes.customPaddingInput
|
152
178
|
},
|
153
179
|
onChange: handleChange,
|
154
180
|
placeholder: "0"
|
@@ -161,7 +187,8 @@ const BannerSpacing = props => {
|
|
161
187
|
value: pro_value?.bottom,
|
162
188
|
className: "borderInput removeScroll",
|
163
189
|
style: {
|
164
|
-
...squreStyle.bottomRight
|
190
|
+
...squreStyle.bottomRight,
|
191
|
+
...classes.customPaddingInput
|
165
192
|
},
|
166
193
|
onChange: handleChange,
|
167
194
|
placeholder: "0"
|
@@ -174,7 +201,8 @@ const BannerSpacing = props => {
|
|
174
201
|
value: pro_value?.left,
|
175
202
|
className: "borderInput removeScroll",
|
176
203
|
style: {
|
177
|
-
...squreStyle.topLeft
|
204
|
+
...squreStyle.topLeft,
|
205
|
+
...classes.customPaddingInput
|
178
206
|
},
|
179
207
|
onChange: handleChange,
|
180
208
|
placeholder: "0"
|
@@ -1,8 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
|
-
import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box } from "@mui/material";
|
2
|
+
import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box, IconButton } 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";
|
6
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
7
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
8
9
|
const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
@@ -90,10 +91,22 @@ const BorderRadius = props => {
|
|
90
91
|
})]
|
91
92
|
}), /*#__PURE__*/_jsx(FormControlLabel, {
|
92
93
|
className: "ccheckbox-primary",
|
94
|
+
sx: {
|
95
|
+
...classes.customCheckBox
|
96
|
+
},
|
93
97
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
94
98
|
value: !lockRadius,
|
95
99
|
checked: !lockRadius,
|
96
|
-
onChange: onLockRadius
|
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
|
+
})
|
97
110
|
}),
|
98
111
|
label: /*#__PURE__*/_jsx(Typography, {
|
99
112
|
variant: "body1",
|