@configuratorware/configurator-admingui 1.35.1 → 1.35.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.
@@ -99,8 +99,9 @@ actions.postData = function () {
99
99
  text = text.replace(/"'/g, '"');
100
100
  text = text.replace(/'/g, '"'); // fix fieldnames wrapped in single quotes - json only allows for double quotes
101
101
 
102
- text = text.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:([^\/])/g, '"$2":$4');
102
+ text = JSON.stringify(eval(text));
103
103
  } catch (e) {
104
+ console.log(e);
104
105
  console.log('error doing json replacements');
105
106
  }
106
107
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-admingui",
3
- "version": "1.35.1",
3
+ "version": "1.35.2",
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.35.1",
32
+ "redhotmagma-visualization": "1.35.2",
33
33
  "redux": "^4.1.0",
34
34
  "redux-logger": "^3.0.6",
35
35
  "redux-persist": "^5.10.0",
@@ -45,6 +45,7 @@ actions.postData = () => (dispatch, getState) => {
45
45
  const questionTreeId = result.data.id;
46
46
  state.data.data.value.forEach((treeFile) => {
47
47
  const languageId = languages.findIndex((language) => language.iso === treeFile.language) + 1;
48
+
48
49
  if (languageId > 0 && treeFile.fileName.name) {
49
50
  filesToUpload.push({
50
51
  value: treeFile.fileName,
@@ -61,7 +62,6 @@ actions.postData = () => (dispatch, getState) => {
61
62
  dispatch(originalPostDataAction());
62
63
  return;
63
64
  }
64
-
65
65
  const reader = new FileReader();
66
66
  reader.onload = function(fileContent) {
67
67
  let text = reader.result;
@@ -73,8 +73,9 @@ actions.postData = () => (dispatch, getState) => {
73
73
  text = text.replace(/"'/g, '"');
74
74
  text = text.replace(/'/g, '"');
75
75
  // fix fieldnames wrapped in single quotes - json only allows for double quotes
76
- text = text.replace(/(['"])?([a-zA-Z0-9_]+)(['"])?:([^\/])/g, '"$2":$4');
76
+ text = JSON.stringify(eval(text));
77
77
  } catch (e) {
78
+ console.log(e)
78
79
  console.log('error doing json replacements')
79
80
  }
80
81
  uploadFile(file.value.name, text, file.languageId, questionTreeId, dispatch, resolve, () => {