@flozy/editor 5.1.2 → 5.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Editor/ChatEditor.js +34 -25
- package/dist/Editor/CommonEditor.js +7 -13
- package/dist/Editor/Editor.css +10 -52
- package/dist/Editor/Elements/AI/AIInput.js +1 -0
- package/dist/Editor/Elements/AI/CustomSelect.js +10 -17
- package/dist/Editor/Elements/AI/Styles.js +1 -7
- package/dist/Editor/Elements/Button/EditorButton.js +1 -0
- package/dist/Editor/Elements/Color Picker/ColorButtons.js +5 -7
- package/dist/Editor/Elements/Color Picker/Styles.js +3 -7
- package/dist/Editor/Elements/Color Picker/defaultColors.js +2 -2
- package/dist/Editor/Elements/Form/Form.js +2 -38
- package/dist/Editor/Elements/Form/FormElements/FormCheckbox.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormDate.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormEmail.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormNumbers.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormRadioButton.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormText.js +1 -7
- package/dist/Editor/Elements/Form/FormElements/FormTextArea.js +1 -6
- package/dist/Editor/Elements/Form/FormPopup.js +9 -12
- package/dist/Editor/Elements/FreeGrid/FreeGrid.js +1 -1
- package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -20
- package/dist/Editor/Elements/Grid/GridButton.js +1 -2
- package/dist/Editor/Elements/Grid/GridItem.js +2 -3
- package/dist/Editor/Elements/Grid/Styles.js +3 -0
- package/dist/Editor/Elements/Link/LinkButton.js +1 -1
- package/dist/Editor/Elements/Signature/Signature.css +1 -1
- package/dist/Editor/Elements/Signature/SignatureOptions/TypeSignature.js +2 -2
- package/dist/Editor/Elements/Signature/SignaturePopup.js +48 -13
- package/dist/Editor/Elements/SimpleText/index.js +1 -8
- package/dist/Editor/Elements/SimpleText/style.js +1 -8
- package/dist/Editor/Elements/Table/Styles.js +43 -25
- package/dist/Editor/Elements/Table/Table.js +138 -206
- package/dist/Editor/Elements/Table/TableCell.js +102 -355
- package/dist/Editor/Elements/Table/TablePopup.js +3 -9
- package/dist/Editor/Elements/Table/TableRow.js +2 -10
- package/dist/Editor/Styles/EditorStyles.js +1 -3
- package/dist/Editor/Toolbar/FormatTools/BlockButton.js +0 -10
- package/dist/Editor/Toolbar/FormatTools/Dropdown.js +11 -7
- package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +4 -10
- package/dist/Editor/Toolbar/FormatTools/MarkButton.js +0 -3
- package/dist/Editor/Toolbar/FormatTools/TextSize.js +2 -0
- package/dist/Editor/Toolbar/Mini/MiniToolbar.js +6 -3
- package/dist/Editor/Toolbar/Mini/Styles.js +1 -4
- package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -3
- package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +11 -16
- package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +49 -416
- package/dist/Editor/Toolbar/PopupTool/TextFormat.js +8 -62
- package/dist/Editor/Toolbar/PopupTool/index.js +6 -5
- package/dist/Editor/Toolbar/Toolbar.js +0 -6
- package/dist/Editor/Toolbar/toolbarGroups.js +0 -4
- package/dist/Editor/assets/svg/BrainIcon.js +2 -2
- package/dist/Editor/common/ColorPickerButton.js +2 -3
- package/dist/Editor/common/FontLoader/FontLoader.js +4 -4
- package/dist/Editor/common/Icon.js +23 -24
- package/dist/Editor/common/LinkSettings/NavComponents.js +1 -2
- package/dist/Editor/common/LinkSettings/index.js +1 -2
- package/dist/Editor/common/MentionsPopup/Styles.js +3 -151
- package/dist/Editor/common/MentionsPopup/index.js +1 -1
- package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +12 -108
- package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
- package/dist/Editor/common/Shorthands/elements.js +1 -13
- package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
- package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
- package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
- package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +2 -5
- package/dist/Editor/common/StyleBuilder/formStyle.js +149 -268
- package/dist/Editor/common/StyleBuilder/index.js +11 -84
- package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
- package/dist/Editor/common/StyleBuilder/tableStyle.js +25 -69
- package/dist/Editor/common/Uploader.js +0 -8
- package/dist/Editor/common/iconListV2.js +40 -378
- package/dist/Editor/common/iconslist.js +5 -8
- package/dist/Editor/commonStyle.js +9 -117
- package/dist/Editor/helper/deserialize/index.js +1 -4
- package/dist/Editor/helper/index.js +2 -2
- package/dist/Editor/helper/theme.js +1 -24
- package/dist/Editor/hooks/useMouseMove.js +2 -5
- package/dist/Editor/plugins/withCustomDeleteBackward.js +2 -3
- package/dist/Editor/plugins/withHTML.js +1 -17
- package/dist/Editor/plugins/withLayout.js +1 -48
- package/dist/Editor/utils/SlateUtilityFunctions.js +0 -18
- package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -21
- package/dist/Editor/utils/embed.js +1 -2
- package/dist/Editor/utils/events.js +1 -0
- package/dist/Editor/utils/font.js +4 -11
- package/dist/Editor/utils/formfield.js +4 -8
- package/dist/Editor/utils/helper.js +1 -34
- package/dist/Editor/utils/insertNewLine.js +1 -19
- package/dist/Editor/utils/pageSettings.js +2 -14
- package/dist/Editor/utils/serializeToText.js +0 -2
- package/dist/Editor/utils/table.js +24 -228
- package/package.json +1 -1
- package/dist/Editor/Elements/DataView/DataView.js +0 -101
- package/dist/Editor/Elements/DataView/DataViewButton.js +0 -23
- package/dist/Editor/Elements/DataView/Layouts/ColumnView.js +0 -59
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/CheckType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +0 -140
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SimpleSelect.js +0 -40
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/styles.js +0 -59
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/DateType.js +0 -26
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/MultiSelectType.js +0 -38
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/SelectType.js +0 -35
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +0 -36
- package/dist/Editor/Elements/DataView/Layouts/DataTypes/index.js +0 -17
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseField.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/ChooseSort.js +0 -38
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/SortOptions/index.js +0 -74
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/index.js +0 -64
- package/dist/Editor/Elements/DataView/Layouts/FilterSort/styles.js +0 -106
- package/dist/Editor/Elements/DataView/Layouts/FilterView.js +0 -174
- package/dist/Editor/Elements/DataView/Layouts/Formula.js +0 -29
- package/dist/Editor/Elements/DataView/Layouts/Options/AddOptions.js +0 -113
- package/dist/Editor/Elements/DataView/Layouts/Options/AddProperty.js +0 -37
- package/dist/Editor/Elements/DataView/Layouts/Options/AllProperties.js +0 -111
- package/dist/Editor/Elements/DataView/Layouts/Options/ChangeProperty.js +0 -62
- package/dist/Editor/Elements/DataView/Layouts/Options/ColumnsList.js +0 -36
- package/dist/Editor/Elements/DataView/Layouts/Options/Constants.js +0 -101
- package/dist/Editor/Elements/DataView/Layouts/Options/EditOption.js +0 -160
- package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +0 -190
- package/dist/Editor/Elements/DataView/Layouts/Options/FilterProperty.js +0 -42
- package/dist/Editor/Elements/DataView/Layouts/Options/PropertyList.js +0 -30
- package/dist/Editor/Elements/DataView/Layouts/Options/index.js +0 -110
- package/dist/Editor/Elements/DataView/Layouts/Options/styles.js +0 -179
- package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +0 -100
- package/dist/Editor/Elements/DataView/Layouts/TableView.js +0 -227
- package/dist/Editor/Elements/DataView/Layouts/ViewData.js +0 -70
- package/dist/Editor/Elements/DataView/Layouts/index.js +0 -25
- package/dist/Editor/Elements/DataView/Providers/DataViewProvider.js +0 -288
- package/dist/Editor/Elements/DataView/Utils/globalSearch.js +0 -15
- package/dist/Editor/Elements/DataView/Utils/multiSortRows.js +0 -72
- package/dist/Editor/Elements/DataView/styles.js +0 -143
- package/dist/Editor/Elements/Table/AddRowCol.js +0 -77
- package/dist/Editor/Elements/Table/DragButton.js +0 -141
- package/dist/Editor/Elements/Table/DragStyles.js +0 -69
- package/dist/Editor/Elements/Table/Draggable.js +0 -25
- package/dist/Editor/Elements/Table/Droppable.js +0 -53
- package/dist/Editor/Elements/Table/TableTool.js +0 -101
- package/dist/Editor/Elements/Table/tableHelper.js +0 -71
- package/dist/Editor/assets/svg/TableIcons.js +0 -220
- package/dist/Editor/common/Select/index.js +0 -20
- package/dist/Editor/common/Select/styles.js +0 -17
- package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
- package/dist/Editor/hooks/useTable.js +0 -175
- package/dist/Editor/utils/dataView.js +0 -43
@@ -1,106 +1,121 @@
|
|
1
|
-
import React, {
|
2
|
-
import {
|
3
|
-
import {
|
4
|
-
import { Box, IconButton, Tooltip, Table as TableComp, TableBody, useTheme
|
1
|
+
import React, { useState } from "react";
|
2
|
+
import { Transforms } from "slate";
|
3
|
+
import { useSelected, useSlateStatic } from "slate-react";
|
4
|
+
import { Box, IconButton, Tooltip, Table as TableComp, TableBody, useTheme } from "@mui/material";
|
5
|
+
import AlignHorizontalLeftIcon from "@mui/icons-material/AlignHorizontalLeft";
|
6
|
+
import AlignHorizontalRightIcon from "@mui/icons-material/AlignHorizontalRight";
|
7
|
+
import AlignVerticalTopIcon from "@mui/icons-material/AlignVerticalTop";
|
8
|
+
import AlignVerticalBottomIcon from "@mui/icons-material/AlignVerticalBottom";
|
9
|
+
import DeleteForeverIcon from "@mui/icons-material/DeleteForever";
|
10
|
+
import MoreVertIcon from "@mui/icons-material/MoreVert";
|
11
|
+
import SettingsIcon from "@mui/icons-material/Settings";
|
12
|
+
import DeleteCellIcon from "./DeleteCellIcon";
|
13
|
+
import DeleteRowIcon from "./DeleteRowIcon";
|
5
14
|
import { TableUtil } from "../../utils/table";
|
6
15
|
import TablePopup from "./TablePopup";
|
7
|
-
import {
|
16
|
+
import { useEditorSelection } from "../../hooks/useMouseMove";
|
8
17
|
import TableStyles from "./Styles";
|
9
18
|
import "./table.css";
|
10
19
|
import { groupByBreakpoint } from "../../helper/theme";
|
11
|
-
import useTable, { TableProvider } from "../../hooks/useTable";
|
12
|
-
import AddRowCol from "./AddRowCol";
|
13
|
-
import TableTool from "./TableTool";
|
14
|
-
import { useDebouncedCallback } from "use-debounce";
|
15
|
-
import { MoreIcon, SettingsIcon } from "../../assets/svg/TableIcons";
|
16
20
|
import { jsx as _jsx } from "react/jsx-runtime";
|
17
21
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
18
|
-
const
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
+
const TABLE_MENUS = [{
|
23
|
+
Icon: AlignHorizontalRightIcon,
|
24
|
+
text: "Insert Columns to the Right",
|
25
|
+
action: {
|
26
|
+
type: "insertColumn",
|
27
|
+
position: "after"
|
22
28
|
}
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
29
|
+
}, {
|
30
|
+
Icon: AlignHorizontalLeftIcon,
|
31
|
+
text: "Insert Columns to the Left",
|
32
|
+
action: {
|
33
|
+
type: "insertColumn",
|
34
|
+
position: "at"
|
35
|
+
}
|
36
|
+
}, {
|
37
|
+
Icon: AlignVerticalTopIcon,
|
38
|
+
text: "Insert Row Above",
|
39
|
+
action: {
|
40
|
+
type: "insertRow",
|
41
|
+
positon: "at"
|
42
|
+
}
|
43
|
+
}, {
|
44
|
+
Icon: AlignVerticalBottomIcon,
|
45
|
+
text: "Insert Row Below",
|
46
|
+
action: {
|
47
|
+
type: "insertRow",
|
48
|
+
position: "after"
|
49
|
+
}
|
50
|
+
}, {
|
51
|
+
Icon: DeleteRowIcon,
|
52
|
+
text: "Delete Row",
|
53
|
+
action: {
|
54
|
+
type: "deleteRow"
|
55
|
+
}
|
56
|
+
}, {
|
57
|
+
Icon: DeleteCellIcon,
|
58
|
+
text: "Delete Column",
|
59
|
+
action: {
|
60
|
+
type: "deleteColumn"
|
61
|
+
}
|
62
|
+
}, {
|
63
|
+
Icon: SettingsIcon,
|
64
|
+
text: "Settings",
|
65
|
+
action: {
|
66
|
+
type: "settings"
|
67
|
+
}
|
68
|
+
}, {
|
69
|
+
Icon: DeleteForeverIcon,
|
70
|
+
text: "Remove Table",
|
71
|
+
action: {
|
72
|
+
type: "remove"
|
73
|
+
}
|
74
|
+
}];
|
61
75
|
const Table = props => {
|
62
76
|
const theme = useTheme();
|
63
|
-
const {
|
64
|
-
theme: editorTheme
|
65
|
-
} = useEditorContext();
|
66
77
|
const {
|
67
78
|
element,
|
68
79
|
attributes,
|
69
80
|
children,
|
70
81
|
customProps
|
71
82
|
} = props;
|
72
|
-
const classes = TableStyles(
|
83
|
+
const classes = TableStyles();
|
73
84
|
const {
|
74
85
|
readOnly
|
75
86
|
} = customProps;
|
76
87
|
const [openSetttings, setOpenSettings] = useState(false);
|
77
|
-
const [exandTools, setExpandTools] = useState(
|
88
|
+
const [exandTools, setExpandTools] = useState(false);
|
78
89
|
const {
|
79
90
|
bgColor,
|
80
91
|
borderColor,
|
81
|
-
xsHidden
|
82
|
-
fontFamily,
|
83
|
-
fontWeight,
|
84
|
-
textSize,
|
85
|
-
textColor
|
92
|
+
xsHidden
|
86
93
|
} = element;
|
87
94
|
const editor = useSlateStatic();
|
88
95
|
const selected = useSelected();
|
89
96
|
const table = new TableUtil(editor);
|
90
97
|
const tableProps = table.getTableProps();
|
91
98
|
const [showTool] = useEditorSelection(editor);
|
92
|
-
const
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
const handleAction = type => {
|
99
|
+
const handleAction = ({
|
100
|
+
type,
|
101
|
+
position
|
102
|
+
}) => () => {
|
97
103
|
Transforms.select(editor, editor.selection);
|
98
104
|
switch (type) {
|
99
|
-
case "
|
100
|
-
table.
|
105
|
+
case "insertRow":
|
106
|
+
table.insertRow(position);
|
107
|
+
break;
|
108
|
+
case "insertColumn":
|
109
|
+
table.insertColumn(position);
|
110
|
+
break;
|
111
|
+
case "deleteRow":
|
112
|
+
table.deleteRow();
|
101
113
|
break;
|
102
|
-
case "
|
103
|
-
table.
|
114
|
+
case "deleteColumn":
|
115
|
+
table.deleteColumn();
|
116
|
+
break;
|
117
|
+
case "remove":
|
118
|
+
table.removeTable();
|
104
119
|
break;
|
105
120
|
case "settings":
|
106
121
|
if (tableProps) {
|
@@ -111,16 +126,42 @@ const Table = props => {
|
|
111
126
|
return;
|
112
127
|
}
|
113
128
|
};
|
114
|
-
const handleExpand =
|
115
|
-
setExpandTools(
|
129
|
+
const handleExpand = () => {
|
130
|
+
setExpandTools(!exandTools);
|
131
|
+
};
|
132
|
+
const ToolBar = () => {
|
133
|
+
return selected && !showTool ? /*#__PURE__*/_jsxs(Box, {
|
134
|
+
component: "div",
|
135
|
+
contentEditable: false,
|
136
|
+
className: `tableToolBar ${exandTools ? "active" : ""}`,
|
137
|
+
sx: classes.tableToolBar,
|
138
|
+
children: [/*#__PURE__*/_jsx(Tooltip, {
|
139
|
+
title: "Show Tools",
|
140
|
+
arrow: true,
|
141
|
+
onClick: handleExpand,
|
142
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
143
|
+
className: "toolbtn toggle",
|
144
|
+
children: /*#__PURE__*/_jsx(MoreVertIcon, {})
|
145
|
+
})
|
146
|
+
}), TABLE_MENUS.map(({
|
147
|
+
Icon,
|
148
|
+
text,
|
149
|
+
action
|
150
|
+
}) => {
|
151
|
+
return /*#__PURE__*/_jsx(Tooltip, {
|
152
|
+
title: text,
|
153
|
+
arrow: true,
|
154
|
+
children: /*#__PURE__*/_jsx(IconButton, {
|
155
|
+
className: `toolbtn ${action?.type}`,
|
156
|
+
onClick: handleAction(action),
|
157
|
+
children: /*#__PURE__*/_jsx(Icon, {})
|
158
|
+
})
|
159
|
+
}, text);
|
160
|
+
})]
|
161
|
+
}) : null;
|
116
162
|
};
|
117
|
-
useEffect(() => {
|
118
|
-
if (!selected) {
|
119
|
-
setExpandTools(false);
|
120
|
-
}
|
121
|
-
}, [selected]);
|
122
163
|
const onSettings = () => {
|
123
|
-
setOpenSettings(
|
164
|
+
setOpenSettings(true);
|
124
165
|
};
|
125
166
|
const onSave = data => {
|
126
167
|
const updateData = {
|
@@ -142,137 +183,28 @@ const Table = props => {
|
|
142
183
|
lg: "inline-block"
|
143
184
|
}
|
144
185
|
}, theme);
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
const selection = {
|
151
|
-
anchor: position,
|
152
|
-
focus: position
|
153
|
-
};
|
154
|
-
|
155
|
-
// select the last row first col to insert row below
|
156
|
-
Transforms.select(editor, selection);
|
157
|
-
table.insertRow("after");
|
158
|
-
Transforms.deselect(editor);
|
159
|
-
};
|
160
|
-
const addCol = () => {
|
161
|
-
const lastCol = element?.columns - 1;
|
162
|
-
const firstRow = 0;
|
163
|
-
const lastColumnPath = [...path, firstRow, lastCol];
|
164
|
-
const position = Editor.start(editor, lastColumnPath);
|
165
|
-
const selection = {
|
166
|
-
anchor: position,
|
167
|
-
focus: position
|
168
|
-
};
|
169
|
-
|
170
|
-
// select the last row first col to insert row below
|
171
|
-
Transforms.select(editor, selection);
|
172
|
-
table.insertColumn("after");
|
173
|
-
Transforms.deselect(editor);
|
174
|
-
};
|
175
|
-
const handleRowDragBtns = () => {
|
176
|
-
if (containerRef?.current?.scrollLeft > 0) {
|
177
|
-
hideRowDragBtns("none", dragRowBtnCls);
|
178
|
-
} else {
|
179
|
-
hideRowDragBtns("", dragRowBtnCls);
|
180
|
-
}
|
181
|
-
};
|
182
|
-
const handleScroll = () => {
|
183
|
-
handleRowDragBtns();
|
184
|
-
};
|
185
|
-
const onMouseOver = () => {
|
186
|
-
containerRef?.current?.classList.remove("hideScroll");
|
187
|
-
};
|
188
|
-
const onMouseLeave = () => {
|
189
|
-
containerRef?.current?.classList.add("hideScroll");
|
190
|
-
};
|
191
|
-
const commonAddBtnProps = {
|
192
|
-
tableRef,
|
193
|
-
containerRef,
|
194
|
-
readOnly,
|
195
|
-
tableNode: element
|
196
|
-
};
|
197
|
-
return /*#__PURE__*/_jsxs(TableProvider, {
|
198
|
-
editor: editor,
|
199
|
-
otherProps: {
|
200
|
-
dragRowBtnCls,
|
201
|
-
tablePath: path,
|
202
|
-
openSetttings
|
186
|
+
return /*#__PURE__*/_jsxs("div", {
|
187
|
+
style: {
|
188
|
+
minWidth: "100%",
|
189
|
+
maxWidth: "100%",
|
190
|
+
position: "relative"
|
203
191
|
},
|
204
|
-
children: [/*#__PURE__*/
|
205
|
-
|
206
|
-
minWidth: "100%",
|
207
|
-
maxWidth: "100%",
|
208
|
-
position: "relative",
|
209
|
-
overflowX: "auto",
|
210
|
-
display: "flex",
|
211
|
-
paddingTop: "10px"
|
212
|
-
},
|
213
|
-
ref: containerRef,
|
214
|
-
onScroll: handleScroll,
|
215
|
-
onMouseOver: onMouseOver,
|
216
|
-
onMouseLeave: onMouseLeave,
|
217
|
-
className: "custom-scroll",
|
218
|
-
children: [/*#__PURE__*/_jsx(TableComp, {
|
219
|
-
className: readOnly ? "readOnly" : "",
|
220
|
-
sx: {
|
221
|
-
...classes.table,
|
222
|
-
...tableSX
|
223
|
-
},
|
224
|
-
style: {
|
225
|
-
background: bgColor,
|
226
|
-
border: borderColor ? `1px solid ${borderColor}` : "",
|
227
|
-
width: "auto",
|
228
|
-
fontFamily,
|
229
|
-
fontWeight,
|
230
|
-
fontSize: textSize,
|
231
|
-
color: textColor
|
232
|
-
},
|
233
|
-
ref: tableRef,
|
234
|
-
children: /*#__PURE__*/_jsx(TableBody, {
|
235
|
-
...attributes,
|
236
|
-
children: children
|
237
|
-
})
|
238
|
-
}), /*#__PURE__*/_jsx(AddRowCol, {
|
239
|
-
...commonAddBtnProps,
|
240
|
-
addType: "col",
|
241
|
-
onAdd: addCol
|
242
|
-
})]
|
243
|
-
}), /*#__PURE__*/_jsx(AddRowCol, {
|
244
|
-
...commonAddBtnProps,
|
245
|
-
addType: "row",
|
246
|
-
onAdd: addRow
|
247
|
-
}), !readOnly && /*#__PURE__*/_jsx(ToolBar, {
|
248
|
-
selected: selected,
|
249
|
-
showTool: showTool,
|
250
|
-
classes: classes,
|
251
|
-
handleExpand: handleExpand,
|
252
|
-
handleAction: handleAction,
|
253
|
-
exandTools: exandTools
|
254
|
-
}), /*#__PURE__*/_jsx(Popper, {
|
255
|
-
open: Boolean(exandTools),
|
256
|
-
anchorEl: exandTools,
|
257
|
-
transition: true,
|
258
|
-
contentEditable: false,
|
192
|
+
children: [/*#__PURE__*/_jsx(TableComp, {
|
193
|
+
className: readOnly ? "readOnly" : "",
|
259
194
|
sx: {
|
260
|
-
|
195
|
+
...classes.table,
|
196
|
+
...tableSX
|
261
197
|
},
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
theme: editorTheme,
|
271
|
-
handleToolAction: handleAction
|
272
|
-
})
|
273
|
-
})
|
198
|
+
style: {
|
199
|
+
background: bgColor,
|
200
|
+
border: borderColor ? `1px solid ${borderColor}` : "",
|
201
|
+
width: "auto"
|
202
|
+
},
|
203
|
+
children: /*#__PURE__*/_jsx(TableBody, {
|
204
|
+
...attributes,
|
205
|
+
children: children
|
274
206
|
})
|
275
|
-
}), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
|
207
|
+
}), !readOnly && /*#__PURE__*/_jsx(ToolBar, {}), openSetttings ? /*#__PURE__*/_jsx(TablePopup, {
|
276
208
|
element: tableProps?.styleProps || {},
|
277
209
|
onSave: onSave,
|
278
210
|
onClose: onClose,
|