@seafile/sdoc-editor 2.0.18-alph-0.0.9 → 2.0.18-alph-0.1.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/seatable-row/dialog/add-seatable-row-dialog/helpers.js +5 -21
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/link-content.js +0 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/row-card-header-cell.js +0 -1
- package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/row-card-item.js +0 -3
- package/dist/basic-sdk/extension/plugins/seatable-row/render-elem/index.js +1 -3
- package/package.json +1 -1
package/dist/basic-sdk/extension/plugins/seatable-row/dialog/add-seatable-row-dialog/helpers.js
CHANGED
|
@@ -26,28 +26,12 @@ const getRowName = (columns, row, formula_rows) => {
|
|
|
26
26
|
if (formula_rows) {
|
|
27
27
|
formulaRows = formula_rows;
|
|
28
28
|
} else {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
formulaRows = {
|
|
32
|
-
VMjdqn_yQAWIdPFwvp_72g: {
|
|
33
|
-
I3hm: null
|
|
34
|
-
}
|
|
35
|
-
};
|
|
29
|
+
const view = window.app.getSelectedView();
|
|
30
|
+
formulaRows = view.formula_rows || {};
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
const departments = null;
|
|
41
|
-
// const collaborators = window.app.state.collaboratorsWithAppUsers;
|
|
42
|
-
const collaborators = [{
|
|
43
|
-
avatar_url: 'http://127.0.0.1:80/media/avatars/default.png',
|
|
44
|
-
contact_email: '',
|
|
45
|
-
email: 'cf496c43676c427e8bf1acb8736b2491@auth.local',
|
|
46
|
-
id: '',
|
|
47
|
-
name: 'admin',
|
|
48
|
-
name_pinyin: 'admin'
|
|
49
|
-
}];
|
|
50
|
-
// console.log(1, formulaRows, data, tables, collaborators, departments);
|
|
32
|
+
const tables = window.app.state.value.tables;
|
|
33
|
+
const departments = window.app.state;
|
|
34
|
+
const collaborators = window.app.state.collaboratorsWithAppUsers;
|
|
51
35
|
return (0, _dtableUtils.getCellValueDisplayString)(row, type, key, {
|
|
52
36
|
formulaRows,
|
|
53
37
|
data,
|
|
@@ -67,7 +67,6 @@ class RowCardItem extends _react.PureComponent {
|
|
|
67
67
|
} = column;
|
|
68
68
|
const draggedCellId = `${tableId}-${key}`;
|
|
69
69
|
const existedWidth = JSON.parse(localStorage.getItem(draggedCellId));
|
|
70
|
-
console.log(2, existedWidth, width, column);
|
|
71
70
|
let columnWidth = existedWidth && rowCardType === 'link' ? existedWidth : width;
|
|
72
71
|
if (draggedCell.id === draggedCellId) {
|
|
73
72
|
columnWidth = draggedCell.width;
|
|
@@ -142,8 +141,6 @@ class RowCardItem extends _react.PureComponent {
|
|
|
142
141
|
onRef
|
|
143
142
|
} = this.props;
|
|
144
143
|
onRef && onRef(this, rowIdx);
|
|
145
|
-
// const { eventBus } = window.app;
|
|
146
|
-
console.log(2, _basicSdk.EventBus);
|
|
147
144
|
const eventBus = _basicSdk.EventBus.getInstance();
|
|
148
145
|
this.unsubscribeChangeHeaderWidth = eventBus.subscribe(_constants.EXTERNAL_EVENT.CHANGE_HEADER_WIDTH, this.setDraggedCell);
|
|
149
146
|
}
|
|
@@ -43,7 +43,6 @@ const RowRecord = _ref => {
|
|
|
43
43
|
async function initTableData() {
|
|
44
44
|
const table = await editor.getTableById(table_id);
|
|
45
45
|
setRowRecordName(table.rows[0]['0000']);
|
|
46
|
-
console.log(5555, table);
|
|
47
46
|
if (!tableInfoRef.current) {
|
|
48
47
|
tableInfoRef.current = {};
|
|
49
48
|
}
|
|
@@ -60,7 +59,7 @@ const RowRecord = _ref => {
|
|
|
60
59
|
setShownRecord(shownRecord);
|
|
61
60
|
const updatedColumnWidthMap = Object.fromEntries(Object.entries(columnWidthMap).map(_ref2 => {
|
|
62
61
|
let [key, value] = _ref2;
|
|
63
|
-
return [key, value
|
|
62
|
+
return [key, value];
|
|
64
63
|
}));
|
|
65
64
|
setColumnWidthMap(updatedColumnWidthMap);
|
|
66
65
|
let validColumns = table.columns;
|
|
@@ -92,7 +91,6 @@ const RowRecord = _ref => {
|
|
|
92
91
|
}
|
|
93
92
|
return column;
|
|
94
93
|
});
|
|
95
|
-
console.log(1, validColumns);
|
|
96
94
|
setColumns(validColumns);
|
|
97
95
|
}
|
|
98
96
|
initTableData();
|