@seafile/sdoc-editor 1.0.100 → 1.0.102
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.
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
color: #444;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
87
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover {
|
|
88
88
|
position: absolute;
|
|
89
89
|
top: 38px;
|
|
90
90
|
left: 0px;
|
|
@@ -96,12 +96,12 @@
|
|
|
96
96
|
border: 1px solid #dedede;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-right-
|
|
99
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-right-popover {
|
|
100
100
|
left: 200px;
|
|
101
101
|
width: 300px;
|
|
102
102
|
}
|
|
103
103
|
|
|
104
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
104
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .tables-list-empty {
|
|
105
105
|
padding: 10px;
|
|
106
106
|
width: 100%;
|
|
107
107
|
font-size: 13px;
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
vertical-align: middle;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
113
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container {
|
|
114
114
|
list-style: none;
|
|
115
115
|
overflow-y: auto;
|
|
116
116
|
max-height: 280px;
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
padding: 8px 0px;
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
121
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-setting-item {
|
|
122
122
|
position: relative;
|
|
123
123
|
white-space: nowrap;
|
|
124
124
|
cursor: pointer;
|
|
@@ -130,52 +130,52 @@
|
|
|
130
130
|
justify-content: space-between;
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
133
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-custom-switch-item .custom-switch-description {
|
|
134
134
|
margin-left: 0px;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
137
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-custom-switch-item .custom-switch {
|
|
138
138
|
padding-left: 0px;
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
141
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-custom-switch-item .custom-switch-indicator {
|
|
142
142
|
position: absolute;
|
|
143
143
|
right: 0px;
|
|
144
144
|
cursor: pointer;
|
|
145
145
|
}
|
|
146
146
|
|
|
147
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
147
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-setting-item:hover {
|
|
148
148
|
background-color: #f5f5f5;;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
151
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-setting-item .active {
|
|
152
152
|
background-color: #f5f5f5;;
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
155
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-setting-item .check-mark {
|
|
156
156
|
opacity: 0;
|
|
157
157
|
padding: 0 10px;
|
|
158
158
|
}
|
|
159
159
|
|
|
160
|
-
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-
|
|
160
|
+
.sdoc-seatable-hover-menu-container .hover-menu-container .sdoc-seatable-setting-popover .seatable-setting-container .seatable-setting-item .checked {
|
|
161
161
|
opacity: 1;
|
|
162
162
|
}
|
|
163
163
|
|
|
164
|
-
.sdoc-seatable-setting-filter-
|
|
164
|
+
.sdoc-seatable-setting-filter-popover-wrapper {
|
|
165
165
|
top: 38px !important;
|
|
166
166
|
left: 83px !important;
|
|
167
167
|
transform: unset !important;
|
|
168
168
|
margin-top: 0px !important;
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
.sdoc-seatable-setting-sort-
|
|
171
|
+
.sdoc-seatable-setting-sort-popover-wrapper {
|
|
172
172
|
top: 38px !important;
|
|
173
173
|
left: 122px !important;
|
|
174
174
|
transform: unset !important;
|
|
175
175
|
margin-top: 0px !important;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
|
-
.sdoc-seatable-setting-hide-column-
|
|
178
|
+
.sdoc-seatable-setting-hide-column-popover-wrapper {
|
|
179
179
|
top: 38px !important;
|
|
180
180
|
left: 158px !important;
|
|
181
181
|
transform: unset !important;
|
|
@@ -289,7 +289,7 @@ function OpMenu(_ref3) {
|
|
|
289
289
|
placement: "top",
|
|
290
290
|
fade: true
|
|
291
291
|
}, t('Style_settings'))), isShowTableList && /*#__PURE__*/_react.default.createElement("div", {
|
|
292
|
-
className: "sdoc-seatable-setting-
|
|
292
|
+
className: "sdoc-seatable-setting-popover"
|
|
293
293
|
}, /*#__PURE__*/_react.default.createElement(TablesList, {
|
|
294
294
|
tablesData: tablesData,
|
|
295
295
|
onSelectTable: onSelectTable,
|
|
@@ -297,7 +297,7 @@ function OpMenu(_ref3) {
|
|
|
297
297
|
})), /*#__PURE__*/_react.default.createElement(_filterSetter.default, {
|
|
298
298
|
target: "sdoc_seatable_filter",
|
|
299
299
|
container: document.getElementById('sdoc-seatable-hover-menu-container'),
|
|
300
|
-
popperClassName: "sdoc-seatable-setting-filter-
|
|
300
|
+
popperClassName: "sdoc-seatable-setting-filter-popover-wrapper",
|
|
301
301
|
columns: selectedTable.columns,
|
|
302
302
|
filterConjunction: element.filter_conjunction || 'And',
|
|
303
303
|
filters: element.filters || [],
|
|
@@ -309,7 +309,7 @@ function OpMenu(_ref3) {
|
|
|
309
309
|
}), /*#__PURE__*/_react.default.createElement(_sortSetter.default, {
|
|
310
310
|
target: "sdoc_seatable_sort",
|
|
311
311
|
container: document.getElementById('sdoc-seatable-hover-menu-container'),
|
|
312
|
-
popperClassName: "sdoc-seatable-setting-sort-
|
|
312
|
+
popperClassName: "sdoc-seatable-setting-sort-popover-wrapper",
|
|
313
313
|
columns: selectedTable.columns,
|
|
314
314
|
sorts: element.sorts || [],
|
|
315
315
|
isShowSortPopover: isShowSort,
|
|
@@ -319,14 +319,14 @@ function OpMenu(_ref3) {
|
|
|
319
319
|
}), /*#__PURE__*/_react.default.createElement(_hideColumnSetter.default, {
|
|
320
320
|
target: "sdoc_seatable_hidden_column",
|
|
321
321
|
container: document.getElementById('sdoc-seatable-hover-menu-container'),
|
|
322
|
-
popperClassName: "sdoc-seatable-setting-hide-column-
|
|
322
|
+
popperClassName: "sdoc-seatable-setting-hide-column-popover-wrapper",
|
|
323
323
|
columns: selectedTable.columns,
|
|
324
324
|
shownColumnKeys: element.shown_column_keys || [],
|
|
325
325
|
isShowHideColumnSetter: isShowHideColumn,
|
|
326
326
|
onSettingUpdate: onHideColumnChange,
|
|
327
327
|
onPopoverToggle: onHiddenColumn
|
|
328
328
|
}), isShowSeaTableSetting && /*#__PURE__*/_react.default.createElement("div", {
|
|
329
|
-
className: "sdoc-seatable-setting-
|
|
329
|
+
className: "sdoc-seatable-setting-popover sdoc-seatable-setting-right-popover"
|
|
330
330
|
}, /*#__PURE__*/_react.default.createElement(TablesSettings, {
|
|
331
331
|
settings: element,
|
|
332
332
|
updatePageSettings: updatePageSettings
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
background-color: rgb(50, 48, 44);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
.wiki-outline-wrapper .wiki-outline-
|
|
46
|
+
.wiki-outline-wrapper .wiki-outline-popover {
|
|
47
47
|
position: absolute;
|
|
48
48
|
right: 0;
|
|
49
49
|
width: 242px;
|
|
@@ -57,11 +57,11 @@
|
|
|
57
57
|
overflow-y: auto;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
.wiki-outline-wrapper .wiki-outline-
|
|
60
|
+
.wiki-outline-wrapper .wiki-outline-popover .sdoc-outline-list-container {
|
|
61
61
|
padding: 6px;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
.wiki-outline-wrapper .wiki-outline-
|
|
64
|
+
.wiki-outline-wrapper .wiki-outline-popover .sdoc-outline-list-container .sdoc-outline-item {
|
|
65
65
|
color: rgb(120, 119, 116);
|
|
66
66
|
transition: color 0.15s;
|
|
67
67
|
cursor: pointer;
|
|
@@ -69,11 +69,11 @@
|
|
|
69
69
|
font-size: 14px;
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
.wiki-outline-wrapper .wiki-outline-
|
|
72
|
+
.wiki-outline-wrapper .wiki-outline-popover .sdoc-outline-list-container .wiki-outline-active {
|
|
73
73
|
color: rgb(35, 131, 226)
|
|
74
74
|
}
|
|
75
75
|
|
|
76
|
-
.wiki-outline-wrapper .wiki-outline-
|
|
76
|
+
.wiki-outline-wrapper .wiki-outline-popover .sdoc-outline-list-container .sdoc-outline-item:hover {
|
|
77
77
|
background: rgba(55, 53, 47, 0.06);
|
|
78
78
|
border-radius: 6px;
|
|
79
79
|
}
|
|
@@ -19,16 +19,21 @@ const WikiOutline = _ref => {
|
|
|
19
19
|
const scrollRef = (0, _useScrollContext.useScrollContext)();
|
|
20
20
|
const wikiOutlineRef = (0, _react.useRef)(null);
|
|
21
21
|
const [wikiOutlineList, setWikiOutlineList] = (0, _react.useState)([]);
|
|
22
|
-
const [
|
|
22
|
+
const [isShowOutlinePopover, setIsShowOutlinePopover] = (0, _react.useState)(false);
|
|
23
23
|
const onMouseOver = (0, _react.useCallback)(() => {
|
|
24
|
-
if (!
|
|
25
|
-
|
|
24
|
+
if (!isShowOutlinePopover) {
|
|
25
|
+
setIsShowOutlinePopover(true);
|
|
26
26
|
}
|
|
27
|
-
}, [
|
|
27
|
+
}, [isShowOutlinePopover]);
|
|
28
28
|
const updateWikiOutlineList = (0, _react.useCallback)(() => {
|
|
29
29
|
const list = doc.filter(item => ['header1', 'header2', 'header3'].includes(item.type));
|
|
30
|
-
if (list.length === 0)
|
|
31
|
-
|
|
30
|
+
if (list.length === 0) {
|
|
31
|
+
setWikiOutlineList([]);
|
|
32
|
+
return;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// The slateValue value in the document cannot be operated, so copy it for operation
|
|
36
|
+
const newList = JSON.parse(JSON.stringify(list));
|
|
32
37
|
const index = list.findIndex(item => {
|
|
33
38
|
const {
|
|
34
39
|
id
|
|
@@ -81,29 +86,25 @@ const WikiOutline = _ref => {
|
|
|
81
86
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
82
87
|
className: "sdoc-outline-wrapper wiki-outline-wrapper",
|
|
83
88
|
onMouseLeave: () => {
|
|
84
|
-
|
|
89
|
+
setIsShowOutlinePopover(false);
|
|
85
90
|
}
|
|
86
91
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
87
92
|
className: "sdoc-outline"
|
|
88
93
|
}, wikiOutlineList.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
89
94
|
className: "sdoc-outline-list-container",
|
|
90
95
|
onMouseOver: onMouseOver
|
|
91
|
-
}, wikiOutlineList.map((item, index) => {
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}))), isShowOutlinePopver && /*#__PURE__*/_react.default.createElement("div", {
|
|
98
|
-
className: "wiki-outline-popver",
|
|
96
|
+
}, wikiOutlineList.map((item, index) => /*#__PURE__*/_react.default.createElement(_outlineItem.default, {
|
|
97
|
+
key: index,
|
|
98
|
+
item: item,
|
|
99
|
+
isDisplayHorizontalBar: true
|
|
100
|
+
})))), isShowOutlinePopover && /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
+
className: "wiki-outline-popover",
|
|
99
102
|
ref: wikiOutlineRef
|
|
100
103
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
101
104
|
className: "sdoc-outline-list-container"
|
|
102
|
-
}, wikiOutlineList.map((item, index) => {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
});
|
|
107
|
-
}))));
|
|
105
|
+
}, wikiOutlineList.map((item, index) => /*#__PURE__*/_react.default.createElement(_outlineItem.default, {
|
|
106
|
+
key: index,
|
|
107
|
+
item: item
|
|
108
|
+
})))));
|
|
108
109
|
};
|
|
109
110
|
var _default = exports.default = (0, _reactI18next.withTranslation)('sdoc-editor')(WikiOutline);
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seafile/sdoc-editor",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.102",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "This is a sdoc editor",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@seafile/print-js": "1.6.6",
|
|
9
|
-
"@seafile/react-image-lightbox": "2.0.
|
|
9
|
+
"@seafile/react-image-lightbox": "2.0.5",
|
|
10
10
|
"@seafile/slate": "0.91.8",
|
|
11
11
|
"@seafile/slate-history": "0.86.2",
|
|
12
12
|
"@seafile/slate-hyperscript": "0.81.7",
|