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,25 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
|
-
var _utils = require("../../utils");
|
|
17
|
-
var _colorRules = require("../../constants/color-rules");
|
|
18
|
-
var _context = _interopRequireDefault(require("../../context"));
|
|
19
|
-
var _mapJson = _interopRequireDefault(require("../../services/map-json"));
|
|
20
|
-
var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
|
|
21
|
-
var _chartComponent = _interopRequireDefault(require("./chart-component"));
|
|
22
|
-
class Map extends _chartComponent.default {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { debounce } from 'lodash-es';
|
|
4
|
+
import * as d3 from 'd3';
|
|
5
|
+
import { feature } from 'topojson';
|
|
6
|
+
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
7
|
+
import { CHART_SUMMARY_TYPE, MAP_LEVEL, DEFAULT_NUMBER_FORMAT_OBJECT, CHART_THEME_COLOR } from '../../constants';
|
|
8
|
+
import { BaseUtils } from '../../utils';
|
|
9
|
+
import { COLOR_OPTIONS } from '../../constants/color-rules';
|
|
10
|
+
import context from '../../context';
|
|
11
|
+
import fetchMapJson from '../../services/map-json';
|
|
12
|
+
import ToolTip from '../../components/tooltip';
|
|
13
|
+
import ChartComponent from './chart-component';
|
|
14
|
+
class Map extends ChartComponent {
|
|
23
15
|
constructor(props) {
|
|
24
16
|
super(props);
|
|
25
17
|
this.handleResize = () => {
|
|
@@ -45,15 +37,16 @@ class Map extends _chartComponent.default {
|
|
|
45
37
|
const {
|
|
46
38
|
type
|
|
47
39
|
} = chart.config;
|
|
48
|
-
const mediaUrl =
|
|
49
|
-
const mapJson = await (
|
|
40
|
+
const mediaUrl = context.getSetting('mediaUrl');
|
|
41
|
+
const mapJson = await fetchMapJson(MAP_LEVEL.WORLD, '', mediaUrl);
|
|
50
42
|
if (!mapJson) return;
|
|
51
|
-
const newMapJson =
|
|
43
|
+
const newMapJson = feature(mapJson, mapJson.objects);
|
|
52
44
|
const statisticNewData = this.formatWorldMapStatisticData(data, newMapJson, type);
|
|
53
45
|
this.draw(statisticNewData, newMapJson);
|
|
54
46
|
};
|
|
55
47
|
this.showTooltip = (event, data) => {
|
|
56
48
|
const curData = data.find(item => item.name.includes(event.target.parentNode.getAttribute('data-name')));
|
|
49
|
+
if (!curData) return;
|
|
57
50
|
const title = curData.nameType === 'en' ? curData.name : curData.name_cn;
|
|
58
51
|
const value = Number(event.target.parentNode.getAttribute('data-value'));
|
|
59
52
|
const {
|
|
@@ -102,7 +95,7 @@ class Map extends _chartComponent.default {
|
|
|
102
95
|
canvasStyle,
|
|
103
96
|
isCalculateByView
|
|
104
97
|
} = this.props;
|
|
105
|
-
const theme =
|
|
98
|
+
const theme = CHART_THEME_COLOR[globalTheme];
|
|
106
99
|
const {
|
|
107
100
|
data_color,
|
|
108
101
|
legend_size,
|
|
@@ -114,7 +107,7 @@ class Map extends _chartComponent.default {
|
|
|
114
107
|
height: chartHeight,
|
|
115
108
|
insertPadding
|
|
116
109
|
} = this.chartBoundingClientRect;
|
|
117
|
-
const currentColorOption =
|
|
110
|
+
const currentColorOption = COLOR_OPTIONS.filter(item => item.name === data_color)[0] || COLOR_OPTIONS[0];
|
|
118
111
|
const {
|
|
119
112
|
exampleColors,
|
|
120
113
|
highlightedBorderColor
|
|
@@ -191,7 +184,7 @@ class Map extends _chartComponent.default {
|
|
|
191
184
|
colorRange: exampleColors,
|
|
192
185
|
legendDirection: legend_direction,
|
|
193
186
|
legendSize: legend_size,
|
|
194
|
-
legendTextRange: [
|
|
187
|
+
legendTextRange: [BaseUtils.getSummaryValueDisplayString(columnData, minVal, summary_method), BaseUtils.getSummaryValueDisplayString(columnData, maxVal, summary_method)]
|
|
195
188
|
});
|
|
196
189
|
};
|
|
197
190
|
this.handleAcitveAndInActiveState = (state, event, highlightedBorderColor) => {
|
|
@@ -216,11 +209,11 @@ class Map extends _chartComponent.default {
|
|
|
216
209
|
summary_column_key,
|
|
217
210
|
table_id
|
|
218
211
|
} = chart.config;
|
|
219
|
-
let columnData =
|
|
220
|
-
if (summary_type ===
|
|
221
|
-
const table =
|
|
222
|
-
const summaryColumn =
|
|
223
|
-
columnData = summaryColumn.data ||
|
|
212
|
+
let columnData = DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
213
|
+
if (summary_type === CHART_SUMMARY_TYPE.ADVANCED) {
|
|
214
|
+
const table = getTableById(table_id);
|
|
215
|
+
const summaryColumn = getTableColumnByKey(table, summary_column_key) || {};
|
|
216
|
+
columnData = summaryColumn.data || DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
224
217
|
}
|
|
225
218
|
return columnData;
|
|
226
219
|
};
|
|
@@ -234,12 +227,12 @@ class Map extends _chartComponent.default {
|
|
|
234
227
|
componentDidMount() {
|
|
235
228
|
this.createChart();
|
|
236
229
|
this.drawChart();
|
|
237
|
-
this.debouncedHandleResize =
|
|
230
|
+
this.debouncedHandleResize = debounce(this.handleResize, 300);
|
|
238
231
|
window.addEventListener('resize', this.debouncedHandleResize);
|
|
239
232
|
}
|
|
240
233
|
componentDidUpdate(prevProps) {
|
|
241
234
|
super.componentDidUpdate(prevProps);
|
|
242
|
-
if (
|
|
235
|
+
if (BaseUtils.shouldChartComponentUpdate(prevProps, this.props)) {
|
|
243
236
|
this.destroyChart();
|
|
244
237
|
this.createChart();
|
|
245
238
|
this.drawChart();
|
|
@@ -254,10 +247,10 @@ class Map extends _chartComponent.default {
|
|
|
254
247
|
tooltipData,
|
|
255
248
|
toolTipPosition
|
|
256
249
|
} = this.state;
|
|
257
|
-
return /*#__PURE__*/
|
|
250
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
258
251
|
ref: ref => this.container = ref,
|
|
259
252
|
className: "sea-chart-container"
|
|
260
|
-
}, /*#__PURE__*/
|
|
253
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
261
254
|
tooltipData: tooltipData,
|
|
262
255
|
toolTipPosition: toolTipPosition,
|
|
263
256
|
chart: this.chart
|
|
@@ -265,16 +258,16 @@ class Map extends _chartComponent.default {
|
|
|
265
258
|
}
|
|
266
259
|
}
|
|
267
260
|
Map.propTypes = {
|
|
268
|
-
canvasStyle:
|
|
269
|
-
chart:
|
|
270
|
-
groupbyColumn:
|
|
271
|
-
columnGroupbyColumn:
|
|
272
|
-
summaryColumn:
|
|
273
|
-
result:
|
|
274
|
-
tables:
|
|
275
|
-
globalTheme:
|
|
276
|
-
chartColorTheme:
|
|
277
|
-
toggleRecords:
|
|
278
|
-
customRender:
|
|
261
|
+
canvasStyle: PropTypes.object,
|
|
262
|
+
chart: PropTypes.object,
|
|
263
|
+
groupbyColumn: PropTypes.object,
|
|
264
|
+
columnGroupbyColumn: PropTypes.object,
|
|
265
|
+
summaryColumn: PropTypes.object,
|
|
266
|
+
result: PropTypes.array,
|
|
267
|
+
tables: PropTypes.array,
|
|
268
|
+
globalTheme: PropTypes.string,
|
|
269
|
+
chartColorTheme: PropTypes.string,
|
|
270
|
+
toggleRecords: PropTypes.func,
|
|
271
|
+
customRender: PropTypes.func
|
|
279
272
|
};
|
|
280
|
-
|
|
273
|
+
export default Map;
|
package/dist/view/wrapper/map.js
CHANGED
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
|
-
var _utils = require("../../utils");
|
|
17
|
-
var _colorRules = require("../../constants/color-rules");
|
|
18
|
-
var _context = _interopRequireDefault(require("../../context"));
|
|
19
|
-
var _mapJson = _interopRequireDefault(require("../../services/map-json"));
|
|
20
|
-
var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
|
|
21
|
-
var _chartComponent = _interopRequireDefault(require("./chart-component"));
|
|
22
|
-
class Map extends _chartComponent.default {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { debounce } from 'lodash-es';
|
|
4
|
+
import * as d3 from 'd3';
|
|
5
|
+
import { feature } from 'topojson';
|
|
6
|
+
import { getTableById, getTableColumnByKey } from 'dtable-utils';
|
|
7
|
+
import { CHART_SUMMARY_TYPE, MAP_LEVEL, DEFAULT_NUMBER_FORMAT_OBJECT, CHART_THEME_COLOR } from '../../constants';
|
|
8
|
+
import { BaseUtils } from '../../utils';
|
|
9
|
+
import { COLOR_OPTIONS } from '../../constants/color-rules';
|
|
10
|
+
import context from '../../context';
|
|
11
|
+
import fetchMapJson from '../../services/map-json';
|
|
12
|
+
import ToolTip from '../../components/tooltip';
|
|
13
|
+
import ChartComponent from './chart-component';
|
|
14
|
+
class Map extends ChartComponent {
|
|
23
15
|
constructor(props) {
|
|
24
16
|
super(props);
|
|
25
17
|
this.handleResize = () => {
|
|
@@ -44,13 +36,13 @@ class Map extends _chartComponent.default {
|
|
|
44
36
|
if (!Array.isArray(data)) return;
|
|
45
37
|
const {
|
|
46
38
|
map_location,
|
|
47
|
-
map_level =
|
|
39
|
+
map_level = MAP_LEVEL.COUNTRY,
|
|
48
40
|
type
|
|
49
41
|
} = chart.config;
|
|
50
|
-
const mediaUrl =
|
|
51
|
-
const mapJson = await (
|
|
42
|
+
const mediaUrl = context.getSetting('mediaUrl');
|
|
43
|
+
const mapJson = await fetchMapJson(map_level, map_location, mediaUrl);
|
|
52
44
|
if (!mapJson) return;
|
|
53
|
-
const newMapJson = map_level ===
|
|
45
|
+
const newMapJson = map_level === MAP_LEVEL.COUNTRY ? feature(mapJson, mapJson.objects) : mapJson;
|
|
54
46
|
const statisticNewData = this.formatMapStatisticData(data, newMapJson, type);
|
|
55
47
|
this.draw(statisticNewData, newMapJson);
|
|
56
48
|
};
|
|
@@ -102,7 +94,7 @@ class Map extends _chartComponent.default {
|
|
|
102
94
|
globalTheme,
|
|
103
95
|
canvasStyle
|
|
104
96
|
} = this.props;
|
|
105
|
-
const theme =
|
|
97
|
+
const theme = CHART_THEME_COLOR[globalTheme];
|
|
106
98
|
const {
|
|
107
99
|
data_color,
|
|
108
100
|
legend_size,
|
|
@@ -114,7 +106,7 @@ class Map extends _chartComponent.default {
|
|
|
114
106
|
height: chartHeight,
|
|
115
107
|
insertPadding
|
|
116
108
|
} = this.chartBoundingClientRect;
|
|
117
|
-
const currentColorOption =
|
|
109
|
+
const currentColorOption = COLOR_OPTIONS.filter(item => item.name === data_color)[0] || COLOR_OPTIONS[0];
|
|
118
110
|
const {
|
|
119
111
|
exampleColors,
|
|
120
112
|
highlightedBorderColor
|
|
@@ -179,7 +171,7 @@ class Map extends _chartComponent.default {
|
|
|
179
171
|
colorRange: exampleColors,
|
|
180
172
|
legendDirection: legend_direction,
|
|
181
173
|
legendSize: legend_size,
|
|
182
|
-
legendTextRange: [
|
|
174
|
+
legendTextRange: [BaseUtils.getSummaryValueDisplayString(columnData, minVal, summary_method), BaseUtils.getSummaryValueDisplayString(columnData, maxVal, summary_method)]
|
|
183
175
|
});
|
|
184
176
|
};
|
|
185
177
|
this.handleAcitveAndInActiveState = (state, event, highlightedBorderColor) => {
|
|
@@ -204,11 +196,11 @@ class Map extends _chartComponent.default {
|
|
|
204
196
|
summary_column_key,
|
|
205
197
|
table_id
|
|
206
198
|
} = chart.config;
|
|
207
|
-
let columnData =
|
|
208
|
-
if (summary_type ===
|
|
209
|
-
const table =
|
|
210
|
-
const summaryColumn =
|
|
211
|
-
columnData = summaryColumn.data ||
|
|
199
|
+
let columnData = DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
200
|
+
if (summary_type === CHART_SUMMARY_TYPE.ADVANCED) {
|
|
201
|
+
const table = getTableById(table_id);
|
|
202
|
+
const summaryColumn = getTableColumnByKey(table, summary_column_key) || {};
|
|
203
|
+
columnData = summaryColumn.data || DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
212
204
|
}
|
|
213
205
|
return columnData;
|
|
214
206
|
};
|
|
@@ -222,12 +214,12 @@ class Map extends _chartComponent.default {
|
|
|
222
214
|
componentDidMount() {
|
|
223
215
|
this.createChart();
|
|
224
216
|
this.drawChart();
|
|
225
|
-
this.debouncedHandleResize =
|
|
217
|
+
this.debouncedHandleResize = debounce(this.handleResize, 300);
|
|
226
218
|
window.addEventListener('resize', this.debouncedHandleResize);
|
|
227
219
|
}
|
|
228
220
|
componentDidUpdate(prevProps) {
|
|
229
221
|
super.componentDidUpdate(prevProps);
|
|
230
|
-
if (
|
|
222
|
+
if (BaseUtils.shouldChartComponentUpdate(prevProps, this.props)) {
|
|
231
223
|
this.destroyChart();
|
|
232
224
|
this.createChart();
|
|
233
225
|
this.drawChart();
|
|
@@ -242,10 +234,10 @@ class Map extends _chartComponent.default {
|
|
|
242
234
|
tooltipData,
|
|
243
235
|
toolTipPosition
|
|
244
236
|
} = this.state;
|
|
245
|
-
return /*#__PURE__*/
|
|
237
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
246
238
|
ref: ref => this.container = ref,
|
|
247
239
|
className: "sea-chart-container"
|
|
248
|
-
}, /*#__PURE__*/
|
|
240
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
249
241
|
tooltipData: tooltipData,
|
|
250
242
|
toolTipPosition: toolTipPosition,
|
|
251
243
|
chart: this.chart
|
|
@@ -253,16 +245,16 @@ class Map extends _chartComponent.default {
|
|
|
253
245
|
}
|
|
254
246
|
}
|
|
255
247
|
Map.propTypes = {
|
|
256
|
-
canvasStyle:
|
|
257
|
-
chart:
|
|
258
|
-
groupbyColumn:
|
|
259
|
-
columnGroupbyColumn:
|
|
260
|
-
summaryColumn:
|
|
261
|
-
result:
|
|
262
|
-
tables:
|
|
263
|
-
globalTheme:
|
|
264
|
-
chartColorTheme:
|
|
265
|
-
toggleRecords:
|
|
266
|
-
customRender:
|
|
248
|
+
canvasStyle: PropTypes.object,
|
|
249
|
+
chart: PropTypes.object,
|
|
250
|
+
groupbyColumn: PropTypes.object,
|
|
251
|
+
columnGroupbyColumn: PropTypes.object,
|
|
252
|
+
summaryColumn: PropTypes.object,
|
|
253
|
+
result: PropTypes.array,
|
|
254
|
+
tables: PropTypes.array,
|
|
255
|
+
globalTheme: PropTypes.string,
|
|
256
|
+
chartColorTheme: PropTypes.string,
|
|
257
|
+
toggleRecords: PropTypes.func,
|
|
258
|
+
customRender: PropTypes.func
|
|
267
259
|
};
|
|
268
|
-
|
|
260
|
+
export default Map;
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
14
|
-
var _dtableUtils = require("dtable-utils");
|
|
15
|
-
var _constants = require("../../constants");
|
|
16
|
-
var _utils = require("../../utils");
|
|
17
|
-
var _intl = _interopRequireDefault(require("../../intl"));
|
|
18
|
-
var _tooltip = _interopRequireDefault(require("../../components/tooltip"));
|
|
19
|
-
var _chartComponent = _interopRequireDefault(require("./chart-component"));
|
|
20
|
-
class Mirror extends _chartComponent.default {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { debounce } from 'lodash-es';
|
|
4
|
+
import * as d3 from 'd3';
|
|
5
|
+
import classNames from 'classnames';
|
|
6
|
+
import { getTableById, getTableColumnByKey, getNumberDisplayString } from 'dtable-utils';
|
|
7
|
+
import { CHART_SUMMARY_SHOW, DEFAULT_NUMBER_FORMAT_OBJECT, CHART_SUMMARY_TYPE, TITLE_AMOUNT } from '../../constants';
|
|
8
|
+
import { BaseUtils } from '../../utils';
|
|
9
|
+
import intl from '../../intl';
|
|
10
|
+
import ToolTip from '../../components/tooltip';
|
|
11
|
+
import ChartComponent from './chart-component';
|
|
12
|
+
class Mirror extends ChartComponent {
|
|
21
13
|
constructor(props) {
|
|
22
14
|
super(props);
|
|
23
15
|
this.handleResize = () => {
|
|
@@ -39,7 +31,7 @@ class Mirror extends _chartComponent.default {
|
|
|
39
31
|
let {
|
|
40
32
|
result
|
|
41
33
|
} = this.props;
|
|
42
|
-
const data =
|
|
34
|
+
const data = BaseUtils.formatEmptyName(result.data, '', intl.get('Empty'));
|
|
43
35
|
if (!Array.isArray(data)) return;
|
|
44
36
|
this.draw({
|
|
45
37
|
data,
|
|
@@ -60,7 +52,7 @@ class Mirror extends _chartComponent.default {
|
|
|
60
52
|
offsetY
|
|
61
53
|
} = event;
|
|
62
54
|
const newTooltipData = {
|
|
63
|
-
title: summary_type === 'count' ?
|
|
55
|
+
title: summary_type === 'count' ? intl.get(TITLE_AMOUNT) : intl.get(CHART_SUMMARY_SHOW[summary_method]),
|
|
64
56
|
items: [{
|
|
65
57
|
color: '',
|
|
66
58
|
name: data.name,
|
|
@@ -116,11 +108,11 @@ class Mirror extends _chartComponent.default {
|
|
|
116
108
|
bottomLegendSpace
|
|
117
109
|
} = this.chartBoundingClientRect;
|
|
118
110
|
const themeColors = this.getThemeColors();
|
|
119
|
-
let columnData =
|
|
120
|
-
if (summary_type ===
|
|
121
|
-
const table =
|
|
122
|
-
const summaryColumn =
|
|
123
|
-
columnData = summaryColumn.data ||
|
|
111
|
+
let columnData = DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
112
|
+
if (summary_type === CHART_SUMMARY_TYPE.ADVANCED) {
|
|
113
|
+
const table = getTableById(tables, table_id);
|
|
114
|
+
const summaryColumn = getTableColumnByKey(table, summary_column) || {};
|
|
115
|
+
columnData = summaryColumn.data || DEFAULT_NUMBER_FORMAT_OBJECT;
|
|
124
116
|
}
|
|
125
117
|
const scaleBandDomain = Array.from(new Set(data.map(d => d.group_name)));
|
|
126
118
|
const scaleBand = d3.scaleBand().domain(scaleBandDomain).range(is_transpose ? [insertPadding, chartWidth - insertPadding] : [insertPadding, chartHeight - insertPadding - bottomLegendSpace]).paddingInner(0.1).paddingOuter(0);
|
|
@@ -130,13 +122,13 @@ class Mirror extends _chartComponent.default {
|
|
|
130
122
|
const scaleLinear1 = d3.scaleLinear().domain([maxDomain, 0]).range([scaleBand(scaleBandDomain[0]), scaleBand.bandwidth()]);
|
|
131
123
|
const scaleLinear2 = d3.scaleLinear().domain([0, maxDomain]).range([scaleBand(scaleBandDomain[1]), scaleBand(scaleBandDomain[1]) + scaleBand.bandwidth()]);
|
|
132
124
|
const scaleLinearWrapper = this.chart.append('g').attr('class', 'scale-linear-axis-wrapper');
|
|
133
|
-
scaleLinearWrapper.append('g').attr('class', 'scale-linear-1').attr('transform', is_transpose ?
|
|
125
|
+
scaleLinearWrapper.append('g').attr('class', 'scale-linear-1').attr('transform', is_transpose ? `translate(0, ${chartHeight - insertPadding - bottomLegendSpace})` : `translate(${insertPadding}, 0)`).call(is_transpose ? d3.axisBottom(scaleLinear1).tickSizeInner(0).tickSizeOuter(0).ticks(5) : d3.axisLeft(scaleLinear1).tickSizeInner(0).tickSizeOuter(0).ticks(5)).call(g => {
|
|
134
126
|
g.select('.domain').remove();
|
|
135
127
|
g.selectAll('text').attr('font-size', themeColors.fontSize).attr('fill', themeColors.textColor);
|
|
136
128
|
g.selectAll('.tick line').attr('stroke', themeColors.gridColor);
|
|
137
129
|
is_transpose ? g.selectAll('.tick line').attr('y2', -(chartHeight - insertPadding - insertPadding - bottomLegendSpace)) : g.selectAll('.tick line').attr('x2', chartWidth - insertPadding - insertPadding);
|
|
138
130
|
});
|
|
139
|
-
scaleLinearWrapper.append('g').attr('class', 'scale-linear-2').attr('transform', is_transpose ?
|
|
131
|
+
scaleLinearWrapper.append('g').attr('class', 'scale-linear-2').attr('transform', is_transpose ? `translate(0, ${chartHeight - insertPadding - bottomLegendSpace})` : `translate(${insertPadding}, 0)`).call(is_transpose ? d3.axisBottom(scaleLinear2).tickSizeInner(0).tickSizeOuter(0).ticks(5).tickFormat(t => getNumberDisplayString(t, columnData)) : d3.axisLeft(scaleLinear2).tickSizeInner(0).tickSizeOuter(0).ticks(5).tickFormat(t => getNumberDisplayString(t, columnData))).call(g => {
|
|
140
132
|
g.select('.domain').remove();
|
|
141
133
|
g.selectAll('text').attr('font-size', themeColors.fontSize).attr('fill', themeColors.textColor);
|
|
142
134
|
g.selectAll('.tick line').attr('stroke', themeColors.gridColor);
|
|
@@ -145,12 +137,12 @@ class Mirror extends _chartComponent.default {
|
|
|
145
137
|
|
|
146
138
|
// ScaleBand Center axis
|
|
147
139
|
const scaleBandCenter = d3.scaleBand().domain(new Set(data.map(d => d.name))).range(is_transpose ? [insertPadding, chartHeight - insertPadding - bottomLegendSpace] : [insertPadding, chartWidth - insertPadding]).paddingInner(0.5).paddingOuter(0.1);
|
|
148
|
-
this.chart.append('g').attr('class', 'scale-band-center-axis-wrapper').attr('transform', is_transpose ?
|
|
140
|
+
this.chart.append('g').attr('class', 'scale-band-center-axis-wrapper').attr('transform', is_transpose ? `translate(${scaleLinear1(0)}, 0)` : `translate(0, ${scaleLinear1(0)})`).call(is_transpose ? d3.axisRight(scaleBandCenter).tickSizeInner(4).tickSizeOuter(0).tickFormat(t => {
|
|
149
141
|
const name = String(t);
|
|
150
|
-
return name.length > 5 ?
|
|
142
|
+
return name.length > 5 ? `${name.slice(0, 5)}...` : name;
|
|
151
143
|
}) : d3.axisBottom(scaleBandCenter).tickSizeInner(4).tickSizeOuter(0).tickFormat(t => {
|
|
152
144
|
const name = String(t);
|
|
153
|
-
return name.length > 5 ?
|
|
145
|
+
return name.length > 5 ? `${name.slice(0, 5)}...` : name;
|
|
154
146
|
})).call(g => {
|
|
155
147
|
g.select('.domain').remove();
|
|
156
148
|
g.selectAll('.tick line').attr('stroke', themeColors.XAxisColor);
|
|
@@ -268,12 +260,12 @@ class Mirror extends _chartComponent.default {
|
|
|
268
260
|
componentDidMount() {
|
|
269
261
|
this.createChart();
|
|
270
262
|
this.drawChart();
|
|
271
|
-
this.debouncedHandleResize =
|
|
263
|
+
this.debouncedHandleResize = debounce(this.handleResize, 300);
|
|
272
264
|
window.addEventListener('resize', this.debouncedHandleResize);
|
|
273
265
|
}
|
|
274
266
|
componentDidUpdate(prevProps) {
|
|
275
267
|
super.componentDidUpdate(prevProps);
|
|
276
|
-
if (
|
|
268
|
+
if (BaseUtils.shouldChartComponentUpdate(prevProps, this.props)) {
|
|
277
269
|
this.destroyChart();
|
|
278
270
|
this.createChart();
|
|
279
271
|
this.drawChart();
|
|
@@ -291,13 +283,13 @@ class Mirror extends _chartComponent.default {
|
|
|
291
283
|
tooltipData,
|
|
292
284
|
toolTipPosition
|
|
293
285
|
} = this.state;
|
|
294
|
-
return /*#__PURE__*/
|
|
286
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
295
287
|
ref: ref => this.container = ref,
|
|
296
|
-
className: (
|
|
288
|
+
className: classNames('sea-chart-container', {
|
|
297
289
|
'show-x-axis-label': this.isShowXAxisLabel(chart),
|
|
298
290
|
'show-y-axis-label': this.isShowYAxisLabel(chart)
|
|
299
291
|
})
|
|
300
|
-
}, /*#__PURE__*/
|
|
292
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
301
293
|
tooltipData: tooltipData,
|
|
302
294
|
toolTipPosition: toolTipPosition,
|
|
303
295
|
chart: this.chart
|
|
@@ -305,16 +297,16 @@ class Mirror extends _chartComponent.default {
|
|
|
305
297
|
}
|
|
306
298
|
}
|
|
307
299
|
Mirror.propTypes = {
|
|
308
|
-
canvasStyle:
|
|
309
|
-
chart:
|
|
310
|
-
groupbyColumn:
|
|
311
|
-
columnGroupbyColumn:
|
|
312
|
-
summaryColumn:
|
|
313
|
-
result:
|
|
314
|
-
tables:
|
|
315
|
-
globalTheme:
|
|
316
|
-
chartColorTheme:
|
|
317
|
-
toggleRecords:
|
|
318
|
-
customRender:
|
|
300
|
+
canvasStyle: PropTypes.object,
|
|
301
|
+
chart: PropTypes.object,
|
|
302
|
+
groupbyColumn: PropTypes.object,
|
|
303
|
+
columnGroupbyColumn: PropTypes.object,
|
|
304
|
+
summaryColumn: PropTypes.object,
|
|
305
|
+
result: PropTypes.object,
|
|
306
|
+
tables: PropTypes.array,
|
|
307
|
+
globalTheme: PropTypes.string,
|
|
308
|
+
chartColorTheme: PropTypes.string,
|
|
309
|
+
toggleRecords: PropTypes.func,
|
|
310
|
+
customRender: PropTypes.func
|
|
319
311
|
};
|
|
320
|
-
|
|
312
|
+
export default Mirror;
|