dtable-statistic 4.3.2 → 4.3.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/api/dtable-db-api.js +10 -3
- package/es/calculator/base-calculator.js +20 -12
- package/es/calculator/basic-chart-calculator.js +72 -65
- package/es/calculator/combination-calculator.js +64 -57
- package/es/calculator/compare-bar-calculator.js +33 -26
- package/es/calculator/completeness-calculator.js +37 -30
- package/es/calculator/copy-value.js +7 -1
- package/es/calculator/dashboard-calculator.js +20 -13
- package/es/calculator/heat-map-calculator.js +25 -18
- package/es/calculator/horizontal-bar-calculator.js +15 -8
- package/es/calculator/index.js +42 -35
- package/es/calculator/map-calculator.js +29 -22
- package/es/calculator/mirror-calculator.js +27 -20
- package/es/calculator/number-card-calculator.js +17 -10
- package/es/calculator/pivot-table-calculator.js +65 -58
- package/es/calculator/scatter-calculator.js +21 -14
- package/es/calculator/thread-manager.js +7 -1
- package/es/calculator/trend-calculator.js +29 -22
- package/es/calculator/workers/basic-chart-calculator-worker.js +83 -76
- package/es/calculator/workers/calculator.worker.js +33 -30
- package/es/calculator/workers/card-calculator-worker.js +19 -13
- package/es/calculator/workers/combination-calculator-worker.js +53 -46
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +29 -22
- package/es/calculator/workers/completeness-calculator-worker.js +41 -34
- package/es/calculator/workers/dashboard-calculator-worker.js +24 -18
- package/es/calculator/workers/mirror-calculator-worker.js +29 -22
- package/es/calculator/workers/pivot-table-calculator-worker.js +84 -77
- package/es/calculator/workers/scatter-calculator-worker.js +27 -20
- package/es/calculator/workers/trend-calculator-worker.js +34 -27
- package/es/calculator/world-map-calculator.js +24 -17
- package/es/components/common-add-tool.js +12 -5
- package/es/components/dialog/chart-addition-edit-dialog.js +20 -12
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +110 -103
- package/es/components/dialog/color-theme-dialog.js +22 -15
- package/es/components/dialog/delete-confirmation-dialog.js +18 -11
- package/es/components/dialog/enlarged-chart-dialog.js +28 -20
- package/es/components/dialog/new-table-dialog.js +23 -16
- package/es/components/dialog/new-view-dialog.js +22 -15
- package/es/components/dialog/rename-view-dialog.js +22 -14
- package/es/components/dialog/statistic-record-dialog/index.js +45 -37
- package/es/components/dialog/statistic-types-dialog/index.js +22 -14
- package/es/components/dialog/table-select-dialog.js +23 -15
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +56 -43
- package/es/components/dtable-popover.js +19 -12
- package/es/components/dtable-search-input.js +21 -13
- package/es/components/dtable-select.js +20 -12
- package/es/components/icon.js +11 -4
- package/es/components/index.js +76 -11
- package/es/components/loading.js +10 -3
- package/es/components/modal-portal.js +12 -5
- package/es/components/popover/color-rules/color-rule.js +33 -25
- package/es/components/popover/color-rules/index.js +14 -6
- package/es/components/popover/color-rules/rule-filters/filter.js +35 -28
- package/es/components/popover/color-rules/rule-filters/index.js +25 -17
- package/es/components/popover/color-rules/rule-filters/number-input.js +17 -9
- package/es/components/popover/color-rules-popover.js +32 -24
- package/es/components/popover/color-selector-popover.js +17 -10
- package/es/components/seatable-radio/index.js +16 -9
- package/es/components/select/index.js +9 -2
- package/es/components/select/option-group.js +27 -19
- package/es/components/select/option.js +14 -6
- package/es/components/select/select.js +25 -17
- package/es/components/toast/alert.js +31 -24
- package/es/components/toast/index.js +10 -3
- package/es/components/toast/toast.js +20 -12
- package/es/components/toast/toastManager.js +17 -9
- package/es/components/toast/toaster.js +14 -6
- package/es/constants/color-rules.js +12 -6
- package/es/constants/dtable-select-style.js +9 -4
- package/es/constants/event-types.js +10 -4
- package/es/constants/index.js +96 -67
- package/es/constants/key-codes.js +2 -0
- package/es/constants/map.js +8 -2
- package/es/constants/model.js +26 -20
- package/es/constants/regions.js +8 -3
- package/es/constants/zIndexes.js +7 -1
- package/es/custom-g2.js +236 -208
- package/es/dashboard.js +58 -50
- package/es/desktop-dashboard.js +55 -47
- package/es/index.js +6 -3
- package/es/locale/index.js +13 -10
- package/es/locale/lang/de.js +7 -1
- package/es/locale/lang/en.js +7 -1
- package/es/locale/lang/fr.js +7 -1
- package/es/locale/lang/zh_CN.js +7 -1
- package/es/mobile-dashboard.js +46 -38
- package/es/model/bar-group.js +19 -11
- package/es/model/bar.js +18 -10
- package/es/model/base-model.js +9 -2
- package/es/model/basic-number-card.js +16 -8
- package/es/model/collaborators.js +9 -2
- package/es/model/combination.js +20 -12
- package/es/model/compare-bar.js +24 -16
- package/es/model/completeness-group.js +16 -8
- package/es/model/completeness.js +13 -5
- package/es/model/custom-bar.js +14 -6
- package/es/model/dashboard.js +14 -6
- package/es/model/generic-model.js +141 -133
- package/es/model/heat-map.js +19 -11
- package/es/model/horizontal-bar-group.js +18 -10
- package/es/model/horizontal-bar.js +18 -10
- package/es/model/index.js +185 -53
- package/es/model/map.js +23 -15
- package/es/model/mirror.js +21 -13
- package/es/model/pie.js +18 -10
- package/es/model/ring.js +19 -11
- package/es/model/scatter.js +14 -6
- package/es/model/statistic-dashboard.js +9 -2
- package/es/model/table.js +18 -10
- package/es/model/trend.js +20 -12
- package/es/model/world-map.js +21 -13
- package/es/service/chart-service.js +14 -7
- package/es/service/dashboard-service.js +42 -35
- package/es/service/map-json.js +14 -8
- package/es/stat-editor/chart-name-editor.js +15 -8
- package/es/stat-editor/index.js +24 -16
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +30 -22
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +57 -49
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +32 -24
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +11 -4
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +27 -19
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +51 -43
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +31 -23
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +31 -23
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +48 -40
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +29 -21
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +34 -26
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +55 -47
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +30 -22
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +26 -18
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +35 -27
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +32 -24
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +41 -33
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +30 -22
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +25 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +54 -46
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +31 -23
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +34 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +85 -77
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +29 -21
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +81 -73
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +24 -16
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +27 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +26 -18
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +59 -51
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +27 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +57 -49
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +20 -12
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +56 -48
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +17 -9
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +29 -21
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +38 -30
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +58 -50
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +25 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +56 -47
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +20 -12
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +19 -12
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +70 -62
- package/es/stat-editor/stat-settings/map/map-level.js +20 -13
- package/es/stat-editor/stat-settings/map/map-province-city.js +27 -20
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +19 -11
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +28 -20
- package/es/stat-editor/stat-settings/public-setting/calender.js +29 -22
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +13 -6
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +16 -9
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +21 -13
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +15 -8
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +19 -11
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +35 -27
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +15 -8
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +26 -18
- package/es/stat-list/chart-preview.js +33 -20
- package/es/stat-list/index.js +36 -28
- package/es/stat-view/area-chart.js +51 -44
- package/es/stat-view/bar-chart.js +55 -48
- package/es/stat-view/base-chart.js +32 -24
- package/es/stat-view/basic-number-card.js +26 -19
- package/es/stat-view/combination-chart.js +57 -50
- package/es/stat-view/compare-chart.js +47 -40
- package/es/stat-view/completeness-chart.js +37 -30
- package/es/stat-view/custom-bar.js +38 -31
- package/es/stat-view/dashboard-chart.js +22 -15
- package/es/stat-view/heat-map.js +50 -43
- package/es/stat-view/horizontal-bar-chart.js +59 -52
- package/es/stat-view/index.js +80 -73
- package/es/stat-view/line-chart.js +47 -40
- package/es/stat-view/map.js +40 -33
- package/es/stat-view/mirror.js +28 -21
- package/es/stat-view/pie-chart.js +36 -29
- package/es/stat-view/pivot-table/index.js +39 -32
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +39 -31
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +37 -29
- package/es/stat-view/pivot-table/pivot-table-display-name.js +54 -46
- package/es/stat-view/pivot-table/two-dimension-table.js +70 -62
- package/es/stat-view/ring-chart.js +46 -39
- package/es/stat-view/scatter-chart.js +37 -30
- package/es/stat-view/treemap-chart.js +45 -38
- package/es/stat-view/trend-chart.js +39 -32
- package/es/stat-view/world-map.js +40 -33
- package/es/tabs/index.js +40 -32
- package/es/tabs/tab.js +35 -27
- package/es/utils/basic-chart-utils.js +9 -2
- package/es/utils/cell-format.js +22 -14
- package/es/utils/cell-value.js +14 -7
- package/es/utils/collaborator.js +13 -4
- package/es/utils/color-utils.js +29 -18
- package/es/utils/column-utils.js +29 -18
- package/es/utils/column.js +11 -4
- package/es/utils/common-utils.js +67 -43
- package/es/utils/date-format.js +8 -2
- package/es/utils/export-table-utils.js +91 -82
- package/es/utils/index.js +100 -11
- package/es/utils/map.js +36 -26
- package/es/utils/model.js +14 -6
- package/es/utils/object.js +15 -6
- package/es/utils/pivot-table.js +23 -16
- package/es/utils/row-utils.js +34 -24
- package/es/utils/search.js +29 -21
- package/es/utils/sql-utils.js +75 -65
- package/es/utils/stat-utils.js +67 -60
- package/es/utils/trend-utils.js +40 -32
- package/package.json +82 -125
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableStore = require("dtable-store");
|
|
9
|
+
var _baseCalculator = _interopRequireDefault(require("./base-calculator"));
|
|
10
|
+
var _commonUtils = require("../utils/common-utils");
|
|
11
|
+
var _constants = require("../constants");
|
|
12
|
+
var _statUtils = _interopRequireDefault(require("../utils/stat-utils"));
|
|
13
|
+
class WorldMapCalculator extends _baseCalculator.default {
|
|
7
14
|
constructor(_ref) {
|
|
8
15
|
let {
|
|
9
16
|
value,
|
|
@@ -28,11 +35,11 @@ class WorldMapCalculator extends BaseCalculator {
|
|
|
28
35
|
summary_column
|
|
29
36
|
} = chart;
|
|
30
37
|
const table = this.getTableById(table_id);
|
|
31
|
-
const selectedColumn = column && TableUtils.getTableColumnByKey(table, column);
|
|
38
|
+
const selectedColumn = column && _dtableStore.TableUtils.getTableColumnByKey(table, column);
|
|
32
39
|
if (column && !selectedColumn) {
|
|
33
40
|
return false;
|
|
34
41
|
}
|
|
35
|
-
if (summary_column && !TableUtils.getTableColumnByKey(table, summary_column)) {
|
|
42
|
+
if (summary_column && !_dtableStore.TableUtils.getTableColumnByKey(table, summary_column)) {
|
|
36
43
|
return false;
|
|
37
44
|
}
|
|
38
45
|
return true;
|
|
@@ -56,22 +63,22 @@ class WorldMapCalculator extends BaseCalculator {
|
|
|
56
63
|
} = chart;
|
|
57
64
|
const selectedTable = this.getTableById(table_id);
|
|
58
65
|
const selectedView = this.getViewById(view_id, selectedTable);
|
|
59
|
-
const selectedColumn = TableUtils.getTableColumnByKey(selectedTable, column);
|
|
66
|
+
const selectedColumn = _dtableStore.TableUtils.getTableColumnByKey(selectedTable, column);
|
|
60
67
|
if (!selectedColumn) return [];
|
|
61
68
|
const columnName = selectedColumn.name;
|
|
62
69
|
const isAdvanced = summary_type === 'advanced';
|
|
63
|
-
const method = isAdvanced ? DTABLE_DB_SUMMARY_METHOD[summary_method] : 'COUNT';
|
|
64
|
-
const sqlCondition = filter2SqlCondition(selectedTable, selectedView);
|
|
70
|
+
const method = isAdvanced ? _constants.DTABLE_DB_SUMMARY_METHOD[summary_method] : 'COUNT';
|
|
71
|
+
const sqlCondition = (0, _dtableStore.filter2SqlCondition)(selectedTable, selectedView);
|
|
65
72
|
let summaryColumnName = '';
|
|
66
73
|
let summaryColumn;
|
|
67
74
|
let sqlString = '';
|
|
68
75
|
if (isAdvanced) {
|
|
69
|
-
summaryColumn = TableUtils.getTableColumnByKey(selectedTable, summary_column);
|
|
76
|
+
summaryColumn = _dtableStore.TableUtils.getTableColumnByKey(selectedTable, summary_column);
|
|
70
77
|
if (!summaryColumn) {
|
|
71
78
|
return [];
|
|
72
79
|
}
|
|
73
80
|
summaryColumnName = summaryColumn.name;
|
|
74
|
-
const summaryColumnMethod = getSummaryColumnMethod(method, summaryColumnName);
|
|
81
|
+
const summaryColumnMethod = (0, _commonUtils.getSummaryColumnMethod)(method, summaryColumnName);
|
|
75
82
|
sqlString = "select `".concat(columnName, "`, ").concat(summaryColumnMethod, " from ").concat(selectedTable.name, " ").concat(sqlCondition, " group by ").concat(columnName, " limit 5000");
|
|
76
83
|
} else {
|
|
77
84
|
sqlString = "select `".concat(columnName, "`, ").concat(method, "(").concat(columnName, ") from ").concat(selectedTable.name, " ").concat(sqlCondition, " group by ").concat(columnName, " limit 5000");
|
|
@@ -81,15 +88,15 @@ class WorldMapCalculator extends BaseCalculator {
|
|
|
81
88
|
const data = result.data;
|
|
82
89
|
if (!data.results) return [];
|
|
83
90
|
const newResult = [];
|
|
84
|
-
const summaryColumnMethod = getSummaryColumnMethod(method, summaryColumnName);
|
|
91
|
+
const summaryColumnMethod = (0, _commonUtils.getSummaryColumnMethod)(method, summaryColumnName);
|
|
85
92
|
const valueKey = isAdvanced ? "".concat(summaryColumnMethod) : "".concat(method, "(").concat(columnName, ")");
|
|
86
93
|
data.results.forEach(item => {
|
|
87
94
|
const currentValue = item[column];
|
|
88
95
|
let value = item[valueKey];
|
|
89
96
|
let formatted_value = value;
|
|
90
97
|
if (isAdvanced) {
|
|
91
|
-
value = formatNumericValue(value, summaryColumn);
|
|
92
|
-
formatted_value =
|
|
98
|
+
value = (0, _commonUtils.formatNumericValue)(value, summaryColumn);
|
|
99
|
+
formatted_value = _statUtils.default.getFormattedValue(value, summaryColumn, summary_method);
|
|
93
100
|
}
|
|
94
101
|
if (currentValue) {
|
|
95
102
|
const name = typeof currentValue === 'string' ? currentValue : currentValue.country_region;
|
|
@@ -128,4 +135,4 @@ class WorldMapCalculator extends BaseCalculator {
|
|
|
128
135
|
};
|
|
129
136
|
}
|
|
130
137
|
}
|
|
131
|
-
|
|
138
|
+
var _default = exports.default = WorldMapCalculator;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
2
9
|
function CommonAddTool(props) {
|
|
3
10
|
const {
|
|
4
11
|
callBack,
|
|
@@ -6,16 +13,16 @@ function CommonAddTool(props) {
|
|
|
6
13
|
className,
|
|
7
14
|
addIconClassName
|
|
8
15
|
} = props;
|
|
9
|
-
return /*#__PURE__*/
|
|
16
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
10
17
|
className: "add-item-btn ".concat(className ? className : ''),
|
|
11
18
|
onClick: e => {
|
|
12
19
|
callBack(e);
|
|
13
20
|
}
|
|
14
|
-
}, /*#__PURE__*/
|
|
21
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
15
22
|
className: "dtable-font dtable-icon-add-table ".concat(addIconClassName || '')
|
|
16
|
-
}), /*#__PURE__*/
|
|
23
|
+
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
17
24
|
className: "add-new-option text-truncate",
|
|
18
25
|
title: footerName
|
|
19
26
|
}, footerName));
|
|
20
27
|
}
|
|
21
|
-
|
|
28
|
+
var _default = exports.default = CommonAddTool;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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 _reactstrap = require("reactstrap");
|
|
12
|
+
var _chartSelector = _interopRequireDefault(require("./chart-addition-widgets/chart-selector"));
|
|
13
|
+
var _statEditor = _interopRequireDefault(require("../../stat-editor"));
|
|
14
|
+
class ChartAdditionEditDialog extends _react.Component {
|
|
7
15
|
constructor(props) {
|
|
8
16
|
super(props);
|
|
9
17
|
this.addChart = chartType => {
|
|
@@ -50,16 +58,16 @@ class ChartAdditionEditDialog extends Component {
|
|
|
50
58
|
chart
|
|
51
59
|
} = this.state;
|
|
52
60
|
const editMode = !!chart;
|
|
53
|
-
return /*#__PURE__*/
|
|
61
|
+
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
54
62
|
isOpen: true,
|
|
55
63
|
toggle: this.props.hideChartAdditionDialog,
|
|
56
64
|
className: "statistic-chart-addition-dialog",
|
|
57
65
|
zIndex: 1048
|
|
58
|
-
}, /*#__PURE__*/
|
|
66
|
+
}, /*#__PURE__*/_react.default.createElement(_reactstrap.ModalHeader, {
|
|
59
67
|
toggle: this.props.hideChartAdditionDialog
|
|
60
|
-
},
|
|
68
|
+
}, _reactIntlUniversal.default.get(editMode ? 'Edit_the_chart' : 'Choose_a_chart')), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, {
|
|
61
69
|
className: "statistic-modal-body"
|
|
62
|
-
}, editMode ? /*#__PURE__*/
|
|
70
|
+
}, editMode ? /*#__PURE__*/_react.default.createElement(_statEditor.default, {
|
|
63
71
|
dtableChangedTime: this.props.dtableChangedTime,
|
|
64
72
|
colorThemeName: colorThemeName,
|
|
65
73
|
statItem: chart,
|
|
@@ -74,9 +82,9 @@ class ChartAdditionEditDialog extends Component {
|
|
|
74
82
|
modifyChartName: this.modifyChartName,
|
|
75
83
|
modifyChart: this.modifyChart,
|
|
76
84
|
toggleStatisticRecordsDialog: this.props.toggleStatisticRecordsDialog
|
|
77
|
-
}) : /*#__PURE__*/
|
|
85
|
+
}) : /*#__PURE__*/_react.default.createElement(_chartSelector.default, {
|
|
78
86
|
addEditingChart: this.addChart
|
|
79
87
|
})));
|
|
80
88
|
}
|
|
81
89
|
}
|
|
82
|
-
|
|
90
|
+
var _default = exports.default = ChartAdditionEditDialog;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _reactstrap = require("reactstrap");
|
|
10
|
+
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
+
var _constants = require("../../../constants");
|
|
12
|
+
var _commonUtils = require("../../../utils/common-utils");
|
|
13
|
+
var _statisticChartSelectorModule = _interopRequireDefault(require("./statistic-chart-selector.module.css"));
|
|
14
|
+
class ChartSelector extends _react.default.Component {
|
|
8
15
|
constructor(props) {
|
|
9
16
|
super(props);
|
|
10
17
|
this.setCurrentCatIndex = (index, e) => {
|
|
@@ -21,177 +28,177 @@ class ChartSelector extends React.Component {
|
|
|
21
28
|
};
|
|
22
29
|
const lang = window.dtable && window.dtable.lang || 'zh-cn';
|
|
23
30
|
this.chartTypes = [{
|
|
24
|
-
catTitle:
|
|
31
|
+
catTitle: _reactIntlUniversal.default.get('Histogram'),
|
|
25
32
|
icon: 'dtable-icon-histogram',
|
|
26
33
|
items: [{
|
|
27
|
-
type: STAT_TYPE.BAR,
|
|
28
|
-
title:
|
|
34
|
+
type: _constants.STAT_TYPE.BAR,
|
|
35
|
+
title: _reactIntlUniversal.default.get('Basic_histogram'),
|
|
29
36
|
image: 'bar.png'
|
|
30
37
|
}, {
|
|
31
|
-
type: STAT_TYPE.BAR_GROUP,
|
|
32
|
-
title:
|
|
38
|
+
type: _constants.STAT_TYPE.BAR_GROUP,
|
|
39
|
+
title: _reactIntlUniversal.default.get('Grouped_histogram'),
|
|
33
40
|
image: 'bar-group.png'
|
|
34
41
|
}, {
|
|
35
|
-
type: STAT_TYPE.BAR_STACK,
|
|
36
|
-
title:
|
|
42
|
+
type: _constants.STAT_TYPE.BAR_STACK,
|
|
43
|
+
title: _reactIntlUniversal.default.get('Stacked_histogram'),
|
|
37
44
|
image: 'bar-stack.png'
|
|
38
45
|
}, {
|
|
39
|
-
type: STAT_TYPE.COMPARE_BAR,
|
|
40
|
-
title:
|
|
46
|
+
type: _constants.STAT_TYPE.COMPARE_BAR,
|
|
47
|
+
title: _reactIntlUniversal.default.get('Time_comparison_histogram'),
|
|
41
48
|
image: 'compared-chart.png'
|
|
42
49
|
}, {
|
|
43
|
-
type: STAT_TYPE.CUSTOM_BAR,
|
|
44
|
-
title:
|
|
50
|
+
type: _constants.STAT_TYPE.CUSTOM_BAR,
|
|
51
|
+
title: _reactIntlUniversal.default.get('Custom_histogram'),
|
|
45
52
|
image: 'custom-bar.png'
|
|
46
53
|
}]
|
|
47
54
|
}, {
|
|
48
|
-
catTitle:
|
|
55
|
+
catTitle: _reactIntlUniversal.default.get('Bar_chart'),
|
|
49
56
|
icon: 'dtable-icon-bar-chart',
|
|
50
57
|
items: [{
|
|
51
|
-
type: STAT_TYPE.HORIZONTAL_BAR,
|
|
52
|
-
title:
|
|
58
|
+
type: _constants.STAT_TYPE.HORIZONTAL_BAR,
|
|
59
|
+
title: _reactIntlUniversal.default.get('Basic_bar_chart'),
|
|
53
60
|
image: 'horizontal-bar.png'
|
|
54
61
|
}, {
|
|
55
|
-
type: STAT_TYPE.HORIZONTAL_GROUP_BAR,
|
|
56
|
-
title:
|
|
62
|
+
type: _constants.STAT_TYPE.HORIZONTAL_GROUP_BAR,
|
|
63
|
+
title: _reactIntlUniversal.default.get('Grouped_bar_chart'),
|
|
57
64
|
image: 'horizontal-group-bar.png'
|
|
58
65
|
}, {
|
|
59
|
-
type: STAT_TYPE.STACKED_HORIZONTAL_BAR,
|
|
60
|
-
title:
|
|
66
|
+
type: _constants.STAT_TYPE.STACKED_HORIZONTAL_BAR,
|
|
67
|
+
title: _reactIntlUniversal.default.get('Stacked_bar_chart'),
|
|
61
68
|
image: 'stacked-horizontal-bar.png'
|
|
62
69
|
}, {
|
|
63
|
-
type: STAT_TYPE.COMPLETENESS_CHART,
|
|
64
|
-
title:
|
|
70
|
+
type: _constants.STAT_TYPE.COMPLETENESS_CHART,
|
|
71
|
+
title: _reactIntlUniversal.default.get('Completeness_chart'),
|
|
65
72
|
image: 'completeness-chart.png'
|
|
66
73
|
}, {
|
|
67
|
-
type: STAT_TYPE.GROUP_COMPLETENESS_CHART,
|
|
68
|
-
title:
|
|
74
|
+
type: _constants.STAT_TYPE.GROUP_COMPLETENESS_CHART,
|
|
75
|
+
title: _reactIntlUniversal.default.get('Grouped_completeness_chart'),
|
|
69
76
|
image: 'group-completeness-chart.png'
|
|
70
77
|
}]
|
|
71
78
|
}, {
|
|
72
|
-
catTitle:
|
|
79
|
+
catTitle: _reactIntlUniversal.default.get('Line_chart'),
|
|
73
80
|
icon: 'dtable-icon-line-chart',
|
|
74
81
|
items: [{
|
|
75
|
-
type: STAT_TYPE.LINE,
|
|
76
|
-
title:
|
|
82
|
+
type: _constants.STAT_TYPE.LINE,
|
|
83
|
+
title: _reactIntlUniversal.default.get('Basic_line_chart'),
|
|
77
84
|
image: 'line.png'
|
|
78
85
|
}, {
|
|
79
|
-
type: STAT_TYPE.GROUP_LINE,
|
|
80
|
-
title:
|
|
86
|
+
type: _constants.STAT_TYPE.GROUP_LINE,
|
|
87
|
+
title: _reactIntlUniversal.default.get('Grouped_line_chart'),
|
|
81
88
|
image: 'group_line.png'
|
|
82
89
|
}]
|
|
83
90
|
}, {
|
|
84
|
-
catTitle:
|
|
91
|
+
catTitle: _reactIntlUniversal.default.get('Area_chart'),
|
|
85
92
|
icon: 'dtable-icon-area-chart',
|
|
86
93
|
items: [{
|
|
87
|
-
type: STAT_TYPE.AREA_CHART,
|
|
88
|
-
title:
|
|
94
|
+
type: _constants.STAT_TYPE.AREA_CHART,
|
|
95
|
+
title: _reactIntlUniversal.default.get('Area_chart'),
|
|
89
96
|
image: 'area-chart.png'
|
|
90
97
|
}, {
|
|
91
|
-
type: STAT_TYPE.AREA_GROUP_CHART,
|
|
92
|
-
title:
|
|
98
|
+
type: _constants.STAT_TYPE.AREA_GROUP_CHART,
|
|
99
|
+
title: _reactIntlUniversal.default.get('Grouped_area_chart'),
|
|
93
100
|
image: 'area-group-chart.png'
|
|
94
101
|
}]
|
|
95
102
|
}, {
|
|
96
|
-
catTitle:
|
|
103
|
+
catTitle: _reactIntlUniversal.default.get('Pie_chart'),
|
|
97
104
|
icon: 'dtable-icon-pie-chart',
|
|
98
105
|
items: [{
|
|
99
|
-
type: STAT_TYPE.PIE,
|
|
100
|
-
title:
|
|
106
|
+
type: _constants.STAT_TYPE.PIE,
|
|
107
|
+
title: _reactIntlUniversal.default.get('Basic_pie_chart'),
|
|
101
108
|
image: 'pie.png'
|
|
102
109
|
}, {
|
|
103
|
-
type: STAT_TYPE.RING,
|
|
104
|
-
title:
|
|
110
|
+
type: _constants.STAT_TYPE.RING,
|
|
111
|
+
title: _reactIntlUniversal.default.get('Ring_chart'),
|
|
105
112
|
image: 'ring.png'
|
|
106
113
|
}]
|
|
107
114
|
}, {
|
|
108
|
-
catTitle:
|
|
115
|
+
catTitle: _reactIntlUniversal.default.get('Scatter_chart'),
|
|
109
116
|
icon: 'dtable-icon-scatter-chart',
|
|
110
117
|
items: [{
|
|
111
|
-
type: STAT_TYPE.SCATTER,
|
|
112
|
-
title:
|
|
118
|
+
type: _constants.STAT_TYPE.SCATTER,
|
|
119
|
+
title: _reactIntlUniversal.default.get('Scatter_chart'),
|
|
113
120
|
image: 'scatter.png'
|
|
114
121
|
}]
|
|
115
122
|
}, {
|
|
116
|
-
catTitle:
|
|
123
|
+
catTitle: _reactIntlUniversal.default.get('Combination_chart'),
|
|
117
124
|
icon: 'dtable-icon-combination-chart',
|
|
118
125
|
items: [{
|
|
119
|
-
type: STAT_TYPE.COMBINATION_CHART,
|
|
120
|
-
title:
|
|
126
|
+
type: _constants.STAT_TYPE.COMBINATION_CHART,
|
|
127
|
+
title: _reactIntlUniversal.default.get('Combination_chart'),
|
|
121
128
|
image: 'combination-chart.png'
|
|
122
129
|
}]
|
|
123
130
|
}, {
|
|
124
|
-
catTitle:
|
|
131
|
+
catTitle: _reactIntlUniversal.default.get('Map'),
|
|
125
132
|
icon: 'dtable-icon-map',
|
|
126
133
|
items: [{
|
|
127
|
-
type: STAT_TYPE.MAP,
|
|
134
|
+
type: _constants.STAT_TYPE.MAP,
|
|
128
135
|
title: '中国地图',
|
|
129
136
|
image: 'map.png',
|
|
130
|
-
hide: lang
|
|
137
|
+
hide: lang !== 'zh-cn'
|
|
131
138
|
}, {
|
|
132
|
-
type: STAT_TYPE.MAP_BUBBLE,
|
|
139
|
+
type: _constants.STAT_TYPE.MAP_BUBBLE,
|
|
133
140
|
title: '中国地图(气泡图)',
|
|
134
141
|
image: 'map-bubble.png',
|
|
135
|
-
hide: lang
|
|
142
|
+
hide: lang !== 'zh-cn'
|
|
136
143
|
}, {
|
|
137
|
-
type: STAT_TYPE.WORLD_MAP,
|
|
138
|
-
title:
|
|
144
|
+
type: _constants.STAT_TYPE.WORLD_MAP,
|
|
145
|
+
title: _reactIntlUniversal.default.get('World_map'),
|
|
139
146
|
image: 'world-map.png'
|
|
140
147
|
}, {
|
|
141
|
-
type: STAT_TYPE.WORLD_MAP_BUBBLE,
|
|
142
|
-
title: "".concat(
|
|
148
|
+
type: _constants.STAT_TYPE.WORLD_MAP_BUBBLE,
|
|
149
|
+
title: "".concat(_reactIntlUniversal.default.get('World_map'), "(").concat(_reactIntlUniversal.default.get('Bubble'), ")"),
|
|
143
150
|
image: 'world-map-bubble.png'
|
|
144
151
|
}]
|
|
145
152
|
}, {
|
|
146
|
-
catTitle:
|
|
153
|
+
catTitle: _reactIntlUniversal.default.get('Heat_map'),
|
|
147
154
|
icon: 'dtable-icon-heat-map',
|
|
148
155
|
items: [{
|
|
149
|
-
type: STAT_TYPE.HEAT_MAP,
|
|
150
|
-
title:
|
|
156
|
+
type: _constants.STAT_TYPE.HEAT_MAP,
|
|
157
|
+
title: _reactIntlUniversal.default.get('Heat_map'),
|
|
151
158
|
image: 'heat-map.png'
|
|
152
159
|
}]
|
|
153
160
|
}, {
|
|
154
|
-
catTitle:
|
|
161
|
+
catTitle: _reactIntlUniversal.default.get('Facet_chart'),
|
|
155
162
|
icon: 'dtable-icon-facet-chart',
|
|
156
163
|
items: [{
|
|
157
|
-
type: STAT_TYPE.MIRROR,
|
|
158
|
-
title:
|
|
164
|
+
type: _constants.STAT_TYPE.MIRROR,
|
|
165
|
+
title: _reactIntlUniversal.default.get('Mirror_chart'),
|
|
159
166
|
image: 'mirror.png'
|
|
160
167
|
}]
|
|
161
168
|
}, {
|
|
162
|
-
catTitle:
|
|
169
|
+
catTitle: _reactIntlUniversal.default.get('Card'),
|
|
163
170
|
icon: 'dtable-icon-card',
|
|
164
171
|
items: [{
|
|
165
|
-
type: STAT_TYPE.BASIC_NUMBER_CARD,
|
|
166
|
-
title:
|
|
172
|
+
type: _constants.STAT_TYPE.BASIC_NUMBER_CARD,
|
|
173
|
+
title: _reactIntlUniversal.default.get('Basic_number_card'),
|
|
167
174
|
image: 'number-card.png'
|
|
168
175
|
}, {
|
|
169
|
-
type: STAT_TYPE.TREND_CHART,
|
|
170
|
-
title:
|
|
176
|
+
type: _constants.STAT_TYPE.TREND_CHART,
|
|
177
|
+
title: _reactIntlUniversal.default.get('Trend_chart'),
|
|
171
178
|
image: 'trend-chart.png'
|
|
172
179
|
}]
|
|
173
180
|
}, {
|
|
174
|
-
catTitle:
|
|
181
|
+
catTitle: _reactIntlUniversal.default.get('Gauge'),
|
|
175
182
|
icon: 'dtable-icon-gauge',
|
|
176
183
|
items: [{
|
|
177
|
-
type: STAT_TYPE.DASHBOARD,
|
|
178
|
-
title:
|
|
184
|
+
type: _constants.STAT_TYPE.DASHBOARD,
|
|
185
|
+
title: _reactIntlUniversal.default.get('Gauge'),
|
|
179
186
|
image: 'dashboard-chart.png'
|
|
180
187
|
}]
|
|
181
188
|
}, {
|
|
182
|
-
catTitle:
|
|
189
|
+
catTitle: _reactIntlUniversal.default.get('Treemap'),
|
|
183
190
|
icon: 'dtable-icon-rectangular-tree-diagram',
|
|
184
191
|
items: [{
|
|
185
|
-
type: STAT_TYPE.TREEMAP,
|
|
186
|
-
title:
|
|
192
|
+
type: _constants.STAT_TYPE.TREEMAP,
|
|
193
|
+
title: _reactIntlUniversal.default.get('Treemap'),
|
|
187
194
|
image: 'treemap.png'
|
|
188
195
|
}]
|
|
189
196
|
}, {
|
|
190
|
-
catTitle:
|
|
197
|
+
catTitle: _reactIntlUniversal.default.get('Pivot_table'),
|
|
191
198
|
icon: 'dtable-icon-dtable-logo',
|
|
192
199
|
items: [{
|
|
193
|
-
type: STAT_TYPE.PIVOT_TABLE,
|
|
194
|
-
title:
|
|
200
|
+
type: _constants.STAT_TYPE.PIVOT_TABLE,
|
|
201
|
+
title: _reactIntlUniversal.default.get('Pivot_table'),
|
|
195
202
|
image: 'pivot-table.png'
|
|
196
203
|
}]
|
|
197
204
|
}];
|
|
@@ -203,50 +210,50 @@ class ChartSelector extends React.Component {
|
|
|
203
210
|
const {
|
|
204
211
|
currentCatIndex
|
|
205
212
|
} = this.state;
|
|
206
|
-
return /*#__PURE__*/
|
|
207
|
-
className: "".concat(
|
|
208
|
-
}, /*#__PURE__*/
|
|
209
|
-
className: "".concat(
|
|
213
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
214
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-types-container'], " d-flex flex-column h-100")
|
|
215
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
216
|
+
className: "".concat(_statisticChartSelectorModule.default['chart-categories-nav'], " flex-shrink-0 d-flex flex-wrap align-items-center list-unstyled")
|
|
210
217
|
}, this.chartTypes.map((item, index) => {
|
|
211
|
-
return /*#__PURE__*/
|
|
218
|
+
return /*#__PURE__*/_react.default.createElement("li", {
|
|
212
219
|
key: index,
|
|
213
220
|
className: 'px-4 py-2 chart-cat-nav-item'
|
|
214
|
-
}, /*#__PURE__*/
|
|
221
|
+
}, /*#__PURE__*/_react.default.createElement("i", {
|
|
215
222
|
id: item.icon,
|
|
216
|
-
className: "".concat(
|
|
223
|
+
className: "".concat(_statisticChartSelectorModule.default['chart-icon'], " dtable-font ").concat(item.icon, " ").concat(currentCatIndex === index ? "".concat(_statisticChartSelectorModule.default['icon-highlight']) : ''),
|
|
217
224
|
onClick: this.setCurrentCatIndex.bind(this, index)
|
|
218
|
-
}), /*#__PURE__*/
|
|
225
|
+
}), /*#__PURE__*/_react.default.createElement(_reactstrap.UncontrolledTooltip, {
|
|
219
226
|
placement: "bottom",
|
|
220
227
|
target: item.icon
|
|
221
228
|
}, item.catTitle));
|
|
222
|
-
})), /*#__PURE__*/
|
|
229
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
223
230
|
id: "chart-types-container",
|
|
224
|
-
className: "flex-fill o-auto ".concat(
|
|
231
|
+
className: "flex-fill o-auto ".concat(_statisticChartSelectorModule.default['statistic-type'])
|
|
225
232
|
}, this.chartTypes.map((item, index) => {
|
|
226
|
-
return /*#__PURE__*/
|
|
233
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
227
234
|
key: "chart-type-".concat(index),
|
|
228
235
|
className: "mb-7"
|
|
229
|
-
}, /*#__PURE__*/
|
|
230
|
-
className: "".concat(
|
|
236
|
+
}, /*#__PURE__*/_react.default.createElement("h3", {
|
|
237
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-type-title'], " m-0"),
|
|
231
238
|
id: "chart-type-".concat(index + 1)
|
|
232
|
-
}, item.catTitle), /*#__PURE__*/
|
|
239
|
+
}, item.catTitle), /*#__PURE__*/_react.default.createElement("div", {
|
|
233
240
|
className: 'd-flex flex-wrap'
|
|
234
241
|
}, item.items.map((chart, index) => {
|
|
235
|
-
return /*#__PURE__*/
|
|
242
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
236
243
|
key: index,
|
|
237
244
|
onClick: this.props.addEditingChart.bind(this, chart.type),
|
|
238
|
-
className: "".concat(
|
|
239
|
-
}, /*#__PURE__*/
|
|
240
|
-
className: "".concat(
|
|
241
|
-
}, chart.title), /*#__PURE__*/
|
|
242
|
-
className: "".concat(
|
|
243
|
-
}, /*#__PURE__*/
|
|
244
|
-
src: getImageUrl(chart.image),
|
|
245
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-type-item'], " ").concat(selectedType === chart.type ? _statisticChartSelectorModule.default['statistic-type-item-selected'] : '', " ").concat(chart.hide ? 'd-none' : '')
|
|
246
|
+
}, /*#__PURE__*/_react.default.createElement("p", {
|
|
247
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-type-description'])
|
|
248
|
+
}, chart.title), /*#__PURE__*/_react.default.createElement("div", {
|
|
249
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-type-image-container'])
|
|
250
|
+
}, /*#__PURE__*/_react.default.createElement("img", {
|
|
251
|
+
src: (0, _commonUtils.getImageUrl)(chart.image),
|
|
245
252
|
alt: "",
|
|
246
|
-
className: "".concat(
|
|
253
|
+
className: "".concat(_statisticChartSelectorModule.default['statistic-type-demo-chart-image'])
|
|
247
254
|
})));
|
|
248
255
|
})));
|
|
249
256
|
})));
|
|
250
257
|
}
|
|
251
258
|
}
|
|
252
|
-
|
|
259
|
+
var _default = exports.default = ChartSelector;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
10
|
+
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
11
|
+
var _reactstrap = require("reactstrap");
|
|
12
|
+
var _constants = require("../../constants");
|
|
13
|
+
require("../../assets/css/color-theme-dialog.css");
|
|
14
|
+
class ColorThemeDialog extends _react.default.Component {
|
|
8
15
|
constructor() {
|
|
9
16
|
super(...arguments);
|
|
10
17
|
this.onColorItemClick = colorThemeName => {
|
|
@@ -20,16 +27,16 @@ class ColorThemeDialog extends React.Component {
|
|
|
20
27
|
colors
|
|
21
28
|
} = item;
|
|
22
29
|
const isActive = name === colorThemeName;
|
|
23
|
-
return /*#__PURE__*/
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
24
31
|
key: name,
|
|
25
|
-
className:
|
|
32
|
+
className: (0, _classnames.default)('color-theme-item', {
|
|
26
33
|
'active': isActive
|
|
27
34
|
}),
|
|
28
35
|
onClick: () => {
|
|
29
36
|
this.onColorItemClick(name);
|
|
30
37
|
}
|
|
31
38
|
}, colors.map((color, index) => {
|
|
32
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
33
40
|
className: "statistic-color-block",
|
|
34
41
|
key: "color-theme-".concat(index),
|
|
35
42
|
style: {
|
|
@@ -40,19 +47,19 @@ class ColorThemeDialog extends React.Component {
|
|
|
40
47
|
};
|
|
41
48
|
}
|
|
42
49
|
render() {
|
|
43
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement(_reactstrap.Modal, {
|
|
44
51
|
isOpen: true,
|
|
45
52
|
autoFocus: false,
|
|
46
53
|
className: "color-theme-setting-dialog",
|
|
47
54
|
zIndex: 1048,
|
|
48
55
|
toggle: this.props.onToggleColorThemeDialog
|
|
49
|
-
}, /*#__PURE__*/
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_reactstrap.ModalHeader, {
|
|
50
57
|
toggle: this.props.onToggleColorThemeDialog
|
|
51
|
-
},
|
|
58
|
+
}, _reactIntlUniversal.default.get('Settings')), /*#__PURE__*/_react.default.createElement(_reactstrap.ModalBody, null, /*#__PURE__*/_react.default.createElement("label", null, _reactIntlUniversal.default.get('Chart_color_scheme')), /*#__PURE__*/_react.default.createElement("div", {
|
|
52
59
|
className: "color-theme-container"
|
|
53
|
-
}, CHART_STYLE_COLORS.map(item => {
|
|
60
|
+
}, _constants.CHART_STYLE_COLORS.map(item => {
|
|
54
61
|
return this.renderColorItem(item);
|
|
55
62
|
}))));
|
|
56
63
|
}
|
|
57
64
|
}
|
|
58
|
-
|
|
65
|
+
var _default = exports.default = ColorThemeDialog;
|