dtable-statistic 5.0.28 → 5.0.29-alpha.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.
@@ -54,13 +54,15 @@ class StatList extends _react.Component {
54
54
  });
55
55
  };
56
56
  this.showNewTableDialog = (chartIndexExport2Table, statisticalResult) => {
57
+ console.log(chartIndexExport2Table, statisticalResult);
57
58
  this.statisticalResult4Export = statisticalResult;
58
59
  this.setState({
59
60
  chartIndexExport2Table
60
61
  });
61
62
  };
62
63
  this.exportChart2Table = (tableName, chart) => {
63
- if (chart.type !== _seaChart.CHART_TYPE.TABLE) {
64
+ var _chart$config;
65
+ if ((chart === null || chart === void 0 ? void 0 : (_chart$config = chart.config) === null || _chart$config === void 0 ? void 0 : _chart$config.type) !== _seaChart.CHART_TYPE.TABLE) {
64
66
  this.statisticalResult4Export = null;
65
67
  _toaster2.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
66
68
  this.closeNewTableDialog();
@@ -98,10 +100,11 @@ class StatList extends _react.Component {
98
100
  });
99
101
  };
100
102
  this.updateChart2Table = (selectedTableId, chartUpdate2Table) => {
103
+ var _chartUpdate2Table$co;
101
104
  const {
102
105
  getTableById
103
106
  } = this.props;
104
- if (chartUpdate2Table.type !== _seaChart.CHART_TYPE.TABLE) {
107
+ if ((chartUpdate2Table === null || chartUpdate2Table === void 0 ? void 0 : (_chartUpdate2Table$co = chartUpdate2Table.config) === null || _chartUpdate2Table$co === void 0 ? void 0 : _chartUpdate2Table$co.type) !== _seaChart.CHART_TYPE.TABLE) {
105
108
  this.statisticalResult4Update = null;
106
109
  _toaster2.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
107
110
  this.closeSelectTableDialog();
@@ -238,7 +241,7 @@ class StatList extends _react.Component {
238
241
  onEnlargeToggle: this.closeEnlargedChart
239
242
  }), chartExport2Table && /*#__PURE__*/_react.default.createElement(_newTableDialog.default, {
240
243
  getTables: this.props.getTables,
241
- tableName: chartExport2Table.name,
244
+ tableName: chartExport2Table.config.name || '',
242
245
  onNewTableConfirm: tableName => this.exportChart2Table(tableName, chartExport2Table),
243
246
  onNewTableCancel: this.closeNewTableDialog
244
247
  }), chartUpdate2Table && /*#__PURE__*/_react.default.createElement(_tableSelectDialog.default, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dtable-statistic",
3
- "version": "5.0.28",
3
+ "version": "5.0.29-alpha.1",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
6
6
  "author": "seafile",
@@ -18,7 +18,7 @@
18
18
  "react-grid-layout": "^1.2.5",
19
19
  "react-intl-universal": "^2.4.8",
20
20
  "reactstrap": "8.9.0",
21
- "sea-chart": "~0.0.75"
21
+ "sea-chart": "~0.0.76"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "dtable-ui-component": "~5.0.*",