@configuratorware/configurator-admingui 1.38.1 → 1.38.3
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/Screens/ReceiveOfferRequests/Components/ConfigurationDataSheet.js +10 -5
- package/Screens/Savedconfigurations/Components/ConfigurationDataSheet.js +5 -4
- package/package.json +2 -2
- package/src/Screens/ReceiveOfferRequests/Components/ConfigurationDataSheet.js +7 -5
- package/src/Screens/Savedconfigurations/Components/ConfigurationDataSheet.js +5 -5
|
@@ -9,7 +9,7 @@ exports.generateConfigurationDataSheet = exports["default"] = void 0;
|
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
-
var _lodash = require("lodash");
|
|
12
|
+
var _lodash = _interopRequireWildcard(require("lodash"));
|
|
13
13
|
|
|
14
14
|
var _i18n = require("../../../App/i18n");
|
|
15
15
|
|
|
@@ -27,6 +27,10 @@ var _OpenInNew = _interopRequireDefault(require("@material-ui/icons/OpenInNew"))
|
|
|
27
27
|
|
|
28
28
|
var _ConfigurationDataSheet = require("../../Savedconfigurations/Components/ConfigurationDataSheet");
|
|
29
29
|
|
|
30
|
+
var _Actions = require("../../Creator/Reducers/Actions");
|
|
31
|
+
|
|
32
|
+
var _ConfigurationActions = require("../../Creator/Reducers/ConfigurationActions");
|
|
33
|
+
|
|
30
34
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
35
|
|
|
32
36
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -101,7 +105,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
101
105
|
|
|
102
106
|
_createClass(ConfigurationDataSheet, [{
|
|
103
107
|
key: "renderConfigurationData",
|
|
104
|
-
value: function renderConfigurationData(data) {
|
|
108
|
+
value: function renderConfigurationData(data, locale) {
|
|
105
109
|
var configurationCode = (0, _lodash.get)(data, 'code.value', '');
|
|
106
110
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
107
111
|
className: "configuration-data"
|
|
@@ -229,7 +233,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
229
233
|
className: "section-title"
|
|
230
234
|
}, (0, _i18n.T)('productionDataLabel')), /*#__PURE__*/_react["default"].createElement("a", {
|
|
231
235
|
style: styles.link,
|
|
232
|
-
href: "".concat(_network["default"].frontendBaseURL, "configurations/zip/production/").concat(configurationCode)
|
|
236
|
+
href: "".concat(_network["default"].frontendBaseURL, "configurations/zip/production/").concat(configurationCode, "?_language=").concat(locale.replace('-', '_'))
|
|
233
237
|
}, (0, _i18n.T)('productionDataDownloadButtonLabel')))));
|
|
234
238
|
}
|
|
235
239
|
}, {
|
|
@@ -238,7 +242,8 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
238
242
|
var _this$props = this.props,
|
|
239
243
|
postData = _this$props.postData,
|
|
240
244
|
hideDetails = _this$props.hideDetails,
|
|
241
|
-
entityState = _this$props.entityState
|
|
245
|
+
entityState = _this$props.entityState,
|
|
246
|
+
locale = _this$props.locale;
|
|
242
247
|
var data = entityState.data,
|
|
243
248
|
isReady = entityState.isReady;
|
|
244
249
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -246,7 +251,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
246
251
|
height: '100%',
|
|
247
252
|
width: '100%'
|
|
248
253
|
}
|
|
249
|
-
}, isReady && this.renderConfigurationData(data), /*#__PURE__*/_react["default"].createElement("div", {
|
|
254
|
+
}, isReady && this.renderConfigurationData(data, locale), /*#__PURE__*/_react["default"].createElement("div", {
|
|
250
255
|
className: "action-buttons"
|
|
251
256
|
}, postData && /*#__PURE__*/_react["default"].createElement(_RaisedButton["default"], {
|
|
252
257
|
label: (0, _i18n.T)('Save'),
|
|
@@ -124,7 +124,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
124
124
|
|
|
125
125
|
_createClass(ConfigurationDataSheet, [{
|
|
126
126
|
key: "renderConfigurationData",
|
|
127
|
-
value: function renderConfigurationData(data) {
|
|
127
|
+
value: function renderConfigurationData(data, locale) {
|
|
128
128
|
var configurationCode = (0, _lodash.get)(data, 'code.value', '');
|
|
129
129
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
130
130
|
className: "configuration-data"
|
|
@@ -249,7 +249,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
249
249
|
className: "section-title"
|
|
250
250
|
}, (0, _i18n.T)('productionDataLabel')), /*#__PURE__*/_react["default"].createElement("a", {
|
|
251
251
|
style: styles.link,
|
|
252
|
-
href: "".concat(_network["default"].frontendBaseURL, "configurations/zip/production/").concat(configurationCode)
|
|
252
|
+
href: "".concat(_network["default"].frontendBaseURL, "configurations/zip/production/").concat(configurationCode, "?_language=").concat(locale.replace('-', '_'))
|
|
253
253
|
}, (0, _i18n.T)('productionDataDownloadButtonLabel')))));
|
|
254
254
|
}
|
|
255
255
|
}, {
|
|
@@ -258,7 +258,8 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
258
258
|
var _this$props = this.props,
|
|
259
259
|
postData = _this$props.postData,
|
|
260
260
|
hideDetails = _this$props.hideDetails,
|
|
261
|
-
entityState = _this$props.entityState
|
|
261
|
+
entityState = _this$props.entityState,
|
|
262
|
+
locale = _this$props.locale;
|
|
262
263
|
var data = entityState.data,
|
|
263
264
|
isReady = entityState.isReady;
|
|
264
265
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
@@ -266,7 +267,7 @@ var ConfigurationDataSheet = /*#__PURE__*/function (_Component) {
|
|
|
266
267
|
height: '100%',
|
|
267
268
|
width: '100%'
|
|
268
269
|
}
|
|
269
|
-
}, isReady && this.renderConfigurationData(data), /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
|
+
}, isReady && this.renderConfigurationData(data, locale), /*#__PURE__*/_react["default"].createElement("div", {
|
|
270
271
|
className: "action-buttons"
|
|
271
272
|
}, postData && /*#__PURE__*/_react["default"].createElement(_RaisedButton["default"], {
|
|
272
273
|
label: (0, _i18n.T)('Save'),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-admingui",
|
|
3
|
-
"version": "1.38.
|
|
3
|
+
"version": "1.38.3",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"private": false,
|
|
6
6
|
"dependencies": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"react-redux-i18n": "^1.9.3",
|
|
30
30
|
"react-router": "^3.2.6",
|
|
31
31
|
"react-sortable-hoc": "^1.11.0",
|
|
32
|
-
"redhotmagma-visualization": "1.38.
|
|
32
|
+
"redhotmagma-visualization": "1.38.3",
|
|
33
33
|
"redux": "^4.1.0",
|
|
34
34
|
"redux-logger": "^3.0.6",
|
|
35
35
|
"redux-persist": "^5.10.0",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { get } from 'lodash';
|
|
2
|
+
import _, { get } from 'lodash';
|
|
3
3
|
import { T } from '../../../App/i18n';
|
|
4
4
|
|
|
5
5
|
import RaisedButton from '../../../UIComponents/RaisedButton';
|
|
@@ -9,6 +9,8 @@ import networkConfig from '../../../App/Config/network';
|
|
|
9
9
|
import { Tooltip } from '@material-ui/core';
|
|
10
10
|
import OpenInNew from '@material-ui/icons/OpenInNew';
|
|
11
11
|
import { formatColorIdentifier } from '../../Savedconfigurations/Components/ConfigurationDataSheet';
|
|
12
|
+
import {CREATOR_REDUCER_NAME} from "../../Creator/Reducers/Actions";
|
|
13
|
+
import {CONFIGURATION_REDUCER_NAME} from "../../Creator/Reducers/ConfigurationActions";
|
|
12
14
|
|
|
13
15
|
const DataRow = ({ label, value, children, identifier, bold }) => (
|
|
14
16
|
<TableRow className="data-row">
|
|
@@ -34,7 +36,7 @@ const styles = {
|
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
export default class ConfigurationDataSheet extends Component {
|
|
37
|
-
renderConfigurationData(data) {
|
|
39
|
+
renderConfigurationData(data, locale) {
|
|
38
40
|
const configurationCode = get(data, 'code.value', '');
|
|
39
41
|
return (
|
|
40
42
|
<div className="configuration-data">
|
|
@@ -204,7 +206,7 @@ export default class ConfigurationDataSheet extends Component {
|
|
|
204
206
|
<div className="section-title">{T('productionDataLabel')}</div>
|
|
205
207
|
<a
|
|
206
208
|
style={styles.link}
|
|
207
|
-
href={`${networkConfig.frontendBaseURL}configurations/zip/production/${configurationCode}`}
|
|
209
|
+
href={`${networkConfig.frontendBaseURL}configurations/zip/production/${configurationCode}?_language=${locale.replace('-', '_')}`}
|
|
208
210
|
>
|
|
209
211
|
{T('productionDataDownloadButtonLabel')}
|
|
210
212
|
</a>
|
|
@@ -216,12 +218,12 @@ export default class ConfigurationDataSheet extends Component {
|
|
|
216
218
|
}
|
|
217
219
|
|
|
218
220
|
render() {
|
|
219
|
-
const { postData, hideDetails, entityState } = this.props;
|
|
221
|
+
const { postData, hideDetails, entityState, locale } = this.props;
|
|
220
222
|
const { data, isReady } = entityState;
|
|
221
223
|
|
|
222
224
|
return (
|
|
223
225
|
<div style={{ height: '100%', width: '100%' }}>
|
|
224
|
-
{isReady && this.renderConfigurationData(data)}
|
|
226
|
+
{isReady && this.renderConfigurationData(data, locale)}
|
|
225
227
|
|
|
226
228
|
<div className="action-buttons">
|
|
227
229
|
{postData && (
|
|
@@ -52,7 +52,7 @@ const styles = {
|
|
|
52
52
|
};
|
|
53
53
|
|
|
54
54
|
export default class ConfigurationDataSheet extends Component {
|
|
55
|
-
renderConfigurationData(data) {
|
|
55
|
+
renderConfigurationData(data, locale) {
|
|
56
56
|
const configurationCode = get(data, 'code.value', '');
|
|
57
57
|
return (
|
|
58
58
|
<div className="configuration-data">
|
|
@@ -220,7 +220,7 @@ export default class ConfigurationDataSheet extends Component {
|
|
|
220
220
|
<div className="section-title">{T('productionDataLabel')}</div>
|
|
221
221
|
<a
|
|
222
222
|
style={styles.link}
|
|
223
|
-
href={`${networkConfig.frontendBaseURL}configurations/zip/production/${configurationCode}`}
|
|
223
|
+
href={`${networkConfig.frontendBaseURL}configurations/zip/production/${configurationCode}?_language=${locale.replace('-', '_')}`}
|
|
224
224
|
>
|
|
225
225
|
{T('productionDataDownloadButtonLabel')}
|
|
226
226
|
</a>
|
|
@@ -232,12 +232,12 @@ export default class ConfigurationDataSheet extends Component {
|
|
|
232
232
|
}
|
|
233
233
|
|
|
234
234
|
render() {
|
|
235
|
-
const { postData, hideDetails, entityState } = this.props;
|
|
235
|
+
const { postData, hideDetails, entityState, locale } = this.props;
|
|
236
236
|
const { data, isReady } = entityState;
|
|
237
|
-
|
|
237
|
+
|
|
238
238
|
return (
|
|
239
239
|
<div style={{ height: '100%', width: '100%' }}>
|
|
240
|
-
{isReady && this.renderConfigurationData(data)}
|
|
240
|
+
{isReady && this.renderConfigurationData(data, locale)}
|
|
241
241
|
|
|
242
242
|
<div className="action-buttons">
|
|
243
243
|
{postData && (
|