@seafile/sdoc-editor 2.0.18-alph-0.0.8 → 2.0.18-alph-0.1.0

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.
@@ -26,28 +26,12 @@ const getRowName = (columns, row, formula_rows) => {
26
26
  if (formula_rows) {
27
27
  formulaRows = formula_rows;
28
28
  } else {
29
- // const view = window.app.getSelectedView();
30
- // formulaRows = view.formula_rows || {};
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
- // const tables = window.app.state.value.tables;
38
- const tables = null;
39
- // const departments = window.app.state;
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,
@@ -11,7 +11,7 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
11
11
  var _classnames = _interopRequireDefault(require("classnames"));
12
12
  var _ResizeHandle = _interopRequireDefault(require("./resize-handle/ResizeHandle"));
13
13
  var _constants = require("../../../../../../constants");
14
- var _basicSdk = _interopRequireDefault(require("../../../../../../basic-sdk"));
14
+ var _basicSdk = require("../../../../../../basic-sdk");
15
15
  class RowCardHeaderCell extends _react.default.Component {
16
16
  constructor(props) {
17
17
  super(props);
@@ -62,7 +62,7 @@ class RowCardHeaderCell extends _react.default.Component {
62
62
  this.setState({
63
63
  resizing: false
64
64
  });
65
- const eventBus = _basicSdk.default.getInstance();
65
+ const eventBus = _basicSdk.EventBus.getInstance();
66
66
  eventBus.dispatch(_constants.EXTERNAL_EVENT.CHANGE_HEADER_WIDTH, {
67
67
  id: draggedCellId,
68
68
  width
@@ -13,7 +13,7 @@ var _reactI18next = require("react-i18next");
13
13
  var _helpers = require("./helpers");
14
14
  var _linkContent = _interopRequireDefault(require("./link-content"));
15
15
  var _constants = require("../../../../../../constants");
16
- var _basicSdk = _interopRequireDefault(require("../../../../../../basic-sdk"));
16
+ var _basicSdk = require("../../../../../../basic-sdk");
17
17
  const EMPTY_LINK = /*#__PURE__*/_react.default.createElement("span", {
18
18
  className: "row-cell-value-empty"
19
19
  });
@@ -143,8 +143,8 @@ class RowCardItem extends _react.PureComponent {
143
143
  } = this.props;
144
144
  onRef && onRef(this, rowIdx);
145
145
  // const { eventBus } = window.app;
146
- console.log(2, _basicSdk.default);
147
- const eventBus = _basicSdk.default.getInstance();
146
+ console.log(2, _basicSdk.EventBus);
147
+ const eventBus = _basicSdk.EventBus.getInstance();
148
148
  this.unsubscribeChangeHeaderWidth = eventBus.subscribe(_constants.EXTERNAL_EVENT.CHANGE_HEADER_WIDTH, this.setDraggedCell);
149
149
  }
150
150
  componentWillUnmount() {
@@ -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 * 1.2];
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();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seafile/sdoc-editor",
3
- "version": "2.0.18-alph-0.0.8",
3
+ "version": "2.0.18-alph-0.1.0",
4
4
  "private": false,
5
5
  "description": "This is a sdoc editor",
6
6
  "main": "dist/index.js",