@configuratorware/configurator-frontendgui 1.51.2 → 1.51.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.
@@ -13,7 +13,6 @@ var _isArray = _interopRequireDefault(require("lodash/isArray"));
13
13
  var _get = _interopRequireDefault(require("lodash/get"));
14
14
  var _find = _interopRequireDefault(require("lodash/find"));
15
15
  var _first = _interopRequireDefault(require("lodash/first"));
16
- var _lowerCase = _interopRequireDefault(require("lodash/lowerCase"));
17
16
  var _isPositiveNumber = require("../../../Utils/Math/isPositiveNumber");
18
17
  var _Selectors = require("./Selectors");
19
18
  var _Selectors2 = require("../Configurator/Selectors");
@@ -103,15 +102,12 @@ function processConfigurationModes(configurationModes) {
103
102
  maxZoom2d: maxZoom2d
104
103
  };
105
104
  }
106
- var sortAlphabetically = function sortAlphabetically(a, b) {
107
- return (0, _lowerCase["default"])(a.title) !== (0, _lowerCase["default"])(b.title) ? (0, _lowerCase["default"])(a.title) < (0, _lowerCase["default"])(b.title) ? -1 : 1 : 0;
108
- };
109
105
  var sortDesignAreas = function sortDesignAreas(designAreas) {
110
106
  return designAreas.sort(function (a, b) {
111
107
  if (a.sequenceNumber !== b.sequenceNumber) {
112
108
  return parseInt(a.sequenceNumber) < parseInt(b.sequenceNumber) ? -1 : 1;
113
109
  } else {
114
- return sortAlphabetically(a, b);
110
+ return 0;
115
111
  }
116
112
  });
117
113
  };
@@ -202,31 +202,6 @@ var applicationConfiguration = {
202
202
  // switch to the previously selected view when selecting a component that has no view specified
203
203
  switchViewOnComponentSelection: true
204
204
  };
205
-
206
- /**
207
- * document.domain can be set via a GET Param or is defaulted to
208
- * the (subdomain.)secondlevel.tld (subdamain cut out)
209
- */
210
- function setDocumentDomain() {
211
- var query = new URLSearchParams(location.search);
212
- var parts = window.location.hostname.split('.');
213
- var domain = query.get('_documentdomain');
214
- if (!domain) {
215
- if (parts.length > 1) {
216
- // get domain.tld at max
217
- parts = parts.reverse();
218
- domain = parts[1] + '.' + parts[0];
219
- } else {
220
- domain = window.location.hostname;
221
- }
222
- }
223
- try {
224
- document.domain = domain;
225
- } catch (e) {
226
- // eslint-disable-next-line no-console
227
- console.log('WARNING: document.domain could not be set');
228
- }
229
- }
230
205
  function preventLeavingPage() {
231
206
  if (process.env.NODE_ENV === 'production' && !getConf('adminMode')) {
232
207
  // registering beforeunload event
@@ -252,7 +227,6 @@ function init() {
252
227
  }
253
228
  applicationConfiguration = (0, _merge["default"])(applicationConfiguration, getQueryParams());
254
229
  _Api["default"].init(applicationConfiguration.network);
255
- setDocumentDomain();
256
230
  preventLeavingPage();
257
231
  return applicationConfiguration;
258
232
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.51.2",
3
+ "version": "1.51.3",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "main": "./index.js",
7
7
  "dependencies": {
8
8
  "@babel/polyfill": "^7.12.1",
9
- "@configuratorware/scripts": "1.51.2",
9
+ "@configuratorware/scripts": "1.51.3",
10
10
  "@material-ui/core": "^4.12.4",
11
11
  "@material-ui/icons": "^4.11.3",
12
12
  "@material-ui/lab": "^4.0.0-alpha.61",
@@ -36,8 +36,8 @@
36
36
  "react-router-dom": "^5.3.4",
37
37
  "react-swipeable": "^5.5.1",
38
38
  "react-zoom-pan-pinch": "^2.1.3",
39
- "redhotmagma-graphics-editor": "1.51.2",
40
- "redhotmagma-visualization": "1.51.2",
39
+ "redhotmagma-graphics-editor": "1.51.3",
40
+ "redhotmagma-visualization": "1.51.3",
41
41
  "redux": "^4.1.0",
42
42
  "redux-logger": "^3.0.6",
43
43
  "redux-persist": "^5.10.0",
@@ -3,7 +3,6 @@ import isArray from 'lodash/isArray';
3
3
  import get from 'lodash/get';
4
4
  import find from 'lodash/find';
5
5
  import first from 'lodash/first';
6
- import lowerCase from 'lodash/lowerCase';
7
6
  import { isPositiveNumber } from 'Utils/Math/isPositiveNumber';
8
7
  import {
9
8
  getDesignAreaColorAmount,
@@ -69,16 +68,12 @@ export function processConfigurationModes(configurationModes) {
69
68
  };
70
69
  }
71
70
 
72
- const sortAlphabetically = (a, b) => {
73
- return lowerCase(a.title) !== lowerCase(b.title) ? (lowerCase(a.title) < lowerCase(b.title) ? -1 : 1) : 0;
74
- };
75
-
76
71
  const sortDesignAreas = designAreas =>
77
72
  designAreas.sort((a, b) => {
78
73
  if (a.sequenceNumber !== b.sequenceNumber) {
79
74
  return parseInt(a.sequenceNumber) < parseInt(b.sequenceNumber) ? -1 : 1;
80
75
  } else {
81
- return sortAlphabetically(a, b);
76
+ return 0;
82
77
  }
83
78
  });
84
79
 
@@ -224,34 +224,6 @@ let applicationConfiguration = {
224
224
  switchViewOnComponentSelection: true,
225
225
  };
226
226
 
227
- /**
228
- * document.domain can be set via a GET Param or is defaulted to
229
- * the (subdomain.)secondlevel.tld (subdamain cut out)
230
- */
231
- function setDocumentDomain() {
232
- const query = new URLSearchParams(location.search);
233
-
234
- let parts = window.location.hostname.split('.');
235
- let domain = query.get('_documentdomain');
236
-
237
- if (!domain) {
238
- if (parts.length > 1) {
239
- // get domain.tld at max
240
- parts = parts.reverse();
241
- domain = parts[1] + '.' + parts[0];
242
- } else {
243
- domain = window.location.hostname;
244
- }
245
- }
246
-
247
- try {
248
- document.domain = domain;
249
- } catch (e) {
250
- // eslint-disable-next-line no-console
251
- console.log('WARNING: document.domain could not be set');
252
- }
253
- }
254
-
255
227
  function preventLeavingPage() {
256
228
  if (process.env.NODE_ENV === 'production' && !getConf('adminMode')) {
257
229
  // registering beforeunload event
@@ -280,7 +252,6 @@ export function init() {
280
252
 
281
253
  Api.init(applicationConfiguration.network);
282
254
 
283
- setDocumentDomain();
284
255
  preventLeavingPage();
285
256
 
286
257
  return applicationConfiguration;