sea-chart 2.0.38 → 2.0.39
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 +15 -8
- package/dist/components/cell-factory/FormatterConfig.js +62 -55
- package/dist/components/cell-factory/SimpleCellFormatter.js +12 -5
- package/dist/components/cell-factory/SingleSelectOption.js +18 -11
- package/dist/components/cell-factory/cell-editor-factory.js +12 -5
- package/dist/components/cell-factory/cell-formatter-factory.js +11 -4
- package/dist/components/cell-factory/link-content.js +38 -30
- package/dist/components/chart-color-selector/color-selector.js +18 -11
- package/dist/components/collaborator/index.js +14 -7
- package/dist/components/color-picker/index.js +19 -12
- package/dist/components/color-popover/color-rules/color-rule.js +34 -26
- package/dist/components/color-popover/color-rules/index.js +15 -7
- package/dist/components/color-popover/color-rules/rule-filters/filter.js +34 -27
- package/dist/components/color-popover/color-rules/rule-filters/index.js +25 -17
- package/dist/components/color-popover/color-rules/rule-filters/number-input.js +17 -9
- package/dist/components/color-popover/color-rules-popover.js +38 -30
- package/dist/components/color-popover/color-selector-popover.js +20 -12
- package/dist/components/color-setting/color-group-selector.js +21 -13
- package/dist/components/common-add-tool/index.js +15 -8
- package/dist/components/data-process-setter/data-setting-header.js +14 -7
- package/dist/components/data-process-setter/hide-column-setter.js +20 -13
- package/dist/components/data-process-setter/index.js +27 -4
- package/dist/components/data-process-setter/sort-setter.js +26 -18
- package/dist/components/draggable/Draggable.js +13 -7
- package/dist/components/drill-down-settings/drill-down-fields-popover/index.js +48 -40
- package/dist/components/drill-down-settings/drill-down-fields-settings/index.js +18 -10
- package/dist/components/drill-down-settings/index.js +18 -11
- package/dist/components/dtable-popover/index.js +20 -13
- package/dist/components/dtable-search-input/index.js +21 -13
- package/dist/components/font-settings/index.js +22 -14
- package/dist/components/goal-line-setting/goal-setting-item.js +14 -6
- package/dist/components/goal-line-setting/index.js +19 -12
- package/dist/components/highlighter/highlighter.js +14 -7
- package/dist/components/icon/index.js +12 -5
- package/dist/components/index.js +48 -7
- package/dist/components/loading/index.js +13 -6
- package/dist/components/number-input/index.js +11 -4
- package/dist/components/pixel-editor/index.js +23 -15
- package/dist/components/popover/hide-column-popover/hide-column-popover-widgets/hide-column-item.js +15 -8
- package/dist/components/popover/hide-column-popover/hide-column-popover.js +34 -26
- package/dist/components/popover/sort-popover/sort-popover-widgets/sort-utils.js +18 -9
- package/dist/components/popover/sort-popover/sort-popover.js +65 -55
- package/dist/components/resize-handle/ResizeHandle.js +13 -6
- package/dist/components/row-card/row-card-header-cell.js +24 -17
- package/dist/components/row-card/row-card-header.js +22 -15
- package/dist/components/row-card/row-card-item.js +43 -35
- package/dist/components/row-card/row-card.js +25 -17
- package/dist/components/statistic-record-dialog/index.js +64 -56
- package/dist/components/tooltip/index.js +21 -14
- package/dist/components/types-dialog/index.js +70 -62
- package/dist/components/types-dialog/use-force-update.js +10 -4
- package/dist/constants/color-rules.js +14 -8
- package/dist/constants/common-constants.js +14 -8
- package/dist/constants/error.js +8 -2
- package/dist/constants/geolocation.js +15 -9
- package/dist/constants/index.js +271 -142
- package/dist/constants/key-codes.js +2 -0
- package/dist/constants/model.js +9 -3
- package/dist/constants/regions.js +8 -3
- package/dist/constants/style.js +12 -6
- package/dist/constants/table.js +7 -1
- package/dist/constants/type-image.js +39 -33
- package/dist/constants/type.js +9 -3
- package/dist/context.js +20 -13
- package/dist/editor/index.js +15 -8
- package/dist/index.js +104 -13
- package/dist/intl.js +17 -10
- package/dist/locale/index.js +23 -16
- package/dist/locale/lang/de.js +7 -1
- package/dist/locale/lang/en.js +7 -1
- package/dist/locale/lang/es.js +7 -1
- package/dist/locale/lang/fr.js +7 -1
- package/dist/locale/lang/pt.js +7 -1
- package/dist/locale/lang/ru.js +7 -1
- package/dist/locale/lang/zh_CN.js +7 -1
- package/dist/model/area-group.js +19 -12
- package/dist/model/area.js +19 -12
- package/dist/model/bar-custom.js +18 -11
- package/dist/model/bar-group.js +19 -12
- package/dist/model/bar-stack.js +17 -10
- package/dist/model/bar.js +18 -11
- package/dist/model/base-model.js +11 -4
- package/dist/model/basic-number-card.js +20 -13
- package/dist/model/chart.js +13 -7
- package/dist/model/combination.js +22 -15
- package/dist/model/compare-bar.js +21 -14
- package/dist/model/completeness-group.js +18 -11
- package/dist/model/completeness.js +17 -10
- package/dist/model/dashboard.js +14 -7
- package/dist/model/funnel.js +21 -14
- package/dist/model/generic-model.js +143 -135
- package/dist/model/heat-map.js +16 -9
- package/dist/model/horizontal-bar.js +18 -11
- package/dist/model/horizontal-group-bar.js +17 -10
- package/dist/model/index.js +93 -69
- package/dist/model/line-group.js +20 -13
- package/dist/model/line.js +19 -12
- package/dist/model/map-bubble.js +19 -12
- package/dist/model/map.js +19 -12
- package/dist/model/mirror.js +20 -13
- package/dist/model/pie.js +19 -12
- package/dist/model/ring.js +19 -12
- package/dist/model/scatter.js +17 -10
- package/dist/model/stacked-horizontal-bar.js +18 -11
- package/dist/model/table-element.js +12 -5
- package/dist/model/table.js +14 -7
- package/dist/model/tree-map.js +14 -7
- package/dist/model/trend.js +18 -11
- package/dist/model/user.js +7 -1
- package/dist/model/world-map-bubble.js +19 -12
- package/dist/model/world-map.js +19 -12
- package/dist/services/map-json.js +17 -11
- package/dist/settings/advance-bar-settings/data-settings.js +44 -36
- package/dist/settings/advance-bar-settings/index.js +20 -3
- package/dist/settings/advance-bar-settings/style-settings.js +71 -63
- package/dist/settings/bar-settings/data-settings.js +47 -39
- package/dist/settings/bar-settings/index.js +20 -3
- package/dist/settings/bar-settings/style-settings.js +57 -49
- package/dist/settings/basic-number-card/data-settings.js +57 -49
- package/dist/settings/basic-number-card/index.js +20 -3
- package/dist/settings/basic-number-card/style-settings.js +27 -19
- package/dist/settings/combination-settings/data-settings.js +63 -55
- package/dist/settings/combination-settings/index.js +20 -3
- package/dist/settings/combination-settings/style-settings.js +73 -65
- package/dist/settings/completeness-settings/callbacks/callbacks.js +27 -16
- package/dist/settings/completeness-settings/data-settings/completion-settings.js +28 -21
- package/dist/settings/completeness-settings/data-settings/data-settings.js +32 -25
- package/dist/settings/completeness-settings/index.js +20 -3
- package/dist/settings/completeness-settings/style-settings.js +26 -19
- package/dist/settings/dashboard-settings/data-settings.js +51 -43
- package/dist/settings/dashboard-settings/index.js +13 -2
- package/dist/settings/data-settings.js +79 -72
- package/dist/settings/funnel-settings/components/dnd-item/dnd-item.js +19 -12
- package/dist/settings/funnel-settings/components/dnd-list.js +23 -15
- package/dist/settings/funnel-settings/components/funnel-label-setting.js +40 -32
- package/dist/settings/funnel-settings/components/funnel-layer-setting.js +28 -20
- package/dist/settings/funnel-settings/data-settings.js +31 -23
- package/dist/settings/funnel-settings/index.js +20 -3
- package/dist/settings/funnel-settings/style-settings.js +19 -11
- package/dist/settings/heat-map-settings/data-settings.js +26 -18
- package/dist/settings/heat-map-settings/index.js +20 -3
- package/dist/settings/heat-map-settings/style-settings.js +26 -18
- package/dist/settings/horizontal-bar-settings/data-settings.js +19 -12
- package/dist/settings/horizontal-bar-settings/index.js +20 -3
- package/dist/settings/horizontal-bar-settings/style-settings.js +19 -12
- package/dist/settings/index.js +70 -52
- package/dist/settings/map-settings/components/location-field-selector.js +17 -10
- package/dist/settings/map-settings/components/map-level-selector.js +18 -11
- package/dist/settings/map-settings/components/map-province-city-selector.js +26 -19
- package/dist/settings/map-settings/index.js +20 -3
- package/dist/settings/map-settings/map-data-settings.js +30 -23
- package/dist/settings/map-settings/map-style-settings.js +35 -27
- package/dist/settings/mirror-settings/data-settings.js +34 -26
- package/dist/settings/mirror-settings/index.js +13 -2
- package/dist/settings/pie-settings/data-settings.js +41 -33
- package/dist/settings/pie-settings/index.js +20 -3
- package/dist/settings/pie-settings/style-settings.js +55 -47
- package/dist/settings/scatter/data-settings.js +34 -27
- package/dist/settings/scatter/index.js +12 -3
- package/dist/settings/stacks-settings/index.js +27 -19
- package/dist/settings/stacks-settings/stack-item-settings.js +27 -19
- package/dist/settings/style-settings.js +73 -65
- package/dist/settings/table-element-settings/components/data-filter.js +38 -30
- package/dist/settings/table-element-settings/data-settings.js +29 -21
- package/dist/settings/table-element-settings/index.js +13 -2
- package/dist/settings/table-settings/data-settings.js +120 -112
- package/dist/settings/table-settings/index.js +13 -2
- package/dist/settings/time-comparison-settings/data-settings.js +51 -43
- package/dist/settings/time-comparison-settings/index.js +20 -3
- package/dist/settings/time-comparison-settings/style-settings.js +50 -42
- package/dist/settings/trend-settings/data-settings.js +32 -24
- package/dist/settings/trend-settings/index.js +20 -3
- package/dist/settings/trend-settings/style-setting.js +27 -19
- package/dist/settings/widgets/basic-summary/index.js +63 -55
- package/dist/settings/widgets/chart-type/index.js +26 -18
- package/dist/settings/widgets/color-settings/index.js +80 -72
- package/dist/settings/widgets/common-data-settings.js +29 -21
- package/dist/settings/widgets/data-filter/index.js +43 -35
- package/dist/settings/widgets/data-sort.js +24 -16
- package/dist/settings/widgets/date-summary-item.js +34 -26
- package/dist/settings/widgets/display-values-settings/index.js +22 -14
- package/dist/settings/widgets/divider/index.js +16 -8
- package/dist/settings/widgets/font-settings/font-color-settings.js +19 -11
- package/dist/settings/widgets/font-settings/font-size-settings.js +22 -14
- package/dist/settings/widgets/font-settings/font-weight-settings.js +25 -17
- package/dist/settings/widgets/font-settings/index.js +27 -4
- package/dist/settings/widgets/group-by.js +59 -51
- package/dist/settings/widgets/min-max-setting.js +18 -10
- package/dist/settings/widgets/mininum-slice-percent.js +18 -10
- package/dist/settings/widgets/numeric-summary-item.js +33 -25
- package/dist/settings/widgets/select-line-type/index.js +17 -10
- package/dist/settings/widgets/select-table/index.js +16 -9
- package/dist/settings/widgets/select-view/index.js +28 -20
- package/dist/settings/widgets/stack.js +22 -14
- package/dist/settings/widgets/summary-method-setting.js +25 -17
- package/dist/settings/widgets/summary-settings.js +82 -74
- package/dist/settings/widgets/switch/index.js +16 -9
- package/dist/settings/widgets/text-horizontal-settings.js +23 -15
- package/dist/settings/widgets/time-picker.js +37 -29
- package/dist/settings/widgets/title-settings/index.js +37 -29
- package/dist/settings/widgets/title-settings/title-text.js +12 -5
- package/dist/settings/widgets/x-axios.js +1 -0
- package/dist/settings/widgets/y-axis-group-settings.js +72 -64
- package/dist/utils/cell-format-utils.js +27 -17
- package/dist/utils/cell-value-utils.js +11 -4
- package/dist/utils/chart-utils/base-utils.js +332 -324
- package/dist/utils/chart-utils/index.js +41 -28
- package/dist/utils/chart-utils/original-data-utils/basic-chart-calculator.js +84 -77
- package/dist/utils/chart-utils/original-data-utils/card-calculator.js +20 -13
- package/dist/utils/chart-utils/original-data-utils/combination-calculator.js +52 -45
- package/dist/utils/chart-utils/original-data-utils/compare-bar-chart-calculator.js +28 -21
- package/dist/utils/chart-utils/original-data-utils/completeness-calculator.js +40 -33
- package/dist/utils/chart-utils/original-data-utils/dashboard-calculator.js +23 -16
- package/dist/utils/chart-utils/original-data-utils/index.js +57 -50
- package/dist/utils/chart-utils/original-data-utils/mirror-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/pivot-table-calculator.js +96 -90
- package/dist/utils/chart-utils/original-data-utils/scatter-calculator.js +26 -19
- package/dist/utils/chart-utils/original-data-utils/trend-calculator.js +38 -31
- package/dist/utils/chart-utils/sql-statistics-utils.js +237 -229
- package/dist/utils/chart.js +17 -9
- package/dist/utils/collaborator-manager.js +9 -3
- package/dist/utils/collaborator-utils.js +31 -19
- package/dist/utils/collaborator.js +15 -6
- package/dist/utils/color-utils.js +29 -18
- package/dist/utils/column-utils.js +104 -77
- package/dist/utils/common-utils.js +53 -28
- package/dist/utils/concurrency-manager.js +7 -1
- package/dist/utils/contexts.js +12 -5
- package/dist/utils/date-translate.js +20 -12
- package/dist/utils/digital-sign-utils.js +14 -7
- package/dist/utils/event-bus.js +7 -1
- package/dist/utils/hotkey.js +11 -5
- package/dist/utils/index.js +221 -54
- package/dist/utils/key-generator.js +9 -2
- package/dist/utils/map.js +31 -22
- package/dist/utils/object-utils.js +8 -2
- package/dist/utils/options-utils.js +18 -10
- package/dist/utils/row-record-utils.js +178 -166
- package/dist/utils/row-utils.js +38 -27
- package/dist/utils/search.js +32 -24
- package/dist/utils/sql/chart-data-sql.js +112 -106
- package/dist/utils/sql/column-2-sql-column.js +168 -158
- package/dist/utils/sql/index.js +27 -3
- package/dist/utils/trend-utils.js +47 -39
- package/dist/view/index.js +96 -90
- package/dist/view/title/index.js +24 -16
- package/dist/view/wrapper/area-group.js +53 -45
- package/dist/view/wrapper/area.js +51 -43
- package/dist/view/wrapper/bar-compare.js +46 -38
- package/dist/view/wrapper/bar-custom-stack.js +47 -39
- package/dist/view/wrapper/bar-group.js +53 -45
- package/dist/view/wrapper/bar-stack.js +56 -48
- package/dist/view/wrapper/bar.js +48 -40
- package/dist/view/wrapper/basic-number-card.js +34 -26
- package/dist/view/wrapper/chart-component.js +131 -123
- package/dist/view/wrapper/combination.js +63 -55
- package/dist/view/wrapper/completeness-group.js +48 -40
- package/dist/view/wrapper/completeness.js +44 -36
- package/dist/view/wrapper/dashboard.js +44 -39
- package/dist/view/wrapper/funnel.js +43 -40
- package/dist/view/wrapper/heat-map.js +70 -62
- package/dist/view/wrapper/horizontal-bar-group.js +60 -52
- package/dist/view/wrapper/horizontal-bar-stack.js +55 -47
- package/dist/view/wrapper/horizontal-bar.js +49 -41
- package/dist/view/wrapper/index.js +115 -107
- package/dist/view/wrapper/line-group.js +51 -43
- package/dist/view/wrapper/line.js +50 -42
- package/dist/view/wrapper/map-bubble.js +48 -40
- package/dist/view/wrapper/map-world-bubble.js +47 -39
- package/dist/view/wrapper/map-world.js +49 -41
- package/dist/view/wrapper/map.js +50 -42
- package/dist/view/wrapper/mirror.js +49 -41
- package/dist/view/wrapper/pie.js +52 -44
- package/dist/view/wrapper/ring.js +57 -49
- package/dist/view/wrapper/scatter.js +50 -42
- package/dist/view/wrapper/table/index.js +22 -14
- package/dist/view/wrapper/table/one-dimension-table-no-numeric-columns.js +57 -49
- package/dist/view/wrapper/table/one-dimension-table-with-numeric-columns.js +61 -53
- package/dist/view/wrapper/table/pivot-table-display-name.js +90 -82
- package/dist/view/wrapper/table/two-dimension-table.js +93 -85
- package/dist/view/wrapper/table-element/components/dataset-utils.js +36 -23
- package/dist/view/wrapper/table-element/components/formatter.js +99 -90
- package/dist/view/wrapper/table-element/components/formatters/FileFormatter/index.js +32 -23
- package/dist/view/wrapper/table-element/components/formatters/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/formatters/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/formula-formatter.js +16 -9
- package/dist/view/wrapper/table-element/components/link-formatter.js +97 -90
- package/dist/view/wrapper/table-element/components/record.js +20 -13
- package/dist/view/wrapper/table-element/components/records-body.js +17 -9
- package/dist/view/wrapper/table-element/components/records-header/index.js +15 -7
- package/dist/view/wrapper/table-element/components/records-header/records-header-cell.js +16 -8
- package/dist/view/wrapper/table-element/components/records.js +33 -25
- package/dist/view/wrapper/table-element/components/resize-column-handle/resize-column-handle.js +12 -5
- package/dist/view/wrapper/table-element/components/utils.js +16 -6
- package/dist/view/wrapper/table-element/components/value-display-utils.js +11 -4
- package/dist/view/wrapper/table-element/components/vertical-scrollbar/index.js +13 -6
- package/dist/view/wrapper/table-element/index.js +26 -18
- package/dist/view/wrapper/treemap.js +46 -38
- package/dist/view/wrapper/trend.js +66 -58
- package/package.json +1 -1
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _utils = require("../utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class StackedHorizontalGroupBar extends _baseModel.default {
|
|
5
12
|
constructor(options) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.STACKED_HORIZONTAL_BAR
|
|
15
|
+
type: _constants.CHART_TYPE.STACKED_HORIZONTAL_BAR
|
|
9
16
|
});
|
|
10
17
|
|
|
11
18
|
// vertical axis data
|
|
@@ -15,17 +22,17 @@ class StackedHorizontalGroupBar extends BaseModel {
|
|
|
15
22
|
this.vertical_axis_include_empty = options.x_axis_include_empty_cells;
|
|
16
23
|
|
|
17
24
|
// vertical axis style
|
|
18
|
-
this.show_vertical_axis_label = isBoolean(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
25
|
+
this.show_vertical_axis_label = (0, _utils.isBoolean)(options.x_axis_show_label) ? options.x_axis_show_label : false;
|
|
19
26
|
this.vertical_axis_label_position = options.x_axis_label_position;
|
|
20
27
|
|
|
21
28
|
// horizontal axis data
|
|
22
|
-
this.horizontal_axis_summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
29
|
+
this.horizontal_axis_summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
23
30
|
this.horizontal_axis_column_key = options.y_axis_summary_column_key;
|
|
24
|
-
this.horizontal_axis_summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
31
|
+
this.horizontal_axis_summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
25
32
|
|
|
26
33
|
// horizontal axis style
|
|
27
|
-
this.horizontal_axis_label_color = options.y_axis_label_color || LABEL_COLORS[0];
|
|
28
|
-
this.show_horizontal_axis_label = isBoolean(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
34
|
+
this.horizontal_axis_label_color = options.y_axis_label_color || _constants.LABEL_COLORS[0];
|
|
35
|
+
this.show_horizontal_axis_label = (0, _utils.isBoolean)(options.y_axis_show_label) ? options.y_axis_show_label : false;
|
|
29
36
|
this.horizontal_axis_label_position = options.y_axis_label_position;
|
|
30
37
|
this.horizontal_axis_auto_range = options.y_axis_auto_range;
|
|
31
38
|
this.horizontal_axis_min = options.y_axis_min;
|
|
@@ -40,4 +47,4 @@ class StackedHorizontalGroupBar extends BaseModel {
|
|
|
40
47
|
this.label_font_size = options.label_font_size;
|
|
41
48
|
}
|
|
42
49
|
}
|
|
43
|
-
|
|
50
|
+
var _default = exports.default = StackedHorizontalGroupBar;
|
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _constants = require("../constants");
|
|
9
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
10
|
+
class TableElement extends _baseModel.default {
|
|
4
11
|
constructor(options, tables) {
|
|
5
12
|
super({
|
|
6
13
|
...options,
|
|
7
|
-
type: CHART_TYPE.TABLE_ELEMENT
|
|
14
|
+
type: _constants.CHART_TYPE.TABLE_ELEMENT
|
|
8
15
|
});
|
|
9
16
|
let column_keys = [];
|
|
10
17
|
const table_id = options.table_id;
|
|
@@ -19,4 +26,4 @@ class TableElement extends BaseModel {
|
|
|
19
26
|
this.show_cell_coloring = false;
|
|
20
27
|
}
|
|
21
28
|
}
|
|
22
|
-
|
|
29
|
+
var _default = exports.default = TableElement;
|
package/dist/model/table.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
class Table extends _baseModel.default {
|
|
4
11
|
constructor(options) {
|
|
5
12
|
super({
|
|
6
13
|
...options,
|
|
7
|
-
type: CHART_TYPE.TABLE
|
|
14
|
+
type: _constants.CHART_TYPE.TABLE
|
|
8
15
|
});
|
|
9
16
|
this.groupby_column_key = options.x_axis_column_key;
|
|
10
17
|
this.groupby_date_granularity = options.x_axis_date_granularity;
|
|
11
18
|
this.groupby_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
12
19
|
this.groupby_include_empty_cells = options.x_axis_include_empty_cells;
|
|
13
20
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
14
|
-
this.summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
15
|
-
this.summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
21
|
+
this.summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
22
|
+
this.summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
16
23
|
this.column_groupby_multiple_numeric_column = options.column_groupby_multiple_numeric_column;
|
|
17
24
|
this.summary_columns = options.summary_columns;
|
|
18
25
|
this.column_groupby_column_key = options.column_groupby_column_key;
|
|
@@ -20,4 +27,4 @@ class Table extends BaseModel {
|
|
|
20
27
|
this.column_groupby_geolocation_granularity = options.column_groupby_geolocation_granularity;
|
|
21
28
|
}
|
|
22
29
|
}
|
|
23
|
-
|
|
30
|
+
var _default = exports.default = Table;
|
package/dist/model/tree-map.js
CHANGED
|
@@ -1,20 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
class TreeMap extends _baseModel.default {
|
|
4
11
|
constructor(options) {
|
|
5
12
|
super({
|
|
6
13
|
...options,
|
|
7
|
-
type: CHART_TYPE.TREE_MAP
|
|
14
|
+
type: _constants.CHART_TYPE.TREE_MAP
|
|
8
15
|
});
|
|
9
16
|
this.groupby_column_key = options.x_axis_column_key;
|
|
10
17
|
this.groupby_date_granularity = options.x_axis_date_granularity;
|
|
11
18
|
this.groupby_geolocation_granularity = options.x_axis_geolocation_granularity;
|
|
12
19
|
this.groupby_include_empty_cells = options.x_axis_include_empty_cells;
|
|
13
|
-
this.summary_type = options.y_axis_summary_type || CHART_SUMMARY_TYPE.COUNT;
|
|
14
|
-
this.summary_method = options.y_axis_summary_method || CHART_SUMMARY_TYPE.SUM;
|
|
20
|
+
this.summary_type = options.y_axis_summary_type || _constants.CHART_SUMMARY_TYPE.COUNT;
|
|
21
|
+
this.summary_method = options.y_axis_summary_method || _constants.CHART_SUMMARY_TYPE.SUM;
|
|
15
22
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
16
23
|
this.sort_type = options.sort_type;
|
|
17
24
|
this.minimum_slice_percent = options.minimum_slice_percent;
|
|
18
25
|
}
|
|
19
26
|
}
|
|
20
|
-
|
|
27
|
+
var _default = exports.default = TreeMap;
|
package/dist/model/trend.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableUtils = require("dtable-utils");
|
|
9
|
+
var _constants = require("../constants");
|
|
10
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
11
|
+
class Trend extends _baseModel.default {
|
|
5
12
|
constructor(options, tables) {
|
|
6
13
|
super({
|
|
7
14
|
...options,
|
|
8
|
-
type: CHART_TYPE.TREND
|
|
15
|
+
type: _constants.CHART_TYPE.TREND
|
|
9
16
|
});
|
|
10
17
|
this.date_column_key = options.x_axis_column_key;
|
|
11
18
|
this.date_granularity = options.x_axis_date_granularity;
|
|
12
19
|
if (this.date_column_key && this.table_id) {
|
|
13
|
-
const table = getTableById(tables, this.table_id);
|
|
14
|
-
const column = getTableColumnByKey(table, this.date_column_key);
|
|
15
|
-
if (!column || !isDateColumn(column)) {
|
|
20
|
+
const table = (0, _dtableUtils.getTableById)(tables, this.table_id);
|
|
21
|
+
const column = (0, _dtableUtils.getTableColumnByKey)(table, this.date_column_key);
|
|
22
|
+
if (!column || !(0, _dtableUtils.isDateColumn)(column)) {
|
|
16
23
|
this.date_column_key = null;
|
|
17
24
|
this.date_granularity = null;
|
|
18
25
|
}
|
|
@@ -22,13 +29,13 @@ class Trend extends BaseModel {
|
|
|
22
29
|
this.summary_method = options.y_axis_summary_method;
|
|
23
30
|
this.num_font_size = options.num_font_size || 34;
|
|
24
31
|
this.num_font_color = options.num_font_color;
|
|
25
|
-
this.num_text_align = options.num_text_align || HORIZONTAL_ALIGN.LEFT;
|
|
32
|
+
this.num_text_align = options.num_text_align || _constants.HORIZONTAL_ALIGN.LEFT;
|
|
26
33
|
this.num_font_weight = options.num_font_weight || 700;
|
|
27
34
|
this.label = options.label || '';
|
|
28
35
|
this.card_label_font_size = options.card_label_font_size || 14;
|
|
29
36
|
this.label_font_color = options.label_font_color;
|
|
30
|
-
this.label_text_align = options.label_text_align || HORIZONTAL_ALIGN.LEFT;
|
|
37
|
+
this.label_text_align = options.label_text_align || _constants.HORIZONTAL_ALIGN.LEFT;
|
|
31
38
|
this.label_font_weight = options.label_font_weight || 400;
|
|
32
39
|
}
|
|
33
40
|
}
|
|
34
|
-
|
|
41
|
+
var _default = exports.default = Trend;
|
package/dist/model/user.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
1
7
|
class User {
|
|
2
8
|
constructor(obj) {
|
|
3
9
|
this.loaded = obj.loaded || false;
|
|
@@ -12,4 +18,4 @@ class User {
|
|
|
12
18
|
this.loaded = loaded;
|
|
13
19
|
}
|
|
14
20
|
}
|
|
15
|
-
|
|
21
|
+
var _default = exports.default = User;
|
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableUtils = require("dtable-utils");
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
12
|
+
class WorldMapBubble extends _baseModel.default {
|
|
6
13
|
constructor(options, tables) {
|
|
7
14
|
super({
|
|
8
15
|
...options,
|
|
9
|
-
type: CHART_TYPE.WORLD_MAP_BUBBLE
|
|
16
|
+
type: _constants.CHART_TYPE.WORLD_MAP_BUBBLE
|
|
10
17
|
});
|
|
11
18
|
this.geo_column_key = options.x_axis_column_key;
|
|
12
19
|
if (this.geo_column_key && this.table_id && tables) {
|
|
13
|
-
const table = getTableById(tables, this.table_id);
|
|
14
|
-
const column = getTableColumnByKey(table, this.geo_column_key);
|
|
15
|
-
if (!isStatisticWorldMapColumn(column)) {
|
|
20
|
+
const table = (0, _dtableUtils.getTableById)(tables, this.table_id);
|
|
21
|
+
const column = (0, _dtableUtils.getTableColumnByKey)(table, this.geo_column_key);
|
|
22
|
+
if (!(0, _utils.isStatisticWorldMapColumn)(column)) {
|
|
16
23
|
this.geo_column_key = null;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
this.summary_type = options.y_axis_summary_type;
|
|
20
27
|
this.summary_method = options.y_axis_summary_method;
|
|
21
|
-
if (this.summary_method === CHART_SUMMARY_TYPE.ROW_COUNT) {
|
|
22
|
-
this.summary_method = CHART_SUMMARY_TYPE.MAX;
|
|
28
|
+
if (this.summary_method === _constants.CHART_SUMMARY_TYPE.ROW_COUNT) {
|
|
29
|
+
this.summary_method = _constants.CHART_SUMMARY_TYPE.MAX;
|
|
23
30
|
}
|
|
24
31
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
25
32
|
this.legend_direction = options.legend_direction;
|
|
@@ -27,4 +34,4 @@ class WorldMapBubble extends BaseModel {
|
|
|
27
34
|
this.bubble_color = options.bubble_color;
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
var _default = exports.default = WorldMapBubble;
|
package/dist/model/world-map.js
CHANGED
|
@@ -1,25 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _dtableUtils = require("dtable-utils");
|
|
9
|
+
var _utils = require("../utils");
|
|
10
|
+
var _constants = require("../constants");
|
|
11
|
+
var _baseModel = _interopRequireDefault(require("./base-model"));
|
|
12
|
+
class WorldMap extends _baseModel.default {
|
|
6
13
|
constructor(options, tables) {
|
|
7
14
|
super({
|
|
8
15
|
...options,
|
|
9
|
-
type: CHART_TYPE.WORLD_MAP
|
|
16
|
+
type: _constants.CHART_TYPE.WORLD_MAP
|
|
10
17
|
});
|
|
11
18
|
this.geo_column_key = options.x_axis_column_key;
|
|
12
19
|
if (this.geo_column_key && this.table_id && tables) {
|
|
13
|
-
const table = getTableById(tables, this.table_id);
|
|
14
|
-
const column = getTableColumnByKey(table, this.geo_column_key);
|
|
15
|
-
if (!isStatisticWorldMapColumn(column)) {
|
|
20
|
+
const table = (0, _dtableUtils.getTableById)(tables, this.table_id);
|
|
21
|
+
const column = (0, _dtableUtils.getTableColumnByKey)(table, this.geo_column_key);
|
|
22
|
+
if (!(0, _utils.isStatisticWorldMapColumn)(column)) {
|
|
16
23
|
this.geo_column_key = null;
|
|
17
24
|
}
|
|
18
25
|
}
|
|
19
26
|
this.summary_type = options.y_axis_summary_type || 'count';
|
|
20
27
|
this.summary_method = options.y_axis_summary_method;
|
|
21
|
-
if (this.summary_method === CHART_SUMMARY_TYPE.ROW_COUNT) {
|
|
22
|
-
this.summary_method = CHART_SUMMARY_TYPE.MAX;
|
|
28
|
+
if (this.summary_method === _constants.CHART_SUMMARY_TYPE.ROW_COUNT) {
|
|
29
|
+
this.summary_method = _constants.CHART_SUMMARY_TYPE.MAX;
|
|
23
30
|
}
|
|
24
31
|
this.summary_column_key = options.y_axis_summary_column_key;
|
|
25
32
|
this.legend_direction = options.legend_direction;
|
|
@@ -27,4 +34,4 @@ class WorldMap extends BaseModel {
|
|
|
27
34
|
this.data_color = options.data_color;
|
|
28
35
|
}
|
|
29
36
|
}
|
|
30
|
-
|
|
37
|
+
var _default = exports.default = WorldMap;
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = fetchMapJson;
|
|
7
|
+
var _constants = require("../constants");
|
|
2
8
|
const urlMapJson = {};
|
|
3
9
|
function getMapJson(url) {
|
|
4
10
|
return urlMapJson[url];
|
|
@@ -8,7 +14,7 @@ function setMapJson(url, json) {
|
|
|
8
14
|
}
|
|
9
15
|
function getNameEnByMapLocation(mapLocation) {
|
|
10
16
|
const provinceName = mapLocation && mapLocation.province;
|
|
11
|
-
const province = provinceName && regions.find(province => province.name === provinceName);
|
|
17
|
+
const province = provinceName && _constants.regions.find(province => province.name === provinceName);
|
|
12
18
|
if (!province) return null;
|
|
13
19
|
let nameEN = {
|
|
14
20
|
province_name_en: province.name_en
|
|
@@ -30,24 +36,24 @@ function getNameEnByMapLocation(mapLocation) {
|
|
|
30
36
|
*/
|
|
31
37
|
function getMapJsonQueryUrl(mapLevel, mapLocation) {
|
|
32
38
|
switch (mapLevel) {
|
|
33
|
-
case MAP_LEVEL.WORLD:
|
|
39
|
+
case _constants.MAP_LEVEL.WORLD:
|
|
34
40
|
{
|
|
35
41
|
return 'world';
|
|
36
42
|
}
|
|
37
|
-
case MAP_LEVEL.COUNTRY:
|
|
43
|
+
case _constants.MAP_LEVEL.COUNTRY:
|
|
38
44
|
{
|
|
39
45
|
return 'china';
|
|
40
46
|
}
|
|
41
|
-
case MAP_LEVEL.PROVINCE:
|
|
47
|
+
case _constants.MAP_LEVEL.PROVINCE:
|
|
42
48
|
{
|
|
43
49
|
const nameEn = getNameEnByMapLocation(mapLocation);
|
|
44
50
|
const provinceNameEn = nameEn && nameEn.province_name_en;
|
|
45
51
|
if (!provinceNameEn) {
|
|
46
52
|
return null;
|
|
47
53
|
}
|
|
48
|
-
return
|
|
54
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn);
|
|
49
55
|
}
|
|
50
|
-
case MAP_LEVEL.CITY:
|
|
56
|
+
case _constants.MAP_LEVEL.CITY:
|
|
51
57
|
{
|
|
52
58
|
const nameEn = getNameEnByMapLocation(mapLocation);
|
|
53
59
|
const provinceNameEn = nameEn && nameEn.province_name_en;
|
|
@@ -58,9 +64,9 @@ function getMapJsonQueryUrl(mapLevel, mapLocation) {
|
|
|
58
64
|
|
|
59
65
|
// e.g. 北京市/北京市
|
|
60
66
|
if (provinceNameEn === cityNameEn) {
|
|
61
|
-
return
|
|
67
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn);
|
|
62
68
|
}
|
|
63
|
-
return
|
|
69
|
+
return "region-mapjson/".concat(provinceNameEn, "/").concat(provinceNameEn, "_").concat(cityNameEn);
|
|
64
70
|
}
|
|
65
71
|
default:
|
|
66
72
|
{
|
|
@@ -77,7 +83,7 @@ function handleLoadedMapJson(url, mapJson) {
|
|
|
77
83
|
console.error('on handleLoadedMapJson: mapJson is invalid');
|
|
78
84
|
return null;
|
|
79
85
|
}
|
|
80
|
-
|
|
86
|
+
async function fetchMapJson(mapLevel, mapLocation, mediaUrl) {
|
|
81
87
|
const url = getMapJsonQueryUrl(mapLevel, mapLocation);
|
|
82
88
|
if (!url) {
|
|
83
89
|
console.error('on fetchMapJson: url is null');
|
|
@@ -88,7 +94,7 @@ export default async function fetchMapJson(mapLevel, mapLocation, mediaUrl) {
|
|
|
88
94
|
}
|
|
89
95
|
let mapJson;
|
|
90
96
|
try {
|
|
91
|
-
const res = await fetch(
|
|
97
|
+
const res = await fetch("".concat(mediaUrl, "dtable-statistic/geolocation/").concat(url, ".json"));
|
|
92
98
|
if (!res.ok) {
|
|
93
99
|
return null;
|
|
94
100
|
}
|
|
@@ -1,14 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.default = void 0;
|
|
9
|
+
var _DTableSwitch2 = _interopRequireDefault(require("dtable-ui-component/lib/DTableSwitch"));
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
var _dtableUtils = require("dtable-utils");
|
|
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 _yAxisGroupSettings = _interopRequireDefault(require("../widgets/y-axis-group-settings"));
|
|
16
|
+
var _columnUtils = require("../../utils/column-utils");
|
|
17
|
+
var _constants = require("../../constants");
|
|
18
|
+
var _intl = _interopRequireDefault(require("../../intl"));
|
|
19
|
+
var _dataSort = _interopRequireDefault(require("../widgets/data-sort"));
|
|
12
20
|
const DataSettings = _ref => {
|
|
13
21
|
let {
|
|
14
22
|
chart,
|
|
@@ -18,7 +26,7 @@ const DataSettings = _ref => {
|
|
|
18
26
|
xLabel = 'X_axis',
|
|
19
27
|
yLabel = 'Y_axis'
|
|
20
28
|
} = _ref;
|
|
21
|
-
const onXAxisColumnChange = useCallback(column => {
|
|
29
|
+
const onXAxisColumnChange = (0, _react.useCallback)(column => {
|
|
22
30
|
const {
|
|
23
31
|
config
|
|
24
32
|
} = chart;
|
|
@@ -38,18 +46,18 @@ const DataSettings = _ref => {
|
|
|
38
46
|
update['x_axis_date_granularity'] = null;
|
|
39
47
|
update['x_axis_geolocation_granularity'] = null;
|
|
40
48
|
} else {
|
|
41
|
-
if (DATE_COLUMN_OPTIONS.includes(type) || isDateFormulaColumn(column)) {
|
|
42
|
-
update['x_axis_date_granularity'] = CHART_SUMMARY_TYPE.MONTH;
|
|
49
|
+
if (_dtableUtils.DATE_COLUMN_OPTIONS.includes(type) || (0, _columnUtils.isDateFormulaColumn)(column)) {
|
|
50
|
+
update['x_axis_date_granularity'] = _constants.CHART_SUMMARY_TYPE.MONTH;
|
|
43
51
|
update['x_axis_geolocation_granularity'] = null;
|
|
44
|
-
} else if (type === CellType.GEOLOCATION) {
|
|
52
|
+
} else if (type === _dtableUtils.CellType.GEOLOCATION) {
|
|
45
53
|
const {
|
|
46
54
|
geo_format
|
|
47
55
|
} = column.data || {};
|
|
48
|
-
if (geo_format === GEOLOCATION_FORMAT_MAP.PROVINCE) {
|
|
49
|
-
update['x_axis_geolocation_granularity'] = GEOLOCATION_FORMAT_MAP.PROVINCE;
|
|
50
|
-
} else if (geo_format === GEOLOCATION_FORMAT_MAP.PROVINCE_CITY) {
|
|
51
|
-
update['x_axis_geolocation_granularity'] = GEOLOCATION_FORMAT_CITY;
|
|
52
|
-
} else if (geo_format === GEOLOCATION_FORMAT_MAP.GEOLOCATION || !geo_format) {
|
|
56
|
+
if (geo_format === _constants.GEOLOCATION_FORMAT_MAP.PROVINCE) {
|
|
57
|
+
update['x_axis_geolocation_granularity'] = _constants.GEOLOCATION_FORMAT_MAP.PROVINCE;
|
|
58
|
+
} else if (geo_format === _constants.GEOLOCATION_FORMAT_MAP.PROVINCE_CITY) {
|
|
59
|
+
update['x_axis_geolocation_granularity'] = _constants.GEOLOCATION_FORMAT_CITY;
|
|
60
|
+
} else if (geo_format === _constants.GEOLOCATION_FORMAT_MAP.GEOLOCATION || !geo_format) {
|
|
53
61
|
update['x_axis_geolocation_granularity'] = 'district';
|
|
54
62
|
} else {
|
|
55
63
|
update['x_axis_geolocation_granularity'] = null;
|
|
@@ -59,7 +67,7 @@ const DataSettings = _ref => {
|
|
|
59
67
|
}
|
|
60
68
|
onChange && onChange(update);
|
|
61
69
|
}, [chart, onChange]);
|
|
62
|
-
const onGroupbyDateGranularityChange = useCallback(option => {
|
|
70
|
+
const onGroupbyDateGranularityChange = (0, _react.useCallback)(option => {
|
|
63
71
|
const {
|
|
64
72
|
config
|
|
65
73
|
} = chart;
|
|
@@ -72,7 +80,7 @@ const DataSettings = _ref => {
|
|
|
72
80
|
x_axis_date_granularity: value
|
|
73
81
|
});
|
|
74
82
|
}, [chart, onChange]);
|
|
75
|
-
const onGroupbyGeolocationGranularityChange = useCallback(option => {
|
|
83
|
+
const onGroupbyGeolocationGranularityChange = (0, _react.useCallback)(option => {
|
|
76
84
|
const {
|
|
77
85
|
config
|
|
78
86
|
} = chart;
|
|
@@ -85,7 +93,7 @@ const DataSettings = _ref => {
|
|
|
85
93
|
x_axis_geolocation_granularity: value
|
|
86
94
|
});
|
|
87
95
|
}, [chart, onChange]);
|
|
88
|
-
const onIncludeEmptyChange = useCallback(event => {
|
|
96
|
+
const onIncludeEmptyChange = (0, _react.useCallback)(event => {
|
|
89
97
|
const {
|
|
90
98
|
config
|
|
91
99
|
} = chart;
|
|
@@ -96,14 +104,14 @@ const DataSettings = _ref => {
|
|
|
96
104
|
x_axis_include_empty_cells: !x_axis_include_empty_cells
|
|
97
105
|
});
|
|
98
106
|
}, [chart, onChange]);
|
|
99
|
-
const renderDataSort = useCallback(() => {
|
|
107
|
+
const renderDataSort = (0, _react.useCallback)(() => {
|
|
100
108
|
const {
|
|
101
109
|
config
|
|
102
110
|
} = chart;
|
|
103
|
-
if (!SUPPORT_DATA_SORT_CHART_TYPES.includes(config.type)) return null;
|
|
104
|
-
return /*#__PURE__*/
|
|
111
|
+
if (!_constants.SUPPORT_DATA_SORT_CHART_TYPES.includes(config.type)) return null;
|
|
112
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
105
113
|
className: "mt-4"
|
|
106
|
-
}), /*#__PURE__*/
|
|
114
|
+
}), /*#__PURE__*/_react.default.createElement(_dataSort.default, {
|
|
107
115
|
chart: chart,
|
|
108
116
|
onChange: onChange
|
|
109
117
|
}));
|
|
@@ -118,15 +126,15 @@ const DataSettings = _ref => {
|
|
|
118
126
|
x_axis_geolocation_granularity,
|
|
119
127
|
x_axis_include_empty_cells
|
|
120
128
|
} = config;
|
|
121
|
-
return /*#__PURE__*/
|
|
129
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_commonDataSettings.default, {
|
|
122
130
|
dataSources: dataSources,
|
|
123
131
|
chart: chart,
|
|
124
132
|
tables: tables,
|
|
125
133
|
onChange: onChange
|
|
126
|
-
}), /*#__PURE__*/
|
|
134
|
+
}), /*#__PURE__*/_react.default.createElement(_groupBy.default, {
|
|
127
135
|
tables: tables,
|
|
128
136
|
className: "selected-x-axis",
|
|
129
|
-
label:
|
|
137
|
+
label: _intl.default.get(xLabel),
|
|
130
138
|
selectedTableId: table_id,
|
|
131
139
|
selectedColumnKey: x_axis_column_key,
|
|
132
140
|
selectedDateGranularity: x_axis_date_granularity,
|
|
@@ -134,18 +142,18 @@ const DataSettings = _ref => {
|
|
|
134
142
|
onGroupByChange: onXAxisColumnChange,
|
|
135
143
|
onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
|
|
136
144
|
onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
|
|
137
|
-
}), /*#__PURE__*/
|
|
145
|
+
}), /*#__PURE__*/_react.default.createElement(_DTableSwitch2.default, {
|
|
138
146
|
checked: x_axis_include_empty_cells,
|
|
139
|
-
placeholder:
|
|
147
|
+
placeholder: _intl.default.get('Include_empty'),
|
|
140
148
|
onChange: onIncludeEmptyChange
|
|
141
|
-
}), /*#__PURE__*/
|
|
149
|
+
}), /*#__PURE__*/_react.default.createElement(_divider.default, {
|
|
142
150
|
className: "mt-4"
|
|
143
|
-
}), /*#__PURE__*/
|
|
151
|
+
}), /*#__PURE__*/_react.default.createElement(_yAxisGroupSettings.default, {
|
|
144
152
|
className: "selected-y-axis",
|
|
145
|
-
label:
|
|
153
|
+
label: _intl.default.get(yLabel),
|
|
146
154
|
chart: chart,
|
|
147
155
|
tables: tables,
|
|
148
156
|
onChange: onChange
|
|
149
157
|
}), renderDataSort());
|
|
150
158
|
};
|
|
151
|
-
|
|
159
|
+
var _default = exports.default = DataSettings;
|
|
@@ -1,3 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
Object.defineProperty(exports, "AdvanceBarDataSettings", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () {
|
|
10
|
+
return _dataSettings.default;
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
Object.defineProperty(exports, "AdvanceBarStyleSettings", {
|
|
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"));
|