@flozy/editor 7.0.9 → 8.0.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 +7 -7
- package/dist/Editor/CommonEditor.js +106 -33
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +32 -16
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +25 -9
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +57 -12
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +25 -1
- package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
- package/dist/Editor/Elements/Color Picker/Styles.js +1 -1
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +15 -0
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +111 -29
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +1 -1
- package/dist/Editor/Elements/DataView/styles.js +8 -8
- package/dist/Editor/Elements/Embed/Image.js +2 -2
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +0 -14
- package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +2 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +2 -1
- package/dist/Editor/Elements/FreeGrid/styles.js +3 -0
- package/dist/Editor/Elements/Grid/GridItem.js +2 -3
- package/dist/Editor/Elements/Link/Link.js +70 -43
- package/dist/Editor/Elements/SimpleText/index.js +7 -12
- package/dist/Editor/Elements/SimpleText/style.js +2 -2
- package/dist/Editor/Elements/Table/Table.js +12 -12
- package/dist/Editor/Elements/Title/title.js +13 -1
- package/dist/Editor/Elements/Variables/Style.js +28 -2
- package/dist/Editor/Elements/Variables/VariableButton.js +17 -4
- package/dist/Editor/Styles/EditorStyles.js +287 -291
- 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 +7 -15
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +9 -8
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +210 -85
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +2 -1
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +16 -12
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +56 -9
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +438 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +31 -38
- package/dist/Editor/Toolbar/toolbarGroups.js +48 -6
- package/dist/Editor/assets/svg/ThemeIcons.js +291 -0
- package/dist/Editor/common/ColorPickerButton.js +35 -9
- package/dist/Editor/common/CustomColorPicker/index.js +106 -0
- package/dist/Editor/common/CustomColorPicker/style.js +53 -0
- package/dist/Editor/common/CustomDialog/index.js +90 -0
- package/dist/Editor/common/CustomDialog/style.js +67 -0
- package/dist/Editor/common/CustomDialog/styles.js +80 -0
- package/dist/Editor/common/CustomSelect.js +33 -0
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/DnD/Draggable.js +0 -1
- package/dist/Editor/common/FontLoader/FontList.js +3 -11
- package/dist/Editor/common/FontLoader/FontLoader.js +74 -42
- package/dist/Editor/common/Icon.js +28 -0
- package/dist/Editor/common/ImageSelector/Options/Upload.js +1 -1
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/ImageSelector/UploadStyles.js +1 -2
- package/dist/Editor/common/MentionsPopup/Styles.js +6 -12
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +2 -1
- 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/VideoSettings.js +3 -2
- package/dist/Editor/common/RnD/ElementSettings/styles.js +0 -1
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +8 -2
- 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 +5 -4
- package/dist/Editor/common/RnD/Utils/index.js +45 -0
- package/dist/Editor/common/RnD/index.js +23 -3
- package/dist/Editor/common/Section/index.js +60 -89
- package/dist/Editor/common/Shorthands/elements.js +54 -0
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +4 -2
- 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 +10 -2
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +35 -11
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +13 -4
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
- package/dist/Editor/common/Uploader.js +8 -0
- package/dist/Editor/commonStyle.js +55 -65
- package/dist/Editor/helper/deserialize/index.js +1 -1
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +200 -2
- package/dist/Editor/hooks/useEditorScroll.js +1 -1
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +9 -3
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +5 -9
- package/dist/Editor/plugins/withLayout.js +1 -1
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +50 -173
- package/dist/Editor/theme/index.js +144 -0
- package/dist/Editor/themeSettings/ActiveTheme.js +72 -0
- package/dist/Editor/themeSettings/buttons/index.js +283 -0
- package/dist/Editor/themeSettings/buttons/style.js +21 -0
- package/dist/Editor/themeSettings/colorTheme/index.js +292 -0
- package/dist/Editor/themeSettings/colorTheme/style.js +77 -0
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +121 -0
- package/dist/Editor/themeSettings/fonts/index.js +220 -0
- package/dist/Editor/themeSettings/fonts/style.js +44 -0
- package/dist/Editor/themeSettings/icons.js +60 -0
- package/dist/Editor/themeSettings/index.js +320 -0
- package/dist/Editor/themeSettings/style.js +152 -0
- package/dist/Editor/themeSettingsAI/icons.js +96 -0
- package/dist/Editor/themeSettingsAI/index.js +356 -0
- package/dist/Editor/themeSettingsAI/saveTheme.js +197 -0
- package/dist/Editor/themeSettingsAI/style.js +250 -0
- package/dist/Editor/utils/SlateUtilityFunctions.js +157 -49
- package/dist/Editor/utils/button.js +0 -14
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/helper.js +59 -19
- package/dist/Editor/utils/link.js +1 -1
- package/package.json +5 -2
@@ -1,11 +1,15 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Box, IconButton, Popover } from "@mui/material";
|
2
|
+
import { Box, IconButton, Popover, Typography, useTheme } from "@mui/material";
|
3
3
|
import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
|
4
4
|
import Button from "../../common/Button";
|
5
5
|
import { colors } from "./defaultColors";
|
6
6
|
import ColorPicker from "./colorPicker.svg";
|
7
|
+
import { useSlateStatic } from "slate-react";
|
8
|
+
import { Transforms } from "slate";
|
9
|
+
import { useEditorContext } from "../../hooks/useMouseMove";
|
7
10
|
import { jsx as _jsx } from "react/jsx-runtime";
|
8
11
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
9
13
|
let c = [];
|
10
14
|
const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
|
11
15
|
if (i % 7 === 0) {
|
@@ -110,12 +114,18 @@ const ColorButtons = props => {
|
|
110
114
|
openColorTool,
|
111
115
|
onClose,
|
112
116
|
onColorPickerClick,
|
117
|
+
disableEditTheme,
|
113
118
|
defaultColors = []
|
114
119
|
} = props;
|
115
120
|
const [row1, ...restRows] = ColorChunks([]);
|
116
121
|
const [anchorEl, setAnchorEl] = useState(null);
|
117
122
|
const open = Boolean(anchorEl);
|
118
123
|
const firstRow = defaultColors?.length ? defaultColors : row1;
|
124
|
+
const theme = useTheme();
|
125
|
+
const editor = useSlateStatic();
|
126
|
+
const {
|
127
|
+
setOpenTheme
|
128
|
+
} = useEditorContext();
|
119
129
|
const handleMore = e => {
|
120
130
|
setAnchorEl(e.currentTarget);
|
121
131
|
};
|
@@ -128,6 +138,7 @@ const ColorButtons = props => {
|
|
128
138
|
const handleSelect = color => () => {
|
129
139
|
onSelect(color);
|
130
140
|
};
|
141
|
+
const colorVars = theme?.vars?.colors || {};
|
131
142
|
return /*#__PURE__*/_jsxs(Box, {
|
132
143
|
component: "span",
|
133
144
|
sx: classes.colorButtons,
|
@@ -144,7 +155,7 @@ const ColorButtons = props => {
|
|
144
155
|
activeColor: activeColor
|
145
156
|
}, `si_btn_row1_${m}_${i}`);
|
146
157
|
})
|
147
|
-
}), /*#__PURE__*/
|
158
|
+
}), /*#__PURE__*/_jsx(Popover, {
|
148
159
|
open: open || openColorTool,
|
149
160
|
anchorEl: anchorEl || openColorTool,
|
150
161
|
onClose: handleClose,
|
@@ -158,9 +169,39 @@ const ColorButtons = props => {
|
|
158
169
|
},
|
159
170
|
sx: classes.colorPopper,
|
160
171
|
className: "colorPopper",
|
161
|
-
children:
|
172
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
162
173
|
sx: classes.colorButtonsInner,
|
163
|
-
children:
|
174
|
+
children: [Object.values(colorVars)?.length ? /*#__PURE__*/_jsxs(_Fragment, {
|
175
|
+
children: [/*#__PURE__*/_jsxs(Box, {
|
176
|
+
component: "div",
|
177
|
+
className: "singleColorTitleWrapper",
|
178
|
+
children: [/*#__PURE__*/_jsx(Typography, {
|
179
|
+
variant: "subtitle2",
|
180
|
+
children: "Theme colours"
|
181
|
+
}), disableEditTheme ? null : /*#__PURE__*/_jsx("div", {
|
182
|
+
className: "editBtn",
|
183
|
+
onClick: () => {
|
184
|
+
Transforms.deselect(editor, {
|
185
|
+
at: editor.selection
|
186
|
+
});
|
187
|
+
setOpenTheme("editThemeColor");
|
188
|
+
},
|
189
|
+
children: "Edit"
|
190
|
+
})]
|
191
|
+
}), /*#__PURE__*/_jsx(SingleColorButton, {
|
192
|
+
crs: Object.values(colorVars),
|
193
|
+
handleSelect: handleSelect,
|
194
|
+
classes: classes,
|
195
|
+
activeColor: activeColor
|
196
|
+
})]
|
197
|
+
}) : null, /*#__PURE__*/_jsx(Box, {
|
198
|
+
component: "div",
|
199
|
+
className: "singleColorTitleWrapper",
|
200
|
+
children: /*#__PURE__*/_jsx(Typography, {
|
201
|
+
variant: "subtitle2",
|
202
|
+
children: "Custom colour"
|
203
|
+
})
|
204
|
+
}), restRows.map((m, i) => {
|
164
205
|
return /*#__PURE__*/_jsx(SingleColorButton, {
|
165
206
|
id: `p2_${id}`,
|
166
207
|
crs: m,
|
@@ -169,14 +210,18 @@ const ColorButtons = props => {
|
|
169
210
|
classes: classes,
|
170
211
|
activeColor: activeColor
|
171
212
|
}, `si_btn_${m}_${i}`);
|
172
|
-
})
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
213
|
+
}), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
|
214
|
+
onClick: onColorPickerClick,
|
215
|
+
style: {
|
216
|
+
alignSelf: "start",
|
217
|
+
margin: "6px"
|
218
|
+
},
|
219
|
+
children: /*#__PURE__*/_jsx("img", {
|
220
|
+
src: ColorPicker,
|
221
|
+
alt: "color wheel"
|
222
|
+
})
|
223
|
+
}) : null]
|
224
|
+
})
|
180
225
|
})]
|
181
226
|
});
|
182
227
|
};
|
@@ -60,4 +60,28 @@
|
|
60
60
|
padding: 0 15px !important;
|
61
61
|
width: 60px !important;
|
62
62
|
flex-shrink: 0;
|
63
|
-
}
|
63
|
+
}
|
64
|
+
|
65
|
+
|
66
|
+
.singleColorTitleWrapper {
|
67
|
+
display: flex;
|
68
|
+
justify-content: space-between;
|
69
|
+
align-items: center;
|
70
|
+
padding: 10px;
|
71
|
+
width: 100%;
|
72
|
+
border-bottom: 1px solid #DCE4EC;
|
73
|
+
}
|
74
|
+
|
75
|
+
.singleColorTitleWrapper .MuiTypography-root {
|
76
|
+
font-weight: 600;
|
77
|
+
}
|
78
|
+
|
79
|
+
.singleColorTitleWrapper .editBtn {
|
80
|
+
text-transform: none;
|
81
|
+
color: #2563EB;
|
82
|
+
text-decoration: underline;
|
83
|
+
padding: 0px;
|
84
|
+
min-width: unset;
|
85
|
+
cursor: pointer;
|
86
|
+
font-size: 14px;
|
87
|
+
}
|
@@ -1,7 +1,6 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
2
|
import { ReactEditor } from "slate-react";
|
3
3
|
import { Transforms } from "slate";
|
4
|
-
import ColorPickerTool from "react-gcolor-picker";
|
5
4
|
import { IconButton, Tooltip, Box, Popover } from "@mui/material";
|
6
5
|
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
|
7
6
|
import ColorButtons from "./ColorButtons";
|
@@ -9,6 +8,7 @@ import ColorPickerStyles from "./Styles";
|
|
9
8
|
import colorWheel from "./colorWheel.png";
|
10
9
|
import "./ColorPicker.css";
|
11
10
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
11
|
+
import CustomColorPicker from "../../common/CustomColorPicker";
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
@@ -95,10 +95,10 @@ const ColorPicker = props => {
|
|
95
95
|
horizontal: "top"
|
96
96
|
},
|
97
97
|
sx: classes.colorPickerPopup,
|
98
|
-
children: /*#__PURE__*/_jsx(
|
98
|
+
children: /*#__PURE__*/_jsx(CustomColorPicker, {
|
99
99
|
gradient: true,
|
100
|
-
|
101
|
-
|
100
|
+
onChange: handleFormSubmit,
|
101
|
+
color: activeColor
|
102
102
|
})
|
103
103
|
})]
|
104
104
|
});
|
@@ -21,7 +21,7 @@ const ColorPickerStyles = theme => ({
|
|
21
21
|
border: `1px solid ${theme?.palette?.editor?.miniToolBarBorder} !important`,
|
22
22
|
borderRadius: "7px !important",
|
23
23
|
padding: "0px 5px",
|
24
|
-
|
24
|
+
"@media only screen and (max-width: 600px)": {
|
25
25
|
marginTop: "-40px"
|
26
26
|
}
|
27
27
|
}
|
@@ -16,6 +16,7 @@ const useTableStyles = (theme, appTheme) => ({
|
|
16
16
|
height: "40px"
|
17
17
|
},
|
18
18
|
"& th": {
|
19
|
+
position: "relative",
|
19
20
|
"& svg": {
|
20
21
|
"& .fillStroke": {
|
21
22
|
stroke: appTheme?.palette?.editor?.tv_stroke
|
@@ -129,6 +130,20 @@ const useTableStyles = (theme, appTheme) => ({
|
|
129
130
|
opacity: 1
|
130
131
|
}
|
131
132
|
}
|
133
|
+
},
|
134
|
+
cellResizer: {
|
135
|
+
position: "absolute",
|
136
|
+
cursor: "col-resize",
|
137
|
+
right: "0px",
|
138
|
+
top: 0,
|
139
|
+
width: "3px",
|
140
|
+
borderRadius: "0px",
|
141
|
+
zIndex: 1,
|
142
|
+
background: "transparent",
|
143
|
+
height: "100%",
|
144
|
+
"&:hover, &.active": {
|
145
|
+
background: "#2563EB"
|
146
|
+
}
|
132
147
|
}
|
133
148
|
});
|
134
149
|
export default useTableStyles;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import React, { useState } from "react";
|
1
|
+
import React, { useEffect, useRef, useState } from "react";
|
2
2
|
import { Box, Button, useTheme } from "@mui/material";
|
3
3
|
import { useDataView } from "../Providers/DataViewProvider";
|
4
4
|
import PropertySettings from "./Options";
|
@@ -7,37 +7,116 @@ import useTableStyles from "./TableStyles";
|
|
7
7
|
import { GridSettingsIcon, GridAddSectionIcon } from "../../../common/iconslist";
|
8
8
|
import { useEditorContext } from "../../../hooks/useMouseMove";
|
9
9
|
import Icon from "../../../common/Icon";
|
10
|
+
import useTableResize from "../../../utils/customHooks/useTableResize";
|
10
11
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
12
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
12
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
|
+
const Resizer = ({
|
15
|
+
classes,
|
16
|
+
onMouseDown,
|
17
|
+
height,
|
18
|
+
resizing
|
19
|
+
}) => {
|
20
|
+
return /*#__PURE__*/_jsx(_Fragment, {
|
21
|
+
children: /*#__PURE__*/_jsx(Box, {
|
22
|
+
component: "div",
|
23
|
+
className: `cell-resizer ${resizing ? "active" : ""}`,
|
24
|
+
contentEditable: false,
|
25
|
+
onPointerDown: onMouseDown,
|
26
|
+
sx: classes.cellResizer,
|
27
|
+
style: {
|
28
|
+
height: `${height}px`
|
29
|
+
}
|
30
|
+
})
|
31
|
+
});
|
32
|
+
};
|
13
33
|
const SortIcon = props => {
|
14
34
|
const {
|
15
35
|
sortBy
|
16
36
|
} = props;
|
17
37
|
return sortBy ? sortBy === "asc" ? /*#__PURE__*/_jsx(Box, {
|
18
38
|
sx: {
|
19
|
-
|
20
|
-
|
39
|
+
"& svg": {
|
40
|
+
"& path": {
|
21
41
|
stroke: "rgba(37, 99, 235, 1) !important"
|
22
42
|
}
|
23
43
|
}
|
24
44
|
},
|
25
45
|
children: /*#__PURE__*/_jsx(Icon, {
|
26
|
-
icon:
|
46
|
+
icon: "chervUp"
|
27
47
|
})
|
28
48
|
}) : /*#__PURE__*/_jsx(Box, {
|
29
49
|
sx: {
|
30
|
-
|
31
|
-
|
50
|
+
"& svg": {
|
51
|
+
"& path": {
|
32
52
|
stroke: "rgba(37, 99, 235, 1) !important"
|
33
53
|
}
|
34
54
|
}
|
35
55
|
},
|
36
56
|
children: /*#__PURE__*/_jsx(Icon, {
|
37
|
-
icon:
|
57
|
+
icon: "chervDown"
|
38
58
|
})
|
39
59
|
}) : null;
|
40
60
|
};
|
61
|
+
const THead = props => {
|
62
|
+
const thRef = useRef(null);
|
63
|
+
const {
|
64
|
+
iconType,
|
65
|
+
isSort,
|
66
|
+
classes,
|
67
|
+
onEditProperty,
|
68
|
+
m,
|
69
|
+
tableRef,
|
70
|
+
handleResize
|
71
|
+
} = props;
|
72
|
+
// do not remove extra coma it will lead to swap of variable
|
73
|
+
const [size, onMouseDown, resizing,, isDone] = useTableResize({
|
74
|
+
parentDOM: thRef?.current,
|
75
|
+
size: m?.size,
|
76
|
+
minMaxProps: {
|
77
|
+
minWidth: 30
|
78
|
+
}
|
79
|
+
});
|
80
|
+
useEffect(() => {
|
81
|
+
if (isDone) {
|
82
|
+
handleResize({
|
83
|
+
...m,
|
84
|
+
size: size
|
85
|
+
});
|
86
|
+
}
|
87
|
+
}, [isDone]);
|
88
|
+
return /*#__PURE__*/_jsxs("th", {
|
89
|
+
style: {
|
90
|
+
minWidth: size?.width || 200,
|
91
|
+
maxWidth: size?.width || 200,
|
92
|
+
width: size?.width || 200
|
93
|
+
},
|
94
|
+
ref: thRef,
|
95
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
96
|
+
sx: {
|
97
|
+
maxWidth: "100%",
|
98
|
+
overflow: "hidden"
|
99
|
+
},
|
100
|
+
children: /*#__PURE__*/_jsx(Button, {
|
101
|
+
className: "tv-act-btn la",
|
102
|
+
startIcon: /*#__PURE__*/_jsx(Icon, {
|
103
|
+
icon: iconType
|
104
|
+
}),
|
105
|
+
endIcon: /*#__PURE__*/_jsx(SortIcon, {
|
106
|
+
sortBy: isSort
|
107
|
+
}),
|
108
|
+
fullWidth: true,
|
109
|
+
onClick: onEditProperty(m),
|
110
|
+
children: m.label
|
111
|
+
})
|
112
|
+
}), /*#__PURE__*/_jsx(Resizer, {
|
113
|
+
classes: classes,
|
114
|
+
onMouseDown: onMouseDown,
|
115
|
+
height: tableRef?.current?.getBoundingClientRect()?.height,
|
116
|
+
resizing: resizing
|
117
|
+
})]
|
118
|
+
});
|
119
|
+
};
|
41
120
|
const TableView = props => {
|
42
121
|
const {
|
43
122
|
theme: appTheme
|
@@ -48,6 +127,7 @@ const TableView = props => {
|
|
48
127
|
} = props;
|
49
128
|
const theme = useTheme();
|
50
129
|
const classes = useTableStyles(theme, appTheme);
|
130
|
+
const tableRef = useRef(null);
|
51
131
|
const {
|
52
132
|
properties,
|
53
133
|
onAddProperty,
|
@@ -164,6 +244,9 @@ const TableView = props => {
|
|
164
244
|
setMode({});
|
165
245
|
setAnchorEl(null);
|
166
246
|
};
|
247
|
+
const handleResize = data => {
|
248
|
+
onUpdateProperty(data);
|
249
|
+
};
|
167
250
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
168
251
|
children: [/*#__PURE__*/_jsx(Box, {
|
169
252
|
component: "div",
|
@@ -173,6 +256,7 @@ const TableView = props => {
|
|
173
256
|
children: /*#__PURE__*/_jsxs(Box, {
|
174
257
|
component: "table",
|
175
258
|
sx: classes.table,
|
259
|
+
ref: tableRef,
|
176
260
|
children: [/*#__PURE__*/_jsx("thead", {
|
177
261
|
children: /*#__PURE__*/_jsxs("tr", {
|
178
262
|
children: [shownProperties?.map((m, i) => {
|
@@ -180,26 +264,21 @@ const TableView = props => {
|
|
180
264
|
Icon: iconType
|
181
265
|
} = PROPERTY_TYPES?.find(f => f.type === m.type) || {};
|
182
266
|
const isSort = sortBy?.key === m.key ? sortBy?.operator : null;
|
183
|
-
return /*#__PURE__*/_jsx(
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
}),
|
192
|
-
endIcon: /*#__PURE__*/_jsx(SortIcon, {
|
193
|
-
sortBy: isSort
|
194
|
-
}),
|
195
|
-
fullWidth: true,
|
196
|
-
onClick: onEditProperty(m),
|
197
|
-
children: m.label
|
198
|
-
})
|
267
|
+
return /*#__PURE__*/_jsx(THead, {
|
268
|
+
iconType: iconType,
|
269
|
+
isSort: isSort,
|
270
|
+
onEditProperty: onEditProperty,
|
271
|
+
m: m,
|
272
|
+
classes: classes,
|
273
|
+
tableRef: tableRef,
|
274
|
+
handleResize: handleResize
|
199
275
|
}, i);
|
200
276
|
}), !readOnly ? /*#__PURE__*/_jsxs(_Fragment, {
|
201
277
|
children: [/*#__PURE__*/_jsx("th", {
|
202
278
|
className: "tv-act-btn ico",
|
279
|
+
style: {
|
280
|
+
widht: "autp"
|
281
|
+
},
|
203
282
|
children: /*#__PURE__*/_jsx(Button, {
|
204
283
|
onClick: onAddClick,
|
205
284
|
fullWidth: true,
|
@@ -207,6 +286,9 @@ const TableView = props => {
|
|
207
286
|
})
|
208
287
|
}), /*#__PURE__*/_jsx("th", {
|
209
288
|
className: "tv-act-btn ico",
|
289
|
+
style: {
|
290
|
+
widht: "autp"
|
291
|
+
},
|
210
292
|
children: /*#__PURE__*/_jsx(Button, {
|
211
293
|
onClick: onSettings,
|
212
294
|
fullWidth: true,
|
@@ -226,18 +308,18 @@ const TableView = props => {
|
|
226
308
|
textTransform: "none",
|
227
309
|
justifyContent: "start",
|
228
310
|
color: appTheme?.palette?.editor?.activeColor,
|
229
|
-
|
230
|
-
width:
|
231
|
-
height:
|
311
|
+
"& svg": {
|
312
|
+
width: "18px",
|
313
|
+
height: "18px",
|
232
314
|
strokeWidth: 1.2,
|
233
|
-
|
315
|
+
"& path": {
|
234
316
|
stroke: appTheme?.palette?.editor?.activeColor
|
235
317
|
}
|
236
318
|
},
|
237
|
-
fontFamily:
|
319
|
+
fontFamily: "inter"
|
238
320
|
},
|
239
321
|
startIcon: /*#__PURE__*/_jsx(Icon, {
|
240
|
-
icon:
|
322
|
+
icon: "addRounded"
|
241
323
|
}),
|
242
324
|
children: "Add new row"
|
243
325
|
}) : null, open && !readOnly ? /*#__PURE__*/_jsx(PropertySettings, {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
2
|
-
import {
|
2
|
+
import { Transforms, Node } from "slate";
|
3
3
|
import { PROPERTY_DEFAULTS } from "../Layouts/Options/Constants";
|
4
4
|
import multiSortRows from "../Utils/multiSortRows";
|
5
5
|
import globalSearch from "../Utils/globalSearch";
|
@@ -11,7 +11,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
11
11
|
},
|
12
12
|
"& table th": {
|
13
13
|
cursor: "pointer",
|
14
|
-
|
14
|
+
minWidth: "200px"
|
15
15
|
},
|
16
16
|
"& table, th, td": {
|
17
17
|
border: "1px solid black",
|
@@ -48,7 +48,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
48
48
|
"& .tv-ck-box": {
|
49
49
|
"& svg": {
|
50
50
|
color: appTheme?.palette?.editor?.tv_border,
|
51
|
-
|
51
|
+
"& rect": {
|
52
52
|
fill: appTheme?.palette?.editor?.tv_chk_box_fill,
|
53
53
|
stroke: appTheme?.palette?.editor?.tv_chk_box_stroke
|
54
54
|
}
|
@@ -56,9 +56,9 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
56
56
|
"&.Mui-checked": {
|
57
57
|
"& svg": {
|
58
58
|
color: "rgba(37, 99, 235, 1)",
|
59
|
-
|
59
|
+
"& rect": {
|
60
60
|
fill: appTheme?.palette?.editor?.activeColor,
|
61
|
-
stroke:
|
61
|
+
stroke: "none"
|
62
62
|
}
|
63
63
|
}
|
64
64
|
}
|
@@ -94,7 +94,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
94
94
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
95
95
|
boxShadow: "0px 4px 18px 0px #0000000D",
|
96
96
|
borderRadius: "8px",
|
97
|
-
minWidth:
|
97
|
+
minWidth: "148px"
|
98
98
|
},
|
99
99
|
"& input": {
|
100
100
|
paddingBottom: "0px",
|
@@ -140,12 +140,12 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
140
140
|
width: "150px",
|
141
141
|
border: `1px solid ${appTheme?.palette?.editor?.tv_border}`,
|
142
142
|
borderRadius: "8px",
|
143
|
-
fontFamily:
|
143
|
+
fontFamily: "Inter !important",
|
144
144
|
background: appTheme?.palette?.editor?.tv_pop_bg,
|
145
145
|
color: appTheme?.palette?.editor?.tv_text_primary,
|
146
146
|
"& .MuiButtonBase-root": {
|
147
147
|
fontSize: "14px",
|
148
|
-
padding:
|
148
|
+
padding: "6px 8px",
|
149
149
|
"& svg": {
|
150
150
|
width: "16px",
|
151
151
|
height: "16px",
|
@@ -157,7 +157,7 @@ const useDataViewStyles = (theme, appTheme) => ({
|
|
157
157
|
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
158
158
|
"& svg": {
|
159
159
|
color: `${appTheme?.palette?.editor?.tv_hover_text} !important`,
|
160
|
-
|
160
|
+
"& path": {
|
161
161
|
stroke: `${appTheme?.palette?.editor?.tv_hover_text} !important`
|
162
162
|
}
|
163
163
|
}
|
@@ -5,7 +5,7 @@ import AspectRatioIcon from "@mui/icons-material/AspectRatio";
|
|
5
5
|
import useResize from "../../utils/customHooks/useResize";
|
6
6
|
import EmbedPopup from "./EmbedPopup";
|
7
7
|
import { IconButton, Tooltip, Box, useTheme } from "@mui/material";
|
8
|
-
import {
|
8
|
+
import { LinkIcon } from "../../common/iconslist";
|
9
9
|
import { useEditorContext } from "../../hooks/useMouseMove";
|
10
10
|
import { getTRBLBreakPoints, getBreakPointsValue, groupByBreakpoint } from "../../helper/theme";
|
11
11
|
import Icon from "../../common/Icon";
|
@@ -32,7 +32,7 @@ const ToolBar = ({
|
|
32
32
|
top: "-4px",
|
33
33
|
left: topM ? "35px" : "0px",
|
34
34
|
margin: "0px",
|
35
|
-
gap:
|
35
|
+
gap: "3px"
|
36
36
|
},
|
37
37
|
children: [/*#__PURE__*/_jsx(Tooltip, {
|
38
38
|
title: "Image Settings",
|
@@ -180,20 +180,6 @@ const FreeGrid = props => {
|
|
180
180
|
linkType: "webAddress"
|
181
181
|
},
|
182
182
|
iconPosition: "start",
|
183
|
-
bgColor: "#2563EB",
|
184
|
-
textColor: "#FFF",
|
185
|
-
borderRadius: {
|
186
|
-
topLeft: 30,
|
187
|
-
topRight: 30,
|
188
|
-
bottomLeft: 30,
|
189
|
-
bottomRight: 30
|
190
|
-
},
|
191
|
-
bannerSpacing: {
|
192
|
-
left: 12,
|
193
|
-
top: 12,
|
194
|
-
right: 12,
|
195
|
-
bottom: 12
|
196
|
-
},
|
197
183
|
textAlign: "center",
|
198
184
|
label: "Get Started"
|
199
185
|
}],
|
@@ -59,7 +59,8 @@ const FreeGridBox = props => {
|
|
59
59
|
delete updateData.children;
|
60
60
|
updateData = formatBreakpointValues(element.type, breakpoint, updateData);
|
61
61
|
Transforms.setNodes(editor, {
|
62
|
-
...updateData
|
62
|
+
...updateData,
|
63
|
+
[`${breakpoint}_updatedOn`]: new Date().getTime()
|
63
64
|
}, {
|
64
65
|
at: path
|
65
66
|
});
|
@@ -59,7 +59,8 @@ const FreeGridItem = props => {
|
|
59
59
|
delete updateData.children;
|
60
60
|
updateData = formatBreakpointValues(element.type, breakpoint, updateData);
|
61
61
|
Transforms.setNodes(editor, {
|
62
|
-
...updateData
|
62
|
+
...updateData,
|
63
|
+
[`${breakpoint}_updatedOn`]: new Date().getTime()
|
63
64
|
}, {
|
64
65
|
at: path
|
65
66
|
});
|
@@ -50,8 +50,7 @@ const GridItemToolbar = props => {
|
|
50
50
|
open: true,
|
51
51
|
placement: "top-end",
|
52
52
|
sx: classes.popTools,
|
53
|
-
className: "gi-tool-pp",
|
54
|
-
disablePortal: true,
|
53
|
+
className: "gi-tool-pp hide-popper-on-overlap",
|
55
54
|
contentEditable: false,
|
56
55
|
children: /*#__PURE__*/_jsxs(Box, {
|
57
56
|
className: "ico-grp-ss",
|
@@ -288,7 +287,7 @@ const GridItem = props => {
|
|
288
287
|
...getBRProps,
|
289
288
|
display: "flex",
|
290
289
|
flexDirection: flexDirection || "column",
|
291
|
-
background: bgColor
|
290
|
+
background: bgColor,
|
292
291
|
borderColor: getBorderColor(),
|
293
292
|
borderWidth: borderWidth || "1px",
|
294
293
|
borderStyle: borderStyle || "solid",
|