@flozy/editor 7.0.7 → 7.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Editor/ChatEditor.js +7 -7
- package/dist/Editor/CommonEditor.js +74 -25
- package/dist/Editor/DialogWrapper.js +31 -25
- package/dist/Editor/Editor.css +33 -16
- package/dist/Editor/Elements/AI/PopoverAIInput.js +2 -12
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +26 -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/DataView.js +4 -3
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +5 -1
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +5 -1
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +23 -19
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +1 -1
- package/dist/Editor/Elements/Embed/Image.js +2 -2
- package/dist/Editor/Elements/Form/Form.js +1 -0
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +0 -14
- package/dist/Editor/Elements/FreeGrid/styles.js +4 -0
- package/dist/Editor/Elements/Grid/GridItem.js +2 -3
- package/dist/Editor/Elements/Link/Link.js +70 -43
- package/dist/Editor/Elements/List/CheckList.js +2 -1
- package/dist/Editor/Elements/Search/SearchAttachment.js +1 -0
- package/dist/Editor/Elements/Search/SearchList.js +8 -1
- package/dist/Editor/Elements/SimpleText/index.js +8 -1
- package/dist/Editor/Elements/SimpleText/style.js +5 -1
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +14 -9
- 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/MiniEditor.js +4 -2
- 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 +46 -36
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +3 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +6 -13
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +3 -1
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +211 -91
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +11 -4
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +16 -12
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +1 -1
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +99 -7
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +438 -0
- package/dist/Editor/Toolbar/PopupTool/index.js +2 -0
- 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 +94 -0
- package/dist/Editor/common/CustomDialog/style.js +67 -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 +1 -9
- package/dist/Editor/common/FontLoader/FontLoader.js +6 -4
- package/dist/Editor/common/Icon.js +28 -0
- package/dist/Editor/common/ImageSelector/Styles.js +3 -9
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -9
- package/dist/Editor/common/MentionsPopup/index.js +0 -1
- 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/SwitchViewport/SwitchViewport.js +14 -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 +40 -0
- package/dist/Editor/common/RnD/index.js +23 -3
- 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/index.js +3 -1
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +79 -0
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +15 -7
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +4 -0
- package/dist/Editor/common/Uploader.js +8 -0
- package/dist/Editor/commonStyle.js +58 -63
- package/dist/Editor/helper/ensureWrappedVariables.js +28 -0
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +224 -3
- package/dist/Editor/hooks/useEditorTheme.js +153 -0
- package/dist/Editor/hooks/useMouseMove.js +13 -5
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +4 -2
- 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 +161 -42
- package/dist/Editor/utils/button.js +0 -14
- package/dist/Editor/utils/customHooks/useTableResize.js +2 -1
- package/dist/Editor/utils/draftToSlate.js +3 -2
- package/dist/Editor/utils/font.js +40 -37
- package/dist/Editor/utils/helper.js +88 -19
- package/dist/Editor/utils/link.js +1 -1
- package/dist/Editor/utils/pageSettings.js +14 -2
- package/dist/Editor/utils/table.js +21 -0
- 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
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { Node, Path, Transforms } from "slate";
|
3
|
-
import { ReactEditor,
|
3
|
+
import { ReactEditor, useSlate } from "slate-react";
|
4
4
|
import { Box, useTheme } from "@mui/material";
|
5
5
|
import { DataViewProvider } from "./Providers/DataViewProvider";
|
6
6
|
import useDataViewStyles from "./styles";
|
@@ -15,7 +15,7 @@ const DataView = props => {
|
|
15
15
|
theme: appTheme
|
16
16
|
} = useEditorContext();
|
17
17
|
const theme = useTheme();
|
18
|
-
const editor =
|
18
|
+
const editor = useSlate();
|
19
19
|
const {
|
20
20
|
attributes,
|
21
21
|
children,
|
@@ -113,7 +113,8 @@ const DataView = props => {
|
|
113
113
|
onDuplicate: onDuplicate,
|
114
114
|
readOnly: readOnly,
|
115
115
|
title: title,
|
116
|
-
onTitleChange: onTitleChange
|
116
|
+
onTitleChange: onTitleChange,
|
117
|
+
path: path
|
117
118
|
}), /*#__PURE__*/_jsx(LayoutView, {
|
118
119
|
readOnly: readOnly,
|
119
120
|
children: children
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { TextField } from "@mui/material";
|
3
3
|
import { useDataView } from "../../Providers/DataViewProvider";
|
4
|
+
import { focusDynamicTableInput } from "../../../../utils/helper";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
const NumberType = props => {
|
6
7
|
const {
|
@@ -16,6 +17,7 @@ const NumberType = props => {
|
|
16
17
|
onChange(rowIndex, {
|
17
18
|
[property]: e?.target?.value
|
18
19
|
});
|
20
|
+
focusDynamicTableInput(e);
|
19
21
|
};
|
20
22
|
return /*#__PURE__*/_jsx(TextField, {
|
21
23
|
type: "number",
|
@@ -24,7 +26,9 @@ const NumberType = props => {
|
|
24
26
|
value: value,
|
25
27
|
size: "small",
|
26
28
|
onChange: handleChange,
|
27
|
-
disabled: readOnly
|
29
|
+
disabled: readOnly,
|
30
|
+
id: `tv-number-input-${rowIndex}-${property}` // * should be unique
|
28
31
|
});
|
29
32
|
};
|
33
|
+
|
30
34
|
export default NumberType;
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from "react";
|
2
2
|
import { TextField } from "@mui/material";
|
3
3
|
import { useDataView } from "../../Providers/DataViewProvider";
|
4
|
+
import { focusDynamicTableInput } from "../../../../utils/helper";
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
5
6
|
const TextType = props => {
|
6
7
|
const {
|
@@ -16,6 +17,7 @@ const TextType = props => {
|
|
16
17
|
onChange(rowIndex, {
|
17
18
|
[property]: e?.target?.value
|
18
19
|
});
|
20
|
+
focusDynamicTableInput(e);
|
19
21
|
};
|
20
22
|
const formatValue = () => {
|
21
23
|
if (typeof value === "string") {
|
@@ -30,7 +32,9 @@ const TextType = props => {
|
|
30
32
|
value: formatValue(value),
|
31
33
|
size: "small",
|
32
34
|
onChange: handleChange,
|
33
|
-
disabled: readOnly
|
35
|
+
disabled: readOnly,
|
36
|
+
id: `tv-text-input-${rowIndex}-${property}` // * should be unique
|
34
37
|
});
|
35
38
|
};
|
39
|
+
|
36
40
|
export default TextType;
|
@@ -5,6 +5,7 @@ import FilterSort from "./FilterSort";
|
|
5
5
|
import MoreHorizIcon from "@mui/icons-material/MoreHoriz";
|
6
6
|
import Icon from "../../../common/Icon";
|
7
7
|
import { useEditorContext } from "../../../hooks/useMouseMove";
|
8
|
+
import { focusDynamicTableInput } from "../../../utils/helper";
|
8
9
|
import { jsx as _jsx } from "react/jsx-runtime";
|
9
10
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
10
11
|
const FilterView = props => {
|
@@ -15,7 +16,8 @@ const FilterView = props => {
|
|
15
16
|
onEnter,
|
16
17
|
readOnly,
|
17
18
|
title,
|
18
|
-
onTitleChange
|
19
|
+
onTitleChange,
|
20
|
+
path
|
19
21
|
} = props;
|
20
22
|
const {
|
21
23
|
sort,
|
@@ -70,6 +72,7 @@ const FilterView = props => {
|
|
70
72
|
};
|
71
73
|
const handleTitleChange = e => {
|
72
74
|
onTitleChange(e?.target?.value);
|
75
|
+
focusDynamicTableInput(e);
|
73
76
|
};
|
74
77
|
const handleEnter = e => {
|
75
78
|
if (e?.key === "Enter") {
|
@@ -96,24 +99,25 @@ const FilterView = props => {
|
|
96
99
|
},
|
97
100
|
value: title,
|
98
101
|
onChange: handleTitleChange,
|
99
|
-
onKeyUp: handleEnter
|
102
|
+
onKeyUp: handleEnter,
|
103
|
+
id: `tv-title-input-${path.join("|")}`
|
100
104
|
}) : title || "Untitled"
|
101
105
|
}), /*#__PURE__*/_jsxs(Box, {
|
102
106
|
className: "tv-fi-wrpr",
|
103
107
|
sx: {
|
104
|
-
alignItems:
|
108
|
+
alignItems: "center"
|
105
109
|
},
|
106
110
|
children: [/*#__PURE__*/_jsxs(Box, {
|
107
111
|
className: `tv-sb mr ${toggle ? "open" : ""}`,
|
108
112
|
sx: {
|
109
|
-
minHeight:
|
113
|
+
minHeight: "32px"
|
110
114
|
},
|
111
115
|
children: [/*#__PURE__*/_jsx(IconButton, {
|
112
116
|
type: "button",
|
113
117
|
sx: {
|
114
|
-
|
115
|
-
width:
|
116
|
-
height:
|
118
|
+
"& svg": {
|
119
|
+
width: "14px",
|
120
|
+
height: "14px"
|
117
121
|
}
|
118
122
|
},
|
119
123
|
"aria-label": "search",
|
@@ -137,12 +141,12 @@ const FilterView = props => {
|
|
137
141
|
className: ` ${sort?.length > 0 ? "active" : ""}`,
|
138
142
|
onClick: handleSortClick,
|
139
143
|
sx: {
|
140
|
-
|
144
|
+
"& svg": {
|
141
145
|
strokeWidth: 1.2
|
142
146
|
}
|
143
147
|
},
|
144
148
|
children: /*#__PURE__*/_jsx(Icon, {
|
145
|
-
icon:
|
149
|
+
icon: "sortBy"
|
146
150
|
})
|
147
151
|
}), /*#__PURE__*/_jsx(FilterSort, {
|
148
152
|
open: open,
|
@@ -152,7 +156,7 @@ const FilterView = props => {
|
|
152
156
|
}), !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
153
157
|
className: "mr",
|
154
158
|
sx: {
|
155
|
-
|
159
|
+
"& svg": {
|
156
160
|
fill: theme?.palette?.editor?.tv_stroke
|
157
161
|
}
|
158
162
|
},
|
@@ -162,7 +166,7 @@ const FilterView = props => {
|
|
162
166
|
className: "mr",
|
163
167
|
onClick: handleDeleteRow,
|
164
168
|
children: /*#__PURE__*/_jsx(Icon, {
|
165
|
-
icon:
|
169
|
+
icon: "trashIcon"
|
166
170
|
})
|
167
171
|
}) : null, !readOnly ? /*#__PURE__*/_jsxs(Menu, {
|
168
172
|
sx: classes.basicMenu,
|
@@ -185,24 +189,24 @@ const FilterView = props => {
|
|
185
189
|
onClick: onMenuClick("Duplicate"),
|
186
190
|
children: [" ", /*#__PURE__*/_jsx(Box, {
|
187
191
|
sx: {
|
188
|
-
marginRight:
|
189
|
-
display:
|
190
|
-
alignItems:
|
192
|
+
marginRight: "5px",
|
193
|
+
display: " flex",
|
194
|
+
alignItems: "center"
|
191
195
|
},
|
192
196
|
children: /*#__PURE__*/_jsx(Icon, {
|
193
|
-
icon:
|
197
|
+
icon: "duplicateIcon"
|
194
198
|
})
|
195
199
|
}), "Duplicate"]
|
196
200
|
}), /*#__PURE__*/_jsxs(MenuItem, {
|
197
201
|
onClick: onMenuClick("Delete"),
|
198
202
|
children: [" ", /*#__PURE__*/_jsx(Box, {
|
199
203
|
sx: {
|
200
|
-
marginRight:
|
201
|
-
display:
|
202
|
-
alignItems:
|
204
|
+
marginRight: "5px",
|
205
|
+
display: " flex",
|
206
|
+
alignItems: "center"
|
203
207
|
},
|
204
208
|
children: /*#__PURE__*/_jsx(Icon, {
|
205
|
-
icon:
|
209
|
+
icon: "trashIcon"
|
206
210
|
})
|
207
211
|
}), "Delete"]
|
208
212
|
})]
|
@@ -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";
|
@@ -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
|
}],
|
@@ -171,6 +171,7 @@ const useFreeGridStyles = ({
|
|
171
171
|
height: "100%",
|
172
172
|
"& .signature-container": {
|
173
173
|
height: "100%",
|
174
|
+
LineHeight: 1.43,
|
174
175
|
"& .signature-btn-container": {
|
175
176
|
height: "100%",
|
176
177
|
display: "flex",
|
@@ -337,6 +338,9 @@ const useFreeGridStyles = ({
|
|
337
338
|
fontSize: "14px",
|
338
339
|
borderRadius: "7px"
|
339
340
|
}
|
341
|
+
},
|
342
|
+
"& .remove-resize-styles": {
|
343
|
+
transform: "none !important"
|
340
344
|
}
|
341
345
|
}
|
342
346
|
},
|
@@ -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",
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, { useState } from "react";
|
1
|
+
import React, { useRef, useState } from "react";
|
2
2
|
import { Node, Transforms } from "slate";
|
3
|
-
import { ReactEditor,
|
4
|
-
import { Box, IconButton, Tooltip } from "@mui/material";
|
3
|
+
import { ReactEditor, useSelected, useSlateStatic } from "slate-react";
|
4
|
+
import { Box, IconButton, Popper, Tooltip } from "@mui/material";
|
5
5
|
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
|
6
6
|
import EditIcon from "@mui/icons-material/Edit";
|
7
7
|
import LinkOffIcon from "@mui/icons-material/LinkOff";
|
@@ -11,6 +11,62 @@ import { getLinkType, handleLinkType } from "../../utils/helper";
|
|
11
11
|
import LinkSettings from "../../common/LinkSettings";
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
13
13
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
14
|
+
const Toolbar = props => {
|
15
|
+
const {
|
16
|
+
urlPath,
|
17
|
+
linkType,
|
18
|
+
showInNewTab,
|
19
|
+
selected,
|
20
|
+
linkRef,
|
21
|
+
onEditLink,
|
22
|
+
editor
|
23
|
+
} = props;
|
24
|
+
const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
|
25
|
+
const navType = getLinkType(linkType, urlPath);
|
26
|
+
const hideOpenLink = navType === "page" || !navType;
|
27
|
+
return selected ? /*#__PURE__*/_jsx(Popper, {
|
28
|
+
anchorEl: linkRef?.current,
|
29
|
+
open: true,
|
30
|
+
placement: "top-start",
|
31
|
+
className: "hide-popper-on-overlap",
|
32
|
+
contentEditable: false,
|
33
|
+
style: {
|
34
|
+
zIndex: 1000
|
35
|
+
},
|
36
|
+
children: /*#__PURE__*/_jsxs(Box, {
|
37
|
+
className: "element-toolbar hr",
|
38
|
+
style: {
|
39
|
+
width: "150px",
|
40
|
+
display: "flex",
|
41
|
+
position: "unset"
|
42
|
+
},
|
43
|
+
component: "div",
|
44
|
+
children: [hideOpenLink ? null : /*#__PURE__*/_jsx(Tooltip, {
|
45
|
+
title: "Open",
|
46
|
+
children: /*#__PURE__*/_jsx(Box, {
|
47
|
+
sx: {
|
48
|
+
display: "inline-flex",
|
49
|
+
color: "rgba(0, 0, 0, 0.54)"
|
50
|
+
},
|
51
|
+
...btnProps,
|
52
|
+
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
53
|
+
})
|
54
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
55
|
+
title: "Edit",
|
56
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
57
|
+
onClick: onEditLink,
|
58
|
+
children: /*#__PURE__*/_jsx(EditIcon, {})
|
59
|
+
})
|
60
|
+
}), /*#__PURE__*/_jsx(Tooltip, {
|
61
|
+
title: "Remove",
|
62
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
63
|
+
onClick: () => removeLink(editor),
|
64
|
+
children: /*#__PURE__*/_jsx(LinkOffIcon, {})
|
65
|
+
})
|
66
|
+
})]
|
67
|
+
})
|
68
|
+
}) : null;
|
69
|
+
};
|
14
70
|
const linkStyles = () => ({
|
15
71
|
linkBtn: {
|
16
72
|
border: "none",
|
@@ -40,7 +96,6 @@ const Link = props => {
|
|
40
96
|
} = customProps;
|
41
97
|
const editor = useSlateStatic();
|
42
98
|
const selected = useSelected();
|
43
|
-
const focused = useFocused();
|
44
99
|
const [showInput, setShowInput] = useState(false);
|
45
100
|
const [linkData, setLinkData] = useState({
|
46
101
|
name: "",
|
@@ -53,6 +108,7 @@ const Link = props => {
|
|
53
108
|
const showInNewTab = element?.showInNewTab || element?.target;
|
54
109
|
const linkType = element?.linkType;
|
55
110
|
const classes = linkStyles();
|
111
|
+
const linkRef = useRef(null);
|
56
112
|
const updateLink = data => {
|
57
113
|
Transforms.setNodes(editor, data, {
|
58
114
|
at: path
|
@@ -77,54 +133,25 @@ const Link = props => {
|
|
77
133
|
const handleClose = () => {
|
78
134
|
setShowInput(false);
|
79
135
|
};
|
80
|
-
const Toolbar = () => {
|
81
|
-
const btnProps = handleLinkType(urlPath, linkType, true, showInNewTab === "_blank");
|
82
|
-
const navType = getLinkType(linkType, urlPath);
|
83
|
-
const hideOpenLink = navType === "page" || !navType;
|
84
|
-
return selected && focused ? /*#__PURE__*/_jsxs("div", {
|
85
|
-
className: "element-toolbar hr",
|
86
|
-
contentEditable: false,
|
87
|
-
style: {
|
88
|
-
width: "150px",
|
89
|
-
top: "100%",
|
90
|
-
left: "0px",
|
91
|
-
display: "flex"
|
92
|
-
},
|
93
|
-
children: [hideOpenLink ? null : /*#__PURE__*/_jsx(Tooltip, {
|
94
|
-
title: "Open",
|
95
|
-
children: /*#__PURE__*/_jsx(Box, {
|
96
|
-
sx: {
|
97
|
-
display: "inline-flex",
|
98
|
-
color: "rgba(0, 0, 0, 0.54)"
|
99
|
-
},
|
100
|
-
...btnProps,
|
101
|
-
children: /*#__PURE__*/_jsx(OpenInNewIcon, {})
|
102
|
-
})
|
103
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
104
|
-
title: "Edit",
|
105
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
106
|
-
onClick: onEditLink,
|
107
|
-
children: /*#__PURE__*/_jsx(EditIcon, {})
|
108
|
-
})
|
109
|
-
}), /*#__PURE__*/_jsx(Tooltip, {
|
110
|
-
title: "Remove",
|
111
|
-
children: /*#__PURE__*/_jsx(IconButton, {
|
112
|
-
onClick: () => removeLink(editor),
|
113
|
-
children: /*#__PURE__*/_jsx(LinkOffIcon, {})
|
114
|
-
})
|
115
|
-
})]
|
116
|
-
}) : null;
|
117
|
-
};
|
118
136
|
const buttonProps = handleLinkType(urlPath, linkType, readOnly, showInNewTab === "_blank");
|
119
137
|
return /*#__PURE__*/_jsxs("div", {
|
120
138
|
className: "link",
|
139
|
+
ref: linkRef,
|
121
140
|
children: [/*#__PURE__*/_jsx(Box, {
|
122
141
|
...attributes,
|
123
142
|
...element.attr,
|
124
143
|
sx: classes.linkBtn,
|
125
144
|
...buttonProps,
|
126
145
|
children: children
|
127
|
-
}), /*#__PURE__*/_jsx(Toolbar, {
|
146
|
+
}), /*#__PURE__*/_jsx(Toolbar, {
|
147
|
+
urlPath: urlPath,
|
148
|
+
linkType: linkType,
|
149
|
+
showInNewTab: showInNewTab,
|
150
|
+
selected: selected,
|
151
|
+
linkRef: linkRef,
|
152
|
+
onEditLink: onEditLink,
|
153
|
+
editor: editor
|
154
|
+
}), showInput ? /*#__PURE__*/_jsx(LinkSettings, {
|
128
155
|
handleClose: handleClose,
|
129
156
|
onSave: ({
|
130
157
|
linkType,
|
@@ -49,6 +49,7 @@ const SearchAttachment = props => {
|
|
49
49
|
background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
|
50
50
|
cursor: 'pointer',
|
51
51
|
margin: '4px 0px',
|
52
|
+
lineHeight: 1.43,
|
52
53
|
"&.MuiPaper-root.MuiPaper-rounded": {
|
53
54
|
borderRadius: "7px !important",
|
54
55
|
paddingTop: '0px !important'
|