@flozy/editor 10.4.0 → 10.4.1
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 +17 -16
- package/dist/Editor/CommonEditor.js +134 -18
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +46 -8
- package/dist/Editor/Elements/AI/PopoverAIInput.js +11 -3
- package/dist/Editor/Elements/Accordion/Accordion.js +46 -9
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +1 -23
- package/dist/Editor/Elements/AppHeader/AppHeader.js +10 -5
- package/dist/Editor/Elements/Button/EditorButton.js +27 -9
- package/dist/Editor/Elements/Carousel/CarouselItem.js +2 -1
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +61 -14
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +10 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +15 -13
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +4 -2
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +454 -0
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +23 -8
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +5 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +3 -2
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +11 -0
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +8 -4
- package/dist/Editor/Elements/Embed/Image.js +3 -2
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/EmbedScript/Code.js +14 -2
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +57 -28
- package/dist/Editor/Elements/EmbedScript/styles.js +89 -0
- package/dist/Editor/Elements/Form/Form.js +184 -171
- package/dist/Editor/Elements/Form/FormElements/FormText.js +23 -6
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -2
- package/dist/Editor/Elements/Form/FormField.js +13 -6
- package/dist/Editor/Elements/Form/Workflow/Styles.js +24 -22
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +40 -32
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +7 -4
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -0
- package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
- package/dist/Editor/Elements/FreeGrid/helper.js +115 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +75 -7
- package/dist/Editor/Elements/Grid/Grid.js +14 -2
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +3 -2
- package/dist/Editor/Elements/Search/SearchAttachment.js +40 -9
- package/dist/Editor/Elements/Search/SearchButton.js +9 -8
- package/dist/Editor/Elements/Search/SearchList.js +9 -7
- package/dist/Editor/Elements/Signature/Signature.css +2 -1
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +18 -5
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +16 -3
- package/dist/Editor/Elements/SimpleText/index.js +6 -1
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +0 -1
- package/dist/Editor/Elements/Table/Draggable.js +6 -2
- package/dist/Editor/Elements/Table/Styles.js +7 -0
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +31 -8
- package/dist/Editor/Elements/Title/title.js +6 -6
- package/dist/Editor/Elements/Variables/VariableButton.js +10 -1
- package/dist/Editor/MiniEditor.js +2 -1
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +27 -3
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -3
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +10 -13
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +4 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +167 -42
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +7 -4
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +72 -12
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +100 -27
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +439 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/BackIcon.js +18 -0
- package/dist/Editor/assets/svg/ClearAllRounded.js +31 -0
- package/dist/Editor/assets/svg/ResetIconNew.js +23 -0
- package/dist/Editor/assets/svg/SettingsIcon.js +1 -0
- package/dist/Editor/assets/svg/ThemeIcons.js +293 -0
- package/dist/Editor/common/Checkbox/index.js +46 -0
- package/dist/Editor/common/Checkbox/styles.js +45 -0
- package/dist/Editor/common/ColorPickerButton.js +41 -16
- package/dist/Editor/common/CustomColorPicker/index.js +130 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog2/index.js +94 -0
- package/dist/Editor/common/CustomDialog2/style.js +67 -0
- package/dist/Editor/common/CustomSelect.js +43 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +3 -0
- package/dist/Editor/common/Icon.js +31 -1
- package/dist/Editor/common/ImageSelector/ImageSelector.js +2 -2
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/LinkSettings/NavComponents.js +61 -56
- package/dist/Editor/common/LinkSettings/index.js +82 -80
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
- package/dist/Editor/common/LinkSettings/style.js +209 -74
- package/dist/Editor/common/MentionsPopup/index.js +4 -1
- package/dist/Editor/common/RadioGroup/index.js +48 -0
- package/dist/Editor/common/RadioGroup/styles.js +29 -0
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +13 -15
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +1 -0
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +28 -1
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +6 -5
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +4 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +4 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +3 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/styles.js +146 -12
- package/dist/Editor/common/RnD/OptionsPopup/index.js +8 -5
- package/dist/Editor/common/RnD/OptionsPopup/style.js +120 -19
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +8 -5
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +17 -0
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +6 -3
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +28 -19
- package/dist/Editor/common/RnD/Utils/index.js +3 -1
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +42 -58
- package/dist/Editor/common/RnD/VirtualElement/helper.js +323 -132
- package/dist/Editor/common/RnD/VirtualElement/styles.js +16 -0
- package/dist/Editor/common/RnD/index.js +68 -39
- package/dist/Editor/common/Select/index.js +44 -5
- package/dist/Editor/common/Select/styles.js +31 -2
- package/dist/Editor/common/Shorthands/elements.js +65 -11
- package/dist/Editor/common/SnackBar/index.js +43 -0
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +12 -9
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -2
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +4 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +5 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +12 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +15 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +16 -8
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +36 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +115 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +16 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +3 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +7 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +13 -6
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +5 -7
- package/dist/Editor/common/SwipeableDrawer/style.js +14 -12
- package/dist/Editor/common/Uploader.js +16 -0
- package/dist/Editor/common/iconListV2.js +177 -6
- package/dist/Editor/common/iconslist.js +24 -0
- package/dist/Editor/commonStyle.js +186 -62
- package/dist/Editor/helper/index.js +5 -1
- package/dist/Editor/helper/textIndeces.js +58 -0
- package/dist/Editor/helper/theme.js +203 -2
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +8 -5
- package/dist/Editor/hooks/useTable.js +5 -4
- package/dist/Editor/hooks/useThemeValues.js +63 -0
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +3 -1
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +149 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +82 -0
- package/dist/Editor/themeSettings/buttons/index.js +300 -0
- package/dist/Editor/themeSettings/buttons/style.js +23 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +310 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +81 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +240 -0
- package/dist/Editor/themeSettings/fonts/style.js +62 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +380 -0
- package/dist/Editor/themeSettings/style.js +299 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +355 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +202 -0
- package/dist/Editor/themeSettingsAI/style.js +332 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +172 -46
- package/dist/Editor/utils/accordion.js +14 -4
- package/dist/Editor/utils/button.js +1 -17
- package/dist/Editor/utils/customHooks/useTableResize.js +49 -9
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/events.js +50 -6
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/form.js +4 -4
- package/dist/Editor/utils/formfield.js +9 -2
- package/dist/Editor/utils/helper.js +210 -26
- package/dist/Editor/utils/insertAppHeader.js +1 -1
- package/dist/Editor/utils/signature.js +2 -9
- package/dist/Editor/utils/updateFormName.js +22 -0
- package/package.json +4 -4
@@ -12,7 +12,7 @@ import GuideLines from "./GuideLines";
|
|
12
12
|
import ShadowElement from "./ShadowElement";
|
13
13
|
import BoundaryLine from "./GuideLines/BoundaryLine";
|
14
14
|
import ContextMenu from "./ContextMenu";
|
15
|
-
import VirtualElement from "./VirtualElement";
|
15
|
+
// import VirtualElement from "./VirtualElement";
|
16
16
|
import { ItemTypes } from "./ElementSettings/settingsConstants";
|
17
17
|
import { selectText } from "../../utils/helper";
|
18
18
|
import { removeSign } from "./ElementSettings/OtherSettings";
|
@@ -20,7 +20,7 @@ import useDragging from "../../hooks/useDragging";
|
|
20
20
|
import { dragOverOn } from "../../helper/RnD/focusNode";
|
21
21
|
import { focusSelection, clearSelection, clearSelectionOnly } from "../../helper";
|
22
22
|
// import { reRenderChildNodes } from "./Utils/gridDropItem";
|
23
|
-
import VirtualTextElement from "./VirtualElement/VirtualTextElement";
|
23
|
+
import VirtualTextElement, { updateTextHeight } from "./VirtualElement/VirtualTextElement";
|
24
24
|
import useAutoScroll from "../../hooks/useAutoScroll";
|
25
25
|
import ForceAutoAlignment from "./VirtualElement/ForceAutoAlignment";
|
26
26
|
import BoxHeaderAutoAlignment from "./VirtualElement/BoxHeaderAutoAlignment";
|
@@ -29,6 +29,18 @@ import { useFreeGrid } from "../../Elements/FreeGrid/FreeGrid";
|
|
29
29
|
import { jsx as _jsx } from "react/jsx-runtime";
|
30
30
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
31
31
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
32
|
+
function getTextElementHeight(textElement) {
|
33
|
+
let totalHeight = 0;
|
34
|
+
if (textElement) {
|
35
|
+
textElement.childNodes.forEach(node => {
|
36
|
+
if (node.textContent.trim()) {
|
37
|
+
const el = node;
|
38
|
+
totalHeight += el.offsetHeight || el.getBoundingClientRect().height;
|
39
|
+
}
|
40
|
+
});
|
41
|
+
}
|
42
|
+
return totalHeight;
|
43
|
+
}
|
32
44
|
const ITEM_TYPES = ["child", "parent-container"];
|
33
45
|
const EDIT_MODES = ["text", "form", "table"];
|
34
46
|
const DISABLE_RESIZING = {
|
@@ -77,7 +89,8 @@ const RnD = props => {
|
|
77
89
|
autoAlign,
|
78
90
|
setAutoAlign,
|
79
91
|
isBoxHeader,
|
80
|
-
customProps
|
92
|
+
customProps,
|
93
|
+
xsHidden
|
81
94
|
} = props;
|
82
95
|
const {
|
83
96
|
isSelectedElement,
|
@@ -127,10 +140,11 @@ const RnD = props => {
|
|
127
140
|
isInteracting,
|
128
141
|
handleStart,
|
129
142
|
handleStop
|
130
|
-
} = useFreeGrid()
|
143
|
+
} = useFreeGrid();
|
131
144
|
const {
|
132
145
|
translation
|
133
146
|
} = customProps;
|
147
|
+
const timerId = useRef(0);
|
134
148
|
useEffect(() => {
|
135
149
|
if (ITEM_TYPES.includes(type)) {
|
136
150
|
if (enable === 1) {
|
@@ -140,6 +154,24 @@ const RnD = props => {
|
|
140
154
|
setAbsPosition({});
|
141
155
|
}
|
142
156
|
}
|
157
|
+
const currElement = getCurrentEle();
|
158
|
+
const textElement = currElement?.querySelector(".fgi_type_text");
|
159
|
+
if (breakpoint && textElement && childType === "text" && !enable) {
|
160
|
+
timerId.current = setTimeout(() => {
|
161
|
+
// const { clientHeight } = textElement;
|
162
|
+
const clientHeight = getTextElementHeight(textElement);
|
163
|
+
const {
|
164
|
+
height
|
165
|
+
} = delta || {};
|
166
|
+
const heightDiff = Math.abs(clientHeight - height);
|
167
|
+
if (clientHeight && height && heightDiff >= 5) {
|
168
|
+
updateTextHeight(editor, path, clientHeight, breakpoint);
|
169
|
+
const parentSectionPath = path.slice(0, 2);
|
170
|
+
reRenderChildNodes(editor, parentSectionPath);
|
171
|
+
}
|
172
|
+
}, 200);
|
173
|
+
}
|
174
|
+
return () => clearTimeout(timerId.current);
|
143
175
|
}, [enable]);
|
144
176
|
const getCurrentEle = () => {
|
145
177
|
return positionRef.current?.resizableElement?.current;
|
@@ -499,7 +531,9 @@ const RnD = props => {
|
|
499
531
|
ref
|
500
532
|
}, ".freegrid-container-parent");
|
501
533
|
const formatParentPath = parentPath?.split("|")?.map(m => parseInt(m));
|
502
|
-
|
534
|
+
if (formatParentPath) {
|
535
|
+
reRenderChildNodes(editor, formatParentPath);
|
536
|
+
}
|
503
537
|
};
|
504
538
|
const onCloseSettings = () => {
|
505
539
|
setSelectedElement({
|
@@ -632,32 +666,34 @@ const RnD = props => {
|
|
632
666
|
"data-dragoverid": str_path,
|
633
667
|
"data-dragovertype": type
|
634
668
|
}) : null]
|
635
|
-
}, eId),
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
|
647
|
-
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
|
652
|
-
|
653
|
-
|
654
|
-
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
|
659
|
-
|
660
|
-
|
669
|
+
}, eId), xsHidden && breakpoint === "xs" ? null : /*#__PURE__*/_jsxs(_Fragment, {
|
670
|
+
children: [/*#__PURE__*/_jsx(ElementSettings, {
|
671
|
+
open: Boolean(currentAction),
|
672
|
+
currentAction: currentAction,
|
673
|
+
anchorEl: rndRef?.current,
|
674
|
+
placement: "right-start",
|
675
|
+
onClose: onCloseSettings,
|
676
|
+
childType: childType,
|
677
|
+
editor: editor,
|
678
|
+
path: sp,
|
679
|
+
...settingsProps,
|
680
|
+
elementProps: elementProps,
|
681
|
+
theme: theme
|
682
|
+
}), !active && rndRef?.current && open && !isInteracting ? /*#__PURE__*/_jsx(ElementOptions, {
|
683
|
+
id: `opt_ref_${str_path}`,
|
684
|
+
open: open,
|
685
|
+
anchorEl: rndRef?.current,
|
686
|
+
enable: enable,
|
687
|
+
handleAction: handleAction,
|
688
|
+
actions: actions,
|
689
|
+
actionsMap: actionsMap,
|
690
|
+
optionsProps: optionsProps,
|
691
|
+
selectedAction: currentAction,
|
692
|
+
path: str_path,
|
693
|
+
theme: theme,
|
694
|
+
translation: translation,
|
695
|
+
customProps: customProps
|
696
|
+
}) : null]
|
661
697
|
}), dragInfoOpen ? /*#__PURE__*/_jsx(DragInfo, {
|
662
698
|
anchorEl: rndRef?.current,
|
663
699
|
open: dragInfoOpen,
|
@@ -681,14 +717,7 @@ const RnD = props => {
|
|
681
717
|
handleClose: handleClose,
|
682
718
|
theme: theme,
|
683
719
|
translation: translation
|
684
|
-
}),
|
685
|
-
updated_at: updated_at,
|
686
|
-
path: str_path,
|
687
|
-
editor: editor,
|
688
|
-
sectionElement: sectionElement,
|
689
|
-
sectionCls: `.freegrid-section_${path.join("_")}`,
|
690
|
-
dataSets: dataSets
|
691
|
-
}) : null, childType === "text" && breakpoint === "lg" && !readOnly && enable ? /*#__PURE__*/_jsx(VirtualTextElement, {
|
720
|
+
}), childType === "text" && breakpoint === "lg" && !readOnly && enable ? /*#__PURE__*/_jsx(VirtualTextElement, {
|
692
721
|
editor: editor,
|
693
722
|
dataSets: dataSets,
|
694
723
|
getCurrentEle: getCurrentEle,
|
@@ -1,20 +1,59 @@
|
|
1
|
-
import { Select as Core } from "@mui/material";
|
1
|
+
import { Select as Core, MenuItem, Typography } from "@mui/material";
|
2
2
|
import SelectStyles from "./styles";
|
3
3
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
4
|
+
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
7
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
5
8
|
function Select(props) {
|
6
9
|
const {
|
7
10
|
children,
|
11
|
+
value,
|
12
|
+
onChange,
|
13
|
+
options,
|
14
|
+
label,
|
15
|
+
labelProps,
|
16
|
+
showDefault,
|
17
|
+
translation,
|
8
18
|
...rest
|
9
19
|
} = props;
|
10
20
|
const {
|
11
21
|
theme
|
12
22
|
} = useEditorContext();
|
13
23
|
const classes = SelectStyles(theme);
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
24
|
+
const menuOptions = showDefault ? [{
|
25
|
+
label: "None",
|
26
|
+
value: ""
|
27
|
+
}, ...(options || [])] : options;
|
28
|
+
return /*#__PURE__*/_jsxs(_Fragment, {
|
29
|
+
children: [label ? /*#__PURE__*/_jsx(Typography, {
|
30
|
+
variant: "body2",
|
31
|
+
sx: {
|
32
|
+
paddingBottom: "4px"
|
33
|
+
},
|
34
|
+
...(labelProps || {}),
|
35
|
+
children: label
|
36
|
+
}) : null, /*#__PURE__*/_jsx(Core, {
|
37
|
+
size: "small",
|
38
|
+
fullWidth: true,
|
39
|
+
defaultValue: "",
|
40
|
+
value: value || "",
|
41
|
+
onChange: onChange,
|
42
|
+
sx: classes.select,
|
43
|
+
MenuProps: classes.MenuProps,
|
44
|
+
IconComponent: KeyboardArrowDownRoundedIcon,
|
45
|
+
displayEmpty: true,
|
46
|
+
...rest,
|
47
|
+
children: menuOptions?.map((option, i) => {
|
48
|
+
return /*#__PURE__*/_jsx(MenuItem, {
|
49
|
+
value: option.value,
|
50
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
51
|
+
variant: "body2",
|
52
|
+
children: translation(option.label)
|
53
|
+
})
|
54
|
+
}, i);
|
55
|
+
})
|
56
|
+
})]
|
18
57
|
});
|
19
58
|
}
|
20
59
|
export default Select;
|
@@ -1,16 +1,45 @@
|
|
1
1
|
const SelectStyles = (theme = {}) => {
|
2
2
|
const {
|
3
3
|
textColor,
|
4
|
-
|
4
|
+
textWeightPopUpBackground,
|
5
|
+
menuOptionSelectedOption
|
5
6
|
} = theme?.palette?.editor || {};
|
6
7
|
return {
|
7
8
|
MenuProps: {
|
9
|
+
disablePortal: true,
|
10
|
+
sx: {
|
11
|
+
zIndex: "1302 !important"
|
12
|
+
},
|
8
13
|
PaperProps: {
|
9
14
|
sx: {
|
15
|
+
background: textWeightPopUpBackground,
|
10
16
|
color: textColor,
|
11
|
-
|
17
|
+
borderRadius: "8px",
|
18
|
+
marginTop: "2px",
|
19
|
+
"& li": {
|
20
|
+
padding: "6px 16px",
|
21
|
+
margin: "5px !important",
|
22
|
+
borderRadius: "4px !important"
|
23
|
+
},
|
24
|
+
"& .MuiList-root": {
|
25
|
+
padding: "0px"
|
26
|
+
},
|
27
|
+
"& .MuiTypography-root": {
|
28
|
+
fontSize: "12px !important",
|
29
|
+
fontWeight: 500,
|
30
|
+
fontFamily: "'Inter',sans-serif"
|
31
|
+
},
|
32
|
+
"& .Mui-selected": {
|
33
|
+
background: menuOptionSelectedOption,
|
34
|
+
color: textColor
|
35
|
+
}
|
12
36
|
}
|
13
37
|
}
|
38
|
+
},
|
39
|
+
select: {
|
40
|
+
"& .MuiSelect-icon": {
|
41
|
+
color: "#64748B !important"
|
42
|
+
}
|
14
43
|
}
|
15
44
|
};
|
16
45
|
};
|
@@ -18,6 +18,17 @@ import SearchButton from "../../Elements/Search/SearchButton";
|
|
18
18
|
import canOpen from "../../helper/canOpen";
|
19
19
|
import { jsx as _jsx } from "react/jsx-runtime";
|
20
20
|
const ELEMENTS_LIST = [{
|
21
|
+
name: "Ask AI to write anything",
|
22
|
+
group: "Infinity AI",
|
23
|
+
desc: "",
|
24
|
+
type: "infinityAI",
|
25
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
26
|
+
icon: "infinityIcon"
|
27
|
+
}),
|
28
|
+
onInsert: editor => {
|
29
|
+
insertInfinityAI(editor);
|
30
|
+
}
|
31
|
+
}, {
|
21
32
|
name: "Heading 1",
|
22
33
|
desc: "",
|
23
34
|
group: "Text",
|
@@ -44,6 +55,60 @@ const ELEMENTS_LIST = [{
|
|
44
55
|
icon: "headingThree"
|
45
56
|
}),
|
46
57
|
onInsert: editor => toggleBlock(editor, "headingThree", false)
|
58
|
+
}, {
|
59
|
+
name: "Heading 4",
|
60
|
+
desc: "",
|
61
|
+
group: "Text",
|
62
|
+
type: "headingFour",
|
63
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
64
|
+
icon: "headingFour"
|
65
|
+
}),
|
66
|
+
onInsert: editor => toggleBlock(editor, "headingFour", false)
|
67
|
+
}, {
|
68
|
+
name: "Heading 5",
|
69
|
+
desc: "",
|
70
|
+
group: "Text",
|
71
|
+
type: "headingFive",
|
72
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
73
|
+
icon: "headingFive"
|
74
|
+
}),
|
75
|
+
onInsert: editor => toggleBlock(editor, "headingFive", false)
|
76
|
+
}, {
|
77
|
+
name: "Heading 6",
|
78
|
+
desc: "",
|
79
|
+
group: "Text",
|
80
|
+
type: "headingSix",
|
81
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
82
|
+
icon: "headingSix"
|
83
|
+
}),
|
84
|
+
onInsert: editor => toggleBlock(editor, "headingSix", false)
|
85
|
+
}, {
|
86
|
+
name: "Paragraph 1",
|
87
|
+
desc: "",
|
88
|
+
group: "Text",
|
89
|
+
type: "paragraphOne",
|
90
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
91
|
+
icon: "paragraphOne"
|
92
|
+
}),
|
93
|
+
onInsert: editor => toggleBlock(editor, "paragraphOne", false)
|
94
|
+
}, {
|
95
|
+
name: "Paragraph 2",
|
96
|
+
desc: "",
|
97
|
+
group: "Text",
|
98
|
+
type: "paragraphTwo",
|
99
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
100
|
+
icon: "paragraphTwo"
|
101
|
+
}),
|
102
|
+
onInsert: editor => toggleBlock(editor, "paragraphTwo", false)
|
103
|
+
}, {
|
104
|
+
name: "Paragraph 3",
|
105
|
+
desc: "",
|
106
|
+
group: "Text",
|
107
|
+
type: "paragraphThree",
|
108
|
+
icon: /*#__PURE__*/_jsx(Icon, {
|
109
|
+
icon: "paragraphThree"
|
110
|
+
}),
|
111
|
+
onInsert: editor => toggleBlock(editor, "paragraphThree", false)
|
47
112
|
}, {
|
48
113
|
name: "Quote",
|
49
114
|
desc: "",
|
@@ -276,17 +341,6 @@ const ELEMENTS_LIST = [{
|
|
276
341
|
onInsert: editor => {
|
277
342
|
insertForm(editor);
|
278
343
|
}
|
279
|
-
}, {
|
280
|
-
name: "Ask AI to write anything",
|
281
|
-
group: "Infinity AI",
|
282
|
-
desc: "",
|
283
|
-
type: "infinityAI",
|
284
|
-
icon: /*#__PURE__*/_jsx(Icon, {
|
285
|
-
icon: "infinityIcon"
|
286
|
-
}),
|
287
|
-
onInsert: editor => {
|
288
|
-
insertInfinityAI(editor);
|
289
|
-
}
|
290
344
|
}, {
|
291
345
|
name: "Dynamic Table",
|
292
346
|
group: "Dynamic Table",
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import Snackbar from "@mui/material/Snackbar";
|
2
|
+
import Alert from "@mui/material/Alert";
|
3
|
+
import { useState } from "react";
|
4
|
+
import { useEditorContext } from "../../hooks/useMouseMove";
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
6
|
+
const SnackbarAlert = ({
|
7
|
+
message,
|
8
|
+
setShowSnackBar,
|
9
|
+
severity = "info"
|
10
|
+
}) => {
|
11
|
+
const [open, setOpen] = useState(!!message);
|
12
|
+
const {
|
13
|
+
theme
|
14
|
+
} = useEditorContext();
|
15
|
+
return /*#__PURE__*/_jsx(Snackbar, {
|
16
|
+
open: open,
|
17
|
+
autoHideDuration: 3000,
|
18
|
+
onClose: () => {
|
19
|
+
setOpen(false);
|
20
|
+
setShowSnackBar(false);
|
21
|
+
},
|
22
|
+
anchorOrigin: {
|
23
|
+
vertical: "top",
|
24
|
+
horizontal: "right"
|
25
|
+
},
|
26
|
+
children: /*#__PURE__*/_jsx(Alert, {
|
27
|
+
severity: severity,
|
28
|
+
onClose: () => {
|
29
|
+
setOpen(false);
|
30
|
+
setShowSnackBar(false);
|
31
|
+
},
|
32
|
+
sx: {
|
33
|
+
background: theme?.palette?.primary?.gradientBtn,
|
34
|
+
color: "#FFFFFF",
|
35
|
+
"& .MuiAlert-icon": {
|
36
|
+
color: "#FFFFFF"
|
37
|
+
}
|
38
|
+
},
|
39
|
+
children: message
|
40
|
+
})
|
41
|
+
});
|
42
|
+
};
|
43
|
+
export default SnackbarAlert;
|
@@ -8,11 +8,11 @@ const accordionTitleBtnStyle = [{
|
|
8
8
|
needPreview: true,
|
9
9
|
hideGradient: true
|
10
10
|
}, {
|
11
|
-
label: "
|
11
|
+
label: "Background Color",
|
12
12
|
key: "accordionBgColor",
|
13
13
|
type: "color"
|
14
14
|
}, {
|
15
|
-
label: "
|
15
|
+
label: "Border Color",
|
16
16
|
key: "accordionBorderColor",
|
17
17
|
type: "color"
|
18
18
|
}]
|
@@ -6,15 +6,18 @@ const accordionTitleStyle = [{
|
|
6
6
|
key: "textColor",
|
7
7
|
type: "color",
|
8
8
|
needPreview: true
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
}
|
10
|
+
// {
|
11
|
+
// label: "Background Color",
|
12
|
+
// key: "bgColor",
|
13
|
+
// type: "color",
|
14
|
+
// },
|
15
|
+
// {
|
16
|
+
// label: "Border Color",
|
17
|
+
// key: "borderColor",
|
18
|
+
// type: "color",
|
19
|
+
// },
|
20
|
+
]
|
18
21
|
}, {
|
19
22
|
tab: "Banner Spacing",
|
20
23
|
value: "bannerSpacing",
|
@@ -21,7 +21,8 @@ const buttonStyle = [{
|
|
21
21
|
},
|
22
22
|
children: option.text
|
23
23
|
});
|
24
|
-
}
|
24
|
+
},
|
25
|
+
themeEnabled: true
|
25
26
|
}, {
|
26
27
|
label: "Font Size",
|
27
28
|
key: "textSize",
|
@@ -45,7 +46,8 @@ const buttonStyle = [{
|
|
45
46
|
}, {
|
46
47
|
label: "Button Color",
|
47
48
|
key: "bgColor",
|
48
|
-
type: "color"
|
49
|
+
type: "color",
|
50
|
+
themeEnabled: true
|
49
51
|
}, {
|
50
52
|
label: "Border Color",
|
51
53
|
key: "borderColor",
|
@@ -76,6 +76,11 @@ const BackgroundImage = props => {
|
|
76
76
|
children: translation("REMOVE")
|
77
77
|
}) : /*#__PURE__*/_jsx(Grid, {
|
78
78
|
className: "uploadImageText",
|
79
|
+
sx: {
|
80
|
+
padding: 0,
|
81
|
+
background: `${theme?.palette?.editor?.inputFieldBgColor}`,
|
82
|
+
border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
|
83
|
+
},
|
79
84
|
children: /*#__PURE__*/_jsxs(Button, {
|
80
85
|
component: "label",
|
81
86
|
variant: "text",
|
@@ -3,13 +3,13 @@ import { Checkbox, FormControlLabel, Grid, Slider, Typography, Box, IconButton }
|
|
3
3
|
import { squreStyle } from "./radiusStyle";
|
4
4
|
import { getBreakPointsValue } from "../../../helper/theme";
|
5
5
|
import useWindowResize from "../../../hooks/useWindowResize";
|
6
|
+
import { useEditorTheme } from "../../../hooks/useEditorTheme";
|
6
7
|
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const BANNER_SPACING_KEYS = ["top", "left", "right", "bottom"];
|
10
11
|
const BannerSpacing = props => {
|
11
12
|
const {
|
12
|
-
value: val,
|
13
13
|
data,
|
14
14
|
onChange,
|
15
15
|
elementProps,
|
@@ -23,7 +23,17 @@ const BannerSpacing = props => {
|
|
23
23
|
key
|
24
24
|
} = data;
|
25
25
|
const lockKeyVal = `lock${key}`;
|
26
|
-
|
26
|
+
const {
|
27
|
+
selectedTheme
|
28
|
+
} = useEditorTheme();
|
29
|
+
const {
|
30
|
+
bannerSpacing,
|
31
|
+
lockbannerSpacing
|
32
|
+
} = selectedTheme?.elementProps?.button || {};
|
33
|
+
const isUserValue = Object.keys(props?.value || {})?.length;
|
34
|
+
const isUserLockedSpacing = typeof elementProps[lockKeyVal] === "boolean";
|
35
|
+
const val = isUserValue ? props?.value : bannerSpacing;
|
36
|
+
let lockSpacing = isUserLockedSpacing ? elementProps[lockKeyVal] : lockbannerSpacing;
|
27
37
|
if (lockSpacing === undefined) {
|
28
38
|
lockSpacing = true;
|
29
39
|
}
|
@@ -3,13 +3,13 @@ import { Grid, Typography, Slider, FormControlLabel, Checkbox, Box, IconButton }
|
|
3
3
|
import { radiusStyle } from "./radiusStyle";
|
4
4
|
import useWindowResize from "../../../hooks/useWindowResize";
|
5
5
|
import { getBreakPointsValue, getCustomizationValue } from "../../../helper/theme";
|
6
|
+
import { useEditorTheme } from "../../../hooks/useEditorTheme";
|
6
7
|
import { CheckedBoxCheckIcon } from "../../iconListV2";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const BORDER_RADIUS_KEYS = ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
10
11
|
const BorderRadius = props => {
|
11
12
|
const {
|
12
|
-
value: val,
|
13
13
|
data,
|
14
14
|
onChange,
|
15
15
|
elementProps,
|
@@ -19,16 +19,24 @@ const BorderRadius = props => {
|
|
19
19
|
const {
|
20
20
|
translation
|
21
21
|
} = customProps;
|
22
|
-
let {
|
23
|
-
lockRadius
|
24
|
-
} = elementProps;
|
25
|
-
if (lockRadius === undefined) {
|
26
|
-
lockRadius = true;
|
27
|
-
}
|
28
22
|
const {
|
29
23
|
key
|
30
24
|
} = data;
|
31
25
|
const [size] = useWindowResize();
|
26
|
+
const {
|
27
|
+
selectedTheme
|
28
|
+
} = useEditorTheme();
|
29
|
+
const {
|
30
|
+
borderRadius,
|
31
|
+
lockRadius: themeLockRadius
|
32
|
+
} = selectedTheme?.elementProps?.button || {};
|
33
|
+
const isUserValue = Object.keys(props?.value || {})?.length;
|
34
|
+
const isUserLockedRadius = typeof elementProps?.lockRadius === "boolean";
|
35
|
+
const val = isUserValue ? props?.value : borderRadius;
|
36
|
+
let lockRadius = isUserLockedRadius ? elementProps?.lockRadius : themeLockRadius;
|
37
|
+
if (lockRadius === undefined) {
|
38
|
+
lockRadius = true;
|
39
|
+
}
|
32
40
|
const value = getBreakPointsValue(val, size?.device);
|
33
41
|
const handleChange = e => {
|
34
42
|
let changeAll = {};
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
|
2
2
|
import React from "react";
|
3
3
|
import Icon from "../../Icon";
|
4
|
+
import { useEditorContext } from "../../../hooks/useMouseMove";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
6
7
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -15,14 +16,17 @@ const RenderCard = ({
|
|
15
16
|
}) => {
|
16
17
|
return /*#__PURE__*/_jsx(Card, {
|
17
18
|
sx: {
|
18
|
-
position:
|
19
|
-
padding: "10px"
|
19
|
+
position: "relative",
|
20
|
+
padding: "10px",
|
21
|
+
"& .MuiCheckbox-root svg": {
|
22
|
+
fill: "unset !important"
|
23
|
+
}
|
20
24
|
},
|
21
25
|
children: /*#__PURE__*/_jsx(FormControlLabel, {
|
22
26
|
control: /*#__PURE__*/_jsx(Checkbox, {
|
23
27
|
sx: {
|
24
28
|
padding: 0,
|
25
|
-
marginTop:
|
29
|
+
marginTop: "3px"
|
26
30
|
},
|
27
31
|
onChange: handleChange,
|
28
32
|
checked: value,
|
@@ -58,10 +62,10 @@ const RenderCard = ({
|
|
58
62
|
})
|
59
63
|
}),
|
60
64
|
sx: {
|
61
|
-
width:
|
62
|
-
display:
|
63
|
-
justifyContent:
|
64
|
-
alignItems:
|
65
|
+
width: "100%",
|
66
|
+
display: "flex",
|
67
|
+
justifyContent: "space-between",
|
68
|
+
alignItems: "flex-start",
|
65
69
|
margin: 0
|
66
70
|
},
|
67
71
|
labelPlacement: "start"
|
@@ -83,6 +87,9 @@ const CardsMapping = props => {
|
|
83
87
|
selectedCard,
|
84
88
|
infoIcon
|
85
89
|
} = data;
|
90
|
+
const {
|
91
|
+
theme
|
92
|
+
} = useEditorContext();
|
86
93
|
const {
|
87
94
|
translation
|
88
95
|
} = customProps;
|
@@ -104,7 +111,8 @@ const CardsMapping = props => {
|
|
104
111
|
sx: {
|
105
112
|
marginBottom: "12px",
|
106
113
|
"& .MuiPaper-root": {
|
107
|
-
|
114
|
+
background: theme?.palette?.editor?.miniToolBarBackground,
|
115
|
+
border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
|
108
116
|
borderRadius: "8px",
|
109
117
|
boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
|
110
118
|
}
|