sea-chart 0.0.40-beta.2 → 0.0.40-beta.4
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,6 +10,7 @@ import './index.css';
|
|
|
10
10
|
const TypesDialog = _ref => {
|
|
11
11
|
let {
|
|
12
12
|
type,
|
|
13
|
+
mediaUrl,
|
|
13
14
|
onToggle: propsOnToggle,
|
|
14
15
|
onChange
|
|
15
16
|
} = _ref;
|
|
@@ -53,7 +54,7 @@ const TypesDialog = _ref => {
|
|
|
53
54
|
zIndex: 1048
|
|
54
55
|
}, /*#__PURE__*/React.createElement(ModalHeader, {
|
|
55
56
|
toggle: onToggle
|
|
56
|
-
}, intl.get('Edit_type')), /*#__PURE__*/React.createElement(ModalBody, {
|
|
57
|
+
}, type ? intl.get('Edit_type') : intl.get('All_charts')), /*#__PURE__*/React.createElement(ModalBody, {
|
|
57
58
|
className: "sea-chart-types-body"
|
|
58
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
59
60
|
className: "sea-chart-types-container d-flex flex-column h-100"
|
|
@@ -101,7 +102,7 @@ const TypesDialog = _ref => {
|
|
|
101
102
|
}, intl.get(CHART_TYPE_SHOW[chartType])), /*#__PURE__*/React.createElement("div", {
|
|
102
103
|
className: "sea-chart-type-image-container"
|
|
103
104
|
}, /*#__PURE__*/React.createElement("img", {
|
|
104
|
-
src: context.getChartImageUrl(chartType),
|
|
105
|
+
src: context.getChartImageUrl(chartType, mediaUrl),
|
|
105
106
|
alt: "",
|
|
106
107
|
className: "sea-chart-type-demo-image"
|
|
107
108
|
})));
|
package/dist/context.js
CHANGED
|
@@ -101,12 +101,15 @@ class Context {
|
|
|
101
101
|
this.getTableFormulaResults = (table, rows, value) => {
|
|
102
102
|
return this.api.getTableFormulaResults(table, rows, value);
|
|
103
103
|
};
|
|
104
|
-
this.getChartImageUrl = type => {
|
|
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
|
+
}
|
|
105
109
|
const {
|
|
106
110
|
server,
|
|
107
111
|
mediaUrl
|
|
108
112
|
} = this.settings;
|
|
109
|
-
const name = CHART_TYPE_IMAGE[type];
|
|
110
113
|
return "".concat(server).concat(mediaUrl, "dtable-statistic/img/").concat(name);
|
|
111
114
|
};
|
|
112
115
|
this.api = null;
|