dtable-statistic 5.0.10-alpha.3 → 5.0.10-alpha.4

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 CHANGED
@@ -405,6 +405,7 @@ class DashBoard extends _react.Component {
405
405
  onCloseDashboard: this.props.onCloseStatistic,
406
406
  getViewRows: this.props.getViewRows,
407
407
  getTableFormulaResults: this.props.getTableFormulaResults,
408
+ value: this.value,
408
409
  selectDashboard: this.selectDashboard,
409
410
  addDashboard: this.addDashboard,
410
411
  renameDashboard: this.renameDashboard,
@@ -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 _seaChart = require("sea-chart");
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(...arguments);
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 {
@@ -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.10-alpha.3",
3
+ "version": "5.0.10-alpha.4",
4
4
  "description": "statistics",
5
5
  "main": "dist/dtable-statistic.js",
6
6
  "author": "seafile",