sea-chart 2.0.36 → 2.0.38
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/dist/api/index.js +8 -15
- package/dist/components/cell-factory/FormatterConfig.js +55 -62
- package/dist/components/cell-factory/SimpleCellFormatter.js +5 -12
- package/dist/components/cell-factory/SingleSelectOption.js +11 -18
- package/dist/components/cell-factory/cell-editor-factory.js +5 -12
- package/dist/components/cell-factory/cell-formatter-factory.js +4 -11
- package/dist/components/cell-factory/link-content.js +30 -38
- package/dist/components/chart-color-selector/color-selector.js +11 -18
- package/dist/components/collaborator/index.js +7 -14
- package/dist/components/color-picker/index.js +12 -19
- package/dist/components/color-popover/color-rules/color-rule.js +26 -34
- package/dist/components/color-popover/color-rules/index.js +7 -15
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +27 -34
- package/dist/components/color-popover/color-rules/rule-filters/index.js +17 -25
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +9 -17
- package/dist/components/color-popover/color-rules-popover.js +30 -38
- package/dist/components/color-popover/color-selector-popover.js +12 -20
- package/dist/components/color-setting/color-group-selector.js +13 -21
- package/dist/components/common-add-tool/index.js +8 -15
- package/dist/components/data-process-setter/data-setting-header.js +7 -14
- package/dist/components/data-process-setter/hide-column-setter.js +13 -20
- package/dist/components/data-process-setter/index.js +4 -27
- package/dist/components/data-process-setter/sort-setter.js +18 -26
- package/dist/components/draggable/Draggable.js +7 -13
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +40 -48
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +10 -18
- package/dist/components/drill-down-settings/index.js +11 -18
- package/dist/components/dtable-popover/index.js +13 -20
- package/dist/components/dtable-search-input/index.js +13 -21
- package/dist/components/font-settings/index.js +14 -22
- package/dist/components/goal-line-setting/goal-setting-item.js +6 -14
- package/dist/components/goal-line-setting/index.js +12 -19
- package/dist/components/highlighter/highlighter.js +7 -14
- package/dist/components/icon/index.js +5 -12
- package/dist/components/index.js +7 -48
- package/dist/components/loading/index.js +6 -13
- package/dist/components/number-input/index.js +4 -11
- package/dist/components/pixel-editor/index.js +15 -23
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +8 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +26 -34
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +55 -65
- package/dist/components/resize-handle/ResizeHandle.js +6 -13
- package/dist/components/row-card/row-card-header-cell.js +17 -24
- package/dist/components/row-card/row-card-header.js +15 -22
- package/dist/components/row-card/row-card-item.js +35 -43
- package/dist/components/row-card/row-card.js +17 -25
- package/dist/components/statistic-record-dialog/index.js +56 -64
- package/dist/components/tooltip/index.js +14 -21
- package/dist/components/types-dialog/index.js +62 -70
- package/dist/components/types-dialog/use-force-update.js +4 -10
- package/dist/constants/color-rules.js +8 -14
- package/dist/constants/common-constants.js +8 -14
- package/dist/constants/error.js +2 -8
- package/dist/constants/geolocation.js +9 -15
- package/dist/constants/index.js +142 -271
- package/dist/constants/key-codes.js +0 -2
- package/dist/constants/model.js +3 -9
- package/dist/constants/regions.js +3 -8
- package/dist/constants/style.js +6 -12
- package/dist/constants/table.js +1 -7
- package/dist/constants/type-image.js +33 -39
- package/dist/constants/type.js +3 -9
- package/dist/context.js +13 -20
- package/dist/editor/index.js +8 -15
- package/dist/index.js +13 -104
- package/dist/intl.js +10 -17
- package/dist/locale/index.js +16 -23
- package/dist/locale/lang/de.js +1 -7
- package/dist/locale/lang/en.js +1 -7
- package/dist/locale/lang/es.js +1 -7
- package/dist/locale/lang/fr.js +1 -7
- package/dist/locale/lang/pt.js +1 -7
- package/dist/locale/lang/ru.js +1 -7
- package/dist/locale/lang/zh_CN.js +1 -7
- package/dist/model/area-group.js +12 -19
- package/dist/model/area.js +12 -19
- package/dist/model/bar-custom.js +11 -18
- package/dist/model/bar-group.js +12 -19
- package/dist/model/bar-stack.js +10 -17
- package/dist/model/bar.js +11 -18
- package/dist/model/base-model.js +4 -11
- package/dist/model/basic-number-card.js +13 -20
- package/dist/model/chart.js +7 -13
- package/dist/model/combination.js +15 -22
- package/dist/model/compare-bar.js +14 -21
- package/dist/model/completeness-group.js +11 -18
- package/dist/model/completeness.js +10 -17
- package/dist/model/dashboard.js +7 -14
- package/dist/model/funnel.js +14 -21
- package/dist/model/generic-model.js +135 -143
- package/dist/model/heat-map.js +9 -16
- package/dist/model/horizontal-bar.js +11 -18
- package/dist/model/horizontal-group-bar.js +10 -17
- package/dist/model/index.js +69 -93
- package/dist/model/line-group.js +13 -20
- package/dist/model/line.js +12 -19
- package/dist/model/map-bubble.js +12 -19
- package/dist/model/map.js +12 -19
- package/dist/model/mirror.js +13 -20
- package/dist/model/pie.js +12 -19
- package/dist/model/ring.js +12 -19
- package/dist/model/scatter.js +10 -17
- package/dist/model/stacked-horizontal-bar.js +11 -18
- package/dist/model/table-element.js +5 -12
- package/dist/model/table.js +7 -14
- package/dist/model/tree-map.js +7 -14
- package/dist/model/trend.js +11 -18
- package/dist/model/user.js +1 -7
- package/dist/model/world-map-bubble.js +12 -19
- package/dist/model/world-map.js +12 -19
- package/dist/services/map-json.js +11 -17
- package/dist/settings/advance-bar-settings/data-settings.js +36 -44
- package/dist/settings/advance-bar-settings/index.js +3 -20
- package/dist/settings/advance-bar-settings/style-settings.js +63 -71
- package/dist/settings/bar-settings/data-settings.js +39 -47
- package/dist/settings/bar-settings/index.js +3 -20
- package/dist/settings/bar-settings/style-settings.js +49 -57
- package/dist/settings/basic-number-card/data-settings.js +49 -57
- package/dist/settings/basic-number-card/index.js +3 -20
- package/dist/settings/basic-number-card/style-settings.js +19 -27
- package/dist/settings/combination-settings/data-settings.js +55 -63
- package/dist/settings/combination-settings/index.js +3 -20
- package/dist/settings/combination-settings/style-settings.js +65 -73
- package/dist/settings/completeness-settings/callbacks/callbacks.js +16 -27
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +21 -28
- package/dist/settings/completeness-settings/data-settings/data-settings.js +25 -32
- package/dist/settings/completeness-settings/index.js +3 -20
- package/dist/settings/completeness-settings/style-settings.js +19 -26
- package/dist/settings/dashboard-settings/data-settings.js +43 -51
- package/dist/settings/dashboard-settings/index.js +2 -13
- package/dist/settings/data-settings.js +72 -79
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +12 -19
- package/dist/settings/funnel-settings/components/dnd-list.js +15 -23
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +32 -40
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +20 -28
- package/dist/settings/funnel-settings/data-settings.js +23 -31
- package/dist/settings/funnel-settings/index.js +3 -20
- package/dist/settings/funnel-settings/style-settings.js +11 -19
- package/dist/settings/heat-map-settings/data-settings.js +18 -26
- package/dist/settings/heat-map-settings/index.js +3 -20
- package/dist/settings/heat-map-settings/style-settings.js +18 -26
- package/dist/settings/horizontal-bar-settings/data-settings.js +12 -19
- package/dist/settings/horizontal-bar-settings/index.js +3 -20
- package/dist/settings/horizontal-bar-settings/style-settings.js +12 -19
- package/dist/settings/index.js +52 -70
- package/dist/settings/map-settings/components/location-field-selector.js +10 -17
- package/dist/settings/map-settings/components/map-level-selector.js +11 -18
- package/dist/settings/map-settings/components/map-province-city-selector.js +19 -26
- package/dist/settings/map-settings/index.js +3 -20
- package/dist/settings/map-settings/map-data-settings.js +23 -30
- package/dist/settings/map-settings/map-style-settings.js +27 -35
- package/dist/settings/mirror-settings/data-settings.js +26 -34
- package/dist/settings/mirror-settings/index.js +2 -13
- package/dist/settings/pie-settings/data-settings.js +33 -41
- package/dist/settings/pie-settings/index.js +3 -20
- package/dist/settings/pie-settings/style-settings.js +47 -55
- package/dist/settings/scatter/data-settings.js +27 -34
- package/dist/settings/scatter/index.js +3 -12
- package/dist/settings/stacks-settings/index.js +19 -27
- package/dist/settings/stacks-settings/stack-item-settings.js +19 -27
- package/dist/settings/style-settings.js +65 -73
- package/dist/settings/table-element-settings/components/data-filter.js +30 -38
- package/dist/settings/table-element-settings/data-settings.js +21 -29
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +112 -120
- package/dist/settings/table-settings/index.js +2 -13
- package/dist/settings/time-comparison-settings/data-settings.js +43 -51
- package/dist/settings/time-comparison-settings/index.js +3 -20
- package/dist/settings/time-comparison-settings/style-settings.js +42 -50
- package/dist/settings/trend-settings/data-settings.js +24 -32
- package/dist/settings/trend-settings/index.js +3 -20
- package/dist/settings/trend-settings/style-setting.js +19 -27
- package/dist/settings/widgets/basic-summary/index.js +55 -63
- package/dist/settings/widgets/chart-type/index.js +18 -26
- package/dist/settings/widgets/color-settings/index.js +72 -80
- package/dist/settings/widgets/common-data-settings.js +21 -29
- package/dist/settings/widgets/data-filter/index.js +35 -43
- package/dist/settings/widgets/data-sort.js +16 -24
- package/dist/settings/widgets/date-summary-item.js +26 -34
- package/dist/settings/widgets/display-values-settings/index.js +14 -22
- package/dist/settings/widgets/divider/index.js +8 -16
- package/dist/settings/widgets/font-settings/font-color-settings.js +11 -19
- package/dist/settings/widgets/font-settings/font-size-settings.js +14 -22
- package/dist/settings/widgets/font-settings/font-weight-settings.js +17 -25
- package/dist/settings/widgets/font-settings/index.js +4 -27
- package/dist/settings/widgets/group-by.js +51 -59
- package/dist/settings/widgets/min-max-setting.js +10 -18
- package/dist/settings/widgets/mininum-slice-percent.js +10 -18
- package/dist/settings/widgets/numeric-summary-item.js +25 -33
- package/dist/settings/widgets/select-line-type/index.js +10 -17
- package/dist/settings/widgets/select-table/index.js +9 -16
- package/dist/settings/widgets/select-view/index.js +20 -28
- package/dist/settings/widgets/stack.js +14 -22
- package/dist/settings/widgets/summary-method-setting.js +17 -25
- package/dist/settings/widgets/summary-settings.js +74 -82
- package/dist/settings/widgets/switch/index.js +9 -16
- package/dist/settings/widgets/text-horizontal-settings.js +15 -23
- package/dist/settings/widgets/time-picker.js +29 -37
- package/dist/settings/widgets/title-settings/index.js +29 -37
- package/dist/settings/widgets/title-settings/title-text.js +5 -12
- package/dist/settings/widgets/x-axios.js +0 -1
- package/dist/settings/widgets/y-axis-group-settings.js +64 -72
- package/dist/utils/cell-format-utils.js +17 -27
- package/dist/utils/cell-value-utils.js +4 -11
- package/dist/utils/chart-utils/base-utils.js +324 -332
- package/dist/utils/chart-utils/index.js +28 -41
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +77 -84
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +13 -20
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +45 -52
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +21 -28
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +33 -40
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +16 -23
- package/dist/utils/chart-utils/original-data-utils/index.js +50 -57
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +90 -96
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +19 -26
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +31 -38
- package/dist/utils/chart-utils/sql-statistics-utils.js +229 -237
- package/dist/utils/chart.js +9 -17
- package/dist/utils/collaborator-manager.js +3 -9
- package/dist/utils/collaborator-utils.js +19 -31
- package/dist/utils/collaborator.js +6 -15
- package/dist/utils/color-utils.js +18 -29
- package/dist/utils/column-utils.js +77 -104
- package/dist/utils/common-utils.js +28 -53
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +5 -12
- package/dist/utils/date-translate.js +12 -20
- package/dist/utils/digital-sign-utils.js +7 -14
- package/dist/utils/event-bus.js +1 -7
- package/dist/utils/hotkey.js +5 -11
- package/dist/utils/index.js +54 -221
- package/dist/utils/key-generator.js +2 -9
- package/dist/utils/map.js +22 -31
- package/dist/utils/object-utils.js +2 -8
- package/dist/utils/options-utils.js +10 -18
- package/dist/utils/row-record-utils.js +166 -178
- package/dist/utils/row-utils.js +27 -38
- package/dist/utils/search.js +24 -32
- package/dist/utils/sql/chart-data-sql.js +106 -112
- package/dist/utils/sql/column-2-sql-column.js +158 -168
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +39 -47
- package/dist/view/index.js +90 -96
- package/dist/view/title/index.js +16 -24
- package/dist/view/wrapper/area-group.js +45 -53
- package/dist/view/wrapper/area.js +43 -51
- package/dist/view/wrapper/bar-compare.js +38 -46
- package/dist/view/wrapper/bar-custom-stack.js +39 -47
- package/dist/view/wrapper/bar-group.js +45 -53
- package/dist/view/wrapper/bar-stack.js +48 -56
- package/dist/view/wrapper/bar.js +40 -48
- package/dist/view/wrapper/basic-number-card.js +26 -34
- package/dist/view/wrapper/chart-component.js +123 -131
- package/dist/view/wrapper/combination.js +55 -63
- package/dist/view/wrapper/completeness-group.js +40 -48
- package/dist/view/wrapper/completeness.js +36 -44
- package/dist/view/wrapper/dashboard.js +39 -44
- package/dist/view/wrapper/funnel.js +40 -43
- package/dist/view/wrapper/heat-map.js +62 -70
- package/dist/view/wrapper/horizontal-bar-group.js +52 -60
- package/dist/view/wrapper/horizontal-bar-stack.js +47 -55
- package/dist/view/wrapper/horizontal-bar.js +41 -49
- package/dist/view/wrapper/index.js +107 -115
- package/dist/view/wrapper/line-group.js +43 -51
- package/dist/view/wrapper/line.js +42 -50
- package/dist/view/wrapper/map-bubble.js +40 -48
- package/dist/view/wrapper/map-world-bubble.js +39 -47
- package/dist/view/wrapper/map-world.js +41 -49
- package/dist/view/wrapper/map.js +42 -50
- package/dist/view/wrapper/mirror.js +41 -49
- package/dist/view/wrapper/pie.js +44 -52
- package/dist/view/wrapper/ring.js +49 -57
- package/dist/view/wrapper/scatter.js +42 -50
- package/dist/view/wrapper/table/index.js +14 -22
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +49 -57
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +53 -61
- package/dist/view/wrapper/table/pivot-table-display-name.js +82 -90
- package/dist/view/wrapper/table/two-dimension-table.js +85 -93
- package/dist/view/wrapper/table-element/components/dataset-utils.js +23 -36
- package/dist/view/wrapper/table-element/components/formatter.js +90 -99
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +23 -32
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/formula-formatter.js +9 -16
- package/dist/view/wrapper/table-element/components/link-formatter.js +90 -97
- package/dist/view/wrapper/table-element/components/record.js +13 -20
- package/dist/view/wrapper/table-element/components/records-body.js +9 -17
- package/dist/view/wrapper/table-element/components/records-header/index.js +7 -15
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +8 -16
- package/dist/view/wrapper/table-element/components/records.js +25 -33
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +5 -12
- package/dist/view/wrapper/table-element/components/utils.js +6 -16
- package/dist/view/wrapper/table-element/components/value-display-utils.js +4 -11
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +6 -13
- package/dist/view/wrapper/table-element/index.js +18 -26
- package/dist/view/wrapper/treemap.js +38 -46
- package/dist/view/wrapper/trend.js +58 -66
- package/package.json +5 -5
|
@@ -1,33 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
var _DTableCustomizeSelect2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableCustomizeSelect"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _reactstrap = require("reactstrap");
|
|
13
|
-
var _utils = require("../../../utils");
|
|
14
|
-
var _intl = _interopRequireDefault(require("../../../intl"));
|
|
1
|
+
import _DTableCustomizeSelect from "dtable-ui-component/lib/DTableCustomizeSelect";
|
|
2
|
+
import React, { useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { Label } from 'reactstrap';
|
|
5
|
+
import { generatorCommonOptions } from '../../../utils';
|
|
6
|
+
import intl from '../../../intl';
|
|
15
7
|
const FontWeightSettings = props => {
|
|
16
|
-
const [fontWeight, setFontWeight] =
|
|
17
|
-
const mountRef =
|
|
18
|
-
|
|
8
|
+
const [fontWeight, setFontWeight] = useState(props.fontWeight);
|
|
9
|
+
const mountRef = useRef(false);
|
|
10
|
+
useEffect(() => {
|
|
19
11
|
if (!mountRef.current) {
|
|
20
12
|
mountRef.current = true;
|
|
21
13
|
} else {
|
|
22
14
|
setFontWeight(props.fontWeight);
|
|
23
15
|
}
|
|
24
16
|
}, [props.fontWeight]);
|
|
25
|
-
const fontWeightOptions =
|
|
26
|
-
return
|
|
17
|
+
const fontWeightOptions = useMemo(() => {
|
|
18
|
+
return generatorCommonOptions(props.supportFontWeights, fontWeight);
|
|
27
19
|
}, [props.supportFontWeights, fontWeight]);
|
|
28
|
-
const selectedFontWeightOption =
|
|
20
|
+
const selectedFontWeightOption = useMemo(() => {
|
|
29
21
|
return {
|
|
30
|
-
label: /*#__PURE__*/
|
|
22
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
31
23
|
className: "common-selected-font"
|
|
32
24
|
}, fontWeight)
|
|
33
25
|
};
|
|
@@ -40,13 +32,13 @@ const FontWeightSettings = props => {
|
|
|
40
32
|
setFontWeight(nextFontWeight);
|
|
41
33
|
props.modifyFontWeight(nextFontWeight);
|
|
42
34
|
};
|
|
43
|
-
return /*#__PURE__*/
|
|
44
|
-
className: (
|
|
45
|
-
}, /*#__PURE__*/
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
36
|
+
className: classnames('setting-item sea-chart-font-weight-setting', props.className)
|
|
37
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Font_weight')), /*#__PURE__*/React.createElement(_DTableCustomizeSelect, {
|
|
46
38
|
className: "sea-chart-font-weight",
|
|
47
39
|
value: selectedFontWeightOption,
|
|
48
40
|
options: fontWeightOptions,
|
|
49
41
|
onSelectOption: modifyFontWeight
|
|
50
42
|
}));
|
|
51
43
|
};
|
|
52
|
-
|
|
44
|
+
export default FontWeightSettings;
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "FontColorSettings", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _fontColorSettings.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "FontSizeSettings", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _fontSizeSettings.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
Object.defineProperty(exports, "FontWeightSettings", {
|
|
20
|
-
enumerable: true,
|
|
21
|
-
get: function () {
|
|
22
|
-
return _fontWeightSettings.default;
|
|
23
|
-
}
|
|
24
|
-
});
|
|
25
|
-
var _fontSizeSettings = _interopRequireDefault(require("./font-size-settings"));
|
|
26
|
-
var _fontWeightSettings = _interopRequireDefault(require("./font-weight-settings"));
|
|
27
|
-
var _fontColorSettings = _interopRequireDefault(require("./font-color-settings"));
|
|
1
|
+
import FontSizeSettings from './font-size-settings';
|
|
2
|
+
import FontWeightSettings from './font-weight-settings';
|
|
3
|
+
import FontColorSettings from './font-color-settings';
|
|
4
|
+
export { FontSizeSettings, FontWeightSettings, FontColorSettings };
|
|
@@ -1,31 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _reactstrap = require("reactstrap");
|
|
15
|
-
var _dtableUtils = require("dtable-utils");
|
|
16
|
-
var _columnUtils = require("../../utils/column-utils");
|
|
17
|
-
var _constants = require("../../constants");
|
|
18
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
19
|
-
class GroupBy extends _react.Component {
|
|
1
|
+
import _DTableSelect from "dtable-ui-component/lib/DTableSelect";
|
|
2
|
+
import _DTableCustomizeSelect from "dtable-ui-component/lib/DTableCustomizeSelect";
|
|
3
|
+
import _DTableColumnIcon from "dtable-ui-component/lib/DTableColumnIcon";
|
|
4
|
+
import React, { Component } from 'react';
|
|
5
|
+
import classnames from 'classnames';
|
|
6
|
+
import { Label, FormGroup } from 'reactstrap';
|
|
7
|
+
import { CellType, DATE_COLUMN_OPTIONS, getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
8
|
+
import { isDateFormulaColumn } from '../../utils/column-utils';
|
|
9
|
+
import { CHART_SUPPORT_COLUMNS, DATE_GRANULATES, GEOLOCATION_GRANULATES, CHART_SUMMARY_SHOW, GEOLOCATION_FORMAT_MAP, CHART_TYPE, TIME_COLUMN_LIST, COMPLETENESS_GROUPBY_SUPPORTED_COLUMN_TYPE, NUMBERIC_COLUMN_TYPE, MIRROR_COLUMN_LIST } from '../../constants';
|
|
10
|
+
import intl from '../../intl';
|
|
11
|
+
class GroupBy extends Component {
|
|
20
12
|
constructor(_props) {
|
|
21
13
|
super(_props);
|
|
22
14
|
this.generatorGranulatesOptions = granulates => {
|
|
23
15
|
return granulates.map(item => {
|
|
24
16
|
return {
|
|
25
17
|
value: item,
|
|
26
|
-
label: /*#__PURE__*/
|
|
18
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
27
19
|
className: "ml-0 select-module select-module-name"
|
|
28
|
-
},
|
|
20
|
+
}, intl.get(CHART_SUMMARY_SHOW[item]))
|
|
29
21
|
};
|
|
30
22
|
});
|
|
31
23
|
};
|
|
@@ -34,7 +26,7 @@ class GroupBy extends _react.Component {
|
|
|
34
26
|
tables,
|
|
35
27
|
selectedTableId
|
|
36
28
|
} = props;
|
|
37
|
-
this.selectedTable =
|
|
29
|
+
this.selectedTable = getTableById(tables, selectedTableId);
|
|
38
30
|
const columns = this.selectedTable && Array.isArray(this.selectedTable.columns) ? this.selectedTable.columns : [];
|
|
39
31
|
this.validColumns = this.getAvailableColumns(columns);
|
|
40
32
|
this.columnOptions = this.getColumnOptions(this.validColumns);
|
|
@@ -47,7 +39,7 @@ class GroupBy extends _react.Component {
|
|
|
47
39
|
this.geolocationGranulatesOptions = [];
|
|
48
40
|
return;
|
|
49
41
|
}
|
|
50
|
-
const groupbyColumn =
|
|
42
|
+
const groupbyColumn = getTableColumnByKey(this.selectedTable, selectedColumnKey);
|
|
51
43
|
if (!groupbyColumn) {
|
|
52
44
|
this.geolocationGranulatesOptions = [];
|
|
53
45
|
return;
|
|
@@ -55,19 +47,19 @@ class GroupBy extends _react.Component {
|
|
|
55
47
|
const {
|
|
56
48
|
geo_format
|
|
57
49
|
} = groupbyColumn.data || {};
|
|
58
|
-
if (geo_format ===
|
|
59
|
-
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(
|
|
50
|
+
if (geo_format === GEOLOCATION_FORMAT_MAP.PROVINCE) {
|
|
51
|
+
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(GEOLOCATION_GRANULATES.filter(item => item === GEOLOCATION_FORMAT_MAP.PROVINCE));
|
|
60
52
|
return;
|
|
61
53
|
}
|
|
62
|
-
if (geo_format ===
|
|
63
|
-
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(
|
|
54
|
+
if (geo_format === GEOLOCATION_FORMAT_MAP.PROVINCE_CITY) {
|
|
55
|
+
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(GEOLOCATION_GRANULATES.filter(item => item === 'district'));
|
|
64
56
|
return;
|
|
65
57
|
}
|
|
66
|
-
if (geo_format ===
|
|
58
|
+
if (geo_format === GEOLOCATION_FORMAT_MAP.COUNTRY_REGION || geo_format === GEOLOCATION_FORMAT_MAP.LNG_LAT) {
|
|
67
59
|
this.geolocationGranulatesOptions = [];
|
|
68
60
|
return;
|
|
69
61
|
}
|
|
70
|
-
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(
|
|
62
|
+
this.geolocationGranulatesOptions = this.generatorGranulatesOptions(GEOLOCATION_GRANULATES);
|
|
71
63
|
};
|
|
72
64
|
this.getAvailableColumns = columns => {
|
|
73
65
|
const {
|
|
@@ -78,16 +70,16 @@ class GroupBy extends _react.Component {
|
|
|
78
70
|
if (!columns || !Array.isArray(columns)) return [];
|
|
79
71
|
let newColumns = [];
|
|
80
72
|
if (isMirror) {
|
|
81
|
-
newColumns = columns.filter(column =>
|
|
73
|
+
newColumns = columns.filter(column => MIRROR_COLUMN_LIST.includes(column.type));
|
|
82
74
|
return newColumns;
|
|
83
75
|
}
|
|
84
76
|
if (onlySupportSingleSelect) {
|
|
85
77
|
newColumns = columns.filter(column => column.type === 'single-select');
|
|
86
78
|
return newColumns;
|
|
87
79
|
}
|
|
88
|
-
newColumns = columns.filter(column =>
|
|
80
|
+
newColumns = columns.filter(column => CHART_SUPPORT_COLUMNS.includes(column.type));
|
|
89
81
|
if (onlySupportDate) {
|
|
90
|
-
return newColumns.filter(column =>
|
|
82
|
+
return newColumns.filter(column => TIME_COLUMN_LIST.includes(column.type));
|
|
91
83
|
}
|
|
92
84
|
return newColumns;
|
|
93
85
|
};
|
|
@@ -99,25 +91,25 @@ class GroupBy extends _react.Component {
|
|
|
99
91
|
let newColumns = columns.map(column => {
|
|
100
92
|
return {
|
|
101
93
|
value: column,
|
|
102
|
-
label: /*#__PURE__*/
|
|
94
|
+
label: /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("span", {
|
|
103
95
|
className: "header-icon"
|
|
104
|
-
}, /*#__PURE__*/
|
|
96
|
+
}, /*#__PURE__*/React.createElement(_DTableColumnIcon, {
|
|
105
97
|
column: column
|
|
106
|
-
})), /*#__PURE__*/
|
|
98
|
+
})), /*#__PURE__*/React.createElement("span", {
|
|
107
99
|
className: 'select-option-name'
|
|
108
100
|
}, column.name))
|
|
109
101
|
};
|
|
110
102
|
});
|
|
111
|
-
if ([
|
|
112
|
-
newColumns = newColumns.filter(column =>
|
|
113
|
-
} else if (type ===
|
|
103
|
+
if ([CHART_TYPE.COMPLETENESS, CHART_TYPE.COMPLETENESS_GROUP].includes(type)) {
|
|
104
|
+
newColumns = newColumns.filter(column => COMPLETENESS_GROUPBY_SUPPORTED_COLUMN_TYPE.includes(column.value.type));
|
|
105
|
+
} else if (type === CHART_TYPE.SCATTER) {
|
|
114
106
|
newColumns = newColumns.filter(column => {
|
|
115
|
-
if (column.value.type ===
|
|
116
|
-
return column.value.data.result_type ===
|
|
117
|
-
} else if (column.value.type ===
|
|
118
|
-
return [
|
|
107
|
+
if (column.value.type === CellType.FORMULA) {
|
|
108
|
+
return column.value.data.result_type === CellType.NUMBER;
|
|
109
|
+
} else if (column.value.type === CellType.LINK_FORMULA) {
|
|
110
|
+
return [CellType.NUMBER, CellType.RATE].includes(column.value.data.array_type);
|
|
119
111
|
} else {
|
|
120
|
-
return
|
|
112
|
+
return NUMBERIC_COLUMN_TYPE.includes(column.value.type);
|
|
121
113
|
}
|
|
122
114
|
});
|
|
123
115
|
}
|
|
@@ -127,9 +119,9 @@ class GroupBy extends _react.Component {
|
|
|
127
119
|
key: '',
|
|
128
120
|
type: 'text'
|
|
129
121
|
},
|
|
130
|
-
label: /*#__PURE__*/
|
|
122
|
+
label: /*#__PURE__*/React.createElement("span", {
|
|
131
123
|
className: "ml-0"
|
|
132
|
-
},
|
|
124
|
+
}, intl.get('Not_used'))
|
|
133
125
|
});
|
|
134
126
|
}
|
|
135
127
|
return newColumns;
|
|
@@ -143,15 +135,15 @@ class GroupBy extends _react.Component {
|
|
|
143
135
|
const options = this.columnOptions.find(option => option.value.key === selectedColumnKey);
|
|
144
136
|
selectedOption = options ? options : null;
|
|
145
137
|
}
|
|
146
|
-
return /*#__PURE__*/
|
|
138
|
+
return /*#__PURE__*/React.createElement(_DTableCustomizeSelect, {
|
|
147
139
|
isLocked: false,
|
|
148
140
|
value: selectedOption,
|
|
149
141
|
options: this.columnOptions,
|
|
150
142
|
onSelectOption: this.props.onGroupByChange,
|
|
151
143
|
isInModal: true,
|
|
152
144
|
searchable: true,
|
|
153
|
-
searchPlaceholder:
|
|
154
|
-
noOptionsPlaceholder:
|
|
145
|
+
searchPlaceholder: intl.get('Select_field'),
|
|
146
|
+
noOptionsPlaceholder: intl.get('No_column')
|
|
155
147
|
});
|
|
156
148
|
};
|
|
157
149
|
this.renderGroupbyDateGranulates = () => {
|
|
@@ -159,9 +151,9 @@ class GroupBy extends _react.Component {
|
|
|
159
151
|
selectedDateGranularity
|
|
160
152
|
} = this.props;
|
|
161
153
|
const selectedOption = this.dateGranulatesOptions.find(option => option.value === selectedDateGranularity);
|
|
162
|
-
return /*#__PURE__*/
|
|
154
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
163
155
|
className: "mt-4 sea-chart-parameter-item"
|
|
164
|
-
}, /*#__PURE__*/
|
|
156
|
+
}, /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
165
157
|
menuPortalTarget: "#sea-chart-settings-content",
|
|
166
158
|
value: selectedOption,
|
|
167
159
|
options: this.dateGranulatesOptions,
|
|
@@ -173,9 +165,9 @@ class GroupBy extends _react.Component {
|
|
|
173
165
|
selectedGeolocationGranularity
|
|
174
166
|
} = this.props;
|
|
175
167
|
const selectedOption = this.geolocationGranulatesOptions.find(option => option.value === selectedGeolocationGranularity);
|
|
176
|
-
return /*#__PURE__*/
|
|
168
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
177
169
|
className: "mt-4 sea-chart-parameter-item"
|
|
178
|
-
}, /*#__PURE__*/
|
|
170
|
+
}, /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
179
171
|
menuPortalTarget: "#sea-chart-settings-content",
|
|
180
172
|
value: selectedOption,
|
|
181
173
|
options: this.geolocationGranulatesOptions,
|
|
@@ -189,14 +181,14 @@ class GroupBy extends _react.Component {
|
|
|
189
181
|
} = this.props;
|
|
190
182
|
if (isMirror) return null;
|
|
191
183
|
if (!selectedColumnKey) return null;
|
|
192
|
-
const groupbyColumn =
|
|
184
|
+
const groupbyColumn = getTableColumnByKey(this.selectedTable, selectedColumnKey);
|
|
193
185
|
if (!groupbyColumn) return null;
|
|
194
186
|
const {
|
|
195
187
|
type: groupbyColumnType
|
|
196
188
|
} = groupbyColumn;
|
|
197
|
-
return /*#__PURE__*/
|
|
189
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, (DATE_COLUMN_OPTIONS.includes(groupbyColumnType) || isDateFormulaColumn(groupbyColumn)) && this.renderGroupbyDateGranulates(), groupbyColumnType === CellType.GEOLOCATION && this.geolocationGranulatesOptions.length > 0 && this.renderGroupbyGeolocationGranulates());
|
|
198
190
|
};
|
|
199
|
-
this.dateGranulatesOptions = this.generatorGranulatesOptions(
|
|
191
|
+
this.dateGranulatesOptions = this.generatorGranulatesOptions(DATE_GRANULATES);
|
|
200
192
|
this.initOptions(_props);
|
|
201
193
|
this.initGeolocationOptions(_props);
|
|
202
194
|
}
|
|
@@ -218,11 +210,11 @@ class GroupBy extends _react.Component {
|
|
|
218
210
|
className,
|
|
219
211
|
isRenderGroupBy = true
|
|
220
212
|
} = this.props;
|
|
221
|
-
return /*#__PURE__*/
|
|
222
|
-
className: (
|
|
213
|
+
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
214
|
+
className: classnames('sea-chart-setting-item table-setting', {
|
|
223
215
|
[className]: className
|
|
224
216
|
})
|
|
225
|
-
}, /*#__PURE__*/
|
|
217
|
+
}, /*#__PURE__*/React.createElement(Label, null, label), this.renderSelector(), isRenderGroupBy && this.renderGroupBy());
|
|
226
218
|
}
|
|
227
219
|
}
|
|
228
|
-
|
|
220
|
+
export default GroupBy;
|
|
@@ -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 _intl = _interopRequireDefault(require("../../intl"));
|
|
12
|
-
class MinMaxSetting extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { FormGroup, Label, Input } from 'reactstrap';
|
|
3
|
+
import intl from '../../intl';
|
|
4
|
+
class MinMaxSetting extends Component {
|
|
13
5
|
constructor(props) {
|
|
14
6
|
super(props);
|
|
15
7
|
this.onMinChange = e => {
|
|
@@ -38,18 +30,18 @@ class MinMaxSetting extends _react.Component {
|
|
|
38
30
|
min,
|
|
39
31
|
max
|
|
40
32
|
} = this.state;
|
|
41
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__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 _reactstrap = require("reactstrap");
|
|
11
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
12
|
-
var _components = require("../../components");
|
|
13
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
14
|
-
class MiniNumSlicePercent extends _react.Component {
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
|
+
import { FormGroup, Label } from 'reactstrap';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import { NumberInput } from '../../components';
|
|
5
|
+
import intl from '../../intl';
|
|
6
|
+
class MiniNumSlicePercent extends Component {
|
|
15
7
|
constructor(props) {
|
|
16
8
|
super(props);
|
|
17
9
|
this.replaceNumberNotAllowInput = value => {
|
|
@@ -57,9 +49,9 @@ class MiniNumSlicePercent extends _react.Component {
|
|
|
57
49
|
value,
|
|
58
50
|
className
|
|
59
51
|
} = this.props;
|
|
60
|
-
return /*#__PURE__*/
|
|
61
|
-
className: (
|
|
62
|
-
}, /*#__PURE__*/
|
|
52
|
+
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
53
|
+
className: classnames('sea-chart-parameter-item', className)
|
|
54
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Minimum_slice_percent')), /*#__PURE__*/React.createElement(NumberInput, {
|
|
63
55
|
value: value,
|
|
64
56
|
onChange: this.onPercentChange,
|
|
65
57
|
step: 0.1,
|
|
@@ -70,4 +62,4 @@ class MiniNumSlicePercent extends _react.Component {
|
|
|
70
62
|
}));
|
|
71
63
|
}
|
|
72
64
|
}
|
|
73
|
-
|
|
65
|
+
export default MiniNumSlicePercent;
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _DTableSelect2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableSelect"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _reactstrap = require("reactstrap");
|
|
12
|
-
var _shallowequal = _interopRequireDefault(require("shallowequal"));
|
|
13
|
-
var _constants = require("../../constants");
|
|
14
|
-
var _utils = require("../../utils");
|
|
15
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
16
|
-
class NumericSummaryItem extends _react.Component {
|
|
1
|
+
import _DTableSelect from "dtable-ui-component/lib/DTableSelect";
|
|
2
|
+
import React, { Component } from 'react';
|
|
3
|
+
import { FormGroup, Label } from 'reactstrap';
|
|
4
|
+
import shallowEqual from 'shallowequal';
|
|
5
|
+
import { CHART_SUMMARY_CALCULATION_METHOD, CHART_SUMMARY_SHOW, CHART_DATE_SUMMARY_CALCULATION_METHOD } from '../../constants';
|
|
6
|
+
import { BaseUtils } from '../../utils';
|
|
7
|
+
import intl from '../../intl';
|
|
8
|
+
class NumericSummaryItem extends Component {
|
|
17
9
|
constructor(_props) {
|
|
18
10
|
super(_props);
|
|
19
11
|
this.initSummaryMethodOptions = props => {
|
|
@@ -22,11 +14,11 @@ class NumericSummaryItem extends _react.Component {
|
|
|
22
14
|
numericColumnOptions
|
|
23
15
|
} = props;
|
|
24
16
|
const selectedOption = numericColumnOptions.find(item => item.value.key === value.column_key);
|
|
25
|
-
const summaryMethodOptions = selectedOption &&
|
|
17
|
+
const summaryMethodOptions = selectedOption && BaseUtils.isDateSummaryColumn(selectedOption.value) ? CHART_DATE_SUMMARY_CALCULATION_METHOD : CHART_SUMMARY_CALCULATION_METHOD;
|
|
26
18
|
this.summaryMethodOptions = summaryMethodOptions.map(item => {
|
|
27
19
|
return {
|
|
28
20
|
value: item,
|
|
29
|
-
label:
|
|
21
|
+
label: intl.get(CHART_SUMMARY_SHOW[item])
|
|
30
22
|
};
|
|
31
23
|
});
|
|
32
24
|
};
|
|
@@ -92,7 +84,7 @@ class NumericSummaryItem extends _react.Component {
|
|
|
92
84
|
this.initSummaryMethodOptions(_props);
|
|
93
85
|
}
|
|
94
86
|
UNSAFE_componentWillReceiveProps(nextProps) {
|
|
95
|
-
if (!(
|
|
87
|
+
if (!shallowEqual(this.props.value, nextProps.value)) {
|
|
96
88
|
this.initSummaryMethodOptions(nextProps);
|
|
97
89
|
}
|
|
98
90
|
}
|
|
@@ -120,34 +112,34 @@ class NumericSummaryItem extends _react.Component {
|
|
|
120
112
|
isExpand
|
|
121
113
|
} = this.state;
|
|
122
114
|
const isFirst = index === 0;
|
|
123
|
-
return /*#__PURE__*/
|
|
115
|
+
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
124
116
|
className: "sea-chart-parameter-item"
|
|
125
|
-
}, /*#__PURE__*/
|
|
117
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
126
118
|
className: "numeric-summary-item d-flex align-items-center justify-content-between w-100"
|
|
127
|
-
}, /*#__PURE__*/
|
|
119
|
+
}, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement("i", {
|
|
128
120
|
onClick: this.onToggleExpand,
|
|
129
|
-
className:
|
|
130
|
-
}), /*#__PURE__*/
|
|
121
|
+
className: `numeric-summary-item-icon dtable-font mr-2 ${isExpand ? 'dtable-icon-drop-down' : 'dtable-icon-right-slide'}`
|
|
122
|
+
}), /*#__PURE__*/React.createElement("span", null, intl.get('Summary_field') + ' ' + (1 + index))), !isFirst && /*#__PURE__*/React.createElement("div", {
|
|
131
123
|
className: "delete-numeric-summary-item-content close d-flex align-items-center justify-content-center",
|
|
132
124
|
onClick: this.handleNumericSummaryItemDelete
|
|
133
|
-
}, /*#__PURE__*/
|
|
125
|
+
}, /*#__PURE__*/React.createElement("i", {
|
|
134
126
|
className: "dtable-font dtable-icon-fork-number delete-icon"
|
|
135
|
-
}))), /*#__PURE__*/
|
|
136
|
-
className:
|
|
137
|
-
}, /*#__PURE__*/
|
|
127
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
128
|
+
className: `pl-4 ${isExpand ? 'expanded-numeric-summary-content' : 'collapsed-numeric-summary-content d-none'}`
|
|
129
|
+
}, /*#__PURE__*/React.createElement(FormGroup, {
|
|
138
130
|
className: "sea-chart-parameter-item numeric-column"
|
|
139
|
-
}, /*#__PURE__*/
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
140
132
|
menuPortalTarget: "#sea-chart-settings-content",
|
|
141
133
|
value: selectedColumnOption,
|
|
142
|
-
placeholder:
|
|
134
|
+
placeholder: intl.get('Select_a_column'),
|
|
143
135
|
onChange: option => this.props.onColumnOptionChange(option, index, selectedColumnOption, currentAxisesIndex),
|
|
144
136
|
options: availableOptions,
|
|
145
137
|
style: {
|
|
146
138
|
color: '#6e7687'
|
|
147
139
|
}
|
|
148
|
-
})), /*#__PURE__*/
|
|
140
|
+
})), /*#__PURE__*/React.createElement(FormGroup, {
|
|
149
141
|
className: "sea-chart-parameter-item summary-method"
|
|
150
|
-
}, /*#__PURE__*/
|
|
142
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Summary_method')), /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
151
143
|
menuPortalTarget: "#sea-chart-settings-content",
|
|
152
144
|
value: selectedSummaryMethodOption,
|
|
153
145
|
onChange: option => this.props.onSummaryMethodChange(option, index),
|
|
@@ -155,4 +147,4 @@ class NumericSummaryItem extends _react.Component {
|
|
|
155
147
|
}))));
|
|
156
148
|
}
|
|
157
149
|
}
|
|
158
|
-
|
|
150
|
+
export default NumericSummaryItem;
|
|
@@ -1,18 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _DTableRadio2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableRadio"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _constants = require("../../../constants");
|
|
12
|
-
var _intl = _interopRequireDefault(require("../../../intl"));
|
|
1
|
+
import _DTableRadio from "dtable-ui-component/lib/DTableRadio";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FormGroup, Label } from 'reactstrap';
|
|
4
|
+
import { CHART_LINE_TYPES } from '../../../constants';
|
|
5
|
+
import intl from '../../../intl';
|
|
13
6
|
function SelectLineType(_ref) {
|
|
14
7
|
let {
|
|
15
|
-
selectedLineType =
|
|
8
|
+
selectedLineType = CHART_LINE_TYPES[1],
|
|
16
9
|
onChange
|
|
17
10
|
} = _ref;
|
|
18
11
|
const onChangeLineType = lineType => {
|
|
@@ -21,14 +14,14 @@ function SelectLineType(_ref) {
|
|
|
21
14
|
line_type: lineType
|
|
22
15
|
});
|
|
23
16
|
};
|
|
24
|
-
return /*#__PURE__*/
|
|
17
|
+
return /*#__PURE__*/React.createElement(FormGroup, null, /*#__PURE__*/React.createElement(Label, null, intl.get('Line_type')), CHART_LINE_TYPES.map((lineType, index) => {
|
|
25
18
|
const isChecked = lineType === selectedLineType;
|
|
26
|
-
return /*#__PURE__*/
|
|
19
|
+
return /*#__PURE__*/React.createElement(_DTableRadio, {
|
|
27
20
|
key: index,
|
|
28
21
|
isChecked: isChecked,
|
|
29
22
|
onCheckedChange: () => onChangeLineType(lineType),
|
|
30
|
-
label:
|
|
23
|
+
label: intl.get(lineType)
|
|
31
24
|
});
|
|
32
25
|
}));
|
|
33
26
|
}
|
|
34
|
-
|
|
27
|
+
export default SelectLineType;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _DTableSelect2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableSelect"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
var _reactstrap = require("reactstrap");
|
|
11
|
-
var _intl = _interopRequireDefault(require("../../../intl"));
|
|
12
|
-
class SelectTable extends _react.default.Component {
|
|
1
|
+
import _DTableSelect from "dtable-ui-component/lib/DTableSelect";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Label, FormGroup } from 'reactstrap';
|
|
4
|
+
import intl from '../../../intl';
|
|
5
|
+
class SelectTable extends React.Component {
|
|
13
6
|
constructor(props) {
|
|
14
7
|
super(props);
|
|
15
8
|
this.renderSelector = () => {
|
|
@@ -17,7 +10,7 @@ class SelectTable extends _react.default.Component {
|
|
|
17
10
|
selectedTableId
|
|
18
11
|
} = this.props;
|
|
19
12
|
const selectedOption = selectedTableId ? this.tableOptions.find(option => option.value === selectedTableId) : null;
|
|
20
|
-
return /*#__PURE__*/
|
|
13
|
+
return /*#__PURE__*/React.createElement(_DTableSelect, {
|
|
21
14
|
menuPortalTarget: "#sea-chart-settings-content",
|
|
22
15
|
value: selectedOption,
|
|
23
16
|
options: this.tableOptions,
|
|
@@ -37,9 +30,9 @@ class SelectTable extends _react.default.Component {
|
|
|
37
30
|
}) : [];
|
|
38
31
|
}
|
|
39
32
|
render() {
|
|
40
|
-
return /*#__PURE__*/
|
|
33
|
+
return /*#__PURE__*/React.createElement(FormGroup, {
|
|
41
34
|
className: "sea-chart-setting-item table-setting"
|
|
42
|
-
}, /*#__PURE__*/
|
|
35
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.lang === 'zh-cn' ? '子表' : intl.get('Table')), this.renderSelector());
|
|
43
36
|
}
|
|
44
37
|
}
|
|
45
|
-
|
|
38
|
+
export default SelectTable;
|