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,25 +1,17 @@
|
|
|
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 _typeSettings = _interopRequireDefault(require("./type-settings"));
|
|
12
|
-
var _components = require("../../../components");
|
|
13
|
-
var _chartService = _interopRequireDefault(require("../../../service/chart-service"));
|
|
14
|
-
var _constants = require("../../../constants");
|
|
15
|
-
class BaseSettings extends _react.Component {
|
|
1
|
+
import React, { Component, Fragment } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import TypeSettings from './type-settings';
|
|
4
|
+
import { DTableSelect } from '../../../components';
|
|
5
|
+
import ChartService from '../../../service/chart-service';
|
|
6
|
+
import { INIT_STAT_ITEM } from '../../../constants';
|
|
7
|
+
class BaseSettings extends Component {
|
|
16
8
|
constructor(_props) {
|
|
17
9
|
super(_props);
|
|
18
10
|
this.getTablesOptions = () => {
|
|
19
11
|
const tables = this.props.getTables();
|
|
20
12
|
return Array.isArray(tables) && tables.map(table => {
|
|
21
13
|
return {
|
|
22
|
-
label: /*#__PURE__*/
|
|
14
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
23
15
|
className: "select-option-name"
|
|
24
16
|
}, table.name),
|
|
25
17
|
value: {
|
|
@@ -40,11 +32,11 @@ class BaseSettings extends _react.Component {
|
|
|
40
32
|
return views.map(view => {
|
|
41
33
|
const isArchiveView = view.type === 'archive';
|
|
42
34
|
return {
|
|
43
|
-
label: /*#__PURE__*/
|
|
35
|
+
label: /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
44
36
|
className: "header-icon"
|
|
45
|
-
}, /*#__PURE__*/
|
|
37
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
46
38
|
className: isArchiveView ? 'dtable-font dtable-icon-archive-view' : 'dtable-font dtable-icon-main-view'
|
|
47
|
-
})), /*#__PURE__*/
|
|
39
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
48
40
|
className: "select-option-name"
|
|
49
41
|
}, view.name)),
|
|
50
42
|
value: {
|
|
@@ -80,7 +72,7 @@ class BaseSettings extends _react.Component {
|
|
|
80
72
|
this.props.updateStatItem(Object.assign({}, statItem, {
|
|
81
73
|
table_id: selectedTable._id,
|
|
82
74
|
view_id,
|
|
83
|
-
...
|
|
75
|
+
...INIT_STAT_ITEM[type]
|
|
84
76
|
}));
|
|
85
77
|
};
|
|
86
78
|
this.onSelectView = option => {
|
|
@@ -116,8 +108,8 @@ class BaseSettings extends _react.Component {
|
|
|
116
108
|
};
|
|
117
109
|
this.tablesOptions = this.getTablesOptions();
|
|
118
110
|
this.viewsOptions = this.getViewsOptions(_props);
|
|
119
|
-
const defaultChartTitle =
|
|
120
|
-
this.charService = new
|
|
111
|
+
const defaultChartTitle = intl.get('Untitled');
|
|
112
|
+
this.charService = new ChartService({
|
|
121
113
|
defaultChartTitle
|
|
122
114
|
});
|
|
123
115
|
}
|
|
@@ -132,22 +124,22 @@ class BaseSettings extends _react.Component {
|
|
|
132
124
|
} = this.props;
|
|
133
125
|
const selectedTableOption = this.getSelectedTableOption();
|
|
134
126
|
const selectedViewOption = this.getSelectedViewOption();
|
|
135
|
-
return /*#__PURE__*/
|
|
127
|
+
return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(TypeSettings, {
|
|
136
128
|
chart: statItem,
|
|
137
129
|
onChange: this.onChangeType
|
|
138
|
-
}), /*#__PURE__*/
|
|
130
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
139
131
|
className: "statistic-chart-parameter-item"
|
|
140
|
-
}, /*#__PURE__*/
|
|
132
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Table')), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
141
133
|
value: selectedTableOption,
|
|
142
134
|
options: this.tablesOptions,
|
|
143
135
|
onChange: this.onSelectTable
|
|
144
|
-
})), /*#__PURE__*/
|
|
136
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
145
137
|
className: "statistic-chart-parameter-item"
|
|
146
|
-
}, /*#__PURE__*/
|
|
138
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Views')), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
147
139
|
value: selectedViewOption,
|
|
148
140
|
options: this.viewsOptions,
|
|
149
141
|
onChange: this.onSelectView
|
|
150
142
|
})));
|
|
151
143
|
}
|
|
152
144
|
}
|
|
153
|
-
|
|
145
|
+
export default BaseSettings;
|
|
@@ -1,20 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var _Picker = _interopRequireDefault(require("@seafile/seafile-calendar/lib/Picker"));
|
|
12
|
-
var _seafileCalendar = _interopRequireDefault(require("@seafile/seafile-calendar"));
|
|
13
|
-
var _utils = require("../../../utils");
|
|
14
|
-
require("dayjs/locale/zh-cn");
|
|
15
|
-
require("dayjs/locale/en-gb");
|
|
16
|
-
require("@seafile/seafile-calendar/assets/index.css");
|
|
17
|
-
class DateEditorPopover extends _react.default.Component {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import dayjs from 'dayjs';
|
|
3
|
+
import intl from 'react-intl-universal';
|
|
4
|
+
import DatePicker from '@seafile/seafile-calendar/lib/Picker';
|
|
5
|
+
import Calendar from '@seafile/seafile-calendar';
|
|
6
|
+
import { translateCalendar } from '../../../utils';
|
|
7
|
+
import 'dayjs/locale/zh-cn';
|
|
8
|
+
import 'dayjs/locale/en-gb';
|
|
9
|
+
import '@seafile/seafile-calendar/assets/index.css';
|
|
10
|
+
class DateEditorPopover extends React.Component {
|
|
18
11
|
constructor(props) {
|
|
19
12
|
super(props);
|
|
20
13
|
// event trigger sequence: onOpenChange --> onChange
|
|
@@ -61,26 +54,26 @@ class DateEditorPopover extends _react.default.Component {
|
|
|
61
54
|
dateFormat,
|
|
62
55
|
showHourAndMinute
|
|
63
56
|
} = this.props;
|
|
64
|
-
let defaultValue = (
|
|
65
|
-
return /*#__PURE__*/
|
|
57
|
+
let defaultValue = dayjs().clone();
|
|
58
|
+
return /*#__PURE__*/React.createElement(Calendar, {
|
|
66
59
|
showDateInput: true,
|
|
67
60
|
focusablePanel: false,
|
|
68
|
-
locale:
|
|
61
|
+
locale: translateCalendar(),
|
|
69
62
|
style: {
|
|
70
63
|
zIndex: 1001
|
|
71
64
|
},
|
|
72
65
|
format: dateFormat,
|
|
73
66
|
defaultValue: defaultValue,
|
|
74
67
|
showHourAndMinute: showHourAndMinute,
|
|
75
|
-
dateInputPlaceholder:
|
|
68
|
+
dateInputPlaceholder: intl.get('Enter_date'),
|
|
76
69
|
onClear: this.onClear
|
|
77
70
|
});
|
|
78
71
|
};
|
|
79
72
|
this.state = {
|
|
80
73
|
open: true,
|
|
81
|
-
datePickerValue: props.value ? (
|
|
74
|
+
datePickerValue: props.value ? dayjs(props.value) : null
|
|
82
75
|
};
|
|
83
|
-
this.calendarContainerRef =
|
|
76
|
+
this.calendarContainerRef = React.createRef();
|
|
84
77
|
}
|
|
85
78
|
render() {
|
|
86
79
|
const {
|
|
@@ -91,7 +84,7 @@ class DateEditorPopover extends _react.default.Component {
|
|
|
91
84
|
datePickerValue
|
|
92
85
|
} = this.state;
|
|
93
86
|
const calendar = this.getCalender();
|
|
94
|
-
return /*#__PURE__*/
|
|
87
|
+
return /*#__PURE__*/React.createElement(DatePicker, {
|
|
95
88
|
open: open,
|
|
96
89
|
value: datePickerValue,
|
|
97
90
|
style: {
|
|
@@ -106,20 +99,20 @@ class DateEditorPopover extends _react.default.Component {
|
|
|
106
99
|
value
|
|
107
100
|
} = _ref;
|
|
108
101
|
value = value && value.format(dateFormat);
|
|
109
|
-
return /*#__PURE__*/
|
|
102
|
+
return /*#__PURE__*/React.createElement("span", {
|
|
110
103
|
tabIndex: "0",
|
|
111
104
|
onFocus: this.onFocusDatePicker
|
|
112
|
-
}, /*#__PURE__*/
|
|
105
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
113
106
|
readOnly: true,
|
|
114
107
|
tabIndex: "-1",
|
|
115
108
|
className: "form-control",
|
|
116
|
-
placeholder:
|
|
109
|
+
placeholder: intl.get('Please_select'),
|
|
117
110
|
value: value || '',
|
|
118
111
|
onMouseDown: this.handleMouseDown
|
|
119
|
-
}), /*#__PURE__*/
|
|
112
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
120
113
|
ref: this.calendarContainerRef
|
|
121
114
|
}));
|
|
122
115
|
});
|
|
123
116
|
}
|
|
124
117
|
}
|
|
125
|
-
|
|
118
|
+
export default DateEditorPopover;
|
|
@@ -1,24 +1,17 @@
|
|
|
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 _components = require("../../../components");
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { DTableSelect } from '../../../components';
|
|
11
4
|
function ColumnSettings(props) {
|
|
12
5
|
const {
|
|
13
6
|
columnsOptions,
|
|
14
7
|
selectedColumnOption,
|
|
15
8
|
onChangeSelectedColumn
|
|
16
9
|
} = props;
|
|
17
|
-
return /*#__PURE__*/
|
|
10
|
+
return /*#__PURE__*/React.createElement(DTableSelect, {
|
|
18
11
|
value: selectedColumnOption,
|
|
19
12
|
options: columnsOptions,
|
|
20
|
-
placeholder:
|
|
13
|
+
placeholder: intl.get('Select_a_column'),
|
|
21
14
|
onChange: onChangeSelectedColumn
|
|
22
15
|
});
|
|
23
16
|
}
|
|
24
|
-
|
|
17
|
+
export default ColumnSettings;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 _statisticCustomTitleModule = _interopRequireDefault(require("../../../assets/css/statistic-custom-title.module.css"));
|
|
12
|
-
class CustomTitleSetting extends _react.default.Component {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Input } from 'reactstrap';
|
|
3
|
+
import intl from 'react-intl-universal';
|
|
4
|
+
import styles from '../../../assets/css/statistic-custom-title.module.css';
|
|
5
|
+
class CustomTitleSetting extends React.Component {
|
|
13
6
|
constructor(props) {
|
|
14
7
|
super(props);
|
|
15
8
|
this.onKeyDown = event => {
|
|
@@ -48,9 +41,9 @@ class CustomTitleSetting extends _react.default.Component {
|
|
|
48
41
|
const {
|
|
49
42
|
titleName
|
|
50
43
|
} = this.state;
|
|
51
|
-
return /*#__PURE__*/
|
|
52
|
-
className:
|
|
53
|
-
}, /*#__PURE__*/
|
|
44
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
45
|
+
className: styles['custom-title']
|
|
46
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Custom_title')), /*#__PURE__*/React.createElement(Input, {
|
|
54
47
|
autoComplete: "off",
|
|
55
48
|
value: titleName,
|
|
56
49
|
onChange: this.onChange,
|
|
@@ -59,4 +52,4 @@ class CustomTitleSetting extends _react.default.Component {
|
|
|
59
52
|
}));
|
|
60
53
|
}
|
|
61
54
|
}
|
|
62
|
-
|
|
55
|
+
export default CustomTitleSetting;
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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 _components = require("../../../components");
|
|
12
|
-
var _constants = require("../../../constants");
|
|
13
|
-
class DataSort extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { SeaTableRadio } from '../../../components';
|
|
4
|
+
import { DATA_SORT_TYPE, DATA_SORT_TYPES, DATA_SORT_TYPE_LABEL } from '../../../constants';
|
|
5
|
+
class DataSort extends Component {
|
|
14
6
|
constructor(props) {
|
|
15
7
|
super(props);
|
|
16
8
|
this.onChangeSortType = type => {
|
|
@@ -25,7 +17,7 @@ class DataSort extends _react.Component {
|
|
|
25
17
|
sortType: type
|
|
26
18
|
}, () => {
|
|
27
19
|
this.props.updateStatItem(Object.assign({}, statItem, {
|
|
28
|
-
sort_type: type ===
|
|
20
|
+
sort_type: type === DATA_SORT_TYPE.NOT_SORTED ? '' : type
|
|
29
21
|
}));
|
|
30
22
|
});
|
|
31
23
|
};
|
|
@@ -36,26 +28,26 @@ class DataSort extends _react.Component {
|
|
|
36
28
|
sort_type: _sort_type
|
|
37
29
|
} = _statItem;
|
|
38
30
|
this.state = {
|
|
39
|
-
sortType: _sort_type ||
|
|
31
|
+
sortType: _sort_type || DATA_SORT_TYPE.NOT_SORTED
|
|
40
32
|
};
|
|
41
33
|
}
|
|
42
34
|
render() {
|
|
43
35
|
const {
|
|
44
36
|
sortType
|
|
45
37
|
} = this.state;
|
|
46
|
-
return /*#__PURE__*/
|
|
38
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
47
39
|
className: "statistic-chart-parameter-item"
|
|
48
|
-
}, /*#__PURE__*/
|
|
40
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Data_sorting')), DATA_SORT_TYPES.map((item, index) => {
|
|
49
41
|
let isChecked = sortType === item;
|
|
50
|
-
return /*#__PURE__*/
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
51
43
|
key: 'chart-group-item-' + index,
|
|
52
44
|
className: 'chart-group-item'
|
|
53
|
-
}, /*#__PURE__*/
|
|
45
|
+
}, /*#__PURE__*/React.createElement(SeaTableRadio, {
|
|
54
46
|
isChecked: isChecked,
|
|
55
47
|
onCheckedChange: this.onChangeSortType.bind(this, item),
|
|
56
|
-
label:
|
|
48
|
+
label: intl.get(DATA_SORT_TYPE_LABEL[item])
|
|
57
49
|
}));
|
|
58
50
|
}));
|
|
59
51
|
}
|
|
60
52
|
}
|
|
61
|
-
|
|
53
|
+
export default DataSort;
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
class IndToggleSetting extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
class IndToggleSetting extends Component {
|
|
10
3
|
render() {
|
|
11
4
|
const {
|
|
12
5
|
handleToggleChange,
|
|
@@ -14,22 +7,22 @@ class IndToggleSetting extends _react.Component {
|
|
|
14
7
|
label
|
|
15
8
|
} = this.props;
|
|
16
9
|
const value = isChecked || false;
|
|
17
|
-
return /*#__PURE__*/
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
18
11
|
className: "statistic-toggle-parameter individual-toggle-parameter d-block"
|
|
19
|
-
}, /*#__PURE__*/
|
|
12
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
20
13
|
className: "custom-switch d-flex justify-content-between align-items-start"
|
|
21
|
-
}, /*#__PURE__*/
|
|
14
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
22
15
|
type: "checkbox",
|
|
23
16
|
className: "custom-switch-input",
|
|
24
17
|
checked: value,
|
|
25
18
|
value: value,
|
|
26
19
|
onChange: handleToggleChange,
|
|
27
20
|
name: "custom-switch-checkbox"
|
|
28
|
-
}), /*#__PURE__*/
|
|
21
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
29
22
|
className: "custom-switch-description m-0"
|
|
30
|
-
}, label), /*#__PURE__*/
|
|
23
|
+
}, label), /*#__PURE__*/React.createElement("span", {
|
|
31
24
|
className: "custom-switch-indicator ml-2"
|
|
32
25
|
})));
|
|
33
26
|
}
|
|
34
27
|
}
|
|
35
|
-
|
|
28
|
+
export default IndToggleSetting;
|
|
@@ -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 _reactstrap = require("reactstrap");
|
|
11
|
-
var _reactIntlUniversal = _interopRequireDefault(require("react-intl-universal"));
|
|
12
|
-
class MinMaxSetting extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { Form, FormGroup, Label, Input } from 'reactstrap';
|
|
3
|
+
import intl from 'react-intl-universal';
|
|
4
|
+
class MinMaxSetting extends Component {
|
|
13
5
|
constructor(props) {
|
|
14
6
|
super(props);
|
|
15
7
|
this.onMinChange = e => {
|
|
@@ -36,20 +28,20 @@ class MinMaxSetting extends _react.Component {
|
|
|
36
28
|
min,
|
|
37
29
|
max
|
|
38
30
|
} = this.state;
|
|
39
|
-
return /*#__PURE__*/
|
|
31
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
40
32
|
className: "mt-2"
|
|
41
|
-
}, /*#__PURE__*/
|
|
33
|
+
}, /*#__PURE__*/React.createElement(FormGroup, {
|
|
42
34
|
className: "mb-2"
|
|
43
|
-
}, /*#__PURE__*/
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
44
36
|
for: "min"
|
|
45
|
-
},
|
|
37
|
+
}, intl.get('Min')), /*#__PURE__*/React.createElement(Input, {
|
|
46
38
|
id: "min",
|
|
47
39
|
type: "number",
|
|
48
40
|
value: min,
|
|
49
41
|
onChange: this.onMinChange
|
|
50
|
-
})), /*#__PURE__*/
|
|
42
|
+
})), /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, {
|
|
51
43
|
for: "max"
|
|
52
|
-
},
|
|
44
|
+
}, intl.get('Max')), /*#__PURE__*/React.createElement(Input, {
|
|
53
45
|
id: "max",
|
|
54
46
|
type: "number",
|
|
55
47
|
value: max,
|
|
@@ -57,4 +49,4 @@ class MinMaxSetting extends _react.Component {
|
|
|
57
49
|
})));
|
|
58
50
|
}
|
|
59
51
|
}
|
|
60
|
-
|
|
52
|
+
export default MinMaxSetting;
|
|
@@ -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 _components = require("../../../components");
|
|
12
|
-
var _constants = require("../../../constants");
|
|
13
|
-
var _statisticNumericColumnItemModule = _interopRequireDefault(require("../../../assets/css/statistic-numeric-column-item.module.css"));
|
|
14
|
-
class NumericSummaryItem extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import intl from 'react-intl-universal';
|
|
3
|
+
import { DTableSelect } from '../../../components';
|
|
4
|
+
import { TIME_COLUMN_LIST, STAT_TYPE } from '../../../constants';
|
|
5
|
+
import style from '../../../assets/css/statistic-numeric-column-item.module.css';
|
|
6
|
+
class NumericSummaryItem extends Component {
|
|
15
7
|
constructor(_props) {
|
|
16
8
|
super(_props);
|
|
17
9
|
this.getSelectedColumnOption = props => {
|
|
@@ -31,7 +23,7 @@ class NumericSummaryItem extends _react.Component {
|
|
|
31
23
|
summaryMethodOptions
|
|
32
24
|
} = props;
|
|
33
25
|
const selectedColumnOption = this.getSelectedColumnOption(props);
|
|
34
|
-
if (selectedColumnOption &&
|
|
26
|
+
if (selectedColumnOption && TIME_COLUMN_LIST.includes(selectedColumnOption.value.type)) {
|
|
35
27
|
return summaryMethodOptions.filter(option => {
|
|
36
28
|
return option.value !== 'Mean' && option.value !== 'Sum';
|
|
37
29
|
});
|
|
@@ -84,40 +76,40 @@ class NumericSummaryItem extends _react.Component {
|
|
|
84
76
|
const {
|
|
85
77
|
isExpand
|
|
86
78
|
} = this.state;
|
|
87
|
-
return /*#__PURE__*/
|
|
79
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
88
80
|
style: {
|
|
89
81
|
paddingBottom: isExpand ? '14px' : '7px'
|
|
90
82
|
},
|
|
91
|
-
className: "".concat(
|
|
92
|
-
}, /*#__PURE__*/
|
|
93
|
-
className:
|
|
94
|
-
}, /*#__PURE__*/
|
|
83
|
+
className: "".concat(style['container'], " statistic-chart-parameter-item")
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
85
|
+
className: style['item-title']
|
|
86
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
95
87
|
className: "title-item title-left"
|
|
96
|
-
}, /*#__PURE__*/
|
|
88
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
97
89
|
onClick: this.onToggleExpand,
|
|
98
|
-
className: "".concat(
|
|
99
|
-
}), /*#__PURE__*/
|
|
90
|
+
className: "".concat(style['icon'], " dtable-font ").concat(isExpand ? 'dtable-icon-drop-down' : 'dtable-icon-right-slide')
|
|
91
|
+
}), /*#__PURE__*/React.createElement("label", null, (statItem.type === STAT_TYPE.PIVOT_TABLE ? intl.get('Summary_column') : intl.get('Numeric_column')) + (1 + index))), /*#__PURE__*/React.createElement("span", {
|
|
100
92
|
className: "title-item title-right"
|
|
101
|
-
}, index !== 0 && /*#__PURE__*/
|
|
93
|
+
}, index !== 0 && /*#__PURE__*/React.createElement("i", {
|
|
102
94
|
onClick: () => this.onDeleteNumericColumnItem(index),
|
|
103
|
-
className: "".concat(
|
|
104
|
-
}))), /*#__PURE__*/
|
|
105
|
-
className: isExpand ?
|
|
106
|
-
}, /*#__PURE__*/
|
|
107
|
-
className: "".concat(
|
|
108
|
-
}, /*#__PURE__*/
|
|
95
|
+
className: "".concat(style['close-icon'], " dtable-font dtable-icon-fork-number")
|
|
96
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: isExpand ? style['expanded-numeric-summary-content'] : style['collapsed-numeric-summary-content']
|
|
98
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
99
|
+
className: "".concat(style['select-item'], " numeric-column")
|
|
100
|
+
}, /*#__PURE__*/React.createElement(DTableSelect, {
|
|
109
101
|
className: 'number-column-selector',
|
|
110
102
|
value: selectedColumnOption,
|
|
111
|
-
placeholder:
|
|
103
|
+
placeholder: intl.get('Select_a_column'),
|
|
112
104
|
onChange: onChangeColumnOption.bind(this, index),
|
|
113
105
|
options: numericColumnsOptions
|
|
114
|
-
})), /*#__PURE__*/
|
|
115
|
-
className: "".concat(
|
|
116
|
-
}, /*#__PURE__*/
|
|
106
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
107
|
+
className: "".concat(style['select-item'], " ").concat(style['summary-method'])
|
|
108
|
+
}, /*#__PURE__*/React.createElement("label", null, intl.get('Summary_method')), /*#__PURE__*/React.createElement(DTableSelect, {
|
|
117
109
|
value: selectedSummaryMethodOption,
|
|
118
110
|
onChange: onChangeSummaryMethod.bind(this, index),
|
|
119
111
|
options: this.summaryMethodOptions
|
|
120
112
|
}))));
|
|
121
113
|
}
|
|
122
114
|
}
|
|
123
|
-
|
|
115
|
+
export default NumericSummaryItem;
|
|
@@ -1,33 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
class ToggleSetting extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
class ToggleSetting extends Component {
|
|
10
3
|
render() {
|
|
11
4
|
const {
|
|
12
5
|
handleToggleChange,
|
|
13
6
|
isChecked,
|
|
14
7
|
label
|
|
15
8
|
} = this.props;
|
|
16
|
-
return /*#__PURE__*/
|
|
9
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
17
10
|
className: "statistic-toggle-parameter"
|
|
18
|
-
}, /*#__PURE__*/
|
|
11
|
+
}, /*#__PURE__*/React.createElement("label", {
|
|
19
12
|
className: "custom-switch"
|
|
20
|
-
}, /*#__PURE__*/
|
|
13
|
+
}, /*#__PURE__*/React.createElement("input", {
|
|
21
14
|
type: "checkbox",
|
|
22
15
|
className: "custom-switch-input",
|
|
23
16
|
checked: isChecked,
|
|
24
17
|
onChange: handleToggleChange,
|
|
25
18
|
name: "custom-switch-checkbox"
|
|
26
|
-
}), /*#__PURE__*/
|
|
19
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
27
20
|
className: "custom-switch-indicator"
|
|
28
|
-
}), /*#__PURE__*/
|
|
21
|
+
}), /*#__PURE__*/React.createElement("span", {
|
|
29
22
|
className: "custom-switch-description text-truncate"
|
|
30
23
|
}, label)));
|
|
31
24
|
}
|
|
32
25
|
}
|
|
33
|
-
|
|
26
|
+
export default ToggleSetting;
|