dtable-statistic 5.0.27 → 5.0.29-alpha.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.
@@ -59,6 +59,7 @@ class ChartPreview extends _react.Component {
59
59
  };
60
60
  this.onNewTableDialogToggle = () => {
61
61
  const statisticalResult = this.chartView && this.chartView.getStatData();
62
+ console.log('statisticalResult', statisticalResult);
62
63
  statisticalResult && this.props.showNewTableDialog({
63
64
  statisticalResult
64
65
  });
@@ -54,13 +54,16 @@ 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
+ console.log('exportChart2Table', tableName, chart);
66
+ 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
67
  this.statisticalResult4Export = null;
65
68
  _toaster2.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
66
69
  this.closeNewTableDialog();
@@ -70,19 +73,23 @@ class StatList extends _react.Component {
70
73
  if (!this.statisticalResult4Export) {
71
74
  return;
72
75
  }
76
+ console.log('this.statisticalResult4Export', this.statisticalResult4Export);
73
77
  const {
74
78
  columns,
75
79
  rows
76
80
  } = (0, _exportTableUtils.exportStatisticToTable)({
77
81
  statisticalResult: this.statisticalResult4Export
78
82
  });
83
+ console.log('columns-rows', columns, rows);
79
84
  if (window.app && window.app.onExportStatisticToTable) {
85
+ console.log(111);
80
86
  window.app.onExportStatisticToTable({
81
87
  tableName,
82
88
  columns,
83
89
  rows
84
90
  });
85
91
  }
92
+ console.log(222);
86
93
  this.statisticalResult4Export = null;
87
94
  this.props.onCloseDashboard();
88
95
  };
@@ -238,7 +245,7 @@ class StatList extends _react.Component {
238
245
  onEnlargeToggle: this.closeEnlargedChart
239
246
  }), chartExport2Table && /*#__PURE__*/_react.default.createElement(_newTableDialog.default, {
240
247
  getTables: this.props.getTables,
241
- tableName: chartExport2Table.name,
248
+ tableName: chartExport2Table.config.name || '',
242
249
  onNewTableConfirm: tableName => this.exportChart2Table(tableName, chartExport2Table),
243
250
  onNewTableCancel: this.closeNewTableDialog
244
251
  }), 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.27",
3
+ "version": "5.0.29-alpha.0",
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.74"
21
+ "sea-chart": "~0.0.76"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "dtable-ui-component": "~5.0.*",