sea-chart 2.0.37 → 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 +20 -69
- package/dist/assets/css/sea-chart-d3-tooltip.css +0 -1
- 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 +31 -37
- 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 +41 -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 +12 -23
- package/dist/components/index.js +7 -48
- package/dist/components/loading/index.js +6 -13
- package/dist/components/number-input/index.js +11 -24
- package/dist/components/pixel-editor/index.js +15 -23
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +13 -16
- package/dist/components/popover/hide-column-popover/hide-column-popover.css +5 -1
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +28 -38
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +9 -18
- package/dist/components/popover/sort-popover/sort-popover.js +58 -69
- 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 +61 -68
- package/dist/components/tooltip/index.js +39 -28
- 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 +13 -16
- 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 +2 -7
- package/dist/locale/lang/en.js +2 -7
- package/dist/locale/lang/es.js +2 -7
- package/dist/locale/lang/fr.js +2 -7
- package/dist/locale/lang/pt.js +2 -7
- package/dist/locale/lang/ru.js +2 -7
- package/dist/locale/lang/zh_CN.js +2 -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 +14 -17
- 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 +14 -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 +66 -73
- 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 +51 -59
- package/dist/settings/basic-number-card/data-settings.js +50 -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 -64
- package/dist/settings/combination-settings/index.js +3 -20
- package/dist/settings/combination-settings/style-settings.js +67 -75
- 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 +44 -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 +22 -30
- 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 +57 -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 +49 -58
- package/dist/settings/table-element-settings/data-settings.js +21 -29
- package/dist/settings/table-element-settings/index.css +1 -31
- package/dist/settings/table-element-settings/index.js +2 -13
- package/dist/settings/table-settings/data-settings.js +113 -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 +44 -52
- 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 +59 -66
- 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 +27 -34
- package/dist/settings/widgets/data-filter/index.js +59 -59
- 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 +52 -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 +75 -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 +65 -72
- package/dist/utils/cell-format-utils.js +25 -33
- package/dist/utils/cell-value-utils.js +4 -11
- package/dist/utils/chart-utils/base-utils.js +467 -367
- package/dist/utils/chart-utils/index.js +29 -40
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +78 -85
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +20 -21
- 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 +28 -26
- 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 +94 -97
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +19 -25
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +50 -36
- package/dist/utils/chart-utils/sql-statistics-utils.js +385 -388
- 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 +88 -102
- package/dist/utils/common-utils.js +28 -53
- package/dist/utils/concurrency-manager.js +1 -7
- package/dist/utils/contexts.js +7 -11
- 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 +73 -219
- 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 +251 -183
- 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 +162 -172
- package/dist/utils/sql/index.js +3 -27
- package/dist/utils/trend-utils.js +50 -45
- package/dist/view/index.css +2 -8
- package/dist/view/index.js +102 -103
- package/dist/view/title/index.js +16 -24
- package/dist/view/wrapper/area-group.js +57 -57
- package/dist/view/wrapper/area.js +43 -51
- package/dist/view/wrapper/bar-compare.js +56 -48
- package/dist/view/wrapper/bar-custom-stack.js +73 -55
- package/dist/view/wrapper/bar-group.js +94 -73
- package/dist/view/wrapper/bar-stack.js +49 -57
- package/dist/view/wrapper/bar.js +40 -48
- package/dist/view/wrapper/basic-number-card.js +50 -34
- package/dist/view/wrapper/chart-component.js +164 -569
- package/dist/view/wrapper/combination.js +55 -63
- package/dist/view/wrapper/completeness-group.js +140 -93
- package/dist/view/wrapper/completeness.js +36 -44
- package/dist/view/wrapper/dashboard.js +104 -59
- 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 +70 -58
- package/dist/view/wrapper/horizontal-bar-stack.js +48 -56
- package/dist/view/wrapper/horizontal-bar.js +41 -49
- package/dist/view/wrapper/index.js +107 -115
- package/dist/view/wrapper/line-group.js +49 -52
- 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 +40 -47
- package/dist/view/wrapper/map-world.js +42 -49
- package/dist/view/wrapper/map.js +42 -50
- package/dist/view/wrapper/mirror.js +41 -49
- package/dist/view/wrapper/pie.js +45 -53
- package/dist/view/wrapper/ring.js +50 -58
- package/dist/view/wrapper/scatter.js +50 -56
- 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 -92
- 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 -16
- 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 +8 -13
- 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 +30 -43
- package/dist/view/wrapper/treemap.js +38 -46
- package/dist/view/wrapper/trend.js +80 -65
- package/package.json +15 -12
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "FunnelDataSettings", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _dataSettings.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "FunnelStyleSettings", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _styleSettings.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var _dataSettings = _interopRequireDefault(require("./data-settings"));
|
|
20
|
-
var _styleSettings = _interopRequireDefault(require("./style-settings"));
|
|
1
|
+
import FunnelDataSettings from './data-settings';
|
|
2
|
+
import FunnelStyleSettings from './style-settings';
|
|
3
|
+
export { FunnelDataSettings, FunnelStyleSettings };
|
|
@@ -1,17 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.default = StyleSetting;
|
|
9
|
-
var _DTableSwitch2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableSwitch"));
|
|
10
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
12
|
-
var _divider = _interopRequireDefault(require("../widgets/divider"));
|
|
13
|
-
var _funnelLabelSetting = _interopRequireDefault(require("./components/funnel-label-setting"));
|
|
14
|
-
function StyleSetting(_ref) {
|
|
1
|
+
import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
|
|
2
|
+
import React, { useCallback } from 'react';
|
|
3
|
+
import intl from '../../intl';
|
|
4
|
+
import Divider from '../widgets/divider';
|
|
5
|
+
import FunnelLabelSetting from './components/funnel-label-setting';
|
|
6
|
+
export default function StyleSetting(_ref) {
|
|
15
7
|
let {
|
|
16
8
|
chart,
|
|
17
9
|
onChange
|
|
@@ -24,19 +16,19 @@ function StyleSetting(_ref) {
|
|
|
24
16
|
funnel_label_font_size,
|
|
25
17
|
funnel_show_overall_rate
|
|
26
18
|
} = chart.config;
|
|
27
|
-
const handleShowLegendChange =
|
|
19
|
+
const handleShowLegendChange = useCallback(function (event) {
|
|
28
20
|
const value = event.target.checked;
|
|
29
21
|
onChange && onChange({
|
|
30
22
|
funnel_show_legend: value
|
|
31
23
|
});
|
|
32
24
|
}, [onChange]);
|
|
33
|
-
return /*#__PURE__*/
|
|
25
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(_DTableSwitch, {
|
|
34
26
|
checked: funnel_show_legend,
|
|
35
|
-
placeholder:
|
|
27
|
+
placeholder: intl.get('Show_legend'),
|
|
36
28
|
onChange: handleShowLegendChange
|
|
37
|
-
}), /*#__PURE__*/
|
|
29
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
38
30
|
className: "mt-4"
|
|
39
|
-
}), /*#__PURE__*/
|
|
31
|
+
}), /*#__PURE__*/React.createElement(FunnelLabelSetting, {
|
|
40
32
|
onChange: onChange,
|
|
41
33
|
funnelShowLabels: funnel_show_labels,
|
|
42
34
|
funnelLabelPosition: funnel_label_position,
|
|
@@ -1,19 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _dtableUtils = require("dtable-utils");
|
|
11
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
12
|
-
var _commonDataSettings = _interopRequireDefault(require("../widgets/common-data-settings"));
|
|
13
|
-
var _divider = _interopRequireDefault(require("../widgets/divider"));
|
|
14
|
-
var _groupBy = _interopRequireDefault(require("../widgets/group-by"));
|
|
15
|
-
var _basicSummary = _interopRequireDefault(require("../widgets/basic-summary"));
|
|
16
|
-
var _constants = require("../../constants");
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { CellType } from 'dtable-utils';
|
|
3
|
+
import intl from '../../intl';
|
|
4
|
+
import CommonDataSettings from '../widgets/common-data-settings';
|
|
5
|
+
import Divider from '../widgets/divider';
|
|
6
|
+
import GroupBy from '../widgets/group-by';
|
|
7
|
+
import BasicSummary from '../widgets/basic-summary';
|
|
8
|
+
import { CHART_SUMMARY_TYPES } from '../../constants';
|
|
17
9
|
const DataSettings = _ref => {
|
|
18
10
|
let {
|
|
19
11
|
chart,
|
|
@@ -21,7 +13,7 @@ const DataSettings = _ref => {
|
|
|
21
13
|
tables,
|
|
22
14
|
onChange
|
|
23
15
|
} = _ref;
|
|
24
|
-
const onXAxisColumnChange =
|
|
16
|
+
const onXAxisColumnChange = useCallback(column => {
|
|
25
17
|
const {
|
|
26
18
|
config
|
|
27
19
|
} = chart;
|
|
@@ -45,35 +37,35 @@ const DataSettings = _ref => {
|
|
|
45
37
|
table_id,
|
|
46
38
|
time_column_key
|
|
47
39
|
} = config;
|
|
48
|
-
return /*#__PURE__*/
|
|
40
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(CommonDataSettings, {
|
|
49
41
|
dataSources: dataSources,
|
|
50
42
|
chart: chart,
|
|
51
43
|
tables: tables,
|
|
52
44
|
onChange: onChange
|
|
53
|
-
}), /*#__PURE__*/
|
|
45
|
+
}), /*#__PURE__*/React.createElement(GroupBy, {
|
|
54
46
|
chart: chart,
|
|
55
47
|
tables: tables,
|
|
56
48
|
className: "selected-x-axis",
|
|
57
|
-
label:
|
|
49
|
+
label: intl.get('Time_field'),
|
|
58
50
|
selectedTableId: table_id,
|
|
59
51
|
selectedColumnKey: time_column_key,
|
|
60
52
|
onlySupportDate: true,
|
|
61
53
|
isRenderGroupBy: false,
|
|
62
54
|
onGroupByChange: onXAxisColumnChange
|
|
63
|
-
}), /*#__PURE__*/
|
|
55
|
+
}), /*#__PURE__*/React.createElement(Divider, {
|
|
64
56
|
className: "mt-4"
|
|
65
|
-
}), /*#__PURE__*/
|
|
57
|
+
}), /*#__PURE__*/React.createElement(BasicSummary, {
|
|
66
58
|
className: "selected-y-axis",
|
|
67
|
-
label:
|
|
59
|
+
label: intl.get('Summary_method'),
|
|
68
60
|
summaryTypeKey: 'summary_type',
|
|
69
61
|
summaryMethodKey: 'summary_method',
|
|
70
62
|
summaryColumnKey: 'summary_column_key',
|
|
71
63
|
chart: chart,
|
|
72
64
|
selectedTableId: table_id,
|
|
73
65
|
tables: tables,
|
|
74
|
-
supportColumnTypes: [
|
|
75
|
-
summaryTypeOptions:
|
|
66
|
+
supportColumnTypes: [CellType.NUMBER],
|
|
67
|
+
summaryTypeOptions: CHART_SUMMARY_TYPES,
|
|
76
68
|
onChange: onChange
|
|
77
69
|
}));
|
|
78
70
|
};
|
|
79
|
-
|
|
71
|
+
export default DataSettings;
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "HeatMapDataSettings", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _dataSettings.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "HeatMapStyleSettings", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _styleSettings.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var _dataSettings = _interopRequireDefault(require("./data-settings"));
|
|
20
|
-
var _styleSettings = _interopRequireDefault(require("./style-settings"));
|
|
1
|
+
import HeatMapDataSettings from './data-settings';
|
|
2
|
+
import HeatMapStyleSettings from './style-settings';
|
|
3
|
+
export { HeatMapDataSettings, HeatMapStyleSettings };
|
|
@@ -1,28 +1,20 @@
|
|
|
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 _divider = _interopRequireDefault(require("../widgets/divider"));
|
|
12
|
-
var _components = require("../../components");
|
|
13
|
-
var _colorSettings = _interopRequireDefault(require("../widgets/color-settings"));
|
|
14
|
-
var _constants = require("../../constants");
|
|
15
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { Label, FormGroup } from 'reactstrap';
|
|
3
|
+
import Divider from '../widgets/divider';
|
|
4
|
+
import { PixelEditor } from '../../components';
|
|
5
|
+
import ColorUseTypeSelector from '../widgets/color-settings';
|
|
6
|
+
import { DEFAULT_GRID_SIZE, DEFAULT_GRID_DISTANCE } from '../../constants';
|
|
7
|
+
import intl from '../../intl';
|
|
16
8
|
const StyleSettings = _ref => {
|
|
17
9
|
let {
|
|
18
10
|
chart,
|
|
19
11
|
labelColorConfigs,
|
|
20
12
|
onChange
|
|
21
13
|
} = _ref;
|
|
22
|
-
const onColorChange =
|
|
14
|
+
const onColorChange = useCallback(update => {
|
|
23
15
|
onChange && onChange(update);
|
|
24
16
|
}, [onChange]);
|
|
25
|
-
const modifyGridSize =
|
|
17
|
+
const modifyGridSize = useCallback(currGrid => {
|
|
26
18
|
const {
|
|
27
19
|
config
|
|
28
20
|
} = chart;
|
|
@@ -35,7 +27,7 @@ const StyleSettings = _ref => {
|
|
|
35
27
|
grid_size: parsedGrid
|
|
36
28
|
});
|
|
37
29
|
}, [chart, onChange]);
|
|
38
|
-
const modifyGridDistance =
|
|
30
|
+
const modifyGridDistance = useCallback(currGrid => {
|
|
39
31
|
const {
|
|
40
32
|
config
|
|
41
33
|
} = chart;
|
|
@@ -55,22 +47,22 @@ const StyleSettings = _ref => {
|
|
|
55
47
|
grid_distance,
|
|
56
48
|
grid_size
|
|
57
49
|
} = config;
|
|
58
|
-
return /*#__PURE__*/
|
|
50
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ColorUseTypeSelector, {
|
|
59
51
|
chart: config,
|
|
60
52
|
labelColorConfigs: labelColorConfigs,
|
|
61
53
|
updateChart: onColorChange
|
|
62
|
-
}), /*#__PURE__*/
|
|
54
|
+
}), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(FormGroup, {
|
|
63
55
|
className: "sea-chart-parameter-item"
|
|
64
|
-
}, /*#__PURE__*/
|
|
56
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Grid_size')), /*#__PURE__*/React.createElement(PixelEditor, {
|
|
65
57
|
pixel: grid_size,
|
|
66
|
-
defaultPixel:
|
|
58
|
+
defaultPixel: DEFAULT_GRID_SIZE,
|
|
67
59
|
modifyPixel: modifyGridSize
|
|
68
|
-
})), /*#__PURE__*/
|
|
60
|
+
})), /*#__PURE__*/React.createElement(Divider, null), /*#__PURE__*/React.createElement(FormGroup, {
|
|
69
61
|
className: "sea-chart-parameter-item"
|
|
70
|
-
}, /*#__PURE__*/
|
|
62
|
+
}, /*#__PURE__*/React.createElement(Label, null, intl.get('Grid_distance')), /*#__PURE__*/React.createElement(PixelEditor, {
|
|
71
63
|
pixel: grid_distance,
|
|
72
|
-
defaultPixel:
|
|
64
|
+
defaultPixel: DEFAULT_GRID_DISTANCE,
|
|
73
65
|
modifyPixel: modifyGridDistance
|
|
74
66
|
})));
|
|
75
67
|
};
|
|
76
|
-
|
|
68
|
+
export default StyleSettings;
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _barSettings = require("../bar-settings");
|
|
10
|
-
var _advanceBarSettings = require("../advance-bar-settings");
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _constants = require("../../constants");
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { BarDataSettings } from '../bar-settings';
|
|
3
|
+
import { AdvanceBarDataSettings } from '../advance-bar-settings';
|
|
4
|
+
import { BaseUtils } from '../../utils';
|
|
5
|
+
import { BAR_MAP_TO_HORIZONTAL_MAP, CHART_TYPE } from '../../constants';
|
|
13
6
|
const DataSettings = _ref => {
|
|
14
7
|
let {
|
|
15
8
|
chart,
|
|
@@ -17,7 +10,7 @@ const DataSettings = _ref => {
|
|
|
17
10
|
dataSources,
|
|
18
11
|
onChange: oldOnChange
|
|
19
12
|
} = _ref;
|
|
20
|
-
const onChange =
|
|
13
|
+
const onChange = useCallback(update => {
|
|
21
14
|
const {
|
|
22
15
|
config: oldConfig
|
|
23
16
|
} = chart;
|
|
@@ -31,8 +24,8 @@ const DataSettings = _ref => {
|
|
|
31
24
|
...update
|
|
32
25
|
};
|
|
33
26
|
Object.keys(update).forEach(key => {
|
|
34
|
-
if (
|
|
35
|
-
updateConfig[
|
|
27
|
+
if (BAR_MAP_TO_HORIZONTAL_MAP[key]) {
|
|
28
|
+
updateConfig[BAR_MAP_TO_HORIZONTAL_MAP[key]] = newConfig[key];
|
|
36
29
|
} else {
|
|
37
30
|
updateConfig[key] = newConfig[key];
|
|
38
31
|
}
|
|
@@ -43,7 +36,7 @@ const DataSettings = _ref => {
|
|
|
43
36
|
config,
|
|
44
37
|
id
|
|
45
38
|
} = chart;
|
|
46
|
-
const newConfig =
|
|
39
|
+
const newConfig = BaseUtils.convertConfig(config);
|
|
47
40
|
const newChart = {
|
|
48
41
|
id,
|
|
49
42
|
config: newConfig
|
|
@@ -51,8 +44,8 @@ const DataSettings = _ref => {
|
|
|
51
44
|
const {
|
|
52
45
|
type
|
|
53
46
|
} = config;
|
|
54
|
-
const BarGroupComponent = type ===
|
|
55
|
-
return /*#__PURE__*/
|
|
47
|
+
const BarGroupComponent = type === CHART_TYPE.HORIZONTAL_BAR ? BarDataSettings : AdvanceBarDataSettings;
|
|
48
|
+
return /*#__PURE__*/React.createElement(BarGroupComponent, {
|
|
56
49
|
xLabel: 'Vertical_axis',
|
|
57
50
|
yLabel: 'Horizontal_axis',
|
|
58
51
|
chart: newChart,
|
|
@@ -61,4 +54,4 @@ const DataSettings = _ref => {
|
|
|
61
54
|
onChange: onChange
|
|
62
55
|
});
|
|
63
56
|
};
|
|
64
|
-
|
|
57
|
+
export default DataSettings;
|
|
@@ -1,20 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
Object.defineProperty(exports, "HorizontalDataSettings", {
|
|
8
|
-
enumerable: true,
|
|
9
|
-
get: function () {
|
|
10
|
-
return _dataSettings.default;
|
|
11
|
-
}
|
|
12
|
-
});
|
|
13
|
-
Object.defineProperty(exports, "HorizontalStyleSettings", {
|
|
14
|
-
enumerable: true,
|
|
15
|
-
get: function () {
|
|
16
|
-
return _styleSettings.default;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
var _dataSettings = _interopRequireDefault(require("./data-settings"));
|
|
20
|
-
var _styleSettings = _interopRequireDefault(require("./style-settings"));
|
|
1
|
+
import HorizontalDataSettings from './data-settings';
|
|
2
|
+
import HorizontalStyleSettings from './style-settings';
|
|
3
|
+
export { HorizontalDataSettings, HorizontalStyleSettings };
|
|
@@ -1,15 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
});
|
|
7
|
-
exports.default = void 0;
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _advanceBarSettings = require("../advance-bar-settings");
|
|
10
|
-
var _barSettings = require("../bar-settings");
|
|
11
|
-
var _utils = require("../../utils");
|
|
12
|
-
var _constants = require("../../constants");
|
|
1
|
+
import React, { useCallback } from 'react';
|
|
2
|
+
import { AdvanceBarStyleSettings } from '../advance-bar-settings';
|
|
3
|
+
import { BarStyleSettings } from '../bar-settings';
|
|
4
|
+
import { BaseUtils } from '../../utils';
|
|
5
|
+
import { BAR_MAP_TO_HORIZONTAL_MAP, CHART_TYPE } from '../../constants';
|
|
13
6
|
const StyleSettings = _ref => {
|
|
14
7
|
let {
|
|
15
8
|
chart,
|
|
@@ -17,15 +10,15 @@ const StyleSettings = _ref => {
|
|
|
17
10
|
labelColorConfigs,
|
|
18
11
|
onChange: oldOnChange
|
|
19
12
|
} = _ref;
|
|
20
|
-
const onChange =
|
|
13
|
+
const onChange = useCallback(update => {
|
|
21
14
|
let updateConfig = {};
|
|
22
15
|
const newConfig = {
|
|
23
16
|
...chart.config,
|
|
24
17
|
...update
|
|
25
18
|
};
|
|
26
19
|
Object.keys(update).forEach(key => {
|
|
27
|
-
if (
|
|
28
|
-
updateConfig[
|
|
20
|
+
if (BAR_MAP_TO_HORIZONTAL_MAP[key]) {
|
|
21
|
+
updateConfig[BAR_MAP_TO_HORIZONTAL_MAP[key]] = newConfig[key];
|
|
29
22
|
} else {
|
|
30
23
|
updateConfig[key] = newConfig[key];
|
|
31
24
|
}
|
|
@@ -36,7 +29,7 @@ const StyleSettings = _ref => {
|
|
|
36
29
|
config,
|
|
37
30
|
id
|
|
38
31
|
} = chart;
|
|
39
|
-
const newConfig =
|
|
32
|
+
const newConfig = BaseUtils.convertConfig(config);
|
|
40
33
|
const newChart = {
|
|
41
34
|
id,
|
|
42
35
|
config: newConfig
|
|
@@ -44,8 +37,8 @@ const StyleSettings = _ref => {
|
|
|
44
37
|
const {
|
|
45
38
|
type
|
|
46
39
|
} = config;
|
|
47
|
-
const BarStyleComponent = type ===
|
|
48
|
-
return /*#__PURE__*/
|
|
40
|
+
const BarStyleComponent = type === CHART_TYPE.HORIZONTAL_BAR ? BarStyleSettings : AdvanceBarStyleSettings;
|
|
41
|
+
return /*#__PURE__*/React.createElement(BarStyleComponent, {
|
|
49
42
|
xLabel: 'Vertical_axis',
|
|
50
43
|
yLabel: 'Horizontal_axis',
|
|
51
44
|
labelColorConfigs: labelColorConfigs,
|
|
@@ -54,4 +47,4 @@ const StyleSettings = _ref => {
|
|
|
54
47
|
tables: tables
|
|
55
48
|
});
|
|
56
49
|
};
|
|
57
|
-
|
|
50
|
+
export default StyleSettings;
|
package/dist/settings/index.js
CHANGED
|
@@ -1,35 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports, "StyleSettings", {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return _styleSettings.default;
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
exports.settingsPropTypes = exports.default = void 0;
|
|
21
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
22
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
23
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
24
|
-
var _intl = _interopRequireDefault(require("../intl"));
|
|
25
|
-
var _contexts = require("../utils/contexts");
|
|
26
|
-
var _utils = require("../utils");
|
|
27
|
-
var _constants = require("../constants");
|
|
28
|
-
var _useForceUpdate = _interopRequireDefault(require("../components/types-dialog/use-force-update"));
|
|
29
|
-
var _divider = _interopRequireDefault(require("./widgets/divider"));
|
|
30
|
-
var _dataSettings = _interopRequireDefault(require("./data-settings"));
|
|
31
|
-
var _styleSettings = _interopRequireDefault(require("./style-settings"));
|
|
32
|
-
require("./index.css");
|
|
1
|
+
import React, { useCallback, useMemo, useState, useEffect } from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import classnames from 'classnames';
|
|
4
|
+
import intl from '../intl';
|
|
5
|
+
import { settingsContext, DepartmentsContext, GlobalThemeContext, FirstDayOfWeekContext } from '../utils/contexts';
|
|
6
|
+
import { eventStopPropagation } from '../utils';
|
|
7
|
+
import { BaseUtils } from '../utils';
|
|
8
|
+
import { CHART_SETTINGS_TYPE, CHART_SETTINGS } from '../constants';
|
|
9
|
+
import useForceUpdate from '../components/types-dialog/use-force-update';
|
|
10
|
+
import Divider from './widgets/divider';
|
|
11
|
+
import DataSettings from './data-settings';
|
|
12
|
+
import StyleSettings from './style-settings';
|
|
13
|
+
import './index.css';
|
|
33
14
|
const Settings = _ref => {
|
|
34
15
|
let {
|
|
35
16
|
chart,
|
|
@@ -41,22 +22,23 @@ const Settings = _ref => {
|
|
|
41
22
|
children,
|
|
42
23
|
departments,
|
|
43
24
|
globalTheme,
|
|
44
|
-
lang
|
|
25
|
+
lang,
|
|
26
|
+
firstDayOfWeek
|
|
45
27
|
} = _ref;
|
|
46
|
-
const [type, setType] =
|
|
47
|
-
const [labelColorConfigs, setLabelColorConfigs] =
|
|
48
|
-
const forceUpdate = (
|
|
49
|
-
|
|
28
|
+
const [type, setType] = useState(CHART_SETTINGS_TYPE.DATA);
|
|
29
|
+
const [labelColorConfigs, setLabelColorConfigs] = useState([]);
|
|
30
|
+
const forceUpdate = useForceUpdate();
|
|
31
|
+
useEffect(() => {
|
|
50
32
|
if (lang) {
|
|
51
|
-
|
|
33
|
+
intl.setLang(lang);
|
|
52
34
|
forceUpdate();
|
|
53
35
|
}
|
|
54
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
55
37
|
}, []);
|
|
56
|
-
|
|
38
|
+
useEffect(() => {
|
|
57
39
|
var _window$dtable;
|
|
58
40
|
const systemCustomColors = ((_window$dtable = window.dtable) === null || _window$dtable === void 0 ? void 0 : _window$dtable.customColors) || [];
|
|
59
|
-
const colorConfigs = [...
|
|
41
|
+
const colorConfigs = [...BaseUtils.getCurrentTheme().colors.map(color => ({
|
|
60
42
|
color: color.toUpperCase(),
|
|
61
43
|
text_color: '#fff'
|
|
62
44
|
})), ...systemCustomColors.map(customColor => ({
|
|
@@ -65,13 +47,13 @@ const Settings = _ref => {
|
|
|
65
47
|
}))];
|
|
66
48
|
setLabelColorConfigs(colorConfigs);
|
|
67
49
|
}, []);
|
|
68
|
-
const onChartSettingsTypeChange =
|
|
69
|
-
|
|
50
|
+
const onChartSettingsTypeChange = useCallback(event => {
|
|
51
|
+
eventStopPropagation(event);
|
|
70
52
|
const newType = event.target.getAttribute('data');
|
|
71
53
|
if (type === newType) return;
|
|
72
54
|
setType(newType);
|
|
73
55
|
}, [type]);
|
|
74
|
-
const modifyStatistic =
|
|
56
|
+
const modifyStatistic = useCallback(update => {
|
|
75
57
|
const newChart = {
|
|
76
58
|
...chart,
|
|
77
59
|
config: {
|
|
@@ -79,69 +61,74 @@ const Settings = _ref => {
|
|
|
79
61
|
...update
|
|
80
62
|
}
|
|
81
63
|
};
|
|
82
|
-
onChange && onChange(newChart,
|
|
64
|
+
onChange && onChange(newChart, CHART_SETTINGS_TYPE.DATA);
|
|
83
65
|
}, [chart, onChange]);
|
|
84
|
-
const modifyStyle =
|
|
66
|
+
const modifyStyle = useCallback(update => {
|
|
85
67
|
const newChart = {
|
|
86
68
|
...chart,
|
|
87
69
|
...update
|
|
88
70
|
};
|
|
89
|
-
onChange && onChange(newChart,
|
|
71
|
+
onChange && onChange(newChart, CHART_SETTINGS_TYPE.CHART_STYLE);
|
|
90
72
|
}, [chart, onChange]);
|
|
91
|
-
const validTitle =
|
|
73
|
+
const validTitle = useMemo(() => {
|
|
92
74
|
return title || {};
|
|
93
75
|
}, [title]);
|
|
94
|
-
return /*#__PURE__*/
|
|
76
|
+
return /*#__PURE__*/React.createElement(GlobalThemeContext.Provider, {
|
|
95
77
|
value: {
|
|
96
78
|
globalTheme
|
|
97
79
|
}
|
|
98
|
-
}, /*#__PURE__*/
|
|
80
|
+
}, /*#__PURE__*/React.createElement(settingsContext.Provider, {
|
|
99
81
|
value: {
|
|
100
82
|
hideTitleStyleSetting
|
|
101
83
|
}
|
|
102
|
-
}, /*#__PURE__*/
|
|
84
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
103
85
|
className: "sea-chart-settings"
|
|
104
|
-
}, /*#__PURE__*/
|
|
86
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
105
87
|
className: "sea-chart-settings-type",
|
|
106
88
|
onClick: onChartSettingsTypeChange
|
|
107
|
-
},
|
|
89
|
+
}, CHART_SETTINGS.slice(0, children ? 3 : -1).map(setting => {
|
|
108
90
|
const name = validTitle[setting.type];
|
|
109
|
-
return /*#__PURE__*/
|
|
91
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
110
92
|
key: setting.type,
|
|
111
|
-
className: (
|
|
93
|
+
className: classnames('sea-chart-settings-type-item', {
|
|
112
94
|
'selected': type === setting.type
|
|
113
95
|
}),
|
|
114
96
|
data: setting.type
|
|
115
|
-
}, name ||
|
|
116
|
-
})), /*#__PURE__*/
|
|
97
|
+
}, name || intl.get(setting.name));
|
|
98
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
117
99
|
className: "chart-settings-container position-relative",
|
|
118
100
|
id: "sea-chart-settings-container"
|
|
119
|
-
}, /*#__PURE__*/
|
|
101
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
120
102
|
id: "sea-chart-settings-content",
|
|
121
103
|
className: "chart-settings-content"
|
|
122
|
-
}, type ===
|
|
104
|
+
}, type === CHART_SETTINGS_TYPE.DATA && /*#__PURE__*/React.createElement(FirstDayOfWeekContext.Provider, {
|
|
105
|
+
value: {
|
|
106
|
+
firstDayOfWeek
|
|
107
|
+
}
|
|
108
|
+
}, /*#__PURE__*/React.createElement(DepartmentsContext.Provider, {
|
|
123
109
|
value: {
|
|
124
110
|
departments
|
|
125
111
|
}
|
|
126
|
-
}, /*#__PURE__*/
|
|
112
|
+
}, /*#__PURE__*/React.createElement(DataSettings, {
|
|
127
113
|
dataSources: dataSources,
|
|
128
114
|
chart: chart,
|
|
129
115
|
tables: tables,
|
|
130
116
|
onChange: modifyStatistic
|
|
131
|
-
})), type ===
|
|
117
|
+
}))), type === CHART_SETTINGS_TYPE.CHART_STYLE && /*#__PURE__*/React.createElement(StyleSettings, {
|
|
132
118
|
chart: chart,
|
|
133
119
|
tables: tables,
|
|
134
120
|
labelColorConfigs: labelColorConfigs,
|
|
135
121
|
onChange: modifyStyle
|
|
136
|
-
}), children && type ===
|
|
122
|
+
}), children && type === CHART_SETTINGS_TYPE.GENERAL_STYLE && /*#__PURE__*/React.createElement(React.Fragment, null, children))))));
|
|
137
123
|
};
|
|
138
|
-
const settingsPropTypes =
|
|
139
|
-
chart:
|
|
140
|
-
tables:
|
|
141
|
-
dataSources:
|
|
142
|
-
title:
|
|
143
|
-
hideTitleStyleSetting:
|
|
144
|
-
children:
|
|
145
|
-
onChange:
|
|
124
|
+
const settingsPropTypes = {
|
|
125
|
+
chart: PropTypes.object.isRequired,
|
|
126
|
+
tables: PropTypes.array.isRequired,
|
|
127
|
+
dataSources: PropTypes.string,
|
|
128
|
+
title: PropTypes.object,
|
|
129
|
+
hideTitleStyleSetting: PropTypes.bool,
|
|
130
|
+
children: PropTypes.any,
|
|
131
|
+
onChange: PropTypes.func.isRequired
|
|
146
132
|
};
|
|
147
|
-
|
|
133
|
+
export default Settings;
|
|
134
|
+
export { StyleSettings, Divider, settingsPropTypes };
|