dtable-statistic 4.4.22 → 4.4.24-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/assets/css/dashboard.css +1 -0
- package/es/assets/css/dialog.css +30 -0
- package/es/components/dialog/chart-edit-dialog.js +92 -0
- package/es/components/dialog/enlarged-chart-dialog.js +8 -13
- package/es/components/dialog/statistic-record-dialog/index.js +22 -30
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +2 -2
- package/es/components/index.js +1 -15
- package/es/constants/index.js +1 -2
- package/es/dashboard.js +5 -31
- package/es/desktop-dashboard.js +51 -32
- package/es/mobile-dashboard.js +8 -16
- package/es/model/conver-statItem.js +124 -0
- package/es/service/chart-service.js +8 -15
- package/es/service/dashboard-service.js +25 -29
- package/es/stat-list/chart-preview.js +19 -20
- package/es/stat-list/index.js +13 -19
- package/es/stat-view/index.js +46 -156
- package/es/utils/common-utils.js +2 -352
- package/es/utils/export-table-utils.js +0 -69
- package/es/utils/index.js +0 -89
- package/package.json +5 -7
- package/es/assets/css/color-picker.css +0 -53
- package/es/assets/css/color-rules-popover.css +0 -144
- package/es/assets/css/slider.css +0 -77
- package/es/assets/css/statistic-chart.module.css +0 -11
- package/es/assets/css/statistic-custom-title.module.css +0 -3
- package/es/assets/css/statistic-custom.module.css +0 -4
- package/es/assets/css/statistic-numeric-column-item.module.css +0 -43
- package/es/assets/css/statistic-time-picker.module.css +0 -21
- package/es/calculator/base-calculator.js +0 -80
- package/es/calculator/basic-chart-calculator.js +0 -349
- package/es/calculator/combination-calculator.js +0 -246
- package/es/calculator/compare-bar-calculator.js +0 -197
- package/es/calculator/completeness-calculator.js +0 -215
- package/es/calculator/copy-value.js +0 -53
- package/es/calculator/dashboard-calculator.js +0 -70
- package/es/calculator/heat-map-calculator.js +0 -148
- package/es/calculator/horizontal-bar-calculator.js +0 -67
- package/es/calculator/index.js +0 -81
- package/es/calculator/map-calculator.js +0 -103
- package/es/calculator/mirror-calculator.js +0 -146
- package/es/calculator/number-card-calculator.js +0 -60
- package/es/calculator/pivot-table-calculator.js +0 -821
- package/es/calculator/scatter-calculator.js +0 -75
- package/es/calculator/thread-manager.js +0 -57
- package/es/calculator/trend-calculator.js +0 -113
- package/es/calculator/workers/basic-chart-calculator-worker.js +0 -495
- package/es/calculator/workers/calculator.worker.js +0 -44
- package/es/calculator/workers/card-calculator-worker.js +0 -40
- package/es/calculator/workers/combination-calculator-worker.js +0 -276
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +0 -150
- package/es/calculator/workers/completeness-calculator-worker.js +0 -208
- package/es/calculator/workers/dashboard-calculator-worker.js +0 -68
- package/es/calculator/workers/mirror-calculator-worker.js +0 -152
- package/es/calculator/workers/pivot-table-calculator-worker.js +0 -718
- package/es/calculator/workers/scatter-calculator-worker.js +0 -80
- package/es/calculator/workers/trend-calculator-worker.js +0 -108
- package/es/calculator/world-map-calculator.js +0 -124
- package/es/components/common-add-tool.js +0 -28
- package/es/components/dialog/chart-addition-edit-dialog.js +0 -90
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +0 -259
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +0 -83
- package/es/components/dialog/statistic-types-dialog/index.css +0 -14
- package/es/components/dialog/statistic-types-dialog/index.js +0 -62
- package/es/components/popover/color-rules/color-rule.js +0 -183
- package/es/components/popover/color-rules/index.js +0 -87
- package/es/components/popover/color-rules/rule-filters/filter.js +0 -221
- package/es/components/popover/color-rules/rule-filters/index.css +0 -210
- package/es/components/popover/color-rules/rule-filters/index.js +0 -97
- package/es/components/popover/color-rules/rule-filters/number-input.js +0 -78
- package/es/components/popover/color-rules-popover.js +0 -217
- package/es/components/popover/color-selector-popover.js +0 -82
- package/es/components/seatable-radio/index.css +0 -51
- package/es/components/seatable-radio/index.js +0 -35
- package/es/custom-g2.js +0 -644
- package/es/model/bar-group.js +0 -58
- package/es/model/bar.js +0 -47
- package/es/model/base-model.js +0 -18
- package/es/model/basic-number-card.js +0 -25
- package/es/model/combination.js +0 -48
- package/es/model/compare-bar.js +0 -56
- package/es/model/completeness-group.js +0 -31
- package/es/model/completeness.js +0 -25
- package/es/model/custom-bar.js +0 -25
- package/es/model/dashboard.js +0 -20
- package/es/model/generic-model.js +0 -222
- package/es/model/heat-map.js +0 -33
- package/es/model/horizontal-bar-group.js +0 -55
- package/es/model/horizontal-bar.js +0 -47
- package/es/model/index.js +0 -187
- package/es/model/map.js +0 -38
- package/es/model/mirror.js +0 -33
- package/es/model/pie.js +0 -38
- package/es/model/ring.js +0 -40
- package/es/model/scatter.js +0 -22
- package/es/model/table.js +0 -32
- package/es/model/trend.js +0 -32
- package/es/model/world-map.js +0 -34
- package/es/stat-editor/chart-name-editor.js +0 -68
- package/es/stat-editor/index.js +0 -75
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +0 -153
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +0 -422
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +0 -203
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +0 -23
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +0 -104
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +0 -334
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +0 -119
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +0 -132
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +0 -240
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +0 -89
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +0 -138
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +0 -331
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +0 -143
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +0 -109
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +0 -153
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +0 -144
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +0 -214
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +0 -121
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +0 -172
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +0 -366
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +0 -142
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +0 -150
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +0 -473
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +0 -182
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +0 -564
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +0 -112
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +0 -87
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +0 -187
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +0 -300
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +0 -113
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +0 -289
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +0 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +0 -359
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +0 -48
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +0 -121
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +0 -143
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +0 -269
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +0 -104
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +0 -366
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +0 -55
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +0 -130
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +0 -374
- package/es/stat-editor/stat-settings/map/map-level.js +0 -72
- package/es/stat-editor/stat-settings/map/map-province-city.js +0 -151
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +0 -108
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +0 -154
- package/es/stat-editor/stat-settings/public-setting/calender.js +0 -125
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +0 -24
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +0 -62
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +0 -61
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +0 -35
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +0 -60
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +0 -123
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +0 -33
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.css +0 -29
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +0 -82
- package/es/stat-view/area-chart.js +0 -551
- package/es/stat-view/bar-chart.js +0 -582
- package/es/stat-view/base-chart.js +0 -132
- package/es/stat-view/basic-number-card.js +0 -201
- package/es/stat-view/combination-chart.js +0 -546
- package/es/stat-view/compare-chart.js +0 -483
- package/es/stat-view/completeness-chart.js +0 -390
- package/es/stat-view/custom-bar.js +0 -418
- package/es/stat-view/dashboard-chart.js +0 -266
- package/es/stat-view/heat-map.js +0 -463
- package/es/stat-view/horizontal-bar-chart.js +0 -562
- package/es/stat-view/line-chart.js +0 -518
- package/es/stat-view/map.js +0 -448
- package/es/stat-view/mirror.js +0 -275
- package/es/stat-view/pie-chart.js +0 -290
- package/es/stat-view/pivot-table/index.js +0 -196
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +0 -156
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +0 -176
- package/es/stat-view/pivot-table/pivot-table-display-name.js +0 -215
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +0 -132
- package/es/stat-view/pivot-table/two-dimension-table.js +0 -384
- package/es/stat-view/ring-chart.js +0 -392
- package/es/stat-view/scatter-chart.js +0 -306
- package/es/stat-view/treemap-chart.js +0 -253
- package/es/stat-view/trend-chart.js +0 -249
- package/es/stat-view/world-map.js +0 -431
- package/es/utils/basic-chart-utils.js +0 -29
- package/es/utils/cell-format.js +0 -115
- package/es/utils/collaborator.js +0 -50
- package/es/utils/color-utils.js +0 -134
- package/es/utils/column-utils.js +0 -110
- package/es/utils/column.js +0 -20
- package/es/utils/date-format.js +0 -71
- package/es/utils/map.js +0 -114
- package/es/utils/model.js +0 -19
- package/es/utils/row-utils.js +0 -134
- package/es/utils/search.js +0 -73
- package/es/utils/sql-utils.js +0 -359
- package/es/utils/stat-utils.js +0 -351
- package/es/utils/trend-utils.js +0 -135
package/es/mobile-dashboard.js
CHANGED
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
11
|
var _tabs = _interopRequireDefault(require("./tabs"));
|
|
12
12
|
var _statView = _interopRequireDefault(require("./stat-view"));
|
|
13
|
+
var _seaChart = require("sea-chart");
|
|
13
14
|
var _constants = require("./constants");
|
|
14
15
|
var _icon = _interopRequireDefault(require("./assets/images/icon.png"));
|
|
15
16
|
var _mobileDashboardModule = _interopRequireDefault(require("./assets/css/mobile-dashboard.module.css"));
|
|
@@ -25,13 +26,9 @@ class MobileDashboard extends _react.Component {
|
|
|
25
26
|
render() {
|
|
26
27
|
const {
|
|
27
28
|
getTableById,
|
|
28
|
-
dtableChangedTime,
|
|
29
29
|
colorThemeName,
|
|
30
30
|
statistics,
|
|
31
|
-
selectedDashboardIdx
|
|
32
|
-
chartCalculator,
|
|
33
|
-
labelColorConfigs,
|
|
34
|
-
eventBus
|
|
31
|
+
selectedDashboardIdx
|
|
35
32
|
} = this.props;
|
|
36
33
|
const statistic = statistics[selectedDashboardIdx];
|
|
37
34
|
const {
|
|
@@ -70,10 +67,12 @@ class MobileDashboard extends _react.Component {
|
|
|
70
67
|
}, statItems.map(statItem => {
|
|
71
68
|
const {
|
|
72
69
|
_id,
|
|
73
|
-
type
|
|
70
|
+
type
|
|
71
|
+
} = statItem.config;
|
|
72
|
+
const {
|
|
74
73
|
name
|
|
75
|
-
} = statItem;
|
|
76
|
-
const showStatName = !(type ===
|
|
74
|
+
} = statItem.style_config.title.text;
|
|
75
|
+
const showStatName = !(type === _seaChart.CHART_TYPE.BASIC_NUMBER_CARD || type === _seaChart.CHART_TYPE.DASHBOARD);
|
|
77
76
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
78
77
|
key: "mobile-statistic-chart-".concat(_id),
|
|
79
78
|
className: _mobileDashboardModule.default['mobile-statistic-chart-wrapper']
|
|
@@ -82,17 +81,10 @@ class MobileDashboard extends _react.Component {
|
|
|
82
81
|
}, showStatName && name), /*#__PURE__*/_react.default.createElement("div", {
|
|
83
82
|
className: _mobileDashboardModule.default['mobile-statistic-chart-container']
|
|
84
83
|
}, /*#__PURE__*/_react.default.createElement(_statView.default, {
|
|
85
|
-
isPreview: true,
|
|
86
|
-
isEnlarge: false,
|
|
87
|
-
dtableChangedTime: dtableChangedTime,
|
|
88
84
|
theme: _constants.THEME_NAME_MAP.LIGHT,
|
|
89
85
|
colorThemeName: colorThemeName,
|
|
90
86
|
statItem: statItem,
|
|
91
|
-
|
|
92
|
-
labelColorConfigs: labelColorConfigs,
|
|
93
|
-
eventBus: eventBus,
|
|
94
|
-
getTableById: getTableById,
|
|
95
|
-
queryMapJson: this.props.queryMapJson
|
|
87
|
+
getTableById: getTableById
|
|
96
88
|
})));
|
|
97
89
|
})));
|
|
98
90
|
}
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.convertByType = void 0;
|
|
7
|
+
var _seaChart = require("sea-chart");
|
|
8
|
+
const typeMapping = {
|
|
9
|
+
'chart_bar': _seaChart.CHART_TYPE.BAR,
|
|
10
|
+
'chart_bar_group': _seaChart.CHART_TYPE.BAR_GROUP,
|
|
11
|
+
'chart_bar_stack': _seaChart.CHART_TYPE.BAR_STACK,
|
|
12
|
+
'custom_bar': _seaChart.CHART_TYPE.BAR_CUSTOM,
|
|
13
|
+
'completeness_chart': _seaChart.CHART_TYPE.COMPLETENESS,
|
|
14
|
+
'group_completeness_chart': _seaChart.CHART_TYPE.COMPLETENESS_GROUP,
|
|
15
|
+
'chart_line': _seaChart.CHART_TYPE.LINE,
|
|
16
|
+
'chart_group_line': _seaChart.CHART_TYPE.LINE_GROUP,
|
|
17
|
+
'area_chart': _seaChart.CHART_TYPE.AREA,
|
|
18
|
+
'area_group_chart': _seaChart.CHART_TYPE.AREA_GROUP,
|
|
19
|
+
'chart_pie': _seaChart.CHART_TYPE.PIE,
|
|
20
|
+
'chart_ring': _seaChart.CHART_TYPE.RING,
|
|
21
|
+
'scatter_chart': _seaChart.CHART_TYPE.SCATTER,
|
|
22
|
+
'combination_chart': _seaChart.CHART_TYPE.COMBINATION,
|
|
23
|
+
'trend_chart': _seaChart.CHART_TYPE.TREND,
|
|
24
|
+
'treemap': _seaChart.CHART_TYPE.TREE_MAP,
|
|
25
|
+
'pivot_table': _seaChart.CHART_TYPE.TABLE
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Compatible with old chart
|
|
29
|
+
const convertByType = statItem => {
|
|
30
|
+
const {
|
|
31
|
+
type
|
|
32
|
+
} = statItem;
|
|
33
|
+
const newStatItem = {};
|
|
34
|
+
if (['chart_bar', 'chart_bar_group', 'chart_bar_stack', 'chart_line', 'chart_group_line', 'area_chart', 'area_group_chart'].includes(type)) {
|
|
35
|
+
newStatItem['type'] = typeMapping[type];
|
|
36
|
+
newStatItem['x_axis_include_empty_cells'] = (statItem === null || statItem === void 0 ? void 0 : statItem.x_axis_include_empty) || false;
|
|
37
|
+
newStatItem['x_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_x_axis_label) || false;
|
|
38
|
+
newStatItem['y_axis_summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.y_axis_column_key;
|
|
39
|
+
newStatItem['y_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_y_axis_label) || false;
|
|
40
|
+
newStatItem['y_axis_show_value'] = (statItem === null || statItem === void 0 ? void 0 : statItem.display_data) || false;
|
|
41
|
+
if (type === 'chart_group_line' || type === 'area_group_chart') {
|
|
42
|
+
newStatItem['summary_columns'] = statItem === null || statItem === void 0 ? void 0 : statItem.column_groupby_numeric_columns;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (type === 'compare_bar') {
|
|
46
|
+
newStatItem['x_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_x_axis_label) || false;
|
|
47
|
+
newStatItem['y_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_y_axis_label) || false;
|
|
48
|
+
newStatItem['y_axis_summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.y_axis_column_key;
|
|
49
|
+
}
|
|
50
|
+
if (type === 'custom_bar') {
|
|
51
|
+
newStatItem['type'] = typeMapping[type];
|
|
52
|
+
newStatItem['x_axis_include_empty_cells'] = (statItem === null || statItem === void 0 ? void 0 : statItem.x_axis_include_empty) || false;
|
|
53
|
+
newStatItem['x_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_x_axis_label) || false;
|
|
54
|
+
newStatItem['y_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_y_axis_label) || false;
|
|
55
|
+
newStatItem['y_axises'] = statItem === null || statItem === void 0 ? void 0 : statItem.y_axises.map(item => ({
|
|
56
|
+
...item,
|
|
57
|
+
type: 'bar_stack'
|
|
58
|
+
}));
|
|
59
|
+
}
|
|
60
|
+
if (type === 'completeness_chart' || type === 'group_completeness_chart') {
|
|
61
|
+
newStatItem['type'] = typeMapping[type];
|
|
62
|
+
newStatItem['groupby_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.name_column;
|
|
63
|
+
newStatItem['completed_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.completed_column;
|
|
64
|
+
newStatItem['target_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.target_column;
|
|
65
|
+
if (type === 'group_completeness_chart') {
|
|
66
|
+
newStatItem['column_groupby_column_key'] = statItem.group_column;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
if (type === 'chart_pie' || type === 'chart_ring') {
|
|
70
|
+
newStatItem['type'] = typeMapping[type];
|
|
71
|
+
}
|
|
72
|
+
if (type === 'scatter_chart') {
|
|
73
|
+
newStatItem['type'] = typeMapping[type];
|
|
74
|
+
newStatItem['x_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_x_axis_label) || false;
|
|
75
|
+
newStatItem['y_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_y_axis_label) || false;
|
|
76
|
+
newStatItem['x_axis_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.x_axis_column;
|
|
77
|
+
newStatItem['y_axis_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.y_axis_column;
|
|
78
|
+
newStatItem['column_groupby_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.group_column;
|
|
79
|
+
}
|
|
80
|
+
if (type === 'combination_chart') {
|
|
81
|
+
newStatItem['type'] = typeMapping[type];
|
|
82
|
+
newStatItem['x_axis_show_label'] = (statItem === null || statItem === void 0 ? void 0 : statItem.show_x_axis_label) || false;
|
|
83
|
+
newStatItem['x_axis_include_empty_cells'] = (statItem === null || statItem === void 0 ? void 0 : statItem.x_axis_include_empty) || false;
|
|
84
|
+
}
|
|
85
|
+
if (type === 'map' || type === 'map_bubble') {
|
|
86
|
+
newStatItem['geo_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.geo_column;
|
|
87
|
+
newStatItem['summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_column;
|
|
88
|
+
newStatItem['x_axis_include_empty_cells'] = (statItem === null || statItem === void 0 ? void 0 : statItem.x_axis_include_empty) || false;
|
|
89
|
+
}
|
|
90
|
+
if (type === 'world_map' || type === 'world_map_bubble') {
|
|
91
|
+
newStatItem['geo_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.column;
|
|
92
|
+
newStatItem['summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_column;
|
|
93
|
+
}
|
|
94
|
+
if (type === 'heat_map') {
|
|
95
|
+
newStatItem['time_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.time_column;
|
|
96
|
+
newStatItem['summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_column;
|
|
97
|
+
}
|
|
98
|
+
if (type === 'mirror') {
|
|
99
|
+
newStatItem['column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.column;
|
|
100
|
+
newStatItem['group_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.group_column;
|
|
101
|
+
newStatItem['summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_column;
|
|
102
|
+
}
|
|
103
|
+
if (type === 'basic_number_card') {
|
|
104
|
+
newStatItem['numeric_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.numeric_column;
|
|
105
|
+
}
|
|
106
|
+
if (type === 'trend_chart') {
|
|
107
|
+
newStatItem['type'] = typeMapping[type];
|
|
108
|
+
newStatItem['date_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.date_column;
|
|
109
|
+
newStatItem['summary_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_column;
|
|
110
|
+
}
|
|
111
|
+
if (type === 'dashboard') {
|
|
112
|
+
newStatItem['target_value_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.target_value_column;
|
|
113
|
+
newStatItem['total_value_column_key'] = statItem === null || statItem === void 0 ? void 0 : statItem.total_value_column;
|
|
114
|
+
}
|
|
115
|
+
if (type === 'treemap') {
|
|
116
|
+
newStatItem['type'] = typeMapping[type];
|
|
117
|
+
}
|
|
118
|
+
if (type === 'pivot_table') {
|
|
119
|
+
newStatItem['type'] = typeMapping[type];
|
|
120
|
+
newStatItem['summary_columns'] = statItem === null || statItem === void 0 ? void 0 : statItem.summary_columns_option;
|
|
121
|
+
}
|
|
122
|
+
return newStatItem;
|
|
123
|
+
};
|
|
124
|
+
exports.convertByType = convertByType;
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
7
6
|
exports.default = void 0;
|
|
7
|
+
var _seaChart = require("sea-chart");
|
|
8
8
|
var _commonUtils = require("../utils/common-utils");
|
|
9
|
-
var _model = _interopRequireWildcard(require("../model"));
|
|
10
9
|
class ChartService {
|
|
11
10
|
constructor(_ref) {
|
|
12
11
|
let {
|
|
@@ -17,10 +16,8 @@ class ChartService {
|
|
|
17
16
|
generatorChart() {
|
|
18
17
|
let statistic = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
19
18
|
let table = arguments.length > 1 ? arguments[1] : undefined;
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
if (!ChartModel) return null;
|
|
23
|
-
return new ChartModel(object, table);
|
|
19
|
+
const chartModel = new _seaChart.ChartModel(statistic, table);
|
|
20
|
+
return chartModel;
|
|
24
21
|
}
|
|
25
22
|
getInitChart(_ref2) {
|
|
26
23
|
let {
|
|
@@ -55,15 +52,11 @@ class ChartService {
|
|
|
55
52
|
stat_items
|
|
56
53
|
} = dashboard;
|
|
57
54
|
const statId = (0, _commonUtils.generatorUniqueId)(stat_items);
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
_id: statId,
|
|
64
|
-
name: name + '(copy)',
|
|
65
|
-
layout: null
|
|
66
|
-
};
|
|
55
|
+
const newStatItem = JSON.parse(JSON.stringify(originalStatItem));
|
|
56
|
+
newStatItem.config._id = statId;
|
|
57
|
+
newStatItem.style_config.title.text = originalStatItem.style_config.title.text + '(copy)';
|
|
58
|
+
newStatItem.layout = null;
|
|
59
|
+
return newStatItem;
|
|
67
60
|
}
|
|
68
61
|
getConvertedChart(_ref4) {
|
|
69
62
|
let {
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports.default = void 0;
|
|
8
|
+
var _seaChart = require("sea-chart");
|
|
8
9
|
var _statisticDashboard = _interopRequireDefault(require("../model/statistic-dashboard"));
|
|
9
10
|
var _utils = require("../utils");
|
|
10
11
|
var _commonUtils = require("../utils/common-utils");
|
|
@@ -15,13 +16,11 @@ class DashBoardService {
|
|
|
15
16
|
let {
|
|
16
17
|
value,
|
|
17
18
|
defaultDashboardName,
|
|
18
|
-
chartCalculator,
|
|
19
19
|
chartService,
|
|
20
20
|
updateStatistics,
|
|
21
21
|
deletePluginSettings
|
|
22
22
|
} = _ref;
|
|
23
23
|
this.defaultDashboardName = defaultDashboardName;
|
|
24
|
-
this.chartCalculator = chartCalculator;
|
|
25
24
|
this.chartService = chartService;
|
|
26
25
|
this.initStatistics(value, updateStatistics, deletePluginSettings);
|
|
27
26
|
}
|
|
@@ -64,23 +63,23 @@ class DashBoardService {
|
|
|
64
63
|
type
|
|
65
64
|
} = chart;
|
|
66
65
|
switch (type) {
|
|
67
|
-
case
|
|
66
|
+
case _seaChart.CHART_TYPE.TABLE:
|
|
68
67
|
{
|
|
69
68
|
return this.convertPivotTable(chart);
|
|
70
69
|
}
|
|
71
|
-
case
|
|
70
|
+
case _seaChart.CHART_TYPE.BAR:
|
|
72
71
|
{
|
|
73
72
|
return this.convertChartBar(chart);
|
|
74
73
|
}
|
|
75
|
-
case
|
|
74
|
+
case _seaChart.CHART_TYPE.LINE:
|
|
76
75
|
{
|
|
77
76
|
return this.convertChartLine(chart);
|
|
78
77
|
}
|
|
79
|
-
case
|
|
78
|
+
case _seaChart.CHART_TYPE.PIE:
|
|
80
79
|
{
|
|
81
80
|
return this.chartService.generatorChart({
|
|
82
81
|
...chart,
|
|
83
|
-
type:
|
|
82
|
+
type: _seaChart.CHART_TYPE.RING
|
|
84
83
|
});
|
|
85
84
|
}
|
|
86
85
|
default:
|
|
@@ -121,9 +120,9 @@ class DashBoardService {
|
|
|
121
120
|
};
|
|
122
121
|
const isGroupbyMultipleNumericColumns = column_groupby_multiple_numeric_column && column_groupby_numeric_column_keys && column_groupby_numeric_column_keys.length > 0;
|
|
123
122
|
if (column_groupby_column_key || isGroupbyMultipleNumericColumns) {
|
|
124
|
-
convertedChart.type =
|
|
123
|
+
convertedChart.type = _seaChart.CHART_TYPE.BAR_GROUP;
|
|
125
124
|
if (y_axis_use_stack) {
|
|
126
|
-
convertedChart.type =
|
|
125
|
+
convertedChart.type = _seaChart.CHART_TYPE.BAR_STACK;
|
|
127
126
|
}
|
|
128
127
|
if (isGroupbyMultipleNumericColumns) {
|
|
129
128
|
convertedChart.column_groupby_multiple_numeric_column = column_groupby_multiple_numeric_column;
|
|
@@ -150,7 +149,7 @@ class DashBoardService {
|
|
|
150
149
|
...chart
|
|
151
150
|
};
|
|
152
151
|
if (column_groupby_column_key) {
|
|
153
|
-
convertedChart.type =
|
|
152
|
+
convertedChart.type = _seaChart.CHART_TYPE.LINE_GROUP;
|
|
154
153
|
if (isGroupbyMultipleNumericColumns) {
|
|
155
154
|
convertedChart.column_groupby_multiple_numeric_column = column_groupby_multiple_numeric_column;
|
|
156
155
|
convertedChart.column_groupby_numeric_columns = column_groupby_numeric_column_keys.map(key => {
|
|
@@ -210,13 +209,12 @@ class DashBoardService {
|
|
|
210
209
|
if (!Array.isArray(charts) || charts.length === 0) {
|
|
211
210
|
return dashboard;
|
|
212
211
|
}
|
|
213
|
-
charts = charts.filter(chart => this.chartCalculator.isValidChart(chart));
|
|
214
212
|
charts = charts.map((chart, index) => {
|
|
215
213
|
if (!chart.layout) {
|
|
216
214
|
return {
|
|
217
215
|
...chart,
|
|
218
216
|
layout: {
|
|
219
|
-
i: chart._id,
|
|
217
|
+
i: chart.config._id,
|
|
220
218
|
x: index % 2 * 2,
|
|
221
219
|
y: Infinity,
|
|
222
220
|
w: 2,
|
|
@@ -342,7 +340,7 @@ class DashBoardService {
|
|
|
342
340
|
stat_items
|
|
343
341
|
} = updatedDashboard;
|
|
344
342
|
updatedDashboard.stat_items = stat_items.map(chart => {
|
|
345
|
-
const chartLayout = idChartLayoutMap[chart._id];
|
|
343
|
+
const chartLayout = idChartLayoutMap[chart.config._id];
|
|
346
344
|
if (!chartLayout) return chart;
|
|
347
345
|
const {
|
|
348
346
|
x,
|
|
@@ -379,7 +377,7 @@ class DashBoardService {
|
|
|
379
377
|
const statItemsLen = updatedDashboard.stat_items.length;
|
|
380
378
|
if (!chart.layout) {
|
|
381
379
|
chart.layout = {
|
|
382
|
-
i: chart._id,
|
|
380
|
+
i: chart.config._id,
|
|
383
381
|
x: statItemsLen % 2 * 2,
|
|
384
382
|
y: Infinity,
|
|
385
383
|
w: 2,
|
|
@@ -401,7 +399,7 @@ class DashBoardService {
|
|
|
401
399
|
if (!updatedDashboard) {
|
|
402
400
|
break;
|
|
403
401
|
}
|
|
404
|
-
let deleteIndex = updatedDashboard.stat_items.findIndex(chart => chart._id === chart_id);
|
|
402
|
+
let deleteIndex = updatedDashboard.stat_items.findIndex(chart => chart.config._id === chart_id);
|
|
405
403
|
if (deleteIndex < 0) {
|
|
406
404
|
break;
|
|
407
405
|
}
|
|
@@ -415,13 +413,13 @@ class DashBoardService {
|
|
|
415
413
|
index,
|
|
416
414
|
chart
|
|
417
415
|
} = payload;
|
|
418
|
-
const charId = chart._id;
|
|
416
|
+
const charId = chart.config._id;
|
|
419
417
|
const updatedStatistics = [...this.statistics];
|
|
420
418
|
let updatedDashboard = updatedStatistics[index];
|
|
421
419
|
if (!updatedDashboard) {
|
|
422
420
|
break;
|
|
423
421
|
}
|
|
424
|
-
let updateIndex = updatedDashboard.stat_items.findIndex(chart => chart._id === charId);
|
|
422
|
+
let updateIndex = updatedDashboard.stat_items.findIndex(chart => chart.config._id === charId);
|
|
425
423
|
if (updateIndex < 0) {
|
|
426
424
|
break;
|
|
427
425
|
}
|
|
@@ -439,29 +437,27 @@ class DashBoardService {
|
|
|
439
437
|
const updatedStatistics = [...this.statistics];
|
|
440
438
|
let currentDashboard = updatedStatistics[index];
|
|
441
439
|
if (!currentDashboard || !Array.isArray(currentDashboard.stat_items)) break;
|
|
442
|
-
let movedChartIndex = currentDashboard.stat_items.findIndex(chart => chart._id === chart_id);
|
|
440
|
+
let movedChartIndex = currentDashboard.stat_items.findIndex(chart => chart.config._id === chart_id);
|
|
443
441
|
if (movedChartIndex < 0) break;
|
|
444
442
|
let targetDashboard = target_view_id && updatedStatistics.find(view => view._id === target_view_id);
|
|
445
443
|
if (!targetDashboard) break;
|
|
446
444
|
const movedCharts = currentDashboard.stat_items.splice(movedChartIndex, 1);
|
|
447
445
|
let movedChart = movedCharts && movedCharts[0];
|
|
448
446
|
if (!movedChart) break;
|
|
449
|
-
let newChartId = movedChart._id;
|
|
447
|
+
let newChartId = movedChart.config._id;
|
|
450
448
|
if (!Array.isArray(targetDashboard.stat_items)) {
|
|
451
449
|
targetDashboard.stat_items = [];
|
|
452
450
|
} else {
|
|
453
451
|
newChartId = (0, _commonUtils.generatorUniqueId)(targetDashboard.statItems);
|
|
454
452
|
}
|
|
455
|
-
movedChart =
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
}
|
|
464
|
-
});
|
|
453
|
+
movedChart.config._id = newChartId;
|
|
454
|
+
movedChart.layout = {
|
|
455
|
+
i: newChartId,
|
|
456
|
+
x: targetDashboard.stat_items.length % 2 * 2,
|
|
457
|
+
y: Infinity,
|
|
458
|
+
w: 2,
|
|
459
|
+
h: 7
|
|
460
|
+
};
|
|
465
461
|
targetDashboard.stat_items.push(movedChart);
|
|
466
462
|
this.statistics = updatedStatistics;
|
|
467
463
|
break;
|
|
@@ -11,7 +11,6 @@ var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
|
11
11
|
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
12
12
|
var _statView = _interopRequireDefault(require("../stat-view"));
|
|
13
13
|
var _statisticDropdownMenu = _interopRequireDefault(require("../components/dropdown-menu/statistic-dropdown-menu"));
|
|
14
|
-
var _constants = require("../constants");
|
|
15
14
|
class ChartPreview extends _react.Component {
|
|
16
15
|
constructor() {
|
|
17
16
|
super(...arguments);
|
|
@@ -34,7 +33,7 @@ class ChartPreview extends _react.Component {
|
|
|
34
33
|
// for charts rendered with `<canvas>`
|
|
35
34
|
const {
|
|
36
35
|
_id: id
|
|
37
|
-
} = statItem;
|
|
36
|
+
} = statItem.config;
|
|
38
37
|
const originalElement = document.querySelector("#stat-item-".concat(id, " .statistic-chart-container > div"));
|
|
39
38
|
if (originalElement) {
|
|
40
39
|
const containerWidth = originalElement.scrollWidth + 15 * 2;
|
|
@@ -52,7 +51,7 @@ class ChartPreview extends _react.Component {
|
|
|
52
51
|
}).then(canvas => {
|
|
53
52
|
let eleA = document.createElement('a');
|
|
54
53
|
eleA.href = canvas.toDataURL('image/png');
|
|
55
|
-
eleA.download = "".concat(statItem.
|
|
54
|
+
eleA.download = "".concat(statItem.style_config.title.text || 'image', ".png");
|
|
56
55
|
eleA.click();
|
|
57
56
|
document.body.removeChild(exportContainer);
|
|
58
57
|
});
|
|
@@ -72,50 +71,50 @@ class ChartPreview extends _react.Component {
|
|
|
72
71
|
};
|
|
73
72
|
this.renderChart = statItem => {
|
|
74
73
|
const {
|
|
75
|
-
dtableChangedTime,
|
|
76
|
-
chartCalculator,
|
|
77
74
|
theme,
|
|
78
75
|
colorThemeName,
|
|
79
|
-
|
|
76
|
+
api,
|
|
77
|
+
value,
|
|
78
|
+
getTableById,
|
|
79
|
+
toggleStatisticRecordsDialog
|
|
80
80
|
} = this.props;
|
|
81
81
|
return /*#__PURE__*/_react.default.createElement(_statView.default, {
|
|
82
82
|
ref: ref => this.chartView = ref,
|
|
83
|
-
isPreview: true,
|
|
84
|
-
isEnlarge: false,
|
|
85
|
-
dtableChangedTime: dtableChangedTime,
|
|
86
83
|
theme: theme,
|
|
87
84
|
colorThemeName: colorThemeName,
|
|
88
85
|
statItem: statItem,
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
getTableById:
|
|
92
|
-
|
|
93
|
-
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
86
|
+
api: api,
|
|
87
|
+
value: value,
|
|
88
|
+
getTableById: getTableById,
|
|
89
|
+
toggleStatisticRecordsDialog: toggleStatisticRecordsDialog
|
|
94
90
|
});
|
|
95
91
|
};
|
|
96
92
|
this.moveChartToView = viewId => {
|
|
97
93
|
const {
|
|
98
94
|
statItem
|
|
99
95
|
} = this.props;
|
|
100
|
-
this.props.moveChartToView(statItem._id, viewId);
|
|
96
|
+
this.props.moveChartToView(statItem.config._id, viewId);
|
|
101
97
|
};
|
|
102
98
|
}
|
|
103
99
|
render() {
|
|
100
|
+
var _statItem$config;
|
|
104
101
|
const {
|
|
105
102
|
isTableReadOnly,
|
|
106
103
|
statItem
|
|
107
104
|
} = this.props;
|
|
108
105
|
const {
|
|
109
106
|
_id: statId,
|
|
110
|
-
name: statName,
|
|
111
107
|
type
|
|
112
|
-
} = statItem;
|
|
113
|
-
const
|
|
108
|
+
} = statItem.config;
|
|
109
|
+
const {
|
|
110
|
+
text: statName
|
|
111
|
+
} = statItem.style_config.title;
|
|
112
|
+
const statItemId = statItem === null || statItem === void 0 ? void 0 : (_statItem$config = statItem.config) === null || _statItem$config === void 0 ? void 0 : _statItem$config._id;
|
|
114
113
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
115
114
|
className: "statistic-chart-preview-header"
|
|
116
115
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
117
116
|
className: "statistic-chart-preview-name"
|
|
118
|
-
},
|
|
117
|
+
}, statName), /*#__PURE__*/_react.default.createElement("span", {
|
|
119
118
|
className: "statistic-chart-preview-operations"
|
|
120
119
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
121
120
|
className: "statistic-chart-preview-microscope",
|
|
@@ -135,7 +134,7 @@ class ChartPreview extends _react.Component {
|
|
|
135
134
|
onNewTableDialogToggle: this.onNewTableDialogToggle,
|
|
136
135
|
onUpdateTableDialogToggle: this.onUpdateTableDialogToggle
|
|
137
136
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
id: "stat-item-".concat(
|
|
137
|
+
id: "stat-item-".concat(statItemId),
|
|
139
138
|
className: "statistic-chart-preview-container"
|
|
140
139
|
}, this.renderChart(statItem)), /*#__PURE__*/_react.default.createElement("div", {
|
|
141
140
|
className: "statistic-chart-preview-container-resize"
|
package/es/stat-list/index.js
CHANGED
|
@@ -10,6 +10,7 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
10
10
|
var _reactGridLayout = _interopRequireWildcard(require("react-grid-layout"));
|
|
11
11
|
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
12
12
|
var _toaster = _interopRequireDefault(require("dtable-ui-component/lib/toaster"));
|
|
13
|
+
var _seaChart = require("sea-chart");
|
|
13
14
|
var _chartPreview = _interopRequireDefault(require("./chart-preview"));
|
|
14
15
|
var _components = require("../components");
|
|
15
16
|
var _enlargedChartDialog = _interopRequireDefault(require("../components/dialog/enlarged-chart-dialog"));
|
|
@@ -59,7 +60,7 @@ class StatList extends _react.Component {
|
|
|
59
60
|
});
|
|
60
61
|
};
|
|
61
62
|
this.exportChart2Table = (tableName, chart) => {
|
|
62
|
-
if (chart.type !==
|
|
63
|
+
if (chart.type !== _seaChart.CHART_TYPE.TABLE) {
|
|
63
64
|
this.statisticalResult4Export = null;
|
|
64
65
|
_toaster.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
|
|
65
66
|
this.closeNewTableDialog();
|
|
@@ -100,7 +101,7 @@ class StatList extends _react.Component {
|
|
|
100
101
|
const {
|
|
101
102
|
getTableById
|
|
102
103
|
} = this.props;
|
|
103
|
-
if (chartUpdate2Table.type !==
|
|
104
|
+
if (chartUpdate2Table.type !== _seaChart.CHART_TYPE.TABLE) {
|
|
104
105
|
this.statisticalResult4Update = null;
|
|
105
106
|
_toaster.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
|
|
106
107
|
this.closeSelectTableDialog();
|
|
@@ -151,6 +152,7 @@ class StatList extends _react.Component {
|
|
|
151
152
|
chartIndexExport2Table: -1,
|
|
152
153
|
chartIndexUpdate2Table: -1
|
|
153
154
|
};
|
|
155
|
+
this.value = props.getValue();
|
|
154
156
|
}
|
|
155
157
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
156
158
|
const {
|
|
@@ -163,12 +165,10 @@ class StatList extends _react.Component {
|
|
|
163
165
|
render() {
|
|
164
166
|
const {
|
|
165
167
|
isTableReadOnly,
|
|
166
|
-
dtableChangedTime,
|
|
167
168
|
theme,
|
|
168
169
|
colorThemeName,
|
|
169
170
|
statItems,
|
|
170
|
-
|
|
171
|
-
eventBus
|
|
171
|
+
api
|
|
172
172
|
} = this.props;
|
|
173
173
|
const {
|
|
174
174
|
layout,
|
|
@@ -192,8 +192,9 @@ class StatList extends _react.Component {
|
|
|
192
192
|
onLayoutChange: this.onLayoutChange,
|
|
193
193
|
cols: 4,
|
|
194
194
|
useCSSTransforms: false
|
|
195
|
-
}, statItems.map((
|
|
196
|
-
|
|
195
|
+
}, statItems.map((item, index) => {
|
|
196
|
+
var _item$config;
|
|
197
|
+
const statId = item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config._id;
|
|
197
198
|
if (!statId) return null;
|
|
198
199
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
199
200
|
id: statId,
|
|
@@ -201,16 +202,13 @@ class StatList extends _react.Component {
|
|
|
201
202
|
className: "statistic-chart-preview"
|
|
202
203
|
}, /*#__PURE__*/_react.default.createElement(_chartPreview.default, {
|
|
203
204
|
isTableReadOnly: isTableReadOnly,
|
|
204
|
-
dtableChangedTime: dtableChangedTime,
|
|
205
205
|
theme: theme,
|
|
206
206
|
colorThemeName: colorThemeName,
|
|
207
|
-
statItem:
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
statItem: item,
|
|
208
|
+
api: api,
|
|
209
|
+
value: this.value,
|
|
210
210
|
getOtherStatistics: this.props.getOtherStatistics,
|
|
211
211
|
getTableById: this.props.getTableById,
|
|
212
|
-
getTables: this.props.getTables,
|
|
213
|
-
queryMapJson: this.props.queryMapJson,
|
|
214
212
|
copyChart: this.props.copyChart,
|
|
215
213
|
moveChartToView: this.props.moveChartToView,
|
|
216
214
|
deleteChart: this.props.deleteChart,
|
|
@@ -228,19 +226,15 @@ class StatList extends _react.Component {
|
|
|
228
226
|
return this.showSelectTableDialog(index, statisticalResult);
|
|
229
227
|
},
|
|
230
228
|
onToggleEditChart: this.props.onToggleEditChart,
|
|
231
|
-
onCloseDashboard: this.props.onCloseDashboard,
|
|
232
229
|
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
233
230
|
}));
|
|
234
231
|
})), enlargedChart && /*#__PURE__*/_react.default.createElement(_enlargedChartDialog.default, {
|
|
235
|
-
dtableChangedTime: dtableChangedTime,
|
|
236
232
|
colorThemeName: colorThemeName,
|
|
237
233
|
statItem: enlargedChart,
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
api: api,
|
|
235
|
+
value: this.value,
|
|
240
236
|
getTableById: this.props.getTableById,
|
|
241
|
-
queryMapJson: this.props.queryMapJson,
|
|
242
237
|
onEnlargeToggle: this.closeEnlargedChart,
|
|
243
|
-
onToggleShowEnlarged: this.closeEnlargedChart,
|
|
244
238
|
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
245
239
|
}), chartExport2Table && /*#__PURE__*/_react.default.createElement(_components.NewTableDialog, {
|
|
246
240
|
getTables: this.props.getTables,
|