sea-chart 0.0.58-alpha.0 → 0.0.58-alpha.2

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.
@@ -1,12 +1,11 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React, { useCallback } from 'react';
2
3
  import { CellType, DATE_COLUMN_OPTIONS } from 'dtable-utils';
3
4
  import CommonDataSettings from '../widgets/common-data-settings';
4
5
  import Divider from '../widgets/divider';
5
6
  import GroupBy from '../widgets/group-by';
6
- import Switch from '../widgets/switch';
7
7
  import YAxisGroupSettings from '../widgets/y-axis-group-settings';
8
8
  import { CHART_SUMMARY_TYPE, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP } from '../../constants';
9
- import { eventStopPropagation } from '../../utils';
10
9
  import intl from '../../intl';
11
10
  const DataSettings = _ref => {
12
11
  let {
@@ -86,7 +85,6 @@ const DataSettings = _ref => {
86
85
  });
87
86
  }, [chart, onChange]);
88
87
  const onIncludeEmptyChange = useCallback(event => {
89
- eventStopPropagation(event);
90
88
  const {
91
89
  config
92
90
  } = chart;
@@ -123,8 +121,7 @@ const DataSettings = _ref => {
123
121
  onGroupByChange: onXAxisColumnChange,
124
122
  onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
125
123
  onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
126
- }), /*#__PURE__*/React.createElement(Switch, {
127
- key: "x_axis_include_empty_cells",
124
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
128
125
  checked: x_axis_include_empty_cells,
129
126
  placeholder: intl.get('Include_empty'),
130
127
  onChange: onIncludeEmptyChange
@@ -1,13 +1,12 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React, { useCallback } from 'react';
2
3
  import { CellType, DATE_COLUMN_OPTIONS } from 'dtable-utils';
3
4
  import intl from '../../intl';
4
5
  import CommonDataSettings from '../widgets/common-data-settings';
5
6
  import Divider from '../widgets/divider';
6
7
  import GroupBy from '../widgets/group-by';
7
- import Switch from '../widgets/switch';
8
8
  import BasicSummary from '../widgets/basic-summary';
9
9
  import DataSort from '../widgets/data-sort';
10
- import { eventStopPropagation } from '../../utils';
11
10
  import { CHART_SUMMARY_TYPE, SUPPORT_DATA_SORT_CHART_TYPES, CHART_SUMMARY_TYPES, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP, CHART_TYPE } from '../../constants';
12
11
  const DataSettings = _ref => {
13
12
  let {
@@ -87,7 +86,6 @@ const DataSettings = _ref => {
87
86
  });
88
87
  }, [chart, onChange]);
89
88
  const onIncludeEmptyChange = useCallback(event => {
90
- eventStopPropagation(event);
91
89
  const {
92
90
  config
93
91
  } = chart;
@@ -137,8 +135,7 @@ const DataSettings = _ref => {
137
135
  onGroupByChange: onXAxisColumnChange,
138
136
  onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
139
137
  onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
140
- }), /*#__PURE__*/React.createElement(Switch, {
141
- key: "x_axis_include_empty_cells",
138
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
142
139
  checked: x_axis_include_empty_cells,
143
140
  placeholder: intl.get('Include_empty'),
144
141
  onChange: onIncludeEmptyChange
@@ -1,9 +1,9 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React, { useCallback } from 'react';
2
3
  import { CellType, DATE_COLUMN_OPTIONS } from 'dtable-utils';
3
4
  import CommonDataSettings from '../widgets/common-data-settings';
4
5
  import Divider from '../widgets/divider';
5
6
  import GroupBy from '../widgets/group-by';
6
- import Switch from '../widgets/switch';
7
7
  import SummarySettings from '../widgets/summary-settings';
8
8
  import { eventStopPropagation } from '../../utils';
9
9
  import { CHART_SUMMARY_TYPE, CHART_Y_GROUP_TYPE, CHART_SUMMARY_CALCULATION_METHOD, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP, COMBINATION_POSITION } from '../../constants';
@@ -85,7 +85,6 @@ const DataSettings = _ref => {
85
85
  });
86
86
  }, [chart, onChange]);
87
87
  const onIncludeEmptyChange = useCallback(event => {
88
- eventStopPropagation(event);
89
88
  const {
90
89
  config
91
90
  } = chart;
@@ -239,8 +238,7 @@ const DataSettings = _ref => {
239
238
  onGroupByChange: onXAxisColumnChange,
240
239
  onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
241
240
  onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
242
- }), /*#__PURE__*/React.createElement(Switch, {
243
- key: "x_axis_include_empty_cells",
241
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
244
242
  checked: x_axis_include_empty_cells,
245
243
  placeholder: intl.get('Include_empty'),
246
244
  onChange: onIncludeEmptyChange
@@ -54,7 +54,6 @@ export const onColumnGroupByColumnChange = (option, chart, onChange) => {
54
54
  onChange && onChange(update);
55
55
  };
56
56
  export const onIncludeEmptyChange = (event, chart, onChange) => {
57
- eventStopPropagation(event);
58
57
  const {
59
58
  config
60
59
  } = chart;
@@ -1,8 +1,8 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React from 'react';
2
3
  import CommonDataSettings from '../../widgets/common-data-settings';
3
4
  import Divider from '../../widgets/divider';
4
5
  import GroupBy from '../../widgets/group-by';
5
- import Switch from '../../widgets/switch';
6
6
  import intl from '../../../intl';
7
7
  import { onGroupbyColumnChange, onIncludeEmptyChange, onColumnGroupByColumnChange, onGroupbyDateGranularityChange, onGroupbyGeolocationGranularityChange } from '../callbacks/callbacks';
8
8
  import { CHART_TYPE } from '../../../constants';
@@ -37,8 +37,7 @@ export default function CompletenessDataSettings(_ref) {
37
37
  selectedTableId: table_id,
38
38
  selectedColumnKey: x_axis_column_key,
39
39
  onGroupByChange: e => onGroupbyColumnChange(e, chart, onChange)
40
- }), /*#__PURE__*/React.createElement(Switch, {
41
- key: "x_axis_include_empty_cells",
40
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
42
41
  checked: x_axis_include_empty_cells,
43
42
  placeholder: intl.get('Include_empty'),
44
43
  onChange: e => onIncludeEmptyChange(e, chart, onChange)
@@ -1,12 +1,11 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React, { useCallback } from 'react';
2
3
  import { CellType, DATE_COLUMN_OPTIONS } from 'dtable-utils';
3
4
  import CommonDataSettings from '../widgets/common-data-settings';
4
5
  import Divider from '../widgets/divider';
5
6
  import GroupBy from '../widgets/group-by';
6
- import Switch from '../widgets/switch';
7
7
  import BasicSummary from '../widgets/basic-summary';
8
8
  import DataSort from '../widgets/data-sort';
9
- import { eventStopPropagation } from '../../utils';
10
9
  import { CHART_SUMMARY_TYPE, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP } from '../../constants';
11
10
  import intl from '../../intl';
12
11
  const DataSettings = _ref => {
@@ -85,7 +84,6 @@ const DataSettings = _ref => {
85
84
  });
86
85
  }, [chart, onChange]);
87
86
  const onIncludeEmptyChange = useCallback(event => {
88
- eventStopPropagation(event);
89
87
  const {
90
88
  config
91
89
  } = chart;
@@ -122,8 +120,7 @@ const DataSettings = _ref => {
122
120
  onGroupByChange: onGroupByChange,
123
121
  onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
124
122
  onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
125
- }), /*#__PURE__*/React.createElement(Switch, {
126
- key: "groupby_include_empty_cells",
123
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
127
124
  checked: groupby_include_empty_cells,
128
125
  placeholder: intl.get('Include_empty'),
129
126
  onChange: onIncludeEmptyChange
@@ -1,11 +1,10 @@
1
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
1
2
  import React from 'react';
2
3
  import { CellType, DATE_COLUMN_OPTIONS } from 'dtable-utils';
3
4
  import CommonDataSettings from '../widgets/common-data-settings';
4
5
  import Divider from '../widgets/divider';
5
6
  import GroupBy from '../widgets/group-by';
6
- import Switch from '../widgets/switch';
7
7
  import intl from '../../intl';
8
- import { eventStopPropagation } from '../../utils';
9
8
  import { CHART_SUMMARY_TYPE, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP } from '../../constants';
10
9
  export default function ScatterDataSettings(_ref) {
11
10
  let {
@@ -51,7 +50,6 @@ export default function ScatterDataSettings(_ref) {
51
50
  onChange && onChange(update);
52
51
  };
53
52
  const onIncludeEmptyChange = e => {
54
- eventStopPropagation(e);
55
53
  onChange && onChange({
56
54
  x_axis_include_empty_cells: !x_axis_include_empty_cells
57
55
  });
@@ -119,8 +117,7 @@ export default function ScatterDataSettings(_ref) {
119
117
  selectedTableId: table_id,
120
118
  selectedColumnKey: x_axis_column_key,
121
119
  onGroupByChange: onXAxisColumnChange
122
- }), /*#__PURE__*/React.createElement(Switch, {
123
- key: "x_axis_include_empty_cells",
120
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
124
121
  checked: x_axis_include_empty_cells,
125
122
  placeholder: intl.get('Include_empty'),
126
123
  onChange: onIncludeEmptyChange
@@ -1,15 +1,14 @@
1
- import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
2
1
  import _DTableSelect from "dtable-ui-component/lib/DTableSelect";
2
+ import _DTableSwitch from "dtable-ui-component/lib/DTableSwitch";
3
3
  import React, { useCallback, useMemo } from 'react';
4
4
  import { FormGroup, Label } from 'reactstrap';
5
- import { CellType, COLUMNS_ICON_CONFIG, DATE_COLUMN_OPTIONS, getTableById, getTableColumnByKey } from 'dtable-utils';
5
+ import { CellType, COLUMNS_ICON_CONFIG, DATE_COLUMN_OPTIONS, getTableById } from 'dtable-utils';
6
6
  import CommonDataSettings from '../widgets/common-data-settings';
7
7
  import Divider from '../widgets/divider';
8
8
  import GroupBy from '../widgets/group-by';
9
- import Switch from '../widgets/switch';
10
9
  import BasicSummary from '../widgets/basic-summary';
11
10
  import NumericSummaryItem from '../widgets/numeric-summary-item';
12
- import { eventStopPropagation, BaseUtils } from '../../utils';
11
+ import { BaseUtils } from '../../utils';
13
12
  import { CHART_SUMMARY_TYPE, CHART_Y_GROUP_TYPE, CHART_SUMMARY_SHOW, CHART_SUMMARY_CALCULATION_METHOD, CHART_DATE_SUMMARY_CALCULATION_METHOD, GEOLOCATION_FORMAT_CITY, GEOLOCATION_FORMAT_MAP } from '../../constants';
14
13
  import intl from '../../intl';
15
14
  const DataSettings = _ref => {
@@ -209,7 +208,6 @@ const DataSettings = _ref => {
209
208
  });
210
209
  }, [chart, onChange]);
211
210
  const onIncludeEmptyChange = useCallback(event => {
212
- eventStopPropagation(event);
213
211
  const {
214
212
  config
215
213
  } = chart;
@@ -520,8 +518,7 @@ const DataSettings = _ref => {
520
518
  onGroupByChange: onGroupByColumnChange,
521
519
  onGroupbyDateGranularityChange: onGroupbyDateGranularityChange,
522
520
  onGroupbyGeolocationGranularityChange: onGroupbyGeolocationGranularityChange
523
- }), /*#__PURE__*/React.createElement(Switch, {
524
- key: "groupby_include_empty_cells",
521
+ }), /*#__PURE__*/React.createElement(_DTableSwitch, {
525
522
  checked: groupby_include_empty_cells,
526
523
  placeholder: intl.get('Include_empty'),
527
524
  onChange: onIncludeEmptyChange
@@ -62,7 +62,7 @@ const TitleSetting = props => {
62
62
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(TitleText, {
63
63
  text: initialTitle.text,
64
64
  modifyText: modifyText
65
- }), !hideTitleStyleSetting( /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FontSizeSettings, {
65
+ }), !hideTitleStyleSetting && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FontSizeSettings, {
66
66
  className: 'mt-3',
67
67
  fontSize: initialTitle.font_size,
68
68
  defaultFontSize: isCard ? DAFAULT_TREND_CHART_TITLE_FONT_SIZE : DEFAULT_CHART_TITLE_FONT_SIZE,
@@ -82,7 +82,7 @@ const TitleSetting = props => {
82
82
  value: initialTitle.horizontal_align,
83
83
  defaultValue: HORIZONTAL_ALIGN.LEFT,
84
84
  onChange: modifyHorizontalAlign
85
- }))));
85
+ })));
86
86
  };
87
87
  return /*#__PURE__*/React.createElement(_CollapsibleSettingLayout, {
88
88
  title: intl.get('Title'),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.58-alpha.0",
3
+ "version": "0.0.58-alpha.2",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",