@seafile/sdoc-editor 3.0.205 → 3.0.207
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/extension/plugins/search-replace/popover/index.css +5 -3
- package/dist/extension/plugins/table/menu/table-context-menu/index.js +1 -1
- package/dist/extension/plugins/table/menu/vertical-align-popover/index.js +1 -3
- package/dist/extension/plugins/table/model.js +1 -1
- package/dist/extension/plugins/table/render/render-cell.js +9 -2
- package/package.json +2 -2
|
@@ -2,9 +2,11 @@
|
|
|
2
2
|
position: absolute;
|
|
3
3
|
width: 400px;
|
|
4
4
|
height: 280px;
|
|
5
|
-
z-index:
|
|
5
|
+
z-index: 102;
|
|
6
6
|
background: #fff;
|
|
7
|
-
border: 1px solid #
|
|
7
|
+
border: 1px solid #eee;
|
|
8
|
+
border-radius: 8px;
|
|
9
|
+
box-shadow: 0 6px 14px 0 rgba(0, 0, 0, 0.1);
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
.sdoc-search-replace-popover-container.in-wiki {
|
|
@@ -17,7 +19,7 @@
|
|
|
17
19
|
display: flex;
|
|
18
20
|
justify-content: space-between;
|
|
19
21
|
padding: 10px 15px;
|
|
20
|
-
border-bottom: 1px solid #
|
|
22
|
+
border-bottom: 1px solid #eee;
|
|
21
23
|
pointer-events: none;
|
|
22
24
|
user-select: none;
|
|
23
25
|
}
|
|
@@ -145,7 +145,7 @@ var TableContextMenu = /*#__PURE__*/function (_React$Component) {
|
|
|
145
145
|
var isMergedCell = this.isMergedCell();
|
|
146
146
|
var tableCellNode = (0, _core.getSelectedNodeByType)(editor, _constants2.ELEMENT_TYPE.TABLE_CELL);
|
|
147
147
|
var horizontalAlign = tableCellNode === null || tableCellNode === void 0 ? void 0 : (_tableCellNode$style = tableCellNode.style) === null || _tableCellNode$style === void 0 ? void 0 : _tableCellNode$style[_constants3.TABLE_CELL_STYLE.TEXT_ALIGN];
|
|
148
|
-
var verticalAlign = tableCellNode === null || tableCellNode === void 0 ? void 0 : (_tableCellNode$style2 = tableCellNode.style) === null || _tableCellNode$style2 === void 0 ? void 0 : _tableCellNode$style2[
|
|
148
|
+
var verticalAlign = tableCellNode === null || tableCellNode === void 0 ? void 0 : (_tableCellNode$style2 = tableCellNode.style) === null || _tableCellNode$style2 === void 0 ? void 0 : _tableCellNode$style2[_constants3.TABLE_CELL_STYLE.ALIGN_ITEMS];
|
|
149
149
|
// Check if the table width is fit to screen
|
|
150
150
|
// Use queueMicrotask to resolve the issue that the table cell combined or split, the table width is not updated immediately
|
|
151
151
|
queueMicrotask(function () {
|
|
@@ -11,7 +11,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
11
11
|
var _reactI18next = require("react-i18next");
|
|
12
12
|
var _reactstrap = require("reactstrap");
|
|
13
13
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _KebabToCamel = _interopRequireDefault(require("../../../../../utils/Kebab-to-camel"));
|
|
15
14
|
var _core = require("../../../../core");
|
|
16
15
|
var _constants = require("../../constants");
|
|
17
16
|
var _helpers = require("../../helpers");
|
|
@@ -25,8 +24,7 @@ var VerticalAlignPopover = function VerticalAlignPopover(_ref) {
|
|
|
25
24
|
t = _useTranslation.t;
|
|
26
25
|
var setVerticalAlignStyle = (0, _react.useCallback)(function (position) {
|
|
27
26
|
if (readonly) return;
|
|
28
|
-
|
|
29
|
-
(0, _helpers.setCellStyle)(editor, (0, _defineProperty2["default"])({}, alignItems, position));
|
|
27
|
+
(0, _helpers.setCellStyle)(editor, (0, _defineProperty2["default"])({}, _constants.TABLE_CELL_STYLE.ALIGN_ITEMS, position));
|
|
30
28
|
var focusPoint = editor.selection.focus;
|
|
31
29
|
// prevent select all text in the editor
|
|
32
30
|
(0, _core.focusEditor)(editor, focusPoint);
|
|
@@ -83,6 +83,10 @@ var TableCell = function TableCell(_ref) {
|
|
|
83
83
|
if (element.style) {
|
|
84
84
|
style = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, element.style), style);
|
|
85
85
|
}
|
|
86
|
+
if (_objectUtils["default"].hasProperty(style, _constants3.TABLE_CELL_STYLE.ALIGN_ITEMS)) {
|
|
87
|
+
style.alignItems = style[_constants3.TABLE_CELL_STYLE.ALIGN_ITEMS];
|
|
88
|
+
delete style[_constants3.TABLE_CELL_STYLE.ALIGN_ITEMS];
|
|
89
|
+
}
|
|
86
90
|
var onMouseMove = function onMouseMove(mouseDownEvent) {
|
|
87
91
|
eventBus.dispatch(_constants.INTERNAL_EVENT.TABLE_CELL_MOUSE_ENTER, {
|
|
88
92
|
mouseDownEvent: mouseDownEvent,
|
|
@@ -162,7 +166,7 @@ var TableCell = function TableCell(_ref) {
|
|
|
162
166
|
}
|
|
163
167
|
}, [cellIndex, editor, eventBus, rowIndex, tableEntry, tableId]);
|
|
164
168
|
return /*#__PURE__*/_react["default"].createElement("div", Object.assign({}, attributes, {
|
|
165
|
-
style: (0, _objectSpread2["default"])(
|
|
169
|
+
style: (0, _objectSpread2["default"])({}, style),
|
|
166
170
|
className: (0, _classnames2["default"])('table-cell', attributes.className, highlightClass, (0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])((0, _defineProperty2["default"])({}, _constants3.CELL_SELECTED, isSelected), 'cell-light-height-left-border', isSelectedFirstCell), 'cell-light-height-right-border', isSelectedLastCell), 'cell-light-height-top-border', isSelectedFirstRow), 'cell-light-height-bottom-border', isSelectedLastRow)),
|
|
167
171
|
"data-id": element.id,
|
|
168
172
|
"row-index": rowIndex,
|
|
@@ -204,6 +208,9 @@ function renderTableCell(props) {
|
|
|
204
208
|
if (_objectUtils["default"].hasProperty(element.style, _constants3.TABLE_CELL_STYLE.BACKGROUND_COLOR) && element.style[_constants3.TABLE_CELL_STYLE.BACKGROUND_COLOR]) {
|
|
205
209
|
style['backgroundColor'] = element.style[_constants3.TABLE_CELL_STYLE.BACKGROUND_COLOR];
|
|
206
210
|
}
|
|
211
|
+
if (_objectUtils["default"].hasProperty(element.style, _constants3.TABLE_CELL_STYLE.ALIGN_ITEMS)) {
|
|
212
|
+
style.alignItems = element.style[_constants3.TABLE_CELL_STYLE.ALIGN_ITEMS];
|
|
213
|
+
}
|
|
207
214
|
if (element.is_combined) {
|
|
208
215
|
style.display = 'none';
|
|
209
216
|
}
|
|
@@ -219,7 +226,7 @@ function renderTableCell(props) {
|
|
|
219
226
|
colspan = _element$colspan2 === void 0 ? 1 : _element$colspan2;
|
|
220
227
|
style.gridArea = "".concat(rowIndex + 1, " / ").concat(cellIndex + 1, " / span ").concat(rowspan, " / span ").concat(colspan);
|
|
221
228
|
return /*#__PURE__*/_react["default"].createElement("div", Object.assign({}, attributes, {
|
|
222
|
-
style: (0, _objectSpread2["default"])(
|
|
229
|
+
style: (0, _objectSpread2["default"])({}, style),
|
|
223
230
|
className: (0, _classnames2["default"])('table-cell', highlightClass, attributes.className),
|
|
224
231
|
"data-id": element.id
|
|
225
232
|
}), /*#__PURE__*/_react["default"].createElement("div", {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.207",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest",
|
|
@@ -72,5 +72,5 @@
|
|
|
72
72
|
"publishConfig": {
|
|
73
73
|
"access": "public"
|
|
74
74
|
},
|
|
75
|
-
"gitHead": "
|
|
75
|
+
"gitHead": "c2c5944cdb82467a12a580a51652a54a4d3616b1"
|
|
76
76
|
}
|