@flozy/editor 10.3.8 → 10.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 +16 -17
- package/dist/Editor/CommonEditor.js +18 -134
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +8 -46
- package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
- package/dist/Editor/Elements/Accordion/Accordion.js +9 -46
- package/dist/Editor/Elements/Accordion/AccordionSummary.js +23 -1
- package/dist/Editor/Elements/AppHeader/AppHeader.js +5 -10
- package/dist/Editor/Elements/Button/EditorButton.js +9 -27
- package/dist/Editor/Elements/Carousel/CarouselItem.js +1 -2
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
- package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +2 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +8 -23
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +2 -5
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +2 -3
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -11
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +4 -8
- package/dist/Editor/Elements/Embed/Image.js +2 -3
- package/dist/Editor/Elements/Embed/Video.js +1 -1
- package/dist/Editor/Elements/EmbedScript/Code.js +2 -14
- package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +28 -57
- package/dist/Editor/Elements/Form/Form.js +171 -184
- package/dist/Editor/Elements/Form/FormElements/FormText.js +6 -23
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +2 -2
- package/dist/Editor/Elements/Form/FormField.js +6 -13
- package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +32 -40
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +4 -7
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +0 -1
- package/dist/Editor/Elements/FreeGrid/Options/More.js +8 -8
- package/dist/Editor/Elements/FreeGrid/styles.js +7 -75
- package/dist/Editor/Elements/Grid/Grid.js +2 -14
- package/dist/Editor/Elements/Grid/GridItem.js +1 -1
- package/dist/Editor/Elements/List/CheckList.js +2 -3
- package/dist/Editor/Elements/Search/SearchAttachment.js +9 -40
- package/dist/Editor/Elements/Search/SearchButton.js +8 -9
- package/dist/Editor/Elements/Search/SearchList.js +7 -9
- package/dist/Editor/Elements/Signature/Signature.css +1 -2
- package/dist/Editor/Elements/Signature/SignatureOptions/DrawSignature.js +5 -18
- package/dist/Editor/Elements/Signature/SignatureOptions/UploadSignature.js +3 -16
- package/dist/Editor/Elements/SimpleText/index.js +1 -6
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/DragButton.js +1 -0
- package/dist/Editor/Elements/Table/Draggable.js +2 -6
- package/dist/Editor/Elements/Table/Styles.js +0 -7
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +8 -31
- package/dist/Editor/Elements/Title/title.js +6 -6
- package/dist/Editor/Elements/Variables/VariableButton.js +1 -10
- package/dist/Editor/MiniEditor.js +1 -2
- package/dist/Editor/Styles/EditorStyles.js +5 -5
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +13 -10
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +2 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -7
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -72
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +27 -100
- package/dist/Editor/Toolbar/PopupTool/index.js +1 -1
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/assets/svg/SettingsIcon.js +0 -1
- package/dist/Editor/common/ColorPickerButton.js +16 -41
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +0 -3
- package/dist/Editor/common/Icon.js +1 -31
- package/dist/Editor/common/ImageSelector/ImageSelector.js +2 -2
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/LinkSettings/NavComponents.js +56 -61
- package/dist/Editor/common/LinkSettings/index.js +81 -82
- package/dist/Editor/common/LinkSettings/navOptions.js +2 -2
- package/dist/Editor/common/LinkSettings/style.js +74 -209
- package/dist/Editor/common/RnD/ElementOptions/Actions.js +15 -13
- package/dist/Editor/common/RnD/ElementOptions/Icons/LinkIcon.js +0 -1
- package/dist/Editor/common/RnD/ElementOptions/index.js +2 -2
- package/dist/Editor/common/RnD/ElementOptions/styles.js +1 -28
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +5 -6
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Signature.js +3 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -4
- package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +1 -3
- package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/ElementSettings/styles.js +12 -146
- package/dist/Editor/common/RnD/OptionsPopup/index.js +5 -8
- package/dist/Editor/common/RnD/OptionsPopup/style.js +19 -120
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +5 -8
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +19 -28
- package/dist/Editor/common/RnD/Utils/index.js +1 -3
- package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +58 -42
- package/dist/Editor/common/RnD/VirtualElement/helper.js +132 -323
- package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -16
- package/dist/Editor/common/RnD/index.js +39 -68
- package/dist/Editor/common/Select/index.js +5 -44
- package/dist/Editor/common/Select/styles.js +2 -30
- package/dist/Editor/common/Shorthands/elements.js +11 -65
- package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +2 -2
- package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +9 -12
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
- package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
- package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +8 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +7 -16
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +6 -7
- package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +6 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +7 -5
- package/dist/Editor/common/SwipeableDrawer/style.js +12 -14
- package/dist/Editor/common/Uploader.js +0 -16
- package/dist/Editor/common/iconListV2.js +6 -177
- package/dist/Editor/common/iconslist.js +0 -24
- package/dist/Editor/commonStyle.js +62 -186
- package/dist/Editor/helper/index.js +1 -5
- package/dist/Editor/helper/theme.js +2 -203
- package/dist/Editor/hooks/useMouseMove.js +5 -8
- package/dist/Editor/hooks/useTable.js +4 -5
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +1 -3
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +46 -172
- package/dist/Editor/utils/accordion.js +4 -14
- package/dist/Editor/utils/button.js +17 -1
- package/dist/Editor/utils/customHooks/useTableResize.js +9 -49
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/events.js +6 -50
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/form.js +4 -4
- package/dist/Editor/utils/formfield.js +2 -9
- package/dist/Editor/utils/helper.js +26 -188
- package/dist/Editor/utils/insertAppHeader.js +1 -1
- package/dist/Editor/utils/signature.js +9 -2
- package/package.json +4 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/MultiSelect.js +0 -454
- package/dist/Editor/Elements/EmbedScript/styles.js +0 -89
- package/dist/Editor/Elements/FreeGrid/helper.js +0 -115
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
- package/dist/Editor/assets/svg/BackIcon.js +0 -18
- package/dist/Editor/assets/svg/ClearAllRounded.js +0 -31
- package/dist/Editor/assets/svg/ResetIconNew.js +0 -23
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
- package/dist/Editor/common/Checkbox/index.js +0 -46
- package/dist/Editor/common/Checkbox/styles.js +0 -45
- package/dist/Editor/common/CustomColorPicker/index.js +0 -130
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog2/index.js +0 -94
- package/dist/Editor/common/CustomDialog2/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -43
- package/dist/Editor/common/RadioGroup/index.js +0 -48
- package/dist/Editor/common/RadioGroup/styles.js +0 -29
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/SnackBar/index.js +0 -43
- package/dist/Editor/common/StyleBuilder/fieldTypes/embedUpload.js +0 -115
- package/dist/Editor/helper/textIndeces.js +0 -58
- package/dist/Editor/hooks/useEditorTheme.js +0 -153
- package/dist/Editor/hooks/useThemeValues.js +0 -63
- package/dist/Editor/theme/index.js +0 -149
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
- package/dist/Editor/themeSettings/buttons/index.js +0 -300
- package/dist/Editor/themeSettings/buttons/style.js +0 -23
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
- package/dist/Editor/themeSettings/fonts/index.js +0 -240
- package/dist/Editor/themeSettings/fonts/style.js +0 -62
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -380
- package/dist/Editor/themeSettings/style.js +0 -299
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -355
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
- package/dist/Editor/themeSettingsAI/style.js +0 -332
- package/dist/Editor/utils/updateFormName.js +0 -22
@@ -1,7 +1,6 @@
|
|
1
1
|
import React, { useRef, useState } from "react";
|
2
2
|
import SignatureCanvas from "react-signature-canvas";
|
3
|
-
import { Grid,
|
4
|
-
import { ResetIcon } from "../../../common/iconListV2";
|
3
|
+
import { Grid, useMediaQuery } from "@mui/material";
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
6
|
const DrawSignature = props => {
|
@@ -25,13 +24,6 @@ const DrawSignature = props => {
|
|
25
24
|
signature: result?.imageURL || strImage
|
26
25
|
});
|
27
26
|
};
|
28
|
-
const onClear = () => {
|
29
|
-
canvasRef.clear();
|
30
|
-
setUploading(false);
|
31
|
-
onDataChange({
|
32
|
-
signature: ""
|
33
|
-
});
|
34
|
-
};
|
35
27
|
const isMobile = useMediaQuery("(max-width:599px)");
|
36
28
|
const signatureCanvasStyle = isMobile ? {
|
37
29
|
width: "260px",
|
@@ -39,15 +31,14 @@ const DrawSignature = props => {
|
|
39
31
|
} : {};
|
40
32
|
return /*#__PURE__*/_jsxs(Grid, {
|
41
33
|
container: true,
|
42
|
-
children: [uploading ? "Uploading..." : "", /*#__PURE__*/
|
34
|
+
children: [uploading ? "Uploading..." : "", /*#__PURE__*/_jsx(Grid, {
|
43
35
|
item: true,
|
44
36
|
xs: 12,
|
45
37
|
style: {
|
46
38
|
width: "100%",
|
47
|
-
height: "209px"
|
48
|
-
position: "relative"
|
39
|
+
height: "209px"
|
49
40
|
},
|
50
|
-
children:
|
41
|
+
children: /*#__PURE__*/_jsx(SignatureCanvas, {
|
51
42
|
canvasProps: {
|
52
43
|
className: "signature-canvas",
|
53
44
|
...signatureCanvasStyle
|
@@ -56,11 +47,7 @@ const DrawSignature = props => {
|
|
56
47
|
ref: ref => canvasRef = ref,
|
57
48
|
maxWidth: brush.size || 2,
|
58
49
|
penColor: brush?.color || "#000"
|
59
|
-
})
|
60
|
-
className: "clear-canvas",
|
61
|
-
onClick: onClear,
|
62
|
-
children: /*#__PURE__*/_jsx(ResetIcon, {})
|
63
|
-
})]
|
50
|
+
})
|
64
51
|
})]
|
65
52
|
});
|
66
53
|
};
|
@@ -30,28 +30,15 @@ const UploadSignature = props => {
|
|
30
30
|
signature: result?.imageURL || strImage
|
31
31
|
});
|
32
32
|
};
|
33
|
-
const onRemove = () => {
|
34
|
-
setBase64(null);
|
35
|
-
setUploading(false);
|
36
|
-
onUploadDone({
|
37
|
-
signature: ""
|
38
|
-
});
|
39
|
-
};
|
40
33
|
return /*#__PURE__*/_jsxs("div", {
|
41
34
|
className: "signature-tab2",
|
42
|
-
children: [uploading ? "Uploading..." : "", base64 ? /*#__PURE__*/
|
35
|
+
children: [uploading ? "Uploading..." : "", base64 ? /*#__PURE__*/_jsx("div", {
|
43
36
|
className: "upload-sign-img-wrapper",
|
44
|
-
children:
|
37
|
+
children: /*#__PURE__*/_jsx("img", {
|
45
38
|
className: "upload-sign-img",
|
46
39
|
src: base64,
|
47
40
|
alt: "Signature"
|
48
|
-
})
|
49
|
-
variant: "body2",
|
50
|
-
gutterBottom: true,
|
51
|
-
className: "remove-sign-img-btn",
|
52
|
-
onClick: onRemove,
|
53
|
-
children: "Remove"
|
54
|
-
})]
|
41
|
+
})
|
55
42
|
}) : /*#__PURE__*/_jsxs("div", {
|
56
43
|
className: "upload-input-wrapper",
|
57
44
|
children: [/*#__PURE__*/_jsx("input", {
|
@@ -5,7 +5,6 @@ import { Box } from "@mui/material";
|
|
5
5
|
import { isTextSelected } from "../../utils/helper";
|
6
6
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
7
|
import SimpleTextStyle from "./style";
|
8
|
-
import { getBreakpointLineSpacing, getDevice } from "../../helper/theme";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
11
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -30,12 +29,8 @@ const SimpleText = props => {
|
|
30
29
|
} = customProps;
|
31
30
|
// const { element: pageSt } = getPageSettings(editor) || {};
|
32
31
|
// const { pageColor } = pageSt?.pageProps || {};
|
33
|
-
const breakpoint = getDevice(window.innerWidth);
|
34
|
-
const lineH = element?.children[0]?.lineHeight;
|
35
|
-
const lineHeight = getBreakpointLineSpacing(lineH, breakpoint);
|
36
32
|
const classes = SimpleTextStyle({
|
37
|
-
pageColor: "#FFFFFF"
|
38
|
-
lineHeight
|
33
|
+
pageColor: "#FFFFFF"
|
39
34
|
});
|
40
35
|
const selected = useSelected();
|
41
36
|
const path = ReactEditor.findPath(editor, element);
|
@@ -35,8 +35,8 @@ const SimpleTextStyle = ({
|
|
35
35
|
height: "24px",
|
36
36
|
overflow: "hidden",
|
37
37
|
fontSize: "14px",
|
38
|
-
display:
|
39
|
-
alignItems:
|
38
|
+
display: 'inline-flex',
|
39
|
+
alignItems: 'center',
|
40
40
|
"& .bg-pad-sl": {
|
41
41
|
padding: "2px 4px 2px 4px",
|
42
42
|
background: "transparent",
|
@@ -13,13 +13,9 @@ function Draggable(props) {
|
|
13
13
|
} = props?.data || {};
|
14
14
|
const style = transform ? {
|
15
15
|
transform: dragType === "row" ? `translate3d(0, ${transform.y}px, 0)` : `translate3d(${transform.x}px, 0, 0)`
|
16
|
-
} :
|
16
|
+
} : undefined;
|
17
17
|
return /*#__PURE__*/_jsx(Box, {
|
18
|
-
style:
|
19
|
-
...style,
|
20
|
-
touchAction: "none" // Disables scrolling while dragging. Necessary for proper mobile drag functionality.
|
21
|
-
},
|
22
|
-
|
18
|
+
style: style,
|
23
19
|
ref: setNodeRef,
|
24
20
|
...listeners,
|
25
21
|
...attributes,
|
@@ -86,13 +86,6 @@ const TableStyles = theme => {
|
|
86
86
|
background: "#2563EB"
|
87
87
|
}
|
88
88
|
},
|
89
|
-
mobileCellResizer: {
|
90
|
-
position: "absolute",
|
91
|
-
right: "-10px",
|
92
|
-
top: "-10px",
|
93
|
-
zIndex: 4000,
|
94
|
-
padding: "2px"
|
95
|
-
},
|
96
89
|
mobileToolDrawer: {
|
97
90
|
"& .customSelectContainer": {
|
98
91
|
border: "none !important",
|
@@ -307,7 +307,7 @@ const Table = props => {
|
|
307
307
|
onScroll: handleScroll,
|
308
308
|
onMouseOver: onMouseOver,
|
309
309
|
onMouseLeave: onMouseLeave,
|
310
|
-
className: "custom-scroll",
|
310
|
+
className: !hideTools.includes("add_column") ? "custom-scroll" : '',
|
311
311
|
children: [/*#__PURE__*/_jsx(TableComp, {
|
312
312
|
className: readOnly ? "readOnly" : "",
|
313
313
|
sx: {
|
@@ -345,8 +345,8 @@ const Table = props => {
|
|
345
345
|
handleAction: handleAction,
|
346
346
|
exandTools: exandTools,
|
347
347
|
openSetttings: openSetttings,
|
348
|
-
|
349
|
-
|
348
|
+
translation: translation,
|
349
|
+
hideTools: hideTools
|
350
350
|
}), /*#__PURE__*/_jsx(MoreTableSettings, {
|
351
351
|
exandTools: exandTools,
|
352
352
|
handleAction: handleAction,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useState, useEffect, useMemo } from "react";
|
2
|
-
import { Editor, Path,
|
3
|
-
import { Box
|
2
|
+
import { Editor, Path, Transforms } from "slate";
|
3
|
+
import { Box } from "@mui/material";
|
4
4
|
import { useSlateStatic, ReactEditor } from "slate-react";
|
5
5
|
import useTableResize from "../../utils/customHooks/useTableResize";
|
6
6
|
import { TableUtil } from "../../utils/table";
|
@@ -12,7 +12,6 @@ import TablePopup from "./TablePopup";
|
|
12
12
|
import { Droppable } from "./Droppable";
|
13
13
|
import { useDndContext } from "@dnd-kit/core";
|
14
14
|
import { getNodeWithType } from "../../utils/helper";
|
15
|
-
import { ResizeIcon } from "../../common/iconListV2";
|
16
15
|
import { isEmptyTextNode } from "../../helper";
|
17
16
|
import SimpleText from "../SimpleText";
|
18
17
|
import { jsx as _jsx } from "react/jsx-runtime";
|
@@ -42,32 +41,16 @@ const Resizer = ({
|
|
42
41
|
onMouseDown,
|
43
42
|
height
|
44
43
|
}) => {
|
45
|
-
const eventProps = {
|
46
|
-
onPointerDown: onMouseDown
|
47
|
-
};
|
48
44
|
return /*#__PURE__*/_jsx(_Fragment, {
|
49
45
|
children: /*#__PURE__*/_jsx(Box, {
|
50
46
|
component: "div",
|
51
47
|
className: "cell-resizer",
|
52
48
|
contentEditable: false,
|
49
|
+
onPointerDown: onMouseDown,
|
53
50
|
sx: classes.cellResizer,
|
54
51
|
style: {
|
55
52
|
height: `${height}px`
|
56
|
-
}
|
57
|
-
...eventProps
|
58
|
-
})
|
59
|
-
});
|
60
|
-
};
|
61
|
-
const MobileResizer = ({
|
62
|
-
classes,
|
63
|
-
onMouseDown
|
64
|
-
}) => {
|
65
|
-
return /*#__PURE__*/_jsx(_Fragment, {
|
66
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
67
|
-
contentEditable: false,
|
68
|
-
sx: classes.mobileCellResizer,
|
69
|
-
onTouchStart: onMouseDown,
|
70
|
-
children: /*#__PURE__*/_jsx(ResizeIcon, {})
|
53
|
+
}
|
71
54
|
})
|
72
55
|
});
|
73
56
|
};
|
@@ -132,8 +115,7 @@ const TableCell = props => {
|
|
132
115
|
size: element?.size,
|
133
116
|
minMaxProps: {
|
134
117
|
minWidth: 30
|
135
|
-
}
|
136
|
-
isMobile
|
118
|
+
}
|
137
119
|
});
|
138
120
|
const [tableSize, setTableSize] = useState({});
|
139
121
|
const [openSettings, setOpenSettings] = useState(false);
|
@@ -150,12 +132,8 @@ const TableCell = props => {
|
|
150
132
|
const isFirstRow = row === 0;
|
151
133
|
const isFirstColumn = column === 0;
|
152
134
|
const [hoverRow, hoverCol] = hoverPath ? hoverPath.slice(-2) : [];
|
153
|
-
const
|
154
|
-
|
155
|
-
} = editor;
|
156
|
-
const isHavingSelection = selection && !Range.isCollapsed(selection);
|
157
|
-
const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly && !hideTools.includes("drag") && !isHavingSelection;
|
158
|
-
const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly && !hideTools.includes("drag") && !isHavingSelection;
|
135
|
+
const showColDrag = isFirstRow && hoverCol === column && !resizing && !readOnly && !hideTools.includes("drag");
|
136
|
+
const showRowDrag = isFirstColumn && hoverRow === row && !resizing && !readOnly && !hideTools.includes("drag");
|
159
137
|
const [parentProps] = tableNode || [{}];
|
160
138
|
const [rowProps] = rowNode || [{}];
|
161
139
|
const tableDOM = table.getDOMNode(path, true);
|
@@ -442,7 +420,6 @@ const TableCell = props => {
|
|
442
420
|
resetSelection
|
443
421
|
};
|
444
422
|
const showRowDragBtn = (showRowDrag || isRowDragging) && containerEle?.scrollLeft <= 0;
|
445
|
-
const TableResizer = isMobile && hoverCol === column ? MobileResizer : Resizer;
|
446
423
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
447
424
|
children: [/*#__PURE__*/_jsxs("td", {
|
448
425
|
...element.attr,
|
@@ -477,7 +454,7 @@ const TableCell = props => {
|
|
477
454
|
padding: "8px"
|
478
455
|
},
|
479
456
|
children: children
|
480
|
-
}), isHeader && !readOnly && tableSize?.height && !showTool ? /*#__PURE__*/_jsx(
|
457
|
+
}), isHeader && !readOnly && tableSize?.height && !showTool ? /*#__PURE__*/_jsx(Resizer, {
|
481
458
|
classes: classes,
|
482
459
|
onMouseDown: onMouseDown,
|
483
460
|
height: tableDOM?.getBoundingClientRect()?.height
|
@@ -4,12 +4,6 @@ import { useSlate } from "slate-react";
|
|
4
4
|
import { getNodeText } from "../../utils/helper";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
7
|
-
const isEmptyTextNode = node => {
|
8
|
-
if (Text.isText(node)) {
|
9
|
-
return !node.text.trim();
|
10
|
-
}
|
11
|
-
return false;
|
12
|
-
};
|
13
7
|
const Title = props => {
|
14
8
|
const {
|
15
9
|
attributes,
|
@@ -56,4 +50,10 @@ const useDetectExitFromTitle = (titleNode, onSaveTitle) => {
|
|
56
50
|
}
|
57
51
|
}, [editor.selection]);
|
58
52
|
return null;
|
53
|
+
};
|
54
|
+
const isEmptyTextNode = node => {
|
55
|
+
if (Text.isText(node)) {
|
56
|
+
return !node.text.trim();
|
57
|
+
}
|
58
|
+
return false;
|
59
59
|
};
|
@@ -34,8 +34,7 @@ const VariableButton = props => {
|
|
34
34
|
PaperProps: {
|
35
35
|
style: {
|
36
36
|
maxHeight: 300,
|
37
|
-
overflowY: "auto"
|
38
|
-
transformOrigin: 'top left'
|
37
|
+
overflowY: "auto"
|
39
38
|
},
|
40
39
|
sx: {
|
41
40
|
"&::-webkit-scrollbar-track": {
|
@@ -45,14 +44,6 @@ const VariableButton = props => {
|
|
45
44
|
borderRadius: "16px"
|
46
45
|
}
|
47
46
|
}
|
48
|
-
},
|
49
|
-
anchorOrigin: {
|
50
|
-
vertical: 'bottom',
|
51
|
-
horizontal: 'right'
|
52
|
-
},
|
53
|
-
transformOrigin: {
|
54
|
-
vertical: 'top',
|
55
|
-
horizontal: 'right'
|
56
47
|
}
|
57
48
|
},
|
58
49
|
children: [/*#__PURE__*/_jsx(MenuItem, {
|
@@ -45,13 +45,12 @@ const MiniEditor = props => {
|
|
45
45
|
const {
|
46
46
|
translationMock
|
47
47
|
} = otherProps;
|
48
|
-
const dummyTranslation = () => {};
|
49
48
|
const customProps = {
|
50
49
|
...(otherProps || {}),
|
51
50
|
readOnly: isReadOnly,
|
52
51
|
editorPlaceholder: miniEditorPlaceholder,
|
53
52
|
page_id: id,
|
54
|
-
translation: translation || translationMock
|
53
|
+
translation: translation || translationMock
|
55
54
|
};
|
56
55
|
const [mentions, setMentions] = useMentions({
|
57
56
|
editor,
|
@@ -133,7 +133,7 @@ const editorStyles = ({
|
|
133
133
|
},
|
134
134
|
"& .accordion-summary-collapse-btn": {
|
135
135
|
padding: "4px",
|
136
|
-
width:
|
136
|
+
width: '5px'
|
137
137
|
},
|
138
138
|
"& .workflow-icon-btn": {
|
139
139
|
pointerEvents: "none",
|
@@ -242,7 +242,7 @@ const editorStyles = ({
|
|
242
242
|
}
|
243
243
|
},
|
244
244
|
"& .section-tw": {
|
245
|
-
background:
|
245
|
+
background: 'transparent !important',
|
246
246
|
"& button": {
|
247
247
|
padding: "2px",
|
248
248
|
borderRadius: "0px",
|
@@ -291,8 +291,8 @@ const editorStyles = ({
|
|
291
291
|
}
|
292
292
|
},
|
293
293
|
"& ::selection": {
|
294
|
-
background:
|
295
|
-
color:
|
294
|
+
background: 'rgba(35, 131, 226, 0.35)!important',
|
295
|
+
color: 'inherit'
|
296
296
|
},
|
297
297
|
"&.readOnlyContainer": {
|
298
298
|
"& .max-content": {
|
@@ -302,7 +302,7 @@ const editorStyles = ({
|
|
302
302
|
},
|
303
303
|
fullScreenWrapper: {
|
304
304
|
"& .editor-wrapper": {
|
305
|
-
paddingTop:
|
305
|
+
paddingTop: '20px'
|
306
306
|
},
|
307
307
|
"& .MuiDialog-paper, & .MuiPopover-paper": {
|
308
308
|
background: `${theme?.palette?.editor?.background} !important`
|
@@ -1,32 +1,8 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Select, MenuItem } from "@mui/material";
|
3
|
-
import { addMarkData, activeMark
|
4
|
-
import { toolbarGroups } from "../toolbarGroups.js";
|
3
|
+
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
|
5
4
|
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
6
|
-
import { googleFontList as defaultFonts } from "../../common/FontLoader/FontList.js";
|
7
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
|
-
const allTools = toolbarGroups.flat();
|
9
|
-
const fontWeight = allTools.find(f => f.format === "fontWeight");
|
10
|
-
export const getValue = (editor, format) => {
|
11
|
-
switch (format) {
|
12
|
-
case "fontFamily":
|
13
|
-
{
|
14
|
-
const style = getSelectedElementStyle("font-family", editor, format);
|
15
|
-
return style || defaultFonts[0];
|
16
|
-
}
|
17
|
-
case "fontWeight":
|
18
|
-
{
|
19
|
-
const {
|
20
|
-
options
|
21
|
-
} = fontWeight || {};
|
22
|
-
const fontWeightStyle = getSelectedElementStyle("font-weight", editor, format);
|
23
|
-
const selected = options?.find(o => o.value === fontWeightStyle || o.numVal === fontWeightStyle);
|
24
|
-
return selected?.value;
|
25
|
-
}
|
26
|
-
default:
|
27
|
-
return activeMark(editor, format);
|
28
|
-
}
|
29
|
-
};
|
30
6
|
const Dropdown = ({
|
31
7
|
classes,
|
32
8
|
editor,
|
@@ -34,7 +10,7 @@ const Dropdown = ({
|
|
34
10
|
options,
|
35
11
|
width
|
36
12
|
}) => {
|
37
|
-
const value = activeMark(editor, format
|
13
|
+
const value = activeMark(editor, format);
|
38
14
|
const changeMarkData = (event, format) => {
|
39
15
|
event.preventDefault();
|
40
16
|
const value = event.target.value;
|
@@ -44,7 +20,7 @@ const Dropdown = ({
|
|
44
20
|
});
|
45
21
|
};
|
46
22
|
return /*#__PURE__*/_jsx(Select, {
|
47
|
-
value: value
|
23
|
+
value: value,
|
48
24
|
className: "editor-dd",
|
49
25
|
onChange: e => changeMarkData(e, format),
|
50
26
|
MenuProps: {
|
@@ -1,10 +1,9 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Autocomplete, TextField } from "@mui/material";
|
3
|
-
import { addMarkData } from "../../utils/SlateUtilityFunctions.js";
|
3
|
+
import { activeMark, addMarkData } from "../../utils/SlateUtilityFunctions.js";
|
4
4
|
import usePopupStyle from "../PopupTool/PopupToolStyle.js";
|
5
5
|
import { useEditorContext } from "../../hooks/useMouseMove.js";
|
6
|
-
import KeyboardArrowDownRoundedIcon from
|
7
|
-
import { getValue } from "./Dropdown.js";
|
6
|
+
import KeyboardArrowDownRoundedIcon from '@mui/icons-material/KeyboardArrowDownRounded';
|
8
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
8
|
const FontFamilyAutocomplete = ({
|
10
9
|
editor,
|
@@ -15,7 +14,7 @@ const FontFamilyAutocomplete = ({
|
|
15
14
|
val = "",
|
16
15
|
webFont = false
|
17
16
|
}) => {
|
18
|
-
const markValue =
|
17
|
+
const markValue = activeMark(editor, format);
|
19
18
|
const value = !webFont ? markValue : val;
|
20
19
|
const changeMarkData = (event, newValue, format) => {
|
21
20
|
if (!webFont) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import Icon from "../../common/Icon";
|
3
3
|
import Button from "../../common/Button";
|
4
|
-
import { toggleMark,
|
4
|
+
import { toggleMark, isMarkActive } from "../../utils/SlateUtilityFunctions.js";
|
5
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
6
|
const MarkButton = ({
|
7
7
|
editor,
|
@@ -13,7 +13,7 @@ const MarkButton = ({
|
|
13
13
|
translation
|
14
14
|
} = customProps;
|
15
15
|
return /*#__PURE__*/_jsx(Button, {
|
16
|
-
active:
|
16
|
+
active: isMarkActive(editor, format),
|
17
17
|
format: format,
|
18
18
|
onMouseDown: e => {
|
19
19
|
e.preventDefault();
|
@@ -1,7 +1,8 @@
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { TextField, IconButton } from "@mui/material";
|
3
|
-
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions.js";
|
4
|
-
import {
|
3
|
+
import { addMarkData, activeMark, isBlockActive } from "../../utils/SlateUtilityFunctions.js";
|
4
|
+
import { headingMap, sizeMap } from "../../utils/font.js";
|
5
|
+
import { getBreakPointsValue } from "../../helper/theme.js";
|
5
6
|
import useWindowResize from "../../hooks/useWindowResize.js";
|
6
7
|
import { BREAKPOINTS_DEVICES } from "../../helper/theme.js";
|
7
8
|
import { TextSizeDownArrow, TextSizeUpArrow } from "../../common/iconListV2.js";
|
@@ -14,15 +15,11 @@ const TextSize = ({
|
|
14
15
|
format,
|
15
16
|
fullWidth
|
16
17
|
}) => {
|
17
|
-
const [fontSize, setFontSize] = useState();
|
18
|
-
const timerRef = useRef();
|
19
18
|
const [size] = useWindowResize();
|
20
19
|
const val = activeMark(editor, format);
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
const value = getTextSizeVal(editor);
|
20
|
+
const value = getBreakPointsValue(val, size?.device);
|
21
|
+
const [fontSize, setFontSize] = useState();
|
22
|
+
const timerRef = useRef();
|
26
23
|
useEffect(() => {
|
27
24
|
setFontSize(getSizeVal());
|
28
25
|
}, [value]);
|
@@ -58,7 +55,13 @@ const TextSize = ({
|
|
58
55
|
};
|
59
56
|
const getSizeVal = () => {
|
60
57
|
try {
|
61
|
-
|
58
|
+
let size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
|
59
|
+
Object.entries(headingMap).forEach(([format, value]) => {
|
60
|
+
if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
|
61
|
+
size = value;
|
62
|
+
}
|
63
|
+
});
|
64
|
+
return parseInt(size);
|
62
65
|
} catch (err) {
|
63
66
|
return "";
|
64
67
|
}
|
@@ -12,8 +12,7 @@ function MiniColorPicker(props) {
|
|
12
12
|
classes,
|
13
13
|
id,
|
14
14
|
editor,
|
15
|
-
customProps
|
16
|
-
type
|
15
|
+
customProps
|
17
16
|
} = props;
|
18
17
|
const [openColorTool, setOpenColorTool] = useState(null);
|
19
18
|
const {
|
@@ -39,8 +38,7 @@ function MiniColorPicker(props) {
|
|
39
38
|
classes: classes,
|
40
39
|
forMiniTool: true,
|
41
40
|
openColorTool: openColorTool,
|
42
|
-
closeColorTool: () => setOpenColorTool(null)
|
43
|
-
type: type
|
41
|
+
closeColorTool: () => setOpenColorTool(null)
|
44
42
|
}, id)]
|
45
43
|
});
|
46
44
|
}
|
@@ -1,9 +1,10 @@
|
|
1
1
|
import { useEffect, useRef, useState } from "react";
|
2
|
-
import { activeMark, addMarkData } from "../../../utils/SlateUtilityFunctions";
|
2
|
+
import { activeMark, addMarkData, isBlockActive } from "../../../utils/SlateUtilityFunctions";
|
3
3
|
import { Button, IconButton, Popover, TextField } from "@mui/material";
|
4
4
|
import DownArrowIcon from "../../../assets/svg/DownArrowIcon";
|
5
5
|
import useWindowResize from "../../../hooks/useWindowResize";
|
6
|
-
import { BREAKPOINTS_DEVICES, getBreakPointsValue
|
6
|
+
import { BREAKPOINTS_DEVICES, getBreakPointsValue } from "../../../helper/theme";
|
7
|
+
import { headingMap, sizeMap } from "../../../utils/font";
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
9
10
|
const fontSizeOptions = [8, 9, 10, 11, 12, 14, 16, 18, 20, 22, 26, 32, 36, 40, 48, 64, 96, 128];
|
@@ -18,7 +19,7 @@ function SelectFontSize({
|
|
18
19
|
const containerRef = useRef();
|
19
20
|
const [size] = useWindowResize();
|
20
21
|
const val = activeMark(editor, format);
|
21
|
-
const value =
|
22
|
+
const value = getBreakPointsValue(val, size?.device);
|
22
23
|
const timerRef = useRef();
|
23
24
|
const updateMarkData = newVal => {
|
24
25
|
let upData = {
|
@@ -52,7 +53,13 @@ function SelectFontSize({
|
|
52
53
|
};
|
53
54
|
const getSizeVal = () => {
|
54
55
|
try {
|
55
|
-
|
56
|
+
let size = `${value}`?.indexOf("px") >= 0 ? value : sizeMap[value] || value;
|
57
|
+
Object.entries(headingMap).forEach(([format, value]) => {
|
58
|
+
if (isBlockActive(editor, format) && isNaN(parseInt(size))) {
|
59
|
+
size = value;
|
60
|
+
}
|
61
|
+
});
|
62
|
+
return isNaN(parseInt(size)) ? 14 : parseInt(size);
|
56
63
|
} catch (err) {
|
57
64
|
return "";
|
58
65
|
}
|
@@ -90,8 +97,8 @@ function SelectFontSize({
|
|
90
97
|
anchorEl: anchorEl,
|
91
98
|
onClose: () => setAnchorEl(null),
|
92
99
|
anchorOrigin: {
|
93
|
-
vertical:
|
94
|
-
horizontal:
|
100
|
+
vertical: 'bottom',
|
101
|
+
horizontal: 'left'
|
95
102
|
},
|
96
103
|
sx: classes.customSelectPopoverWrapper,
|
97
104
|
children: fontSizeOptions.map((s, i) => {
|