dtable-statistic 5.0.11 → 5.0.13-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.
- package/es/dashboard.js +1 -1
- package/es/mobile-dashboard.js +21 -8
- package/package.json +2 -2
package/es/dashboard.js
CHANGED
|
@@ -387,7 +387,6 @@ class DashBoard extends _react.Component {
|
|
|
387
387
|
const isTableReadOnly = this.isTableReadOnly();
|
|
388
388
|
const colorThemeName = this.dashboardService.getColorThemeName();
|
|
389
389
|
return _utils.isMobile ? /*#__PURE__*/_react.default.createElement(_mobileDashboard.default, {
|
|
390
|
-
isTableReadOnly: isTableReadOnly,
|
|
391
390
|
colorThemeName: colorThemeName,
|
|
392
391
|
statistics: statistics,
|
|
393
392
|
selectedDashboardIdx: selectedDashboardIdx,
|
|
@@ -395,6 +394,7 @@ class DashBoard extends _react.Component {
|
|
|
395
394
|
onCloseDashboard: this.props.onCloseStatistic,
|
|
396
395
|
getViewRows: this.props.getViewRows,
|
|
397
396
|
getTableFormulaResults: this.props.getTableFormulaResults,
|
|
397
|
+
value: this.value,
|
|
398
398
|
selectDashboard: this.selectDashboard,
|
|
399
399
|
addDashboard: this.addDashboard,
|
|
400
400
|
renameDashboard: this.renameDashboard,
|
package/es/mobile-dashboard.js
CHANGED
|
@@ -8,27 +8,38 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
8
8
|
exports.default = void 0;
|
|
9
9
|
var _react = _interopRequireWildcard(require("react"));
|
|
10
10
|
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
+
var _seaChart = require("sea-chart");
|
|
11
12
|
var _tabs = _interopRequireDefault(require("./tabs"));
|
|
12
13
|
var _statView = _interopRequireDefault(require("./stat-view"));
|
|
13
|
-
var
|
|
14
|
+
var _dtableDbApi = _interopRequireDefault(require("./api/dtable-db-api"));
|
|
14
15
|
var _constants = require("./constants");
|
|
15
16
|
var _icon = _interopRequireDefault(require("./assets/images/icon.png"));
|
|
16
17
|
var _mobileDashboardModule = _interopRequireDefault(require("./assets/css/mobile-dashboard.module.css"));
|
|
17
18
|
class MobileDashboard extends _react.Component {
|
|
18
|
-
constructor() {
|
|
19
|
-
super(
|
|
19
|
+
constructor(props) {
|
|
20
|
+
super(props);
|
|
20
21
|
this.onCloseDashboard = () => {
|
|
21
22
|
this.props.onCloseDashboard({
|
|
22
23
|
isFullScreen: true
|
|
23
24
|
});
|
|
24
25
|
};
|
|
26
|
+
this.api = {
|
|
27
|
+
sqlQuery: this.sqlQuery,
|
|
28
|
+
getViewRows: this.props.getViewRows,
|
|
29
|
+
getTableFormulaResults: this.props.getTableFormulaResults,
|
|
30
|
+
queryUsers: window.app.queryUsers || (() => {})
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
async sqlQuery(sql) {
|
|
34
|
+
return _dtableDbApi.default.sqlQuery(sql);
|
|
25
35
|
}
|
|
26
36
|
render() {
|
|
27
37
|
const {
|
|
28
38
|
getTableById,
|
|
29
39
|
colorThemeName,
|
|
30
40
|
statistics,
|
|
31
|
-
selectedDashboardIdx
|
|
41
|
+
selectedDashboardIdx,
|
|
42
|
+
value
|
|
32
43
|
} = this.props;
|
|
33
44
|
const statistic = statistics[selectedDashboardIdx];
|
|
34
45
|
const {
|
|
@@ -65,13 +76,13 @@ class MobileDashboard extends _react.Component {
|
|
|
65
76
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
66
77
|
className: _mobileDashboardModule.default['mobile-statistic-dashboard-wrapper']
|
|
67
78
|
}, statItems.map(statItem => {
|
|
79
|
+
var _style_config$title, _style_config$title$t;
|
|
68
80
|
const {
|
|
69
81
|
_id,
|
|
70
|
-
type
|
|
82
|
+
type,
|
|
83
|
+
style_config = {}
|
|
71
84
|
} = statItem.config;
|
|
72
|
-
const
|
|
73
|
-
name
|
|
74
|
-
} = statItem.style_config.title.text;
|
|
85
|
+
const name = (style_config === null || style_config === void 0 ? void 0 : (_style_config$title = style_config.title) === null || _style_config$title === void 0 ? void 0 : (_style_config$title$t = _style_config$title.text) === null || _style_config$title$t === void 0 ? void 0 : _style_config$title$t.name) || '';
|
|
75
86
|
const showStatName = !(type === _seaChart.CHART_TYPE.BASIC_NUMBER_CARD || type === _seaChart.CHART_TYPE.DASHBOARD);
|
|
76
87
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
77
88
|
key: "mobile-statistic-chart-".concat(_id),
|
|
@@ -84,6 +95,8 @@ class MobileDashboard extends _react.Component {
|
|
|
84
95
|
theme: _constants.THEME_NAME_MAP.LIGHT,
|
|
85
96
|
colorThemeName: colorThemeName,
|
|
86
97
|
statItem: statItem,
|
|
98
|
+
value: value,
|
|
99
|
+
api: this.api,
|
|
87
100
|
getTableById: getTableById
|
|
88
101
|
})));
|
|
89
102
|
})));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dtable-statistic",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.13-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": "
|
|
21
|
+
"sea-chart": "~0.0.59"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
24
|
"dtable-ui-component": "~5.0.*",
|