@seafile/sdoc-editor 2.0.36 → 2.0.37-alpg-0.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/basic-sdk/extension/plugins/link/hover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/search-replace/menu/index.js +2 -2
- package/dist/basic-sdk/extension/plugins/search-replace/popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/row-card-header.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/dtable-search-input/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/seatable-tables/seatable-settings/filter-setter/filter-popover-widgets/filter-item.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/helpers.js +2 -0
- package/dist/basic-sdk/extension/plugins/table/popover/table-size-popover/index.js +1 -1
- package/dist/basic-sdk/extension/plugins/table/render/index.js +1 -0
- package/dist/basic-sdk/extension/plugins/table/render/table-root.js +1 -1
- package/dist/basic-sdk/extension/toolbar/context-toolbar/index.js +1 -1
- package/dist/components/toast/toaster.js +1 -1
- package/package.json +1 -1
|
@@ -32,7 +32,7 @@ const LinkHover = _ref => {
|
|
|
32
32
|
location.href = element.href;
|
|
33
33
|
}
|
|
34
34
|
}, [element.href]);
|
|
35
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
35
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
36
36
|
id: "link-op-menu",
|
|
37
37
|
className: "link-op-menu",
|
|
38
38
|
style: menuPosition
|
|
@@ -54,7 +54,7 @@ const SearchReplaceMenu = _ref => {
|
|
|
54
54
|
const canvasList = [];
|
|
55
55
|
for (let index = 0; index < generateCount; index++) {
|
|
56
56
|
const top = index * 5000;
|
|
57
|
-
canvasList.push(
|
|
57
|
+
canvasList.push(/*#__PURE__*/_react.default.createElement("canvas", {
|
|
58
58
|
key: 'sdoc-find-search-' + index,
|
|
59
59
|
id: `sdoc-find-search-${index}`,
|
|
60
60
|
className: "sdoc-find-search-highlight-canvas",
|
|
@@ -79,7 +79,7 @@ const SearchReplaceMenu = _ref => {
|
|
|
79
79
|
readonly: readonly,
|
|
80
80
|
isOpen: isOpenPopover,
|
|
81
81
|
closePopover: onMouseDown
|
|
82
|
-
}), isOpenPopover && /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
82
|
+
}), isOpenPopover && /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
83
83
|
style: {
|
|
84
84
|
height: articleContainerSize.clientHeight
|
|
85
85
|
},
|
|
@@ -168,7 +168,7 @@ const SearchReplacePopover = _ref => {
|
|
|
168
168
|
if ((0, _isHotkey.default)('enter', e)) handleNext();
|
|
169
169
|
if ((0, _isHotkey.default)('enter+shift', e)) handleLast();
|
|
170
170
|
};
|
|
171
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
171
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
172
172
|
className: "sdoc-search-replace-popover-container",
|
|
173
173
|
onMouseDown: handleStartMove,
|
|
174
174
|
onMouseMove: handleMouseMove,
|
|
@@ -78,7 +78,7 @@ class RowCardHeader extends _react.default.Component {
|
|
|
78
78
|
// Start from the second column without name
|
|
79
79
|
for (let i = 1; i < renderedColumns.length; i++) {
|
|
80
80
|
const renderedColumn = renderedColumns[i];
|
|
81
|
-
cardHeaderCells.push(
|
|
81
|
+
cardHeaderCells.push(/*#__PURE__*/_react.default.createElement(_rowCardHeaderCell.default, {
|
|
82
82
|
key: renderedColumn.key,
|
|
83
83
|
column: renderedColumn,
|
|
84
84
|
rowCardType: rowCardType,
|
|
@@ -70,7 +70,7 @@ class DtableSearchInput extends _react.Component {
|
|
|
70
70
|
const {
|
|
71
71
|
ClearIndicator
|
|
72
72
|
} = components;
|
|
73
|
-
if (
|
|
73
|
+
if (/*#__PURE__*/_react.default.isValidElement(ClearIndicator)) {
|
|
74
74
|
return /*#__PURE__*/_react.default.cloneElement(ClearIndicator, {
|
|
75
75
|
clearValue: this.clearSearch
|
|
76
76
|
});
|
|
@@ -310,7 +310,7 @@ class FilterItem extends _react.default.Component {
|
|
|
310
310
|
background: inOption.color,
|
|
311
311
|
color: inOption.textColor || null
|
|
312
312
|
};
|
|
313
|
-
labelArray.push(
|
|
313
|
+
labelArray.push(/*#__PURE__*/_react.default.createElement("span", {
|
|
314
314
|
className: className,
|
|
315
315
|
style: optionStyle,
|
|
316
316
|
key: 'option_' + item,
|
|
@@ -121,6 +121,7 @@ const generateEmptyTable = (editor, tableProps) => {
|
|
|
121
121
|
const tableRow = generateTableRow(editor, colsCount, i);
|
|
122
122
|
children.push(tableRow);
|
|
123
123
|
}
|
|
124
|
+
console.log(1, editor, editor.width, _constants3.PAGE_EDIT_AREA_WIDTH);
|
|
124
125
|
const columnWidth = Math.max(_constants2.TABLE_CELL_MIN_WIDTH, parseInt(editor.width / colsCount));
|
|
125
126
|
let columns = [];
|
|
126
127
|
for (let i = 0; i < colsCount; i++) {
|
|
@@ -894,6 +895,7 @@ const getTableColumns = (editor, element) => {
|
|
|
894
895
|
if (columns) return columns;
|
|
895
896
|
const columnsCount = children[0].children.length;
|
|
896
897
|
let initColumns = [];
|
|
898
|
+
console.log(3, editor.width);
|
|
897
899
|
const pageEditAreaWidth = editor.width || _constants3.PAGE_EDIT_AREA_WIDTH;
|
|
898
900
|
for (let i = 0; i < columnsCount; i++) {
|
|
899
901
|
const column = {
|
|
@@ -205,7 +205,7 @@ const TableSizePopover = _ref => {
|
|
|
205
205
|
});
|
|
206
206
|
children.push(child);
|
|
207
207
|
}
|
|
208
|
-
tableSize.push(
|
|
208
|
+
tableSize.push(/*#__PURE__*/_react.default.createElement("div", {
|
|
209
209
|
key: `sdoc-table-size-row-${i}`,
|
|
210
210
|
className: "sdoc-table-size-row d-flex"
|
|
211
211
|
}, children));
|
|
@@ -249,6 +249,7 @@ function renderTable(props) {
|
|
|
249
249
|
} = props;
|
|
250
250
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
251
251
|
const editor = (0, _slateReact.useSlateStatic)();
|
|
252
|
+
console.log(1, editor, editor.width);
|
|
252
253
|
const columns = (0, _helpers.getTableColumns)(editor, element);
|
|
253
254
|
let style = element.style ? {
|
|
254
255
|
...element.style
|
|
@@ -51,7 +51,7 @@ const TableRoot = _ref => {
|
|
|
51
51
|
ref: tableScrollWrapper,
|
|
52
52
|
onScroll: onScroll,
|
|
53
53
|
onContextMenu: onContextMenu
|
|
54
|
-
}, children)), isShowContextMenu && /*#__PURE__*/_react.default.createElement(_menu.TableContextMenu, {
|
|
54
|
+
}, children)), !readonly && isShowContextMenu && /*#__PURE__*/_react.default.createElement(_menu.TableContextMenu, {
|
|
55
55
|
editor: editor,
|
|
56
56
|
contextMenuPosition: menuPosition,
|
|
57
57
|
readonly: readonly
|
|
@@ -62,7 +62,7 @@ const ContextToolbar = () => {
|
|
|
62
62
|
el.removeAttribute('style');
|
|
63
63
|
}
|
|
64
64
|
}, []);
|
|
65
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
65
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
66
66
|
ref: ref,
|
|
67
67
|
className: "sdoc-context-toolbar",
|
|
68
68
|
onMouseDown: onMouseDown,
|
|
@@ -67,7 +67,7 @@ class Toaster {
|
|
|
67
67
|
container.setAttribute('data-evergreen-toaster-container', '');
|
|
68
68
|
document.body.appendChild(container);
|
|
69
69
|
const root = (0, _client.createRoot)(container);
|
|
70
|
-
root.render(
|
|
70
|
+
root.render(/*#__PURE__*/_react.default.createElement(_toastManager.default, {
|
|
71
71
|
bindNotify: this._bindNotify,
|
|
72
72
|
bindGetToasts: this._bindGetToasts,
|
|
73
73
|
bindCloseAll: this._bindCloseAll
|