dtable-statistic 5.0.8-alpha.4 → 5.0.8-alpha.5
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.
|
@@ -148,9 +148,9 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
148
148
|
return rowsIds.map(rowId => idRowMap[rowId]).filter(Boolean);
|
|
149
149
|
};
|
|
150
150
|
this.toggle = () => {
|
|
151
|
-
if (this.valueChanged) {
|
|
152
|
-
|
|
153
|
-
}
|
|
151
|
+
// if (this.valueChanged) {
|
|
152
|
+
// this.props.eventBus.dispatch(CommonEventTypes.REFRESH_CHARTS);
|
|
153
|
+
// }
|
|
154
154
|
this.props.toggleStatisticRecordsDialog();
|
|
155
155
|
};
|
|
156
156
|
this.expandRowUpdated = _ref => {
|
package/es/dashboard.js
CHANGED
|
@@ -66,11 +66,6 @@ class DashBoard extends _react.Component {
|
|
|
66
66
|
selectedDashboardIdx
|
|
67
67
|
});
|
|
68
68
|
};
|
|
69
|
-
this.refreshCharts = () => {
|
|
70
|
-
this.setState({
|
|
71
|
-
dtableChangedTime: Date.now()
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
69
|
this.initDashboard = () => {
|
|
75
70
|
const value = this.value;
|
|
76
71
|
this.dashboardService = new _dashboardService.default({
|
|
@@ -363,8 +358,7 @@ class DashBoard extends _react.Component {
|
|
|
363
358
|
} = this.initDashboard();
|
|
364
359
|
this.state = {
|
|
365
360
|
statistics: _statistics,
|
|
366
|
-
selectedDashboardIdx: _selectedDashboardIdx
|
|
367
|
-
dtableChangedTime: null
|
|
361
|
+
selectedDashboardIdx: _selectedDashboardIdx
|
|
368
362
|
};
|
|
369
363
|
this.isInitDashboard = true;
|
|
370
364
|
this.updatingLocalStatistics = false;
|
|
@@ -377,12 +371,10 @@ class DashBoard extends _react.Component {
|
|
|
377
371
|
} = this.props;
|
|
378
372
|
this.unsubscribeLocalDtableChanged = eventBus.subscribe('local-dtable-changed', this.onLocalDTableChanged);
|
|
379
373
|
this.unsubscribeRemoteDtableChange = eventBus.subscribe('remote-dtable-changed', this.onServerDTableChanged);
|
|
380
|
-
this.unsubscribeRefreshCharts = eventBus.subscribe(_constants.CommonEventTypes.REFRESH_CHARTS, this.refreshCharts);
|
|
381
374
|
}
|
|
382
375
|
componentWillUnmount() {
|
|
383
376
|
this.unsubscribeLocalDtableChanged();
|
|
384
377
|
this.unsubscribeRemoteDtableChange();
|
|
385
|
-
this.unsubscribeRefreshCharts();
|
|
386
378
|
}
|
|
387
379
|
render() {
|
|
388
380
|
const {
|
|
@@ -390,15 +382,13 @@ class DashBoard extends _react.Component {
|
|
|
390
382
|
} = this.props;
|
|
391
383
|
const {
|
|
392
384
|
statistics,
|
|
393
|
-
selectedDashboardIdx
|
|
394
|
-
dtableChangedTime
|
|
385
|
+
selectedDashboardIdx
|
|
395
386
|
} = this.state;
|
|
396
387
|
const isTableReadOnly = this.isTableReadOnly();
|
|
397
388
|
const colorThemeName = this.dashboardService.getColorThemeName();
|
|
398
389
|
return _utils.isMobile ? /*#__PURE__*/_react.default.createElement(_mobileDashboard.default, {
|
|
399
390
|
isTableReadOnly: isTableReadOnly,
|
|
400
391
|
colorThemeName: colorThemeName,
|
|
401
|
-
dtableChangedTime: dtableChangedTime,
|
|
402
392
|
statistics: statistics,
|
|
403
393
|
selectedDashboardIdx: selectedDashboardIdx,
|
|
404
394
|
eventBus: eventBus,
|
|
@@ -413,7 +403,6 @@ class DashBoard extends _react.Component {
|
|
|
413
403
|
}) : /*#__PURE__*/_react.default.createElement(_desktopDashboard.default, {
|
|
414
404
|
isTableReadOnly: isTableReadOnly,
|
|
415
405
|
colorThemeName: colorThemeName,
|
|
416
|
-
dtableChangedTime: dtableChangedTime,
|
|
417
406
|
statistics: statistics,
|
|
418
407
|
selectedDashboardIdx: selectedDashboardIdx,
|
|
419
408
|
eventBus: eventBus,
|
package/es/desktop-dashboard.js
CHANGED
|
@@ -168,7 +168,6 @@ class DesktopDashboard extends _react.Component {
|
|
|
168
168
|
getTableById,
|
|
169
169
|
getValue,
|
|
170
170
|
isTableReadOnly,
|
|
171
|
-
dtableChangedTime,
|
|
172
171
|
colorThemeName,
|
|
173
172
|
statistics,
|
|
174
173
|
selectedDashboardIdx,
|
|
@@ -260,7 +259,6 @@ class DesktopDashboard extends _react.Component {
|
|
|
260
259
|
className: "statistic-main"
|
|
261
260
|
}, /*#__PURE__*/_react.default.createElement(_statList.default, {
|
|
262
261
|
isTableReadOnly: isTableReadOnly,
|
|
263
|
-
dtableChangedTime: dtableChangedTime,
|
|
264
262
|
theme: theme,
|
|
265
263
|
colorThemeName: colorThemeName,
|
|
266
264
|
statItems: statItems,
|
package/es/stat-list/index.js
CHANGED
|
@@ -132,7 +132,7 @@ class StatList extends _react.Component {
|
|
|
132
132
|
|
|
133
133
|
// refresh charts if has updates
|
|
134
134
|
if (Array.isArray(rowIds) && rowIds.length > 0 || Array.isArray(newRows) && newRows.length > 0) {
|
|
135
|
-
|
|
135
|
+
_seaChart.EventBus.dispatch(_constants.CommonEventTypes.REFRESH_CHARTS);
|
|
136
136
|
}
|
|
137
137
|
}
|
|
138
138
|
this.statisticalResult4Update = null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "5.0.8-alpha.
|
|
3
|
+
"version": "5.0.8-alpha.5",
|
|
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.
|
|
21
|
+
"sea-chart": "^0.0.55-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"dtable-ui-component": "~5.0.*",
|