dtable-statistic 4.4.24-alpha.9 → 5.0.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/color-picker.css +53 -0
- package/es/assets/css/color-rules-popover.css +144 -0
- package/es/assets/css/dashboard.css +0 -1
- package/es/assets/css/dialog.css +0 -30
- package/es/assets/css/slider.css +77 -0
- package/es/assets/css/statistic-chart.module.css +11 -0
- package/es/assets/css/statistic-custom-title.module.css +3 -0
- package/es/assets/css/statistic-custom.module.css +4 -0
- package/es/assets/css/statistic-numeric-column-item.module.css +43 -0
- package/es/assets/css/statistic-time-picker.module.css +21 -0
- package/es/calculator/base-calculator.js +80 -0
- package/es/calculator/basic-chart-calculator.js +349 -0
- package/es/calculator/combination-calculator.js +246 -0
- package/es/calculator/compare-bar-calculator.js +197 -0
- package/es/calculator/completeness-calculator.js +215 -0
- package/es/calculator/copy-value.js +53 -0
- package/es/calculator/dashboard-calculator.js +70 -0
- package/es/calculator/heat-map-calculator.js +148 -0
- package/es/calculator/horizontal-bar-calculator.js +67 -0
- package/es/calculator/index.js +81 -0
- package/es/calculator/map-calculator.js +103 -0
- package/es/calculator/mirror-calculator.js +146 -0
- package/es/calculator/number-card-calculator.js +60 -0
- package/es/calculator/pivot-table-calculator.js +821 -0
- package/es/calculator/scatter-calculator.js +75 -0
- package/es/calculator/thread-manager.js +57 -0
- package/es/calculator/trend-calculator.js +113 -0
- package/es/calculator/workers/basic-chart-calculator-worker.js +495 -0
- package/es/calculator/workers/calculator.worker.js +44 -0
- package/es/calculator/workers/card-calculator-worker.js +40 -0
- package/es/calculator/workers/combination-calculator-worker.js +276 -0
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +150 -0
- package/es/calculator/workers/completeness-calculator-worker.js +208 -0
- package/es/calculator/workers/dashboard-calculator-worker.js +68 -0
- package/es/calculator/workers/mirror-calculator-worker.js +152 -0
- package/es/calculator/workers/pivot-table-calculator-worker.js +718 -0
- package/es/calculator/workers/scatter-calculator-worker.js +80 -0
- package/es/calculator/workers/trend-calculator-worker.js +108 -0
- package/es/calculator/world-map-calculator.js +124 -0
- package/es/components/dialog/chart-addition-edit-dialog.js +90 -0
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +259 -0
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +83 -0
- package/es/components/dialog/enlarged-chart-dialog.js +13 -8
- package/es/components/dialog/statistic-record-dialog/index.js +34 -25
- package/es/components/dialog/statistic-types-dialog/index.css +14 -0
- package/es/components/dialog/statistic-types-dialog/index.js +62 -0
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +2 -2
- package/es/components/popover/color-rules/color-rule.js +183 -0
- package/es/components/popover/color-rules/index.js +87 -0
- package/es/components/popover/color-rules/rule-filters/filter.js +221 -0
- package/es/components/popover/color-rules/rule-filters/index.css +210 -0
- package/es/components/popover/color-rules/rule-filters/index.js +97 -0
- package/es/components/popover/color-rules/rule-filters/number-input.js +78 -0
- package/es/components/popover/color-rules-popover.js +218 -0
- package/es/components/popover/color-selector-popover.js +83 -0
- package/es/constants/index.js +2 -1
- package/es/custom-g2.js +644 -0
- package/es/dashboard.js +31 -9
- package/es/desktop-dashboard.js +32 -51
- package/es/mobile-dashboard.js +16 -8
- package/es/model/bar-group.js +58 -0
- package/es/model/bar.js +47 -0
- package/es/model/base-model.js +18 -0
- package/es/model/basic-number-card.js +25 -0
- package/es/model/combination.js +48 -0
- package/es/model/compare-bar.js +56 -0
- package/es/model/completeness-group.js +31 -0
- package/es/model/completeness.js +25 -0
- package/es/model/custom-bar.js +25 -0
- package/es/model/dashboard.js +20 -0
- package/es/model/generic-model.js +222 -0
- package/es/model/heat-map.js +33 -0
- package/es/model/horizontal-bar-group.js +55 -0
- package/es/model/horizontal-bar.js +47 -0
- package/es/model/index.js +187 -0
- package/es/model/map.js +38 -0
- package/es/model/mirror.js +33 -0
- package/es/model/pie.js +38 -0
- package/es/model/ring.js +40 -0
- package/es/model/scatter.js +22 -0
- package/es/model/table.js +32 -0
- package/es/model/trend.js +32 -0
- package/es/model/world-map.js +34 -0
- package/es/service/chart-service.js +15 -8
- package/es/service/dashboard-service.js +29 -25
- package/es/stat-editor/chart-name-editor.js +68 -0
- package/es/stat-editor/index.js +75 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +153 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +422 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +203 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +23 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +104 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +334 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +119 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +132 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +240 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +89 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +138 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +331 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +143 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +109 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +153 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +144 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +214 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +121 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +172 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +366 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +142 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +150 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +473 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +182 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +564 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +112 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +87 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +187 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +300 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +113 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +289 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +58 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +359 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +48 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +121 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +143 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +269 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +104 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +366 -0
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +55 -0
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +130 -0
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +374 -0
- package/es/stat-editor/stat-settings/map/map-level.js +72 -0
- package/es/stat-editor/stat-settings/map/map-province-city.js +151 -0
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +108 -0
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +154 -0
- package/es/stat-editor/stat-settings/public-setting/calender.js +125 -0
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +24 -0
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +62 -0
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +61 -0
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +35 -0
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +60 -0
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +123 -0
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +33 -0
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.css +29 -0
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +82 -0
- package/es/stat-list/chart-preview.js +20 -19
- package/es/stat-list/index.js +21 -15
- package/es/stat-view/area-chart.js +551 -0
- package/es/stat-view/bar-chart.js +582 -0
- package/es/stat-view/base-chart.js +132 -0
- package/es/stat-view/basic-number-card.js +201 -0
- package/es/stat-view/combination-chart.js +546 -0
- package/es/stat-view/compare-chart.js +483 -0
- package/es/stat-view/completeness-chart.js +390 -0
- package/es/stat-view/custom-bar.js +418 -0
- package/es/stat-view/dashboard-chart.js +266 -0
- package/es/stat-view/heat-map.js +463 -0
- package/es/stat-view/horizontal-bar-chart.js +562 -0
- package/es/stat-view/index.js +156 -47
- package/es/stat-view/line-chart.js +518 -0
- package/es/stat-view/map.js +448 -0
- package/es/stat-view/mirror.js +275 -0
- package/es/stat-view/pie-chart.js +290 -0
- package/es/stat-view/pivot-table/index.js +196 -0
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +156 -0
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +176 -0
- package/es/stat-view/pivot-table/pivot-table-display-name.js +215 -0
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +132 -0
- package/es/stat-view/pivot-table/two-dimension-table.js +384 -0
- package/es/stat-view/ring-chart.js +392 -0
- package/es/stat-view/scatter-chart.js +306 -0
- package/es/stat-view/treemap-chart.js +253 -0
- package/es/stat-view/trend-chart.js +249 -0
- package/es/stat-view/world-map.js +431 -0
- package/es/tabs/tab.js +2 -2
- package/es/utils/basic-chart-utils.js +29 -0
- package/es/utils/cell-format.js +115 -0
- package/es/utils/collaborator.js +50 -0
- package/es/utils/color-utils.js +134 -0
- package/es/utils/column-utils.js +110 -0
- package/es/utils/column.js +20 -0
- package/es/utils/common-utils.js +352 -2
- package/es/utils/date-format.js +71 -0
- package/es/utils/export-table-utils.js +69 -0
- package/es/utils/index.js +89 -12
- package/es/utils/map.js +114 -0
- package/es/utils/model.js +19 -0
- package/es/utils/row-utils.js +134 -0
- package/es/utils/search.js +73 -0
- package/es/utils/sql-utils.js +359 -0
- package/es/utils/stat-utils.js +351 -0
- package/es/utils/trend-utils.js +135 -0
- package/package.json +8 -6
- package/es/components/dialog/chart-edit-dialog.js +0 -93
- package/es/components/dtable-popover.js +0 -97
- package/es/components/dtable-search-input.js +0 -135
- package/es/components/index.js +0 -41
- package/es/components/loading.js +0 -15
- package/es/components/modal-portal.js +0 -26
- package/es/model/conver-statItem.js +0 -124
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
.statistic-chart-parameter-item .statistic-selected-type-container {
|
|
2
|
+
height: 38px;
|
|
3
|
+
border: 1px solid hsl(0, 0%, 80%);
|
|
4
|
+
border-radius: 4px;
|
|
5
|
+
padding-left: 8px;
|
|
6
|
+
padding-right: 3px;
|
|
7
|
+
justify-content: space-between;
|
|
8
|
+
background-color: #fff;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.statistic-chart-parameter-item .statistic-switch-type-container {
|
|
12
|
+
height: 24px;
|
|
13
|
+
width: 24px;
|
|
14
|
+
text-align: center;
|
|
15
|
+
line-height: 24px;
|
|
16
|
+
margin-left: 10px;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.statistic-chart-parameter-item .statistic-switch-type-container:hover {
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.statistic-chart-parameter-item .statistic-switch-type-container .statistic-type-switch-icon {
|
|
24
|
+
color: hsl(0, 0%, 80%);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.statistic-chart-parameter-item .statistic-switch-type-container:hover .statistic-type-switch-icon {
|
|
28
|
+
color: hsl(0, 0%, 60%);
|
|
29
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
+
var _icon = _interopRequireDefault(require("../../../../components/icon"));
|
|
12
|
+
var _statisticTypesDialog = _interopRequireDefault(require("../../../../components/dialog/statistic-types-dialog"));
|
|
13
|
+
var _constants = require("../../../../constants");
|
|
14
|
+
require("./index.css");
|
|
15
|
+
class TypeSettings extends _react.Component {
|
|
16
|
+
constructor(props) {
|
|
17
|
+
super(props);
|
|
18
|
+
this.openTypesDialog = () => {
|
|
19
|
+
this.setState({
|
|
20
|
+
isShowDialog: true
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
this.closeTypesDialog = () => {
|
|
24
|
+
this.setState({
|
|
25
|
+
isShowDialog: false
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
this.getChartTypeName = () => {
|
|
29
|
+
const {
|
|
30
|
+
type: chartType
|
|
31
|
+
} = this.props.chart;
|
|
32
|
+
switch (chartType) {
|
|
33
|
+
case _constants.STAT_TYPE.MAP:
|
|
34
|
+
{
|
|
35
|
+
return '中国地图';
|
|
36
|
+
}
|
|
37
|
+
case _constants.STAT_TYPE.MAP_BUBBLE:
|
|
38
|
+
{
|
|
39
|
+
return '中国地图(气泡图)';
|
|
40
|
+
}
|
|
41
|
+
case _constants.STAT_TYPE.WORLD_MAP_BUBBLE:
|
|
42
|
+
{
|
|
43
|
+
return "".concat(_reactIntlUniversal.default.get(_constants.STATISTIC_TYPE_SHOW[_constants.STAT_TYPE.WORLD_MAP]), "(").concat(_reactIntlUniversal.default.get('Bubble'), ")");
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
{
|
|
47
|
+
return _reactIntlUniversal.default.get(_constants.STATISTIC_TYPE_SHOW[chartType]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
this.state = {
|
|
52
|
+
isShowDialog: false
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
render() {
|
|
56
|
+
const {
|
|
57
|
+
isShowDialog
|
|
58
|
+
} = this.state;
|
|
59
|
+
const {
|
|
60
|
+
chart
|
|
61
|
+
} = this.props;
|
|
62
|
+
const {
|
|
63
|
+
type: chartType
|
|
64
|
+
} = chart;
|
|
65
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
66
|
+
className: "statistic-chart-parameter-item"
|
|
67
|
+
}, /*#__PURE__*/_react.default.createElement("label", null, _reactIntlUniversal.default.get('Chart_type')), /*#__PURE__*/_react.default.createElement("div", {
|
|
68
|
+
className: "statistic-selected-type-container d-flex align-items-center"
|
|
69
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, this.getChartTypeName()), /*#__PURE__*/_react.default.createElement("div", {
|
|
70
|
+
className: "statistic-switch-type-container",
|
|
71
|
+
onClick: this.openTypesDialog
|
|
72
|
+
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
73
|
+
symbol: "switch-icon",
|
|
74
|
+
className: "statistic-type-switch-icon"
|
|
75
|
+
})))), isShowDialog && /*#__PURE__*/_react.default.createElement(_statisticTypesDialog.default, {
|
|
76
|
+
type: chartType,
|
|
77
|
+
onChange: this.props.onChange,
|
|
78
|
+
onToggle: this.closeTypesDialog
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
var _default = exports.default = TypeSettings;
|
|
@@ -11,6 +11,7 @@ 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");
|
|
14
15
|
class ChartPreview extends _react.Component {
|
|
15
16
|
constructor() {
|
|
16
17
|
super(...arguments);
|
|
@@ -33,7 +34,7 @@ class ChartPreview extends _react.Component {
|
|
|
33
34
|
// for charts rendered with `<canvas>`
|
|
34
35
|
const {
|
|
35
36
|
_id: id
|
|
36
|
-
} = statItem
|
|
37
|
+
} = statItem;
|
|
37
38
|
const originalElement = document.querySelector("#stat-item-".concat(id, " .statistic-chart-container > div"));
|
|
38
39
|
if (originalElement) {
|
|
39
40
|
const containerWidth = originalElement.scrollWidth + 15 * 2;
|
|
@@ -51,7 +52,7 @@ class ChartPreview extends _react.Component {
|
|
|
51
52
|
}).then(canvas => {
|
|
52
53
|
let eleA = document.createElement('a');
|
|
53
54
|
eleA.href = canvas.toDataURL('image/png');
|
|
54
|
-
eleA.download = "".concat(statItem.
|
|
55
|
+
eleA.download = "".concat(statItem.name || 'image', ".png");
|
|
55
56
|
eleA.click();
|
|
56
57
|
document.body.removeChild(exportContainer);
|
|
57
58
|
});
|
|
@@ -71,50 +72,50 @@ class ChartPreview extends _react.Component {
|
|
|
71
72
|
};
|
|
72
73
|
this.renderChart = statItem => {
|
|
73
74
|
const {
|
|
75
|
+
dtableChangedTime,
|
|
76
|
+
chartCalculator,
|
|
74
77
|
theme,
|
|
75
78
|
colorThemeName,
|
|
76
|
-
|
|
77
|
-
value,
|
|
78
|
-
getTableById,
|
|
79
|
-
toggleStatisticRecordsDialog
|
|
79
|
+
eventBus
|
|
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,
|
|
83
86
|
theme: theme,
|
|
84
87
|
colorThemeName: colorThemeName,
|
|
85
88
|
statItem: statItem,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
getTableById: getTableById,
|
|
89
|
-
|
|
89
|
+
chartCalculator: chartCalculator,
|
|
90
|
+
eventBus: eventBus,
|
|
91
|
+
getTableById: this.props.getTableById,
|
|
92
|
+
queryMapJson: this.props.queryMapJson,
|
|
93
|
+
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
90
94
|
});
|
|
91
95
|
};
|
|
92
96
|
this.moveChartToView = viewId => {
|
|
93
97
|
const {
|
|
94
98
|
statItem
|
|
95
99
|
} = this.props;
|
|
96
|
-
this.props.moveChartToView(statItem.
|
|
100
|
+
this.props.moveChartToView(statItem._id, viewId);
|
|
97
101
|
};
|
|
98
102
|
}
|
|
99
103
|
render() {
|
|
100
|
-
var _statItem$config;
|
|
101
104
|
const {
|
|
102
105
|
isTableReadOnly,
|
|
103
106
|
statItem
|
|
104
107
|
} = this.props;
|
|
105
108
|
const {
|
|
106
109
|
_id: statId,
|
|
110
|
+
name: statName,
|
|
107
111
|
type
|
|
108
|
-
} = statItem
|
|
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;
|
|
112
|
+
} = statItem;
|
|
113
|
+
const showStatName = !(type === _constants.STAT_TYPE.BASIC_NUMBER_CARD || type === _constants.STAT_TYPE.DASHBOARD);
|
|
113
114
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
114
115
|
className: "statistic-chart-preview-header"
|
|
115
116
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
116
117
|
className: "statistic-chart-preview-name"
|
|
117
|
-
}, statName), /*#__PURE__*/_react.default.createElement("span", {
|
|
118
|
+
}, showStatName ? statName : ''), /*#__PURE__*/_react.default.createElement("span", {
|
|
118
119
|
className: "statistic-chart-preview-operations"
|
|
119
120
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
120
121
|
className: "statistic-chart-preview-microscope",
|
|
@@ -134,7 +135,7 @@ class ChartPreview extends _react.Component {
|
|
|
134
135
|
onNewTableDialogToggle: this.onNewTableDialogToggle,
|
|
135
136
|
onUpdateTableDialogToggle: this.onUpdateTableDialogToggle
|
|
136
137
|
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
137
|
-
id: "stat-item-".concat(
|
|
138
|
+
id: "stat-item-".concat(statItem._id),
|
|
138
139
|
className: "statistic-chart-preview-container"
|
|
139
140
|
}, this.renderChart(statItem)), /*#__PURE__*/_react.default.createElement("div", {
|
|
140
141
|
className: "statistic-chart-preview-container-resize"
|
package/es/stat-list/index.js
CHANGED
|
@@ -10,9 +10,8 @@ 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");
|
|
14
13
|
var _chartPreview = _interopRequireDefault(require("./chart-preview"));
|
|
15
|
-
var
|
|
14
|
+
var _newTableDialog = _interopRequireDefault(require("../components/dialog/new-table-dialog"));
|
|
16
15
|
var _enlargedChartDialog = _interopRequireDefault(require("../components/dialog/enlarged-chart-dialog"));
|
|
17
16
|
var _tableSelectDialog = _interopRequireDefault(require("../components/dialog/table-select-dialog"));
|
|
18
17
|
var _exportTableUtils = require("../utils/export-table-utils");
|
|
@@ -60,7 +59,7 @@ class StatList extends _react.Component {
|
|
|
60
59
|
});
|
|
61
60
|
};
|
|
62
61
|
this.exportChart2Table = (tableName, chart) => {
|
|
63
|
-
if (chart.type !==
|
|
62
|
+
if (chart.type !== _constants.STAT_TYPE.PIVOT_TABLE) {
|
|
64
63
|
this.statisticalResult4Export = null;
|
|
65
64
|
_toaster.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
|
|
66
65
|
this.closeNewTableDialog();
|
|
@@ -101,7 +100,7 @@ class StatList extends _react.Component {
|
|
|
101
100
|
const {
|
|
102
101
|
getTableById
|
|
103
102
|
} = this.props;
|
|
104
|
-
if (chartUpdate2Table.type !==
|
|
103
|
+
if (chartUpdate2Table.type !== _constants.STAT_TYPE.PIVOT_TABLE) {
|
|
105
104
|
this.statisticalResult4Update = null;
|
|
106
105
|
_toaster.default.danger(_reactIntlUniversal.default.get('Failed_export_statistic_to_Table'));
|
|
107
106
|
this.closeSelectTableDialog();
|
|
@@ -152,7 +151,6 @@ class StatList extends _react.Component {
|
|
|
152
151
|
chartIndexExport2Table: -1,
|
|
153
152
|
chartIndexUpdate2Table: -1
|
|
154
153
|
};
|
|
155
|
-
this.value = props.getValue();
|
|
156
154
|
}
|
|
157
155
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
158
156
|
const {
|
|
@@ -165,10 +163,12 @@ class StatList extends _react.Component {
|
|
|
165
163
|
render() {
|
|
166
164
|
const {
|
|
167
165
|
isTableReadOnly,
|
|
166
|
+
dtableChangedTime,
|
|
168
167
|
theme,
|
|
169
168
|
colorThemeName,
|
|
170
169
|
statItems,
|
|
171
|
-
|
|
170
|
+
chartCalculator,
|
|
171
|
+
eventBus
|
|
172
172
|
} = this.props;
|
|
173
173
|
const {
|
|
174
174
|
layout,
|
|
@@ -192,9 +192,8 @@ class StatList extends _react.Component {
|
|
|
192
192
|
onLayoutChange: this.onLayoutChange,
|
|
193
193
|
cols: 4,
|
|
194
194
|
useCSSTransforms: false
|
|
195
|
-
}, statItems.map((
|
|
196
|
-
|
|
197
|
-
const statId = item === null || item === void 0 ? void 0 : (_item$config = item.config) === null || _item$config === void 0 ? void 0 : _item$config._id;
|
|
195
|
+
}, statItems.map((statItem, index) => {
|
|
196
|
+
const statId = statItem._id;
|
|
198
197
|
if (!statId) return null;
|
|
199
198
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
200
199
|
id: statId,
|
|
@@ -202,13 +201,16 @@ class StatList extends _react.Component {
|
|
|
202
201
|
className: "statistic-chart-preview"
|
|
203
202
|
}, /*#__PURE__*/_react.default.createElement(_chartPreview.default, {
|
|
204
203
|
isTableReadOnly: isTableReadOnly,
|
|
204
|
+
dtableChangedTime: dtableChangedTime,
|
|
205
205
|
theme: theme,
|
|
206
206
|
colorThemeName: colorThemeName,
|
|
207
|
-
statItem:
|
|
208
|
-
|
|
209
|
-
|
|
207
|
+
statItem: statItem,
|
|
208
|
+
chartCalculator: chartCalculator,
|
|
209
|
+
eventBus: eventBus,
|
|
210
210
|
getOtherStatistics: this.props.getOtherStatistics,
|
|
211
211
|
getTableById: this.props.getTableById,
|
|
212
|
+
getTables: this.props.getTables,
|
|
213
|
+
queryMapJson: this.props.queryMapJson,
|
|
212
214
|
copyChart: this.props.copyChart,
|
|
213
215
|
moveChartToView: this.props.moveChartToView,
|
|
214
216
|
deleteChart: this.props.deleteChart,
|
|
@@ -226,17 +228,21 @@ class StatList extends _react.Component {
|
|
|
226
228
|
return this.showSelectTableDialog(index, statisticalResult);
|
|
227
229
|
},
|
|
228
230
|
onToggleEditChart: this.props.onToggleEditChart,
|
|
231
|
+
onCloseDashboard: this.props.onCloseDashboard,
|
|
229
232
|
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
230
233
|
}));
|
|
231
234
|
})), enlargedChart && /*#__PURE__*/_react.default.createElement(_enlargedChartDialog.default, {
|
|
235
|
+
dtableChangedTime: dtableChangedTime,
|
|
232
236
|
colorThemeName: colorThemeName,
|
|
233
237
|
statItem: enlargedChart,
|
|
234
|
-
|
|
235
|
-
|
|
238
|
+
eventBus: eventBus,
|
|
239
|
+
chartCalculator: chartCalculator,
|
|
236
240
|
getTableById: this.props.getTableById,
|
|
241
|
+
queryMapJson: this.props.queryMapJson,
|
|
237
242
|
onEnlargeToggle: this.closeEnlargedChart,
|
|
243
|
+
onToggleShowEnlarged: this.closeEnlargedChart,
|
|
238
244
|
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
239
|
-
}), chartExport2Table && /*#__PURE__*/_react.default.createElement(
|
|
245
|
+
}), chartExport2Table && /*#__PURE__*/_react.default.createElement(_newTableDialog.default, {
|
|
240
246
|
getTables: this.props.getTables,
|
|
241
247
|
tableName: chartExport2Table.name,
|
|
242
248
|
onNewTableConfirm: tableName => this.exportChart2Table(tableName, chartExport2Table),
|