dtable-statistic 4.3.3 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/api/dtable-db-api.js +3 -10
- package/es/calculator/base-calculator.js +12 -20
- package/es/calculator/basic-chart-calculator.js +65 -72
- package/es/calculator/combination-calculator.js +57 -64
- package/es/calculator/compare-bar-calculator.js +26 -33
- package/es/calculator/completeness-calculator.js +30 -37
- package/es/calculator/copy-value.js +1 -7
- package/es/calculator/dashboard-calculator.js +13 -20
- package/es/calculator/heat-map-calculator.js +18 -25
- package/es/calculator/horizontal-bar-calculator.js +8 -15
- package/es/calculator/index.js +35 -42
- package/es/calculator/map-calculator.js +22 -29
- package/es/calculator/mirror-calculator.js +20 -27
- package/es/calculator/number-card-calculator.js +10 -17
- package/es/calculator/pivot-table-calculator.js +58 -65
- package/es/calculator/scatter-calculator.js +14 -21
- package/es/calculator/thread-manager.js +1 -7
- package/es/calculator/trend-calculator.js +22 -29
- package/es/calculator/workers/basic-chart-calculator-worker.js +76 -83
- package/es/calculator/workers/calculator.worker.js +30 -33
- package/es/calculator/workers/card-calculator-worker.js +13 -19
- package/es/calculator/workers/combination-calculator-worker.js +46 -53
- package/es/calculator/workers/compare-bar-chart-calculator-worker.js +22 -29
- package/es/calculator/workers/completeness-calculator-worker.js +34 -41
- package/es/calculator/workers/dashboard-calculator-worker.js +18 -24
- package/es/calculator/workers/mirror-calculator-worker.js +22 -29
- package/es/calculator/workers/pivot-table-calculator-worker.js +77 -84
- package/es/calculator/workers/scatter-calculator-worker.js +20 -27
- package/es/calculator/workers/trend-calculator-worker.js +27 -34
- package/es/calculator/world-map-calculator.js +17 -24
- package/es/components/common-add-tool.js +5 -12
- package/es/components/dialog/chart-addition-edit-dialog.js +12 -20
- package/es/components/dialog/chart-addition-widgets/chart-selector.js +101 -108
- package/es/components/dialog/color-theme-dialog.js +15 -22
- package/es/components/dialog/delete-confirmation-dialog.js +11 -18
- package/es/components/dialog/enlarged-chart-dialog.js +20 -28
- package/es/components/dialog/new-table-dialog.js +16 -23
- package/es/components/dialog/new-view-dialog.js +14 -21
- package/es/components/dialog/rename-view-dialog.js +14 -22
- package/es/components/dialog/statistic-record-dialog/index.js +37 -45
- package/es/components/dialog/statistic-types-dialog/index.js +14 -22
- package/es/components/dialog/table-select-dialog.js +15 -23
- package/es/components/dropdown-menu/statistic-dropdown-menu.js +41 -49
- package/es/components/dtable-popover.js +12 -19
- package/es/components/dtable-search-input.js +13 -21
- package/es/components/dtable-select.js +15 -21
- package/es/components/icon.js +4 -11
- package/es/components/index.js +11 -76
- package/es/components/loading.js +3 -10
- package/es/components/modal-portal.js +5 -12
- package/es/components/popover/color-rules/color-rule.js +25 -33
- package/es/components/popover/color-rules/index.js +6 -14
- package/es/components/popover/color-rules/rule-filters/filter.js +27 -34
- package/es/components/popover/color-rules/rule-filters/index.js +17 -25
- package/es/components/popover/color-rules/rule-filters/number-input.js +9 -17
- package/es/components/popover/color-rules-popover.js +24 -32
- package/es/components/popover/color-selector-popover.js +10 -17
- package/es/components/seatable-radio/index.js +9 -16
- package/es/components/select/index.js +2 -9
- package/es/components/select/option-group.js +19 -27
- package/es/components/select/option.js +6 -14
- package/es/components/select/select.js +17 -25
- package/es/components/toast/alert.js +24 -31
- package/es/components/toast/index.js +3 -10
- package/es/components/toast/toast.js +12 -20
- package/es/components/toast/toastManager.js +9 -17
- package/es/components/toast/toaster.js +6 -14
- package/es/constants/color-rules.js +6 -12
- package/es/constants/dtable-select-style.js +4 -9
- package/es/constants/event-types.js +4 -10
- package/es/constants/index.js +67 -96
- package/es/constants/key-codes.js +0 -2
- package/es/constants/map.js +2 -8
- package/es/constants/model.js +20 -26
- package/es/constants/regions.js +3 -8
- package/es/constants/zIndexes.js +1 -7
- package/es/custom-g2.js +208 -236
- package/es/dashboard.js +50 -58
- package/es/desktop-dashboard.js +47 -55
- package/es/index.js +3 -6
- package/es/locale/index.js +10 -13
- package/es/locale/lang/de.js +1 -7
- package/es/locale/lang/en.js +1 -7
- package/es/locale/lang/fr.js +1 -7
- package/es/locale/lang/zh_CN.js +1 -7
- package/es/mobile-dashboard.js +38 -46
- package/es/model/bar-group.js +11 -19
- package/es/model/bar.js +10 -18
- package/es/model/base-model.js +2 -9
- package/es/model/basic-number-card.js +8 -16
- package/es/model/collaborators.js +2 -9
- package/es/model/combination.js +12 -20
- package/es/model/compare-bar.js +16 -24
- package/es/model/completeness-group.js +8 -16
- package/es/model/completeness.js +5 -13
- package/es/model/custom-bar.js +6 -14
- package/es/model/dashboard.js +6 -14
- package/es/model/generic-model.js +133 -141
- package/es/model/heat-map.js +11 -19
- package/es/model/horizontal-bar-group.js +10 -18
- package/es/model/horizontal-bar.js +10 -18
- package/es/model/index.js +53 -185
- package/es/model/map.js +15 -23
- package/es/model/mirror.js +13 -21
- package/es/model/pie.js +10 -18
- package/es/model/ring.js +11 -19
- package/es/model/scatter.js +6 -14
- package/es/model/statistic-dashboard.js +2 -9
- package/es/model/table.js +10 -18
- package/es/model/trend.js +12 -20
- package/es/model/world-map.js +13 -21
- package/es/service/chart-service.js +7 -14
- package/es/service/dashboard-service.js +34 -41
- package/es/service/map-json.js +8 -14
- package/es/stat-editor/chart-name-editor.js +8 -15
- package/es/stat-editor/index.js +16 -24
- package/es/stat-editor/stat-settings/advance-chart-settings/basic-number-card-settings.js +21 -29
- package/es/stat-editor/stat-settings/advance-chart-settings/combination-settings.js +49 -57
- package/es/stat-editor/stat-settings/advance-chart-settings/dashboard-chart-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/geo-granularity-settings.js +4 -11
- package/es/stat-editor/stat-settings/advance-chart-settings/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/index.js +43 -51
- package/es/stat-editor/stat-settings/advance-chart-settings/map-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/mirror-settings.js +23 -31
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/combination-style-setting.js +37 -45
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/heat-map-settings.js +19 -27
- package/es/stat-editor/stat-settings/advance-chart-settings/style-setting/map-setting.js +26 -34
- package/es/stat-editor/stat-settings/advance-chart-settings/summary-settings.js +47 -55
- package/es/stat-editor/stat-settings/advance-chart-settings/trend-chart-settings.js +22 -30
- package/es/stat-editor/stat-settings/advance-chart-settings/world-map-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/advance-bar-chart-settings.js +27 -35
- package/es/stat-editor/stat-settings/basic-chart-settings/bar-settings.js +24 -32
- package/es/stat-editor/stat-settings/basic-chart-settings/completeness-chart-settings.js +33 -41
- package/es/stat-editor/stat-settings/basic-chart-settings/custom-bar-settings.js +22 -30
- package/es/stat-editor/stat-settings/basic-chart-settings/groupby-settings.js +27 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-axis-group-settings.js +46 -54
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-bar-settings.js +23 -31
- package/es/stat-editor/stat-settings/basic-chart-settings/horizontal-group-chart-settings.js +26 -34
- package/es/stat-editor/stat-settings/basic-chart-settings/index.js +77 -85
- package/es/stat-editor/stat-settings/basic-chart-settings/pie-settings.js +21 -29
- package/es/stat-editor/stat-settings/basic-chart-settings/pivot-table-settings.js +73 -81
- package/es/stat-editor/stat-settings/basic-chart-settings/scatter-settings.js +16 -24
- package/es/stat-editor/stat-settings/basic-chart-settings/stack-item-settings.js +19 -27
- package/es/stat-editor/stat-settings/basic-chart-settings/stacks-settings.js +18 -26
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/bar-chart-style-setting.js +49 -57
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/completeness-style.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/horizontal-bar-chart-style.js +47 -55
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/label-font-size-editor.js +11 -19
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/pie-chart-style-settings.js +45 -53
- package/es/stat-editor/stat-settings/basic-chart-settings/style-setting/time-compare-style.js +9 -17
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-method-setting.js +20 -28
- package/es/stat-editor/stat-settings/basic-chart-settings/summary-settings.js +30 -38
- package/es/stat-editor/stat-settings/basic-chart-settings/time-comparison-settings.js +50 -58
- package/es/stat-editor/stat-settings/basic-chart-settings/timer-picker.js +17 -25
- package/es/stat-editor/stat-settings/basic-chart-settings/y-axis-group-settings.js +47 -55
- package/es/stat-editor/stat-settings/color-setting/color-group-selector.js +11 -19
- package/es/stat-editor/stat-settings/color-setting/color-picker.js +12 -19
- package/es/stat-editor/stat-settings/color-setting/color-use-type-selector.js +62 -70
- package/es/stat-editor/stat-settings/map/map-level.js +13 -20
- package/es/stat-editor/stat-settings/map/map-province-city.js +20 -27
- package/es/stat-editor/stat-settings/public-setting/axis-label-position-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/base-settings.js +20 -28
- package/es/stat-editor/stat-settings/public-setting/calender.js +22 -29
- package/es/stat-editor/stat-settings/public-setting/column-settings.js +6 -13
- package/es/stat-editor/stat-settings/public-setting/custom-title-setting.js +9 -16
- package/es/stat-editor/stat-settings/public-setting/data-sort-setting.js +13 -21
- package/es/stat-editor/stat-settings/public-setting/ind-toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/min-max-setting.js +11 -19
- package/es/stat-editor/stat-settings/public-setting/numeric-summary-item.js +27 -35
- package/es/stat-editor/stat-settings/public-setting/toggle-setting.js +8 -15
- package/es/stat-editor/stat-settings/public-setting/type-settings/index.js +18 -26
- package/es/stat-list/chart-preview.js +20 -28
- package/es/stat-list/index.js +27 -35
- package/es/stat-view/area-chart.js +43 -50
- package/es/stat-view/bar-chart.js +47 -54
- package/es/stat-view/base-chart.js +24 -32
- package/es/stat-view/basic-number-card.js +19 -26
- package/es/stat-view/combination-chart.js +49 -56
- package/es/stat-view/compare-chart.js +39 -46
- package/es/stat-view/completeness-chart.js +28 -35
- package/es/stat-view/custom-bar.js +31 -38
- package/es/stat-view/dashboard-chart.js +15 -22
- package/es/stat-view/heat-map.js +43 -50
- package/es/stat-view/horizontal-bar-chart.js +51 -58
- package/es/stat-view/index.js +73 -80
- package/es/stat-view/line-chart.js +39 -46
- package/es/stat-view/map.js +33 -40
- package/es/stat-view/mirror.js +21 -28
- package/es/stat-view/pie-chart.js +29 -36
- package/es/stat-view/pivot-table/index.js +32 -39
- package/es/stat-view/pivot-table/one-dimension-table-no-numeric-columns.js +31 -39
- package/es/stat-view/pivot-table/one-dimension-table-with-numeric-columns.js +29 -37
- package/es/stat-view/pivot-table/pivot-table-display-name.js +46 -54
- package/es/stat-view/pivot-table/two-dimension-table.js +62 -70
- package/es/stat-view/ring-chart.js +38 -45
- package/es/stat-view/scatter-chart.js +30 -37
- package/es/stat-view/treemap-chart.js +37 -44
- package/es/stat-view/trend-chart.js +32 -39
- package/es/stat-view/world-map.js +33 -40
- package/es/tabs/index.js +32 -40
- package/es/tabs/tab.js +26 -34
- package/es/utils/basic-chart-utils.js +2 -9
- package/es/utils/cell-format.js +14 -22
- package/es/utils/cell-value.js +7 -14
- package/es/utils/collaborator.js +4 -13
- package/es/utils/color-utils.js +18 -29
- package/es/utils/column-utils.js +18 -29
- package/es/utils/column.js +4 -11
- package/es/utils/common-utils.js +41 -65
- package/es/utils/date-format.js +2 -8
- package/es/utils/export-table-utils.js +82 -91
- package/es/utils/index.js +11 -100
- package/es/utils/map.js +26 -36
- package/es/utils/model.js +6 -14
- package/es/utils/object.js +6 -15
- package/es/utils/pivot-table.js +16 -23
- package/es/utils/row-utils.js +23 -33
- package/es/utils/search.js +21 -29
- package/es/utils/sql-utils.js +65 -75
- package/es/utils/stat-utils.js +60 -66
- package/es/utils/trend-utils.js +32 -40
- package/package.json +1 -1
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
10
|
-
var _reactstrap = require("reactstrap");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';
|
|
11
4
|
function DeleteConfirmationDialog(props) {
|
|
12
5
|
const {
|
|
13
6
|
header,
|
|
@@ -15,21 +8,21 @@ function DeleteConfirmationDialog(props) {
|
|
|
15
8
|
onDelete,
|
|
16
9
|
onToggle
|
|
17
10
|
} = props;
|
|
18
|
-
return /*#__PURE__*/
|
|
11
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
19
12
|
isOpen: true,
|
|
20
13
|
toggle: onToggle
|
|
21
|
-
}, /*#__PURE__*/
|
|
14
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
22
15
|
toggle: onToggle
|
|
23
|
-
}, header), /*#__PURE__*/
|
|
16
|
+
}, header), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement("div", {
|
|
24
17
|
className: "pb-6"
|
|
25
|
-
},
|
|
18
|
+
}, intl.get('Delete_xxx_tip', {
|
|
26
19
|
name
|
|
27
|
-
}))), /*#__PURE__*/
|
|
20
|
+
}))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
28
21
|
color: "secondary",
|
|
29
22
|
onClick: onToggle
|
|
30
|
-
},
|
|
23
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
31
24
|
color: "primary",
|
|
32
25
|
onClick: onDelete
|
|
33
|
-
},
|
|
26
|
+
}, intl.get('Delete'))));
|
|
34
27
|
}
|
|
35
|
-
|
|
28
|
+
export default DeleteConfirmationDialog;
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
|
-
var _html2canvas = _interopRequireDefault(require("html2canvas"));
|
|
12
|
-
var _reactstrap = require("reactstrap");
|
|
13
|
-
var _statView = _interopRequireDefault(require("../../stat-view"));
|
|
14
|
-
var _constants = require("../../constants");
|
|
15
|
-
class EnlargeChartDialog extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import ReactDOM from 'react-dom';
|
|
3
|
+
import html2canvas from 'html2canvas';
|
|
4
|
+
import { Modal, ModalHeader, ModalBody } from 'reactstrap';
|
|
5
|
+
import StatView from '../../stat-view';
|
|
6
|
+
import { STAT_TYPE } from '../../constants';
|
|
7
|
+
class EnlargeChartDialog extends Component {
|
|
16
8
|
constructor() {
|
|
17
9
|
super(...arguments);
|
|
18
10
|
this.toggle = () => {
|
|
@@ -44,11 +36,11 @@ class EnlargeChartDialog extends _react.Component {
|
|
|
44
36
|
queryMapJson: this.props.queryMapJson,
|
|
45
37
|
toggleStatisticRecordsDialog
|
|
46
38
|
};
|
|
47
|
-
return /*#__PURE__*/
|
|
39
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
48
40
|
className: "view-wrapper",
|
|
49
41
|
onClick: this.onClick,
|
|
50
42
|
draggable: false
|
|
51
|
-
}, /*#__PURE__*/
|
|
43
|
+
}, /*#__PURE__*/React.createElement(StatView, viewProps));
|
|
52
44
|
};
|
|
53
45
|
this.onExportChart = () => {
|
|
54
46
|
const exportContainerID = 'exported-chart-container';
|
|
@@ -63,11 +55,11 @@ class EnlargeChartDialog extends _react.Component {
|
|
|
63
55
|
exportContainer.setAttribute('style', "width: ".concat(containerWidth, "px; height: ").concat(containerHeight, "px;"));
|
|
64
56
|
}
|
|
65
57
|
document.body.appendChild(exportContainer);
|
|
66
|
-
|
|
58
|
+
ReactDOM.render(this.renderStatisticView(), exportContainer);
|
|
67
59
|
setTimeout(() => {
|
|
68
60
|
const ele = document.querySelector("#".concat(exportContainerID, " .statistic-chart-container"));
|
|
69
61
|
if (!ele) return;
|
|
70
|
-
(
|
|
62
|
+
html2canvas(ele, {
|
|
71
63
|
windowWidth: ele.scrollWidth,
|
|
72
64
|
windowHeight: ele.scrollHeight
|
|
73
65
|
}).then(canvas => {
|
|
@@ -84,30 +76,30 @@ class EnlargeChartDialog extends _react.Component {
|
|
|
84
76
|
const {
|
|
85
77
|
statItem
|
|
86
78
|
} = this.props;
|
|
87
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
88
80
|
isOpen: true,
|
|
89
81
|
toggle: this.toggle,
|
|
90
82
|
className: "statistic-enlarge-modal",
|
|
91
83
|
modalClassName: "statistic-enlarge-dialog",
|
|
92
84
|
zIndex: 1048
|
|
93
|
-
}, /*#__PURE__*/
|
|
85
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
94
86
|
toggle: this.toggle,
|
|
95
|
-
close: /*#__PURE__*/
|
|
87
|
+
close: /*#__PURE__*/React.createElement("div", {
|
|
96
88
|
className: "header-close-list"
|
|
97
|
-
}, /*#__PURE__*/
|
|
89
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
98
90
|
className: "op-item op-item-icon-wrapper",
|
|
99
91
|
onClick: this.onExportChart
|
|
100
|
-
}, /*#__PURE__*/
|
|
92
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
101
93
|
className: "item-icon dtable-font dtable-icon-download"
|
|
102
|
-
})), /*#__PURE__*/
|
|
94
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
103
95
|
className: "op-item op-item-icon-wrapper header-btn-close",
|
|
104
96
|
onClick: this.toggle
|
|
105
|
-
}, /*#__PURE__*/
|
|
97
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
106
98
|
className: "item-icon dtable-font dtable-icon-x"
|
|
107
99
|
})))
|
|
108
|
-
}, /*#__PURE__*/
|
|
100
|
+
}, /*#__PURE__*/React.createElement("span", null, statItem.type === STAT_TYPE.BASIC_NUMBER_CARD ? '' : statItem.name)), /*#__PURE__*/React.createElement(ModalBody, {
|
|
109
101
|
className: 'statistic-body-container statistic-microscope-content'
|
|
110
102
|
}, this.renderStatisticView()));
|
|
111
103
|
}
|
|
112
104
|
}
|
|
113
|
-
|
|
105
|
+
export default EnlargeChartDialog;
|
|
@@ -1,19 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
10
|
-
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _constants = require("../../constants");
|
|
12
|
-
class NewTableDialog extends _react.default.Component {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Alert, Button } from 'reactstrap';
|
|
4
|
+
import { KeyCodes } from '../../constants';
|
|
5
|
+
class NewTableDialog extends React.Component {
|
|
13
6
|
constructor(props) {
|
|
14
7
|
super(props);
|
|
15
8
|
this.onHotKey = e => {
|
|
16
|
-
if (e.keyCode ===
|
|
9
|
+
if (e.keyCode === KeyCodes.Enter) {
|
|
17
10
|
e.preventDefault();
|
|
18
11
|
this.handleSubmit();
|
|
19
12
|
}
|
|
@@ -83,15 +76,15 @@ class NewTableDialog extends _react.default.Component {
|
|
|
83
76
|
}
|
|
84
77
|
render() {
|
|
85
78
|
var _this$state$tableName;
|
|
86
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
87
80
|
isOpen: true,
|
|
88
81
|
toggle: this.toggle,
|
|
89
82
|
autoFocus: false
|
|
90
|
-
}, /*#__PURE__*/
|
|
83
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
91
84
|
toggle: this.toggle
|
|
92
|
-
},
|
|
85
|
+
}, intl.get('New_table')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
93
86
|
for: "tableName"
|
|
94
|
-
},
|
|
87
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
95
88
|
id: "tableName",
|
|
96
89
|
value: this.state.tableName,
|
|
97
90
|
innerRef: input => {
|
|
@@ -99,18 +92,18 @@ class NewTableDialog extends _react.default.Component {
|
|
|
99
92
|
},
|
|
100
93
|
onChange: this.handleChange,
|
|
101
94
|
autoFocus: true
|
|
102
|
-
}))), this.state.errMessage && /*#__PURE__*/
|
|
95
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
103
96
|
color: "danger",
|
|
104
97
|
className: "mt-2"
|
|
105
|
-
},
|
|
98
|
+
}, intl.get(this.state.errMessage, {
|
|
106
99
|
name: (_this$state$tableName = this.state.tableName) === null || _this$state$tableName === void 0 ? void 0 : _this$state$tableName.trim()
|
|
107
|
-
}))), /*#__PURE__*/
|
|
100
|
+
}))), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
108
101
|
color: "secondary",
|
|
109
102
|
onClick: this.toggle
|
|
110
|
-
},
|
|
103
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
111
104
|
color: "primary",
|
|
112
105
|
onClick: this.handleSubmit
|
|
113
|
-
},
|
|
106
|
+
}, intl.get('Submit'))));
|
|
114
107
|
}
|
|
115
108
|
}
|
|
116
|
-
|
|
109
|
+
export default NewTableDialog;
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
10
|
-
var _reactstrap = require("reactstrap");
|
|
11
|
-
class NewViewDialog extends _react.default.Component {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Alert, Button } from 'reactstrap';
|
|
4
|
+
class NewViewDialog extends React.Component {
|
|
12
5
|
constructor(props) {
|
|
13
6
|
super(props);
|
|
14
7
|
this.handleChange = event => {
|
|
@@ -30,7 +23,7 @@ class NewViewDialog extends _react.default.Component {
|
|
|
30
23
|
viewName = viewName.trim();
|
|
31
24
|
if (!viewName) {
|
|
32
25
|
this.setState({
|
|
33
|
-
errMessage:
|
|
26
|
+
errMessage: intl.get('Name_is_required')
|
|
34
27
|
});
|
|
35
28
|
return;
|
|
36
29
|
}
|
|
@@ -49,15 +42,15 @@ class NewViewDialog extends _react.default.Component {
|
|
|
49
42
|
};
|
|
50
43
|
}
|
|
51
44
|
render() {
|
|
52
|
-
return /*#__PURE__*/
|
|
45
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
53
46
|
isOpen: true,
|
|
54
47
|
toggle: this.toggle,
|
|
55
48
|
autoFocus: false
|
|
56
|
-
}, /*#__PURE__*/
|
|
49
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
57
50
|
toggle: this.toggle
|
|
58
|
-
},
|
|
51
|
+
}, intl.get('New_dashboard')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
59
52
|
for: "viewName"
|
|
60
|
-
},
|
|
53
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
61
54
|
type: "text",
|
|
62
55
|
id: "viewName",
|
|
63
56
|
value: this.state.viewName,
|
|
@@ -67,16 +60,16 @@ class NewViewDialog extends _react.default.Component {
|
|
|
67
60
|
onChange: this.handleChange,
|
|
68
61
|
autoFocus: true,
|
|
69
62
|
onKeyDown: this.handleKeyDown
|
|
70
|
-
}))), this.state.errMessage && /*#__PURE__*/
|
|
63
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
71
64
|
color: "danger",
|
|
72
65
|
className: "mt-2"
|
|
73
|
-
}, this.state.errMessage)), /*#__PURE__*/
|
|
66
|
+
}, this.state.errMessage)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
74
67
|
color: "secondary",
|
|
75
68
|
onClick: this.toggle
|
|
76
|
-
},
|
|
69
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
77
70
|
color: "primary",
|
|
78
71
|
onClick: this.handleSubmit
|
|
79
|
-
},
|
|
72
|
+
}, intl.get('Submit'))));
|
|
80
73
|
}
|
|
81
74
|
}
|
|
82
|
-
|
|
75
|
+
export default NewViewDialog;
|
|
@@ -1,15 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
class RenameViewDialog extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Form, FormGroup, Label, Input, Button, Alert } from 'reactstrap';
|
|
4
|
+
class RenameViewDialog extends Component {
|
|
13
5
|
constructor(props) {
|
|
14
6
|
super(props);
|
|
15
7
|
this.handleChange = event => {
|
|
@@ -39,7 +31,7 @@ class RenameViewDialog extends _react.Component {
|
|
|
39
31
|
viewName = viewName.trim();
|
|
40
32
|
if (!viewName) {
|
|
41
33
|
this.setState({
|
|
42
|
-
errMessage:
|
|
34
|
+
errMessage: intl.get('Name_is_required')
|
|
43
35
|
});
|
|
44
36
|
return;
|
|
45
37
|
}
|
|
@@ -57,30 +49,30 @@ class RenameViewDialog extends _react.Component {
|
|
|
57
49
|
};
|
|
58
50
|
}
|
|
59
51
|
render() {
|
|
60
|
-
return /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
61
53
|
isOpen: true,
|
|
62
54
|
toggle: this.toggle,
|
|
63
55
|
autoFocus: false
|
|
64
|
-
}, /*#__PURE__*/
|
|
56
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
65
57
|
toggle: this.toggle
|
|
66
|
-
},
|
|
58
|
+
}, intl.get('Rename_dashboard')), /*#__PURE__*/React.createElement(ModalBody, null, /*#__PURE__*/React.createElement(Form, null, /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
67
59
|
for: "viewName"
|
|
68
|
-
},
|
|
60
|
+
}, intl.get('Name')), /*#__PURE__*/React.createElement(Input, {
|
|
69
61
|
id: "viewName",
|
|
70
62
|
autoFocus: true,
|
|
71
63
|
value: this.state.viewName,
|
|
72
64
|
onChange: this.handleChange,
|
|
73
65
|
onKeyDown: this.handleKeyDown
|
|
74
|
-
}))), this.state.errMessage && /*#__PURE__*/
|
|
66
|
+
}))), this.state.errMessage && /*#__PURE__*/React.createElement(Alert, {
|
|
75
67
|
color: "danger",
|
|
76
68
|
className: "mt-2"
|
|
77
|
-
}, this.state.errMessage)), /*#__PURE__*/
|
|
69
|
+
}, this.state.errMessage)), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
78
70
|
color: "secondary",
|
|
79
71
|
onClick: this.toggle
|
|
80
|
-
},
|
|
72
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
81
73
|
color: "primary",
|
|
82
74
|
onClick: this.handleSubmit
|
|
83
|
-
},
|
|
75
|
+
}, intl.get('Submit'))));
|
|
84
76
|
}
|
|
85
77
|
}
|
|
86
|
-
|
|
78
|
+
export default RenameViewDialog;
|
|
@@ -1,22 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _dtableStore = require("dtable-store");
|
|
13
|
-
var _dtableDbApi = _interopRequireDefault(require("../../../api/dtable-db-api"));
|
|
14
|
-
var _index = require("../../index");
|
|
15
|
-
var _utils = require("../../../utils");
|
|
16
|
-
var _sqlUtils = require("../../../utils/sql-utils");
|
|
17
|
-
var _constants = require("../../../constants");
|
|
18
|
-
require("./index.css");
|
|
19
|
-
class StatisticRecordDialog extends _react.default.Component {
|
|
1
|
+
import React, { Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalBody } from 'reactstrap';
|
|
4
|
+
import { Views } from 'dtable-store';
|
|
5
|
+
import dtableDbAPI from '../../../api/dtable-db-api';
|
|
6
|
+
import { DtableSearchInput, Loading } from '../../index';
|
|
7
|
+
import { searchRows } from '../../../utils';
|
|
8
|
+
import { getSqlString } from '../../../utils/sql-utils';
|
|
9
|
+
import { CommonEventTypes } from '../../../constants';
|
|
10
|
+
import './index.css';
|
|
11
|
+
class StatisticRecordDialog extends React.Component {
|
|
20
12
|
constructor(props) {
|
|
21
13
|
super(props);
|
|
22
14
|
this.init = () => {
|
|
@@ -42,18 +34,18 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
42
34
|
view_id
|
|
43
35
|
} = chart;
|
|
44
36
|
this.table = getTableById(table_id);
|
|
45
|
-
this.view =
|
|
46
|
-
this.isArchiveView =
|
|
37
|
+
this.view = Views.getViewById(this.table.views, view_id);
|
|
38
|
+
this.isArchiveView = Views.isArchiveView(this.view);
|
|
47
39
|
this.unShowColumnKeyList = this.getUnShowColumnKeyList(this.view);
|
|
48
40
|
this.renderedColumns = this.getRenderedColumns(this.table);
|
|
49
41
|
if (this.isArchiveView || !records) {
|
|
50
|
-
const sqlString =
|
|
42
|
+
const sqlString = getSqlString(chart, statisticRecord, {
|
|
51
43
|
isColumn,
|
|
52
44
|
isCurrentView,
|
|
53
45
|
isRow,
|
|
54
46
|
getTableById
|
|
55
47
|
});
|
|
56
|
-
|
|
48
|
+
dtableDbAPI.sqlQuery(sqlString).then(res => {
|
|
57
49
|
const {
|
|
58
50
|
results: rows
|
|
59
51
|
} = res.data;
|
|
@@ -86,7 +78,7 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
86
78
|
};
|
|
87
79
|
this.initComputedProperties = drilledRows => {
|
|
88
80
|
if (this.isArchiveView) {
|
|
89
|
-
const formulaColumns =
|
|
81
|
+
const formulaColumns = Views.getFormulaColumnsContainLinks(this.table);
|
|
90
82
|
if (formulaColumns.length === 0) return {};
|
|
91
83
|
let formulaRows = {};
|
|
92
84
|
drilledRows.forEach(row => {
|
|
@@ -131,7 +123,7 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
131
123
|
this.getSearchedRows = (rows, searchVal) => {
|
|
132
124
|
if (!Array.isArray(rows) || rows.length === 0) return [];
|
|
133
125
|
if (searchVal) {
|
|
134
|
-
return
|
|
126
|
+
return searchRows(rows, Views.getColumns(this.view, this.table), searchVal, row => {
|
|
135
127
|
return row;
|
|
136
128
|
}).map(row => row._id);
|
|
137
129
|
}
|
|
@@ -148,7 +140,7 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
148
140
|
};
|
|
149
141
|
this.toggle = () => {
|
|
150
142
|
if (this.valueChanged) {
|
|
151
|
-
this.props.eventBus.dispatch(
|
|
143
|
+
this.props.eventBus.dispatch(CommonEventTypes.REFRESH_CHARTS);
|
|
152
144
|
}
|
|
153
145
|
this.props.toggleStatisticRecordsDialog();
|
|
154
146
|
};
|
|
@@ -236,7 +228,7 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
236
228
|
formulaRows: view.formula_rows
|
|
237
229
|
};
|
|
238
230
|
}
|
|
239
|
-
|
|
231
|
+
Views.cacheFormulaResults(table.rows, {
|
|
240
232
|
targetViewId: view._id,
|
|
241
233
|
table,
|
|
242
234
|
value
|
|
@@ -280,8 +272,8 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
280
272
|
this.unShowColumnKeyList = null;
|
|
281
273
|
}
|
|
282
274
|
componentDidMount() {
|
|
283
|
-
this.unsubscribeExpandRowUpdated = this.props.eventBus.subscribe(
|
|
284
|
-
this.unsubscribeExpandRowDeleted = this.props.eventBus.subscribe(
|
|
275
|
+
this.unsubscribeExpandRowUpdated = this.props.eventBus.subscribe(CommonEventTypes.EXPAND_ROW_UPDATED, this.expandRowUpdated);
|
|
276
|
+
this.unsubscribeExpandRowDeleted = this.props.eventBus.subscribe(CommonEventTypes.EXPAND_ROW_DELETED, this.expandRowDeleted);
|
|
285
277
|
this.init();
|
|
286
278
|
}
|
|
287
279
|
componentWillUnmount() {
|
|
@@ -293,49 +285,49 @@ class StatisticRecordDialog extends _react.default.Component {
|
|
|
293
285
|
loading,
|
|
294
286
|
title
|
|
295
287
|
} = this.state;
|
|
296
|
-
return /*#__PURE__*/
|
|
288
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
297
289
|
isOpen: true,
|
|
298
290
|
autoFocus: false,
|
|
299
291
|
toggle: this.toggle,
|
|
300
292
|
className: "statistic-records-dialog",
|
|
301
293
|
zIndex: 1048
|
|
302
|
-
}, /*#__PURE__*/
|
|
294
|
+
}, /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
303
295
|
className: "search-header"
|
|
304
|
-
}, /*#__PURE__*/
|
|
296
|
+
}, /*#__PURE__*/React.createElement("span", null, title), /*#__PURE__*/React.createElement("button", {
|
|
305
297
|
type: "button",
|
|
306
298
|
className: "close",
|
|
307
299
|
"aria-label": "Close",
|
|
308
300
|
onClick: this.toggle
|
|
309
|
-
}, /*#__PURE__*/
|
|
301
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
310
302
|
"aria-hidden": "true"
|
|
311
|
-
}, "\xD7"))), /*#__PURE__*/
|
|
303
|
+
}, "\xD7"))), /*#__PURE__*/React.createElement("div", {
|
|
312
304
|
className: "search-input-container"
|
|
313
|
-
}, /*#__PURE__*/
|
|
305
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
314
306
|
className: "header-search-icon dtable-font dtable-icon-search"
|
|
315
|
-
}), /*#__PURE__*/
|
|
307
|
+
}), /*#__PURE__*/React.createElement(DtableSearchInput, {
|
|
316
308
|
autoFocus: true,
|
|
317
309
|
isClearable: true,
|
|
318
310
|
className: "search-tables-input",
|
|
319
|
-
placeholder:
|
|
311
|
+
placeholder: intl.get('Search_records'),
|
|
320
312
|
onChange: this.onSearch,
|
|
321
313
|
clearValue: this.clearSearch,
|
|
322
314
|
components: {
|
|
323
315
|
ClearIndicator: props => {
|
|
324
|
-
return /*#__PURE__*/
|
|
316
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
325
317
|
className: "clear-search-text",
|
|
326
318
|
onClick: props.clearValue,
|
|
327
|
-
title:
|
|
328
|
-
"aria-label":
|
|
329
|
-
}, /*#__PURE__*/
|
|
319
|
+
title: intl.get('Clear_search_text'),
|
|
320
|
+
"aria-label": intl.get('Clear_search_text')
|
|
321
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
330
322
|
className: "dtable-font dtable-icon-x-"
|
|
331
323
|
}));
|
|
332
324
|
}
|
|
333
325
|
}
|
|
334
|
-
})), /*#__PURE__*/
|
|
326
|
+
})), /*#__PURE__*/React.createElement(ModalBody, {
|
|
335
327
|
className: "statistic-records-container"
|
|
336
|
-
}, loading ? /*#__PURE__*/
|
|
328
|
+
}, loading ? /*#__PURE__*/React.createElement("div", {
|
|
337
329
|
className: "d-flex py-8"
|
|
338
|
-
}, /*#__PURE__*/
|
|
330
|
+
}, /*#__PURE__*/React.createElement(Loading, null)) : this.renderRowsCards())));
|
|
339
331
|
}
|
|
340
332
|
}
|
|
341
|
-
|
|
333
|
+
export default StatisticRecordDialog;
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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
|
-
require("./index.css");
|
|
14
|
-
class StatisticTypesDialog extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { Modal, ModalHeader, ModalBody, ModalFooter, Button } from 'reactstrap';
|
|
4
|
+
import ChartSelector from '../chart-addition-widgets/chart-selector';
|
|
5
|
+
import './index.css';
|
|
6
|
+
class StatisticTypesDialog extends Component {
|
|
15
7
|
constructor(props) {
|
|
16
8
|
super(props);
|
|
17
9
|
this.onToggle = () => {
|
|
@@ -38,25 +30,25 @@ class StatisticTypesDialog extends _react.Component {
|
|
|
38
30
|
const {
|
|
39
31
|
selectedType
|
|
40
32
|
} = this.state;
|
|
41
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement(Modal, {
|
|
42
34
|
isOpen: true,
|
|
43
35
|
toggle: this.onToggle,
|
|
44
36
|
className: "statistic-types-dialog",
|
|
45
37
|
zIndex: 1048
|
|
46
|
-
}, /*#__PURE__*/
|
|
38
|
+
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
47
39
|
toggle: this.onToggle
|
|
48
|
-
},
|
|
40
|
+
}, intl.get('Edit_type')), /*#__PURE__*/React.createElement(ModalBody, {
|
|
49
41
|
className: "statistic-types-body"
|
|
50
|
-
}, /*#__PURE__*/
|
|
42
|
+
}, /*#__PURE__*/React.createElement(ChartSelector, {
|
|
51
43
|
selectedType: selectedType,
|
|
52
44
|
addEditingChart: this.onSelectStatisticType
|
|
53
|
-
})), /*#__PURE__*/
|
|
45
|
+
})), /*#__PURE__*/React.createElement(ModalFooter, null, /*#__PURE__*/React.createElement(Button, {
|
|
54
46
|
color: "secondary",
|
|
55
47
|
onClick: this.onToggle
|
|
56
|
-
},
|
|
48
|
+
}, intl.get('Cancel')), /*#__PURE__*/React.createElement(Button, {
|
|
57
49
|
color: "primary",
|
|
58
50
|
onClick: this.onSubmit
|
|
59
|
-
},
|
|
51
|
+
}, intl.get('Submit'))));
|
|
60
52
|
}
|
|
61
53
|
}
|
|
62
|
-
|
|
54
|
+
export default StatisticTypesDialog;
|