sea-chart 0.0.41-beta.0 → 0.0.41

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.
@@ -10,7 +10,6 @@ import './index.css';
10
10
  const TypesDialog = _ref => {
11
11
  let {
12
12
  type,
13
- mediaUrl,
14
13
  onToggle: propsOnToggle,
15
14
  onChange
16
15
  } = _ref;
@@ -45,8 +44,8 @@ const TypesDialog = _ref => {
45
44
  }, [selectedType]);
46
45
  const onSubmit = useCallback(() => {
47
46
  onChange(selectedType);
48
- type && onToggle();
49
- }, [onChange, selectedType, type, onToggle]);
47
+ onToggle();
48
+ }, [selectedType, onToggle, onChange]);
50
49
  return /*#__PURE__*/React.createElement(Modal, {
51
50
  isOpen: true,
52
51
  toggle: onToggle,
@@ -54,7 +53,7 @@ const TypesDialog = _ref => {
54
53
  zIndex: 1048
55
54
  }, /*#__PURE__*/React.createElement(ModalHeader, {
56
55
  toggle: onToggle
57
- }, type ? intl.get('Edit_type') : intl.get('All_charts')), /*#__PURE__*/React.createElement(ModalBody, {
56
+ }, intl.get('Edit_type')), /*#__PURE__*/React.createElement(ModalBody, {
58
57
  className: "sea-chart-types-body"
59
58
  }, /*#__PURE__*/React.createElement("div", {
60
59
  className: "sea-chart-types-container d-flex flex-column h-100"
@@ -102,7 +101,7 @@ const TypesDialog = _ref => {
102
101
  }, intl.get(CHART_TYPE_SHOW[chartType])), /*#__PURE__*/React.createElement("div", {
103
102
  className: "sea-chart-type-image-container"
104
103
  }, /*#__PURE__*/React.createElement("img", {
105
- src: context.getChartImageUrl(chartType, mediaUrl),
104
+ src: context.getChartImageUrl(chartType),
106
105
  alt: "",
107
106
  className: "sea-chart-type-demo-image"
108
107
  })));
package/dist/context.js CHANGED
@@ -101,15 +101,12 @@ class Context {
101
101
  this.getTableFormulaResults = (table, rows, value) => {
102
102
  return this.api.getTableFormulaResults(table, rows, value);
103
103
  };
104
- this.getChartImageUrl = (type, serverMediaUrl) => {
105
- const name = CHART_TYPE_IMAGE[type];
106
- if (serverMediaUrl) {
107
- return "".concat(serverMediaUrl, "dtable-statistic/img/").concat(name);
108
- }
104
+ this.getChartImageUrl = type => {
109
105
  const {
110
106
  server,
111
107
  mediaUrl
112
108
  } = this.settings;
109
+ const name = CHART_TYPE_IMAGE[type];
113
110
  return "".concat(server).concat(mediaUrl, "dtable-statistic/img/").concat(name);
114
111
  };
115
112
  this.api = null;
package/dist/index.js CHANGED
@@ -4,8 +4,7 @@ import { ChartModel } from './model';
4
4
  import View from './view';
5
5
  import Editor from './editor';
6
6
  import Settings, { StyleSettings, Divider } from './settings';
7
- import TypesDialog from './components/types-dialog';
8
7
  import { ChartDataSQL } from './utils';
9
8
  import Context from './context';
10
9
  export default View;
11
- export { SeaChartAPI, CHART_TYPE, CHART_TYPES, View, Editor, Settings, TypesDialog, StyleSettings, Divider, Context, ChartModel, ChartDataSQL };
10
+ export { SeaChartAPI, CHART_TYPE, CHART_TYPES, View, Editor, Settings, StyleSettings, Divider, Context, ChartModel, ChartDataSQL };
@@ -129,7 +129,6 @@ const en = {
129
129
  "Title": "Title",
130
130
  "Custom_title": "Custom title",
131
131
  "Edit_type": "Edit type",
132
- "All_charts": "All charts",
133
132
  "Cancel": "Cancel",
134
133
  "Submit": "Submit",
135
134
  "There_are_no_statistic_results_yet": "There are no statistic results yet",
@@ -129,7 +129,6 @@ const zh_CN = {
129
129
  "Title": "标题",
130
130
  "Custom_title": "自定义标题",
131
131
  "Edit_type": "编辑类型",
132
- "All_charts": "所有图表",
133
132
  "Cancel": "取消",
134
133
  "Submit": "提交",
135
134
  "There_are_no_statistic_results_yet": "目前还没有统计结果",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sea-chart",
3
- "version": "0.0.41-beta.0",
3
+ "version": "0.0.41",
4
4
  "main": "./dist/index.js",
5
5
  "dependencies": {
6
6
  "@antv/data-set": "0.11.8",