dtable-statistic 4.4.24-alpha.12 → 4.4.24-alpha.3
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.
package/es/desktop-dashboard.js
CHANGED
|
@@ -10,7 +10,6 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _classnames = _interopRequireDefault(require("classnames"));
|
|
11
11
|
var _reactstrap = require("reactstrap");
|
|
12
12
|
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
13
|
-
var _dtableStore = require("dtable-store");
|
|
14
13
|
var _seaChart = require("sea-chart");
|
|
15
14
|
var _tabs = _interopRequireDefault(require("./tabs"));
|
|
16
15
|
var _statList = _interopRequireDefault(require("./stat-list"));
|
|
@@ -38,6 +37,7 @@ class DesktopDashboard extends _react.Component {
|
|
|
38
37
|
});
|
|
39
38
|
};
|
|
40
39
|
this.onToggleAddChart = () => {
|
|
40
|
+
console.log('onToggleAddChart');
|
|
41
41
|
this.setState({
|
|
42
42
|
isShowChartAddDialog: !this.state.isShowChartAddDialog
|
|
43
43
|
});
|
|
@@ -156,37 +156,14 @@ class DesktopDashboard extends _react.Component {
|
|
|
156
156
|
};
|
|
157
157
|
this.api = {
|
|
158
158
|
sqlQuery: this.sqlQuery,
|
|
159
|
-
getViewRows:
|
|
160
|
-
getTableFormulaResults:
|
|
159
|
+
getViewRows: window.dtableSDK.getViewRows,
|
|
160
|
+
getTableFormulaResults: window.dtableSDK.getTableFormulaResults,
|
|
161
161
|
queryUsers: window.app.queryUsers || (() => {})
|
|
162
162
|
};
|
|
163
163
|
}
|
|
164
164
|
async sqlQuery(sql) {
|
|
165
165
|
return _dtableDbApi.default.sqlQuery(sql);
|
|
166
166
|
}
|
|
167
|
-
async getViewRows(view, table) {
|
|
168
|
-
console.log('getViewRows');
|
|
169
|
-
const {
|
|
170
|
-
username = null,
|
|
171
|
-
userId = null,
|
|
172
|
-
userDepartmentIdsMap = null
|
|
173
|
-
} = this.dtableStore.dtableSettings;
|
|
174
|
-
return _dtableStore.Views.getViewRows(view, table, this.dtableStore.value, username, userId, userDepartmentIdsMap);
|
|
175
|
-
}
|
|
176
|
-
async getTableFormulaResults(table, rows) {
|
|
177
|
-
console.log('getTableFormulaResults');
|
|
178
|
-
const {
|
|
179
|
-
username = null,
|
|
180
|
-
userId = null,
|
|
181
|
-
userDepartmentIdsMap = null
|
|
182
|
-
} = this.dtableStore.dtableSettings;
|
|
183
|
-
const formulaColumns = _dtableStore.Views.getFormulaColumnsContainLinks(table);
|
|
184
|
-
return _dtableStore.Views.getTableFormulaResults(table, rows, this.dtableStore.value, formulaColumns, {
|
|
185
|
-
username,
|
|
186
|
-
userId,
|
|
187
|
-
userDepartmentIdsMap
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
167
|
render() {
|
|
191
168
|
const {
|
|
192
169
|
getTableById,
|
|
@@ -211,6 +188,7 @@ class DesktopDashboard extends _react.Component {
|
|
|
211
188
|
stat_items: statItems
|
|
212
189
|
} = statistic || {};
|
|
213
190
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
191
|
+
ref: ref => this.desktopDashboardRef = ref,
|
|
214
192
|
className: (0, _classnames.default)('statistic-them statistic-panel', {
|
|
215
193
|
'statistic-dark': darkMode,
|
|
216
194
|
'statistic-light': !darkMode,
|
|
@@ -314,6 +292,7 @@ class DesktopDashboard extends _react.Component {
|
|
|
314
292
|
onToggleEditChart: this.onToggleEditChart,
|
|
315
293
|
toggleStatisticRecordsDialog: this.toggleStatisticRecordsDialog
|
|
316
294
|
}), isShowChartAddDialog && /*#__PURE__*/_react.default.createElement(_seaChart.TypesDialog, {
|
|
295
|
+
container: this.desktopDashboardRef,
|
|
317
296
|
type: "",
|
|
318
297
|
onToggle: this.onToggleAddChart,
|
|
319
298
|
onChange: this.onTypeChange
|
package/es/stat-view/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "4.4.24-alpha.
|
|
3
|
+
"version": "4.4.24-alpha.3",
|
|
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.42-alpha.
|
|
21
|
+
"sea-chart": "^0.0.42-alpha.0"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"dtable-ui-component": "~4.4.*",
|