@flozy/editor 6.0.3 → 6.0.5
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 +25 -81
- package/dist/Editor/DialogWrapper.js +25 -31
- package/dist/Editor/Editor.css +16 -22
- package/dist/Editor/Elements/AI/PopoverAIInput.js +12 -2
- package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
- package/dist/Editor/Elements/Button/EditorButton.js +9 -26
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +12 -57
- package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
- 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 +3 -4
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +1 -5
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +1 -5
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +19 -23
- 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 +0 -1
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +14 -0
- package/dist/Editor/Elements/FreeGrid/styles.js +0 -4
- package/dist/Editor/Elements/Grid/GridItem.js +3 -2
- package/dist/Editor/Elements/Link/Link.js +43 -70
- package/dist/Editor/Elements/List/CheckList.js +1 -2
- package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
- package/dist/Editor/Elements/Search/SearchList.js +1 -8
- package/dist/Editor/Elements/SimpleText/index.js +1 -8
- package/dist/Editor/Elements/SimpleText/style.js +1 -5
- package/dist/Editor/Elements/Table/Table.js +3 -3
- package/dist/Editor/Elements/Table/TableCell.js +9 -14
- package/dist/Editor/Elements/Title/title.js +1 -13
- package/dist/Editor/Elements/Variables/Style.js +2 -28
- package/dist/Editor/Elements/Variables/VariableButton.js +4 -17
- package/dist/Editor/MiniEditor.js +2 -4
- 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 +15 -7
- package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +36 -46
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +1 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +13 -6
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +1 -3
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +91 -211
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +4 -11
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +12 -16
- package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +1 -1
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +7 -99
- package/dist/Editor/Toolbar/PopupTool/index.js +0 -2
- package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
- package/dist/Editor/common/ColorPickerButton.js +9 -32
- package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
- package/dist/Editor/common/DnD/Draggable.js +1 -0
- package/dist/Editor/common/FontLoader/FontList.js +9 -1
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -6
- package/dist/Editor/common/Icon.js +0 -28
- package/dist/Editor/common/ImageSelector/Styles.js +9 -3
- package/dist/Editor/common/MentionsPopup/Styles.js +9 -3
- package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
- 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/VideoSettings.js +2 -3
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
- package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
- package/dist/Editor/common/RnD/Utils/gridDropItem.js +4 -5
- package/dist/Editor/common/RnD/Utils/index.js +0 -40
- package/dist/Editor/common/RnD/index.js +3 -23
- package/dist/Editor/common/Shorthands/elements.js +0 -54
- package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -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 +2 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +11 -35
- package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
- package/dist/Editor/common/Uploader.js +0 -8
- package/dist/Editor/commonStyle.js +63 -58
- package/dist/Editor/helper/deserialize/index.js +1 -1
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +3 -224
- package/dist/Editor/hooks/useMouseMove.js +5 -13
- package/dist/Editor/plugins/withEmbeds.js +1 -1
- package/dist/Editor/plugins/withHTML.js +2 -2
- package/dist/Editor/plugins/withLayout.js +1 -1
- package/dist/Editor/plugins/withTable.js +1 -1
- package/dist/Editor/theme/ThemeList.js +173 -50
- package/dist/Editor/utils/SlateUtilityFunctions.js +42 -161
- package/dist/Editor/utils/button.js +14 -0
- package/dist/Editor/utils/customHooks/useTableResize.js +1 -2
- package/dist/Editor/utils/draftToSlate.js +2 -3
- package/dist/Editor/utils/font.js +37 -40
- package/dist/Editor/utils/helper.js +19 -88
- package/dist/Editor/utils/link.js +1 -1
- package/dist/Editor/utils/pageSettings.js +2 -14
- package/dist/Editor/utils/table.js +0 -21
- package/package.json +2 -5
- package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
- package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
- package/dist/Editor/common/CustomColorPicker/index.js +0 -106
- package/dist/Editor/common/CustomColorPicker/style.js +0 -53
- package/dist/Editor/common/CustomDialog/index.js +0 -94
- package/dist/Editor/common/CustomDialog/style.js +0 -67
- package/dist/Editor/common/CustomSelect.js +0 -33
- package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
- package/dist/Editor/helper/ensureWrappedVariables.js +0 -28
- package/dist/Editor/hooks/useEditorTheme.js +0 -153
- package/dist/Editor/theme/index.js +0 -144
- package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
- package/dist/Editor/themeSettings/buttons/index.js +0 -283
- package/dist/Editor/themeSettings/buttons/style.js +0 -21
- package/dist/Editor/themeSettings/colorTheme/index.js +0 -292
- package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
- package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
- package/dist/Editor/themeSettings/fonts/index.js +0 -220
- package/dist/Editor/themeSettings/fonts/style.js +0 -44
- package/dist/Editor/themeSettings/icons.js +0 -60
- package/dist/Editor/themeSettings/index.js +0 -320
- package/dist/Editor/themeSettings/style.js +0 -152
- package/dist/Editor/themeSettingsAI/icons.js +0 -96
- package/dist/Editor/themeSettingsAI/index.js +0 -356
- package/dist/Editor/themeSettingsAI/saveTheme.js +0 -197
- package/dist/Editor/themeSettingsAI/style.js +0 -250
@@ -1,15 +1,11 @@
|
|
1
1
|
import React, { useState } from "react";
|
2
|
-
import { Box, IconButton, Popover
|
2
|
+
import { Box, IconButton, Popover } 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";
|
10
7
|
import { jsx as _jsx } from "react/jsx-runtime";
|
11
8
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
12
|
-
import { Fragment as _Fragment } from "react/jsx-runtime";
|
13
9
|
let c = [];
|
14
10
|
const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
|
15
11
|
if (i % 7 === 0) {
|
@@ -114,18 +110,12 @@ const ColorButtons = props => {
|
|
114
110
|
openColorTool,
|
115
111
|
onClose,
|
116
112
|
onColorPickerClick,
|
117
|
-
disableEditTheme,
|
118
113
|
defaultColors = []
|
119
114
|
} = props;
|
120
115
|
const [row1, ...restRows] = ColorChunks([]);
|
121
116
|
const [anchorEl, setAnchorEl] = useState(null);
|
122
117
|
const open = Boolean(anchorEl);
|
123
118
|
const firstRow = defaultColors?.length ? defaultColors : row1;
|
124
|
-
const theme = useTheme();
|
125
|
-
const editor = useSlateStatic();
|
126
|
-
const {
|
127
|
-
setOpenTheme
|
128
|
-
} = useEditorContext();
|
129
119
|
const handleMore = e => {
|
130
120
|
setAnchorEl(e.currentTarget);
|
131
121
|
};
|
@@ -138,7 +128,6 @@ const ColorButtons = props => {
|
|
138
128
|
const handleSelect = color => () => {
|
139
129
|
onSelect(color);
|
140
130
|
};
|
141
|
-
const colorVars = theme?.vars?.colors || {};
|
142
131
|
return /*#__PURE__*/_jsxs(Box, {
|
143
132
|
component: "span",
|
144
133
|
sx: classes.colorButtons,
|
@@ -155,7 +144,7 @@ const ColorButtons = props => {
|
|
155
144
|
activeColor: activeColor
|
156
145
|
}, `si_btn_row1_${m}_${i}`);
|
157
146
|
})
|
158
|
-
}), /*#__PURE__*/
|
147
|
+
}), /*#__PURE__*/_jsxs(Popover, {
|
159
148
|
open: open || openColorTool,
|
160
149
|
anchorEl: anchorEl || openColorTool,
|
161
150
|
onClose: handleClose,
|
@@ -169,39 +158,9 @@ const ColorButtons = props => {
|
|
169
158
|
},
|
170
159
|
sx: classes.colorPopper,
|
171
160
|
className: "colorPopper",
|
172
|
-
children: /*#__PURE__*/
|
161
|
+
children: [/*#__PURE__*/_jsx(Box, {
|
173
162
|
sx: classes.colorButtonsInner,
|
174
|
-
children:
|
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) => {
|
163
|
+
children: restRows.map((m, i) => {
|
205
164
|
return /*#__PURE__*/_jsx(SingleColorButton, {
|
206
165
|
id: `p2_${id}`,
|
207
166
|
crs: m,
|
@@ -210,18 +169,14 @@ const ColorButtons = props => {
|
|
210
169
|
classes: classes,
|
211
170
|
activeColor: activeColor
|
212
171
|
}, `si_btn_${m}_${i}`);
|
213
|
-
})
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
alt: "color wheel"
|
222
|
-
})
|
223
|
-
}) : null]
|
224
|
-
})
|
172
|
+
})
|
173
|
+
}), forMiniTool ? /*#__PURE__*/_jsx(IconButton, {
|
174
|
+
onClick: onColorPickerClick,
|
175
|
+
children: /*#__PURE__*/_jsx("img", {
|
176
|
+
src: ColorPicker,
|
177
|
+
alt: "color wheel"
|
178
|
+
})
|
179
|
+
}) : null]
|
225
180
|
})]
|
226
181
|
});
|
227
182
|
};
|
@@ -60,28 +60,4 @@
|
|
60
60
|
padding: 0 15px !important;
|
61
61
|
width: 60px !important;
|
62
62
|
flex-shrink: 0;
|
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
|
-
}
|
63
|
+
}
|
@@ -1,6 +1,7 @@
|
|
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";
|
4
5
|
import { IconButton, Tooltip, Box, Popover } from "@mui/material";
|
5
6
|
import { addMarkData, activeMark } from "../../utils/SlateUtilityFunctions";
|
6
7
|
import ColorButtons from "./ColorButtons";
|
@@ -8,7 +9,6 @@ import ColorPickerStyles from "./Styles";
|
|
8
9
|
import colorWheel from "./colorWheel.png";
|
9
10
|
import "./ColorPicker.css";
|
10
11
|
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(ColorPickerTool, {
|
99
99
|
gradient: true,
|
100
|
-
|
101
|
-
|
100
|
+
value: activeColor,
|
101
|
+
onChange: handleFormSubmit
|
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, useSlateStatic } 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 = useSlateStatic();
|
19
19
|
const {
|
20
20
|
attributes,
|
21
21
|
children,
|
@@ -113,8 +113,7 @@ const DataView = props => {
|
|
113
113
|
onDuplicate: onDuplicate,
|
114
114
|
readOnly: readOnly,
|
115
115
|
title: title,
|
116
|
-
onTitleChange: onTitleChange
|
117
|
-
path: path
|
116
|
+
onTitleChange: onTitleChange
|
118
117
|
}), /*#__PURE__*/_jsx(LayoutView, {
|
119
118
|
readOnly: readOnly,
|
120
119
|
children: children
|
@@ -1,7 +1,6 @@
|
|
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";
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
const NumberType = props => {
|
7
6
|
const {
|
@@ -17,7 +16,6 @@ const NumberType = props => {
|
|
17
16
|
onChange(rowIndex, {
|
18
17
|
[property]: e?.target?.value
|
19
18
|
});
|
20
|
-
focusDynamicTableInput(e);
|
21
19
|
};
|
22
20
|
return /*#__PURE__*/_jsx(TextField, {
|
23
21
|
type: "number",
|
@@ -26,9 +24,7 @@ const NumberType = props => {
|
|
26
24
|
value: value,
|
27
25
|
size: "small",
|
28
26
|
onChange: handleChange,
|
29
|
-
disabled: readOnly
|
30
|
-
id: `tv-number-input-${rowIndex}-${property}` // * should be unique
|
27
|
+
disabled: readOnly
|
31
28
|
});
|
32
29
|
};
|
33
|
-
|
34
30
|
export default NumberType;
|
@@ -1,7 +1,6 @@
|
|
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";
|
5
4
|
import { jsx as _jsx } from "react/jsx-runtime";
|
6
5
|
const TextType = props => {
|
7
6
|
const {
|
@@ -17,7 +16,6 @@ const TextType = props => {
|
|
17
16
|
onChange(rowIndex, {
|
18
17
|
[property]: e?.target?.value
|
19
18
|
});
|
20
|
-
focusDynamicTableInput(e);
|
21
19
|
};
|
22
20
|
const formatValue = () => {
|
23
21
|
if (typeof value === "string") {
|
@@ -32,9 +30,7 @@ const TextType = props => {
|
|
32
30
|
value: formatValue(value),
|
33
31
|
size: "small",
|
34
32
|
onChange: handleChange,
|
35
|
-
disabled: readOnly
|
36
|
-
id: `tv-text-input-${rowIndex}-${property}` // * should be unique
|
33
|
+
disabled: readOnly
|
37
34
|
});
|
38
35
|
};
|
39
|
-
|
40
36
|
export default TextType;
|
@@ -5,7 +5,6 @@ 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";
|
9
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
10
9
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
11
10
|
const FilterView = props => {
|
@@ -16,8 +15,7 @@ const FilterView = props => {
|
|
16
15
|
onEnter,
|
17
16
|
readOnly,
|
18
17
|
title,
|
19
|
-
onTitleChange
|
20
|
-
path
|
18
|
+
onTitleChange
|
21
19
|
} = props;
|
22
20
|
const {
|
23
21
|
sort,
|
@@ -72,7 +70,6 @@ const FilterView = props => {
|
|
72
70
|
};
|
73
71
|
const handleTitleChange = e => {
|
74
72
|
onTitleChange(e?.target?.value);
|
75
|
-
focusDynamicTableInput(e);
|
76
73
|
};
|
77
74
|
const handleEnter = e => {
|
78
75
|
if (e?.key === "Enter") {
|
@@ -99,25 +96,24 @@ const FilterView = props => {
|
|
99
96
|
},
|
100
97
|
value: title,
|
101
98
|
onChange: handleTitleChange,
|
102
|
-
onKeyUp: handleEnter
|
103
|
-
id: `tv-title-input-${path.join("|")}`
|
99
|
+
onKeyUp: handleEnter
|
104
100
|
}) : title || "Untitled"
|
105
101
|
}), /*#__PURE__*/_jsxs(Box, {
|
106
102
|
className: "tv-fi-wrpr",
|
107
103
|
sx: {
|
108
|
-
alignItems:
|
104
|
+
alignItems: 'center'
|
109
105
|
},
|
110
106
|
children: [/*#__PURE__*/_jsxs(Box, {
|
111
107
|
className: `tv-sb mr ${toggle ? "open" : ""}`,
|
112
108
|
sx: {
|
113
|
-
minHeight:
|
109
|
+
minHeight: '32px'
|
114
110
|
},
|
115
111
|
children: [/*#__PURE__*/_jsx(IconButton, {
|
116
112
|
type: "button",
|
117
113
|
sx: {
|
118
|
-
|
119
|
-
width:
|
120
|
-
height:
|
114
|
+
'& svg': {
|
115
|
+
width: '14px',
|
116
|
+
height: '14px'
|
121
117
|
}
|
122
118
|
},
|
123
119
|
"aria-label": "search",
|
@@ -141,12 +137,12 @@ const FilterView = props => {
|
|
141
137
|
className: ` ${sort?.length > 0 ? "active" : ""}`,
|
142
138
|
onClick: handleSortClick,
|
143
139
|
sx: {
|
144
|
-
|
140
|
+
'& svg': {
|
145
141
|
strokeWidth: 1.2
|
146
142
|
}
|
147
143
|
},
|
148
144
|
children: /*#__PURE__*/_jsx(Icon, {
|
149
|
-
icon:
|
145
|
+
icon: 'sortBy'
|
150
146
|
})
|
151
147
|
}), /*#__PURE__*/_jsx(FilterSort, {
|
152
148
|
open: open,
|
@@ -156,7 +152,7 @@ const FilterView = props => {
|
|
156
152
|
}), !readOnly ? /*#__PURE__*/_jsx(IconButton, {
|
157
153
|
className: "mr",
|
158
154
|
sx: {
|
159
|
-
|
155
|
+
'& svg': {
|
160
156
|
fill: theme?.palette?.editor?.tv_stroke
|
161
157
|
}
|
162
158
|
},
|
@@ -166,7 +162,7 @@ const FilterView = props => {
|
|
166
162
|
className: "mr",
|
167
163
|
onClick: handleDeleteRow,
|
168
164
|
children: /*#__PURE__*/_jsx(Icon, {
|
169
|
-
icon:
|
165
|
+
icon: 'trashIcon'
|
170
166
|
})
|
171
167
|
}) : null, !readOnly ? /*#__PURE__*/_jsxs(Menu, {
|
172
168
|
sx: classes.basicMenu,
|
@@ -189,24 +185,24 @@ const FilterView = props => {
|
|
189
185
|
onClick: onMenuClick("Duplicate"),
|
190
186
|
children: [" ", /*#__PURE__*/_jsx(Box, {
|
191
187
|
sx: {
|
192
|
-
marginRight:
|
193
|
-
display:
|
194
|
-
alignItems:
|
188
|
+
marginRight: '5px',
|
189
|
+
display: ' flex',
|
190
|
+
alignItems: 'center'
|
195
191
|
},
|
196
192
|
children: /*#__PURE__*/_jsx(Icon, {
|
197
|
-
icon:
|
193
|
+
icon: 'duplicateIcon'
|
198
194
|
})
|
199
195
|
}), "Duplicate"]
|
200
196
|
}), /*#__PURE__*/_jsxs(MenuItem, {
|
201
197
|
onClick: onMenuClick("Delete"),
|
202
198
|
children: [" ", /*#__PURE__*/_jsx(Box, {
|
203
199
|
sx: {
|
204
|
-
marginRight:
|
205
|
-
display:
|
206
|
-
alignItems:
|
200
|
+
marginRight: '5px',
|
201
|
+
display: ' flex',
|
202
|
+
alignItems: 'center'
|
207
203
|
},
|
208
204
|
children: /*#__PURE__*/_jsx(Icon, {
|
209
|
-
icon:
|
205
|
+
icon: 'trashIcon'
|
210
206
|
})
|
211
207
|
}), "Delete"]
|
212
208
|
})]
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import React, { createContext, useContext, useEffect, useState } from "react";
|
2
|
-
import { Transforms, Node } from "slate";
|
2
|
+
import { Editor, 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 { LinkIcon } from "../../common/iconslist";
|
8
|
+
import { GridSettingsIcon, 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,6 +180,20 @@ 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
|
+
},
|
183
197
|
textAlign: "center",
|
184
198
|
label: "Get Started"
|
185
199
|
}],
|
@@ -171,7 +171,6 @@ const useFreeGridStyles = ({
|
|
171
171
|
height: "100%",
|
172
172
|
"& .signature-container": {
|
173
173
|
height: "100%",
|
174
|
-
LineHeight: 1.43,
|
175
174
|
"& .signature-btn-container": {
|
176
175
|
height: "100%",
|
177
176
|
display: "flex",
|
@@ -338,9 +337,6 @@ const useFreeGridStyles = ({
|
|
338
337
|
fontSize: "14px",
|
339
338
|
borderRadius: "7px"
|
340
339
|
}
|
341
|
-
},
|
342
|
-
"& .remove-resize-styles": {
|
343
|
-
transform: "none !important"
|
344
340
|
}
|
345
341
|
}
|
346
342
|
},
|
@@ -50,7 +50,8 @@ const GridItemToolbar = props => {
|
|
50
50
|
open: true,
|
51
51
|
placement: "top-end",
|
52
52
|
sx: classes.popTools,
|
53
|
-
className: "gi-tool-pp
|
53
|
+
className: "gi-tool-pp",
|
54
|
+
disablePortal: true,
|
54
55
|
contentEditable: false,
|
55
56
|
children: /*#__PURE__*/_jsxs(Box, {
|
56
57
|
className: "ico-grp-ss",
|
@@ -287,7 +288,7 @@ const GridItem = props => {
|
|
287
288
|
...getBRProps,
|
288
289
|
display: "flex",
|
289
290
|
flexDirection: flexDirection || "column",
|
290
|
-
background: bgColor,
|
291
|
+
background: bgColor || "transparent",
|
291
292
|
borderColor: getBorderColor(),
|
292
293
|
borderWidth: borderWidth || "1px",
|
293
294
|
borderStyle: borderStyle || "solid",
|
@@ -1,7 +1,7 @@
|
|
1
|
-
import React, {
|
1
|
+
import React, { useState } from "react";
|
2
2
|
import { Node, Transforms } from "slate";
|
3
|
-
import { ReactEditor, useSelected, useSlateStatic } from "slate-react";
|
4
|
-
import { Box, IconButton,
|
3
|
+
import { ReactEditor, useFocused, useSelected, useSlateStatic } from "slate-react";
|
4
|
+
import { Box, IconButton, 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,62 +11,6 @@ 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: 1
|
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
|
-
};
|
70
14
|
const linkStyles = () => ({
|
71
15
|
linkBtn: {
|
72
16
|
border: "none",
|
@@ -96,6 +40,7 @@ const Link = props => {
|
|
96
40
|
} = customProps;
|
97
41
|
const editor = useSlateStatic();
|
98
42
|
const selected = useSelected();
|
43
|
+
const focused = useFocused();
|
99
44
|
const [showInput, setShowInput] = useState(false);
|
100
45
|
const [linkData, setLinkData] = useState({
|
101
46
|
name: "",
|
@@ -108,7 +53,6 @@ const Link = props => {
|
|
108
53
|
const showInNewTab = element?.showInNewTab || element?.target;
|
109
54
|
const linkType = element?.linkType;
|
110
55
|
const classes = linkStyles();
|
111
|
-
const linkRef = useRef(null);
|
112
56
|
const updateLink = data => {
|
113
57
|
Transforms.setNodes(editor, data, {
|
114
58
|
at: path
|
@@ -133,25 +77,54 @@ const Link = props => {
|
|
133
77
|
const handleClose = () => {
|
134
78
|
setShowInput(false);
|
135
79
|
};
|
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
|
+
};
|
136
118
|
const buttonProps = handleLinkType(urlPath, linkType, readOnly, showInNewTab === "_blank");
|
137
119
|
return /*#__PURE__*/_jsxs("div", {
|
138
120
|
className: "link",
|
139
|
-
ref: linkRef,
|
140
121
|
children: [/*#__PURE__*/_jsx(Box, {
|
141
122
|
...attributes,
|
142
123
|
...element.attr,
|
143
124
|
sx: classes.linkBtn,
|
144
125
|
...buttonProps,
|
145
126
|
children: children
|
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, {
|
127
|
+
}), /*#__PURE__*/_jsx(Toolbar, {}), showInput ? /*#__PURE__*/_jsx(LinkSettings, {
|
155
128
|
handleClose: handleClose,
|
156
129
|
onSave: ({
|
157
130
|
linkType,
|
@@ -49,7 +49,6 @@ const SearchAttachment = props => {
|
|
49
49
|
background: `${theme?.palette?.containers?.slashBrainCardBg} !important`,
|
50
50
|
cursor: 'pointer',
|
51
51
|
margin: '4px 0px',
|
52
|
-
lineHeight: 1.43,
|
53
52
|
"&.MuiPaper-root.MuiPaper-rounded": {
|
54
53
|
borderRadius: "7px !important",
|
55
54
|
paddingTop: '0px !important'
|