dtable-statistic 4.0.2-test-2
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/README.md +3 -0
- package/es/api/dtable-db-api.js +43 -0
- package/es/assets/css/color-picker.css +53 -0
- package/es/assets/css/color-rules-popover.css +144 -0
- package/es/assets/css/color-theme-dialog.css +40 -0
- package/es/assets/css/dashboard.css +562 -0
- package/es/assets/css/dialog.css +415 -0
- package/es/assets/css/mobile-dashboard.module.css +91 -0
- 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/assets/css/theme.css +61 -0
- package/es/assets/images/icon.png +0 -0
- package/es/calculator/base-calculator.js +111 -0
- package/es/calculator/basic-chart-calculator.js +571 -0
- package/es/calculator/combination-calculator.js +296 -0
- package/es/calculator/compare-bar-calculator.js +291 -0
- package/es/calculator/completeness-calculator.js +307 -0
- package/es/calculator/copy-value.js +47 -0
- package/es/calculator/dashboard-calculator.js +146 -0
- package/es/calculator/heat-map-calculator.js +225 -0
- package/es/calculator/horizontal-bar-calculator.js +100 -0
- package/es/calculator/index.js +88 -0
- package/es/calculator/map-calculator.js +169 -0
- package/es/calculator/mirror-calculator.js +217 -0
- package/es/calculator/number-card-calculator.js +135 -0
- package/es/calculator/pivot-table-calculator.js +810 -0
- package/es/calculator/scatter-calculator.js +150 -0
- package/es/calculator/thread-manager.js +70 -0
- package/es/calculator/trend-calculator.js +204 -0
- package/es/calculator/workers/basic-chart-calculator-worker.js +410 -0
- package/es/calculator/workers/calculator.worker.js +22 -0
- package/es/calculator/workers/card-calculator-worker.js +28 -0
- package/es/calculator/workers/combination-calculator-worker.js +257 -0
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +149 -0
- package/es/calculator/workers/completeness-calculator-worker.js +153 -0
- package/es/calculator/workers/dashboard-calculator-worker.js +56 -0
- package/es/calculator/workers/mirror-calculator-worker.js +132 -0
- package/es/calculator/workers/pivot-table-calculator-worker.js +615 -0
- package/es/calculator/workers/scatter-calculator-worker.js +67 -0
- package/es/calculator/workers/trend-calculator-worker.js +93 -0
- package/es/calculator/world-map-calculator.js +193 -0
- package/es/components/common-add-tool.js +19 -0
- package/es/components/dialog/chart-addition-edit-dialog.js +89 -0
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +261 -0
- package/es/components/dialog/chart-addition-widgets/statistic-chart-selector.module.css +74 -0
- package/es/components/dialog/color-theme-dialog.js +71 -0
- package/es/components/dialog/enlarged-chart-dialog.js +73 -0
- package/es/components/dialog/new-table-dialog.js +113 -0
- package/es/components/dialog/new-view-dialog.js +87 -0
- package/es/components/dialog/rename-view-dialog.js +87 -0
- package/es/components/dialog/statistic-record-dialog/index.css +114 -0
- package/es/components/dialog/statistic-record-dialog/index.js +174 -0
- package/es/components/dialog/table-select-dialog.js +93 -0
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +94 -0
- package/es/components/dtable-popover.js +109 -0
- package/es/components/dtable-search-input.js +137 -0
- package/es/components/dtable-select.js +104 -0
- package/es/components/index.js +11 -0
- package/es/components/loading.js +8 -0
- package/es/components/modal-portal.js +36 -0
- package/es/components/popover/color-rules/color-rule.js +179 -0
- package/es/components/popover/color-rules/index.js +87 -0
- package/es/components/popover/color-rules/rule-filters/filter.js +214 -0
- package/es/components/popover/color-rules/rule-filters/index.css +214 -0
- package/es/components/popover/color-rules/rule-filters/index.js +97 -0
- package/es/components/popover/color-rules/rule-filters/number-input.js +85 -0
- package/es/components/popover/color-rules-popover.js +213 -0
- package/es/components/popover/color-selector-popover.js +85 -0
- package/es/components/seatable-radio/index.css +51 -0
- package/es/components/seatable-radio/index.js +28 -0
- package/es/components/select/index.js +2 -0
- package/es/components/select/option-group.css +104 -0
- package/es/components/select/option-group.js +225 -0
- package/es/components/select/option.js +51 -0
- package/es/components/select/select.css +211 -0
- package/es/components/select/select.js +157 -0
- package/es/components/toast/alert.js +130 -0
- package/es/components/toast/index.js +3 -0
- package/es/components/toast/toast.js +164 -0
- package/es/components/toast/toastManager.js +150 -0
- package/es/components/toast/toaster.js +64 -0
- package/es/constants/color-rules.js +8 -0
- package/es/constants/dtable-select-style.js +61 -0
- package/es/constants/event-types.js +1 -0
- package/es/constants/index.js +501 -0
- package/es/constants/key-codes.js +102 -0
- package/es/constants/zIndexes.js +1 -0
- package/es/custom-g2.js +614 -0
- package/es/dashboard.js +408 -0
- package/es/desktop-dashboard.js +299 -0
- package/es/index.js +33 -0
- package/es/locale/index.js +17 -0
- package/es/locale/lang/de.js +237 -0
- package/es/locale/lang/en.js +237 -0
- package/es/locale/lang/fr.js +237 -0
- package/es/locale/lang/zh_CN.js +237 -0
- package/es/mobile-dashboard.js +103 -0
- package/es/model/collaborators.js +11 -0
- package/es/model/stat-item.js +340 -0
- package/es/model/statistic-dashboard.js +8 -0
- package/es/service/chart-service.js +192 -0
- package/es/service/dashboard-service.js +415 -0
- package/es/stat-editor/chart-name-editor.js +75 -0
- package/es/stat-editor/index.js +74 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +149 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +415 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +193 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +13 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +107 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +332 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +170 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +141 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +219 -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 +132 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +319 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +138 -0
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +135 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +156 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +147 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +195 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +126 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +169 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +352 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +145 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +153 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +466 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +183 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +542 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +111 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +86 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +169 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +273 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +105 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +243 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +65 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +318 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +49 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +124 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +150 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +267 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +109 -0
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +351 -0
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +60 -0
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +129 -0
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +348 -0
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +102 -0
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +124 -0
- package/es/stat-editor/stat-settings/public-setting/calender.js +124 -0
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +15 -0
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +60 -0
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +57 -0
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +41 -0
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +64 -0
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +118 -0
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +39 -0
- package/es/stat-list/chart-preview.js +139 -0
- package/es/stat-list/index.js +275 -0
- package/es/stat-view/area-chart.js +521 -0
- package/es/stat-view/bar-chart.js +568 -0
- package/es/stat-view/base-chart.js +44 -0
- package/es/stat-view/basic-number-card.js +255 -0
- package/es/stat-view/combination-chart.js +558 -0
- package/es/stat-view/compare-chart.js +485 -0
- package/es/stat-view/completeness-chart.js +389 -0
- package/es/stat-view/custom-bar.js +433 -0
- package/es/stat-view/dashboard-chart.js +317 -0
- package/es/stat-view/heat-map.js +501 -0
- package/es/stat-view/horizontal-bar-chart.js +569 -0
- package/es/stat-view/index.js +183 -0
- package/es/stat-view/line-chart.js +505 -0
- package/es/stat-view/map.js +428 -0
- package/es/stat-view/mirror.js +285 -0
- package/es/stat-view/pie-chart.js +326 -0
- package/es/stat-view/pivot-table/index.js +206 -0
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +133 -0
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +164 -0
- package/es/stat-view/pivot-table/statistic-pivot-table.module.css +132 -0
- package/es/stat-view/pivot-table/two-dimension-table.js +344 -0
- package/es/stat-view/ring-chart.js +416 -0
- package/es/stat-view/scatter-chart.js +367 -0
- package/es/stat-view/treemap-chart.js +318 -0
- package/es/stat-view/trend-chart.js +299 -0
- package/es/stat-view/world-map.js +443 -0
- package/es/tabs/index.js +252 -0
- package/es/tabs/statistic-tabs.module.css +154 -0
- package/es/tabs/tab.js +167 -0
- package/es/utils/basic-chart-utils.js +24 -0
- package/es/utils/cell-format.js +110 -0
- package/es/utils/cell-value.js +27 -0
- package/es/utils/collaborator.js +31 -0
- package/es/utils/color-utils.js +112 -0
- package/es/utils/column-utils.js +18 -0
- package/es/utils/column.js +13 -0
- package/es/utils/common-utils.js +303 -0
- package/es/utils/date-format.js +65 -0
- package/es/utils/export-table-utils.js +632 -0
- package/es/utils/index.js +26 -0
- package/es/utils/object.js +26 -0
- package/es/utils/row-utils.js +115 -0
- package/es/utils/search.js +67 -0
- package/es/utils/sql-utils.js +293 -0
- package/es/utils/stat-utils.js +353 -0
- package/es/utils/trend-utils.js +136 -0
- package/index.js +1 -0
- package/package.json +188 -0
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
.statistic-types-container {
|
|
2
|
+
position: relative;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.statistic-type-image-container {
|
|
6
|
+
padding: 0 12px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.statistic-type {
|
|
10
|
+
position: relative;
|
|
11
|
+
padding: 0 16px 16px 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.statistic-type::before {
|
|
15
|
+
content: '';
|
|
16
|
+
display: block;
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 20px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.statistic-type-demo-chart-image {
|
|
22
|
+
width: 100%;
|
|
23
|
+
height: 125px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.statistic-type-title {
|
|
27
|
+
font-weight: 600;
|
|
28
|
+
font-size: 18px;
|
|
29
|
+
color: #202428;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.chart-categories-nav {
|
|
33
|
+
border-bottom: 1px solid #e9ecef;
|
|
34
|
+
background-color: #f9f9f9;
|
|
35
|
+
height: 50px;
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
margin: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.chart-cat-nav-item {
|
|
41
|
+
font-size: 14px;
|
|
42
|
+
color: #666;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.statistic-type-item {
|
|
46
|
+
height: 172px;
|
|
47
|
+
width: 250px;
|
|
48
|
+
cursor: pointer;
|
|
49
|
+
border: 1px solid #dcdade;
|
|
50
|
+
border-radius: 4px;
|
|
51
|
+
box-shadow: 0 0 2px 0 rgba(0,0,0,.1);
|
|
52
|
+
margin: 20px 17px 0 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.statistic-type-description {
|
|
56
|
+
font-weight: 500;
|
|
57
|
+
font-size: 14px;
|
|
58
|
+
margin-top: 14px;
|
|
59
|
+
padding: 0 15px;
|
|
60
|
+
margin-bottom: 10px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.chart-icon {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
color: #666666;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.chart-icon:not(.icon-highlight):hover {
|
|
69
|
+
color: #202428;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.icon-highlight {
|
|
73
|
+
color: #ff8000;
|
|
74
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import classnames from 'classnames';
|
|
7
|
+
import intl from 'react-intl-universal';
|
|
8
|
+
import { Modal, ModalBody, ModalHeader } from 'reactstrap';
|
|
9
|
+
import { CHART_STYLE_COLORS } from '../../constants';
|
|
10
|
+
import '../../assets/css/color-theme-dialog.css';
|
|
11
|
+
var ColorThemeDialog = /*#__PURE__*/function (_React$Component) {
|
|
12
|
+
_inherits(ColorThemeDialog, _React$Component);
|
|
13
|
+
var _super = _createSuper(ColorThemeDialog);
|
|
14
|
+
function ColorThemeDialog() {
|
|
15
|
+
var _this;
|
|
16
|
+
_classCallCheck(this, ColorThemeDialog);
|
|
17
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
18
|
+
args[_key] = arguments[_key];
|
|
19
|
+
}
|
|
20
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
21
|
+
_this.onColorItemClick = function (colorThemeName) {
|
|
22
|
+
if (colorThemeName === _this.props.colorThemeName) return;
|
|
23
|
+
_this.props.modifyColorTheme(colorThemeName);
|
|
24
|
+
};
|
|
25
|
+
_this.renderColorItem = function (item) {
|
|
26
|
+
var colorThemeName = _this.props.colorThemeName;
|
|
27
|
+
var name = item.name,
|
|
28
|
+
colors = item.colors;
|
|
29
|
+
var isActive = name === colorThemeName;
|
|
30
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
31
|
+
key: name,
|
|
32
|
+
className: classnames('color-theme-item', {
|
|
33
|
+
'active': isActive
|
|
34
|
+
}),
|
|
35
|
+
onClick: function onClick() {
|
|
36
|
+
_this.onColorItemClick(name);
|
|
37
|
+
}
|
|
38
|
+
}, colors.map(function (color, index) {
|
|
39
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
40
|
+
className: "statistic-color-block",
|
|
41
|
+
key: "color-theme-".concat(index),
|
|
42
|
+
style: {
|
|
43
|
+
background: "".concat(color)
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}));
|
|
47
|
+
};
|
|
48
|
+
return _this;
|
|
49
|
+
}
|
|
50
|
+
_createClass(ColorThemeDialog, [{
|
|
51
|
+
key: "render",
|
|
52
|
+
value: function render() {
|
|
53
|
+
var _this2 = this;
|
|
54
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
55
|
+
isOpen: true,
|
|
56
|
+
autoFocus: false,
|
|
57
|
+
className: "color-theme-setting-dialog",
|
|
58
|
+
zIndex: 1048,
|
|
59
|
+
toggle: this.props.onToggleColorThemeDialog
|
|
60
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
61
|
+
toggle: this.props.onToggleColorThemeDialog
|
|
62
|
+
}, intl.get('Settings')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("label", null, intl.get('Chart_color_scheme')), /*#__PURE__*/React.createElement("div", {
|
|
63
|
+
className: "color-theme-container"
|
|
64
|
+
}, CHART_STYLE_COLORS.map(function (item) {
|
|
65
|
+
return _this2.renderColorItem(item);
|
|
66
|
+
}))));
|
|
67
|
+
}
|
|
68
|
+
}]);
|
|
69
|
+
return ColorThemeDialog;
|
|
70
|
+
}(React.Component);
|
|
71
|
+
export default ColorThemeDialog;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React, { Component } from 'react';
|
|
6
|
+
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
|
7
|
+
import StatView from '../../stat-view';
|
|
8
|
+
import { STAT_TYPE } from '../../constants';
|
|
9
|
+
var EnlargeChartDialog = /*#__PURE__*/function (_Component) {
|
|
10
|
+
_inherits(EnlargeChartDialog, _Component);
|
|
11
|
+
var _super = _createSuper(EnlargeChartDialog);
|
|
12
|
+
function EnlargeChartDialog() {
|
|
13
|
+
var _this;
|
|
14
|
+
_classCallCheck(this, EnlargeChartDialog);
|
|
15
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
16
|
+
args[_key] = arguments[_key];
|
|
17
|
+
}
|
|
18
|
+
_this = _super.call.apply(_super, [this].concat(args));
|
|
19
|
+
_this.toggle = function () {
|
|
20
|
+
_this.props.onEnlargeToggle();
|
|
21
|
+
};
|
|
22
|
+
_this.onClick = function (e) {
|
|
23
|
+
e.stopPropagation();
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
};
|
|
26
|
+
_this.renderStatisticView = function () {
|
|
27
|
+
var _this$props = _this.props,
|
|
28
|
+
colorThemeName = _this$props.colorThemeName,
|
|
29
|
+
refresh = _this$props.refresh,
|
|
30
|
+
statItem = _this$props.statItem,
|
|
31
|
+
eventBus = _this$props.eventBus,
|
|
32
|
+
chartCalculator = _this$props.chartCalculator,
|
|
33
|
+
getTableById = _this$props.getTableById,
|
|
34
|
+
toggleStatisticRecordsDialog = _this$props.toggleStatisticRecordsDialog;
|
|
35
|
+
var viewProps = {
|
|
36
|
+
isEnlarge: true,
|
|
37
|
+
isPreview: true,
|
|
38
|
+
refresh: refresh,
|
|
39
|
+
colorThemeName: colorThemeName,
|
|
40
|
+
statItem: statItem,
|
|
41
|
+
eventBus: eventBus,
|
|
42
|
+
chartCalculator: chartCalculator,
|
|
43
|
+
getTableById: getTableById,
|
|
44
|
+
toggleStatisticRecordsDialog: toggleStatisticRecordsDialog
|
|
45
|
+
};
|
|
46
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
|
+
className: "view-wrapper",
|
|
48
|
+
onClick: _this.onClick,
|
|
49
|
+
draggable: false
|
|
50
|
+
}, /*#__PURE__*/React.createElement(StatView, viewProps));
|
|
51
|
+
};
|
|
52
|
+
return _this;
|
|
53
|
+
}
|
|
54
|
+
_createClass(EnlargeChartDialog, [{
|
|
55
|
+
key: "render",
|
|
56
|
+
value: function render() {
|
|
57
|
+
var statItem = this.props.statItem;
|
|
58
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
59
|
+
isOpen: true,
|
|
60
|
+
toggle: this.toggle,
|
|
61
|
+
className: "statistic-enlarge-modal",
|
|
62
|
+
modalClassName: "statistic-enlarge-dialog",
|
|
63
|
+
zIndex: 1048
|
|
64
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
65
|
+
toggle: this.toggle
|
|
66
|
+
}, /*#__PURE__*/React.createElement("span", null, statItem.type === STAT_TYPE.BASIC_NUMBER_CARD ? '' : statItem.name)), /*#__PURE__*/React.createElement(ModalBody, {
|
|
67
|
+
className: 'statistic-body-container statistic-microscope-content'
|
|
68
|
+
}, this.renderStatisticView()));
|
|
69
|
+
}
|
|
70
|
+
}]);
|
|
71
|
+
return EnlargeChartDialog;
|
|
72
|
+
}(Component);
|
|
73
|
+
export default EnlargeChartDialog;
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import intl from 'react-intl-universal';
|
|
7
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Alert, Button } from 'reactstrap';
|
|
8
|
+
import { KeyCodes } from '../../constants';
|
|
9
|
+
var NewTableDialog = /*#__PURE__*/function (_React$Component) {
|
|
10
|
+
_inherits(NewTableDialog, _React$Component);
|
|
11
|
+
var _super = _createSuper(NewTableDialog);
|
|
12
|
+
function NewTableDialog(props) {
|
|
13
|
+
var _this;
|
|
14
|
+
_classCallCheck(this, NewTableDialog);
|
|
15
|
+
_this = _super.call(this, props);
|
|
16
|
+
_this.onHotKey = function (e) {
|
|
17
|
+
if (e.keyCode === KeyCodes.Enter) {
|
|
18
|
+
e.preventDefault();
|
|
19
|
+
_this.handleSubmit();
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
_this.handleChange = function (event) {
|
|
23
|
+
var value = event.target.value;
|
|
24
|
+
if (value === _this.state.tableName) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
_this.setState({
|
|
28
|
+
tableName: value
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
_this.toggle = function () {
|
|
32
|
+
_this.props.onNewTableCancel();
|
|
33
|
+
};
|
|
34
|
+
_this.handleSubmit = function () {
|
|
35
|
+
var tableName = _this.state.tableName;
|
|
36
|
+
tableName = tableName.trim();
|
|
37
|
+
if (!tableName) {
|
|
38
|
+
_this.setState({
|
|
39
|
+
errMessage: 'Name_is_required'
|
|
40
|
+
});
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (tableName.indexOf('`') > -1) {
|
|
44
|
+
_this.setState({
|
|
45
|
+
errMessage: 'Name_cannot_contain_backtick'
|
|
46
|
+
});
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
if (tableName.includes('/')) {
|
|
50
|
+
_this.setState({
|
|
51
|
+
errMessage: 'Name_cannot_contain_slash'
|
|
52
|
+
});
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (tableName.includes('\\')) {
|
|
56
|
+
_this.setState({
|
|
57
|
+
errMessage: 'Name_cannot_contain_backslash'
|
|
58
|
+
});
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
_this.props.onNewTableConfirm(tableName);
|
|
62
|
+
};
|
|
63
|
+
_this.state = {
|
|
64
|
+
tableName: props.tableName,
|
|
65
|
+
errMessage: ''
|
|
66
|
+
};
|
|
67
|
+
return _this;
|
|
68
|
+
}
|
|
69
|
+
_createClass(NewTableDialog, [{
|
|
70
|
+
key: "componentDidMount",
|
|
71
|
+
value: function componentDidMount() {
|
|
72
|
+
document.addEventListener('keydown', this.onHotKey);
|
|
73
|
+
}
|
|
74
|
+
}, {
|
|
75
|
+
key: "componentWillUnmount",
|
|
76
|
+
value: function componentWillUnmount() {
|
|
77
|
+
document.removeEventListener('keydown', this.onHotKey);
|
|
78
|
+
}
|
|
79
|
+
}, {
|
|
80
|
+
key: "render",
|
|
81
|
+
value: function render() {
|
|
82
|
+
var _this2 = this;
|
|
83
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
84
|
+
isOpen: true,
|
|
85
|
+
toggle: this.toggle,
|
|
86
|
+
autoFocus: false
|
|
87
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
88
|
+
toggle: this.toggle
|
|
89
|
+
}, intl.get('New_Table')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
90
|
+
for: "tableName"
|
|
91
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
92
|
+
id: "tableName",
|
|
93
|
+
value: this.state.tableName,
|
|
94
|
+
innerRef: function innerRef(input) {
|
|
95
|
+
_this2.newInput = input;
|
|
96
|
+
},
|
|
97
|
+
onChange: this.handleChange,
|
|
98
|
+
autoFocus: true
|
|
99
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
100
|
+
color: "danger",
|
|
101
|
+
className: "mt-2"
|
|
102
|
+
}, intl.get(this.state.errMessage))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
103
|
+
color: "secondary",
|
|
104
|
+
onClick: this.toggle
|
|
105
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
106
|
+
color: "primary",
|
|
107
|
+
onClick: this.handleSubmit
|
|
108
|
+
}, intl.get('Submit'))));
|
|
109
|
+
}
|
|
110
|
+
}]);
|
|
111
|
+
return NewTableDialog;
|
|
112
|
+
}(React.Component);
|
|
113
|
+
export default NewTableDialog;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import intl from 'react-intl-universal';
|
|
7
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Alert, Button } from 'reactstrap';
|
|
8
|
+
var NewViewDialog = /*#__PURE__*/function (_React$Component) {
|
|
9
|
+
_inherits(NewViewDialog, _React$Component);
|
|
10
|
+
var _super = _createSuper(NewViewDialog);
|
|
11
|
+
function NewViewDialog(props) {
|
|
12
|
+
var _this;
|
|
13
|
+
_classCallCheck(this, NewViewDialog);
|
|
14
|
+
_this = _super.call(this, props);
|
|
15
|
+
_this.handleChange = function (event) {
|
|
16
|
+
var value = event.target.value;
|
|
17
|
+
if (value === _this.state.viewName) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
_this.setState({
|
|
21
|
+
viewName: value
|
|
22
|
+
});
|
|
23
|
+
};
|
|
24
|
+
_this.toggle = function () {
|
|
25
|
+
_this.props.onNewViewCancel();
|
|
26
|
+
};
|
|
27
|
+
_this.handleSubmit = function () {
|
|
28
|
+
var viewName = _this.state.viewName;
|
|
29
|
+
viewName = viewName.trim();
|
|
30
|
+
if (!viewName) {
|
|
31
|
+
_this.setState({
|
|
32
|
+
errMessage: intl.get('Name_is_required')
|
|
33
|
+
});
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
_this.props.onNewViewConfirm(viewName);
|
|
37
|
+
_this.props.onNewViewCancel();
|
|
38
|
+
};
|
|
39
|
+
_this.handleKeyDown = function (e) {
|
|
40
|
+
if (e.key == 'Enter') {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
_this.handleSubmit();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
_this.state = {
|
|
46
|
+
viewName: '',
|
|
47
|
+
errMessage: ''
|
|
48
|
+
};
|
|
49
|
+
return _this;
|
|
50
|
+
}
|
|
51
|
+
_createClass(NewViewDialog, [{
|
|
52
|
+
key: "render",
|
|
53
|
+
value: function render() {
|
|
54
|
+
var _this2 = this;
|
|
55
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
56
|
+
isOpen: true,
|
|
57
|
+
toggle: this.toggle,
|
|
58
|
+
autoFocus: false
|
|
59
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
60
|
+
toggle: this.toggle
|
|
61
|
+
}, intl.get('New_dashboard')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
62
|
+
for: "viewName"
|
|
63
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
64
|
+
type: "text",
|
|
65
|
+
id: "viewName",
|
|
66
|
+
value: this.state.viewName,
|
|
67
|
+
innerRef: function innerRef(input) {
|
|
68
|
+
_this2.newInput = input;
|
|
69
|
+
},
|
|
70
|
+
onChange: this.handleChange,
|
|
71
|
+
autoFocus: true,
|
|
72
|
+
onKeyDown: this.handleKeyDown
|
|
73
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
74
|
+
color: "danger",
|
|
75
|
+
className: "mt-2"
|
|
76
|
+
}, this.state.errMessage)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
77
|
+
color: "secondary",
|
|
78
|
+
onClick: this.toggle
|
|
79
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
color: "primary",
|
|
81
|
+
onClick: this.handleSubmit
|
|
82
|
+
}, intl.get('Submit'))));
|
|
83
|
+
}
|
|
84
|
+
}]);
|
|
85
|
+
return NewViewDialog;
|
|
86
|
+
}(React.Component);
|
|
87
|
+
export default NewViewDialog;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
|
+
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
|
+
import React, { Component } from 'react';
|
|
6
|
+
import intl from 'react-intl-universal';
|
|
7
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Button, Alert } from 'reactstrap';
|
|
8
|
+
var RenameViewDialog = /*#__PURE__*/function (_Component) {
|
|
9
|
+
_inherits(RenameViewDialog, _Component);
|
|
10
|
+
var _super = _createSuper(RenameViewDialog);
|
|
11
|
+
function RenameViewDialog(props) {
|
|
12
|
+
var _this;
|
|
13
|
+
_classCallCheck(this, RenameViewDialog);
|
|
14
|
+
_this = _super.call(this, props);
|
|
15
|
+
_this.handleChange = function (event) {
|
|
16
|
+
var viewName = _this.state.viewName;
|
|
17
|
+
var value = event.target.value;
|
|
18
|
+
if (value === viewName) {
|
|
19
|
+
return;
|
|
20
|
+
} else {
|
|
21
|
+
_this.setState({
|
|
22
|
+
viewName: value
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
_this.handleKeyDown = function (e) {
|
|
27
|
+
if (e.keyCode === 13) {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
_this.handleSubmit();
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
_this.handleSubmit = function () {
|
|
34
|
+
var viewName = _this.state.viewName;
|
|
35
|
+
viewName = viewName.trim();
|
|
36
|
+
if (!viewName) {
|
|
37
|
+
_this.setState({
|
|
38
|
+
errMessage: intl.get('Name_is_required')
|
|
39
|
+
});
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (viewName !== _this.props.viewName) {
|
|
43
|
+
_this.props.onRenameDashboard(viewName);
|
|
44
|
+
}
|
|
45
|
+
_this.props.hideRenameViewDialog();
|
|
46
|
+
};
|
|
47
|
+
_this.toggle = function () {
|
|
48
|
+
_this.props.hideRenameViewDialog();
|
|
49
|
+
};
|
|
50
|
+
_this.state = {
|
|
51
|
+
viewName: props.viewName || '',
|
|
52
|
+
errMessage: ''
|
|
53
|
+
};
|
|
54
|
+
return _this;
|
|
55
|
+
}
|
|
56
|
+
_createClass(RenameViewDialog, [{
|
|
57
|
+
key: "render",
|
|
58
|
+
value: function render() {
|
|
59
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
60
|
+
isOpen: true,
|
|
61
|
+
toggle: this.toggle,
|
|
62
|
+
autoFocus: false
|
|
63
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
64
|
+
toggle: this.toggle
|
|
65
|
+
}, intl.get('Rename_dashboard')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
66
|
+
for: "viewName"
|
|
67
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
68
|
+
id: "viewName",
|
|
69
|
+
autoFocus: true,
|
|
70
|
+
value: this.state.viewName,
|
|
71
|
+
onChange: this.handleChange,
|
|
72
|
+
onKeyDown: this.handleKeyDown
|
|
73
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
74
|
+
color: "danger",
|
|
75
|
+
className: "mt-2"
|
|
76
|
+
}, this.state.errMessage)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
77
|
+
color: "secondary",
|
|
78
|
+
onClick: this.toggle
|
|
79
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
80
|
+
color: "primary",
|
|
81
|
+
onClick: this.handleSubmit
|
|
82
|
+
}, intl.get('Submit'))));
|
|
83
|
+
}
|
|
84
|
+
}]);
|
|
85
|
+
return RenameViewDialog;
|
|
86
|
+
}(Component);
|
|
87
|
+
export default RenameViewDialog;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
.statistic-records-dialog {
|
|
2
|
+
width: 800px;
|
|
3
|
+
max-width: 800px;
|
|
4
|
+
height: calc(100% - 56px);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.statistic-records-dialog .modal-content {
|
|
8
|
+
width: 100%;
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.statistic-records-dialog .search-header {
|
|
13
|
+
height: 46px;
|
|
14
|
+
line-height: 46px;
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: space-between;
|
|
17
|
+
border-bottom: 1px solid #e9ecef;
|
|
18
|
+
align-items: center;
|
|
19
|
+
padding: 0 20px;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
font-size: 16px;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.statistic-records-dialog .no-search-result {
|
|
25
|
+
height: 100%;
|
|
26
|
+
width: 100%;
|
|
27
|
+
text-align: center;
|
|
28
|
+
background-position: 50% 140px;
|
|
29
|
+
background-size: 132px 132px;
|
|
30
|
+
line-height: 600px;
|
|
31
|
+
color: #aaa;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.statistic-records-dialog .search-input-container .close {
|
|
35
|
+
height: 24px !important;
|
|
36
|
+
width: 24px;
|
|
37
|
+
line-height: 24px;
|
|
38
|
+
position: absolute;
|
|
39
|
+
right: 14px;
|
|
40
|
+
top: 22px;
|
|
41
|
+
padding: 0;
|
|
42
|
+
margin: 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.statistic-records-dialog .search-input-container {
|
|
46
|
+
margin-top: 10px;
|
|
47
|
+
padding: 0 20px;
|
|
48
|
+
height: 48px;
|
|
49
|
+
position: relative;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.statistic-records-dialog .search-input-container .search-tables-input {
|
|
53
|
+
height: 38px;
|
|
54
|
+
line-height: 38px;
|
|
55
|
+
padding-left: 30px;
|
|
56
|
+
border-bottom: 0;
|
|
57
|
+
background: #f5f5f5;
|
|
58
|
+
border-radius: 3px;
|
|
59
|
+
border: 1px solid #dedede;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.statistic-records-dialog .search-input-container .search-tables-input:focus {
|
|
63
|
+
outline: none;
|
|
64
|
+
box-shadow: unset;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.statistic-records-dialog .search-input-container .header-search-icon {
|
|
68
|
+
line-height: 38px;
|
|
69
|
+
text-align: center;
|
|
70
|
+
color: #aaa;
|
|
71
|
+
margin-left: 11px;
|
|
72
|
+
position: absolute;
|
|
73
|
+
left: unset;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.statistic-records-dialog .search-input-container .clear-search-text {
|
|
77
|
+
display: inline-block;
|
|
78
|
+
position: absolute;
|
|
79
|
+
right: 30px;
|
|
80
|
+
top: 10px;
|
|
81
|
+
height: 12px;
|
|
82
|
+
width: 12px;
|
|
83
|
+
line-height: 12px;
|
|
84
|
+
color: #ccc;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.statistic-records-dialog .search-input-container .clear-search-text .dtable-font {
|
|
88
|
+
font-size: 12px;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.statistic-records-dialog .search-input-container .clear-search-text:hover {
|
|
92
|
+
cursor: pointer;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.statistic-records-dialog .statistic-records-container {
|
|
96
|
+
width: 100%;
|
|
97
|
+
height: 100%;
|
|
98
|
+
padding: 0;
|
|
99
|
+
overflow-y: hidden;
|
|
100
|
+
background-color: #f8f8f8;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.statistic-records-dialog.statistic-records-container .records-list {
|
|
104
|
+
height: calc(100% - 47px);
|
|
105
|
+
width: fit-content;
|
|
106
|
+
min-width: 100%;
|
|
107
|
+
padding: 10px 20px;
|
|
108
|
+
overflow-y: auto;
|
|
109
|
+
margin-top: 3px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.statistic-records-dialog .statistic-records-container .records-list .records-container {
|
|
113
|
+
height: auto;
|
|
114
|
+
}
|