sea-chart 0.0.63-alpha.2 → 0.0.64
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.
|
@@ -40,12 +40,11 @@ class StatisticRecordDialog extends React.Component {
|
|
|
40
40
|
}
|
|
41
41
|
this.unShowColumnKeyList = this.getUnShowColumnKeyList(this.view);
|
|
42
42
|
this.renderedColumns = this.getRenderedColumns(this.table);
|
|
43
|
-
if (this.isArchiveView || !isCalculateByView ||
|
|
43
|
+
if (this.isArchiveView || !isCalculateByView || (rows === null || rows === void 0 ? void 0 : rows.length) === 0) {
|
|
44
44
|
var _context$api;
|
|
45
45
|
const chartDataSQL = new ChartDataSQL({
|
|
46
46
|
table: this.table,
|
|
47
|
-
chart
|
|
48
|
-
view: this.view
|
|
47
|
+
chart
|
|
49
48
|
});
|
|
50
49
|
const sqlString = chartDataSQL.get_statistic_record_sql(chart, statisticRecord, {
|
|
51
50
|
isColumn,
|
|
@@ -13,7 +13,6 @@ class ChartDataSQL {
|
|
|
13
13
|
var _chart$config;
|
|
14
14
|
let {
|
|
15
15
|
table,
|
|
16
|
-
view,
|
|
17
16
|
chart,
|
|
18
17
|
username,
|
|
19
18
|
userId,
|
|
@@ -1060,7 +1059,6 @@ class ChartDataSQL {
|
|
|
1060
1059
|
};
|
|
1061
1060
|
this.error = '';
|
|
1062
1061
|
this.table = table;
|
|
1063
|
-
this.view = view;
|
|
1064
1062
|
this.chart = (chart === null || chart === void 0 ? void 0 : chart.config) || {};
|
|
1065
1063
|
this.username = username;
|
|
1066
1064
|
const table_name = (table === null || table === void 0 ? void 0 : table.name) || '';
|
|
@@ -1074,7 +1072,7 @@ class ChartDataSQL {
|
|
|
1074
1072
|
Array.isArray(table.columns) && table.columns.forEach(column => {
|
|
1075
1073
|
this.column_key_map[column.key] = column;
|
|
1076
1074
|
});
|
|
1077
|
-
this.filter_sql = filter2SqlCondition(table,
|
|
1075
|
+
this.filter_sql = filter2SqlCondition(table, chart, username, userId, userDepartmentIdsMap);
|
|
1078
1076
|
}
|
|
1079
1077
|
}
|
|
1080
1078
|
export default ChartDataSQL;
|
|
@@ -305,10 +305,7 @@ class Combination extends ChartComponent {
|
|
|
305
305
|
}, 100));
|
|
306
306
|
}
|
|
307
307
|
this.chart.on('element:click', e => {
|
|
308
|
-
this.props.toggleRecords(
|
|
309
|
-
...e.data.data,
|
|
310
|
-
isQueryBySql: true
|
|
311
|
-
});
|
|
308
|
+
this.props.toggleRecords(e.data.data);
|
|
312
309
|
});
|
|
313
310
|
this.chart.on('interval:mouseenter', e => {
|
|
314
311
|
if (this.isInsideInterval) return;
|
|
@@ -214,10 +214,7 @@ class TwoDimensionTable extends PureComponent {
|
|
|
214
214
|
'selected-pivot-cell-left': isSelectedCellLeft
|
|
215
215
|
}),
|
|
216
216
|
key: "table-cell-".concat(cellIdx),
|
|
217
|
-
onClick: () => this.toggleRecords({
|
|
218
|
-
...c,
|
|
219
|
-
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name
|
|
220
|
-
}, {
|
|
217
|
+
onClick: () => this.toggleRecords(c, {
|
|
221
218
|
rowIdx,
|
|
222
219
|
cellIdx
|
|
223
220
|
}),
|
|
@@ -268,8 +265,7 @@ class TwoDimensionTable extends PureComponent {
|
|
|
268
265
|
}),
|
|
269
266
|
onClick: () => this.toggleRecords({
|
|
270
267
|
rows: Array.isArray(cells) && cells.length > 0 ? pivotRowCells : rowItem.rows,
|
|
271
|
-
total: total
|
|
272
|
-
name: rowItem === null || rowItem === void 0 ? void 0 : rowItem.name
|
|
268
|
+
total: total
|
|
273
269
|
}, {
|
|
274
270
|
rowIdx,
|
|
275
271
|
cellIdx: cells.length
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sea-chart",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.64",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@antv/data-set": "0.11.8",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"@antv/scale": "0.3.14",
|
|
26
26
|
"dtable-ui-component": "~5.0.11",
|
|
27
|
-
"dtable-utils": "~
|
|
27
|
+
"dtable-utils": "~5.0.*",
|
|
28
28
|
"prop-types": "15.8.1",
|
|
29
29
|
"react": "^17.0.0",
|
|
30
30
|
"react-dom": "^17.0.0"
|