@configuratorware/configurator-admingui 1.37.2 → 1.37.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.
|
@@ -138,8 +138,8 @@ var DesignViewActions = (0, _Actions2.generateDefaultActions)(LIST_KEY, DATA_KEY
|
|
|
138
138
|
var CREATOR_VIEW_URL = 'creator_views';
|
|
139
139
|
var CreatorViewActions = (0, _Actions2.generateDefaultActions)(LIST_KEY, DATA_KEY, REDUCER_NAME, CREATOR_VIEW_URL);
|
|
140
140
|
|
|
141
|
-
var
|
|
142
|
-
return (0, _get["default"])(designerData, 'data.visualizationMode.value.validForConfigurationModes', []).indexOf('creator+designer') !== -1
|
|
141
|
+
var isCreatorDesignerMode = function isCreatorDesignerMode(designerData) {
|
|
142
|
+
return (0, _get["default"])(designerData, 'data.visualizationMode.value.validForConfigurationModes', []).indexOf('creator+designer') !== -1;
|
|
143
143
|
};
|
|
144
144
|
|
|
145
145
|
var listAction = function listAction(params) {
|
|
@@ -155,7 +155,7 @@ var listAction = function listAction(params) {
|
|
|
155
155
|
limit: 1000
|
|
156
156
|
});
|
|
157
157
|
|
|
158
|
-
if (
|
|
158
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
159
159
|
dispatch(CreatorViewActions.listAction(_objectSpread(_objectSpread({}, paramsWithLimit), {}, {
|
|
160
160
|
filters: _objectSpread(_objectSpread({}, filters), {}, {
|
|
161
161
|
'creatorview.item.id': id
|
|
@@ -235,7 +235,7 @@ var postData = function postData() {
|
|
|
235
235
|
var _getState4 = getState(),
|
|
236
236
|
designerData = _getState4.designerData;
|
|
237
237
|
|
|
238
|
-
if (
|
|
238
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
239
239
|
return dispatch(CreatorViewActions.postData(true));
|
|
240
240
|
} else {
|
|
241
241
|
return dispatch(DesignViewActions.postData(true));
|
|
@@ -252,7 +252,7 @@ var detailsAction = function detailsAction() {
|
|
|
252
252
|
var _getState5 = getState(),
|
|
253
253
|
designerData = _getState5.designerData;
|
|
254
254
|
|
|
255
|
-
if (
|
|
255
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
256
256
|
return dispatch(CreatorViewActions.detailsAction.apply(CreatorViewActions, args));
|
|
257
257
|
} else {
|
|
258
258
|
return dispatch(DesignViewActions.detailsAction.apply(DesignViewActions, args));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@configuratorware/configurator-admingui",
|
|
3
|
-
"version": "1.37.
|
|
3
|
+
"version": "1.37.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.37.
|
|
32
|
+
"redhotmagma-visualization": "1.37.3",
|
|
33
33
|
"redux": "^4.1.0",
|
|
34
34
|
"redux-logger": "^3.0.6",
|
|
35
35
|
"redux-persist": "^5.10.0",
|
|
@@ -88,10 +88,10 @@ const CREATOR_VIEW_URL = 'creator_views';
|
|
|
88
88
|
|
|
89
89
|
const CreatorViewActions = generateDefaultActions(LIST_KEY, DATA_KEY, REDUCER_NAME, CREATOR_VIEW_URL);
|
|
90
90
|
|
|
91
|
-
const
|
|
91
|
+
const isCreatorDesignerMode = designerData =>
|
|
92
92
|
get(designerData, 'data.visualizationMode.value.validForConfigurationModes', []).indexOf(
|
|
93
93
|
'creator+designer'
|
|
94
|
-
) !== -1
|
|
94
|
+
) !== -1;
|
|
95
95
|
|
|
96
96
|
const listAction = params => (dispatch, getState) => {
|
|
97
97
|
const { designerData } = getState();
|
|
@@ -99,7 +99,7 @@ const listAction = params => (dispatch, getState) => {
|
|
|
99
99
|
const filters = (params && params.filters) || {};
|
|
100
100
|
const paramsWithLimit = {...params, offset: 0, limit: 1000}
|
|
101
101
|
|
|
102
|
-
if (
|
|
102
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
103
103
|
dispatch(
|
|
104
104
|
CreatorViewActions.listAction({ ...paramsWithLimit, filters: { ...filters, 'creatorview.item.id': id } })
|
|
105
105
|
);
|
|
@@ -157,7 +157,7 @@ const removeDesignArea = identifier => (dispatch, getState) => {
|
|
|
157
157
|
|
|
158
158
|
const postData = () => (dispatch, getState) => {
|
|
159
159
|
const { designerData } = getState();
|
|
160
|
-
if (
|
|
160
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
161
161
|
return dispatch(CreatorViewActions.postData(true));
|
|
162
162
|
} else {
|
|
163
163
|
return dispatch(DesignViewActions.postData(true));
|
|
@@ -166,7 +166,7 @@ const postData = () => (dispatch, getState) => {
|
|
|
166
166
|
|
|
167
167
|
const detailsAction = (...args) => (dispatch, getState) => {
|
|
168
168
|
const { designerData } = getState();
|
|
169
|
-
if (
|
|
169
|
+
if (isCreatorDesignerMode(designerData)) {
|
|
170
170
|
return dispatch(CreatorViewActions.detailsAction(...args));
|
|
171
171
|
} else {
|
|
172
172
|
return dispatch(DesignViewActions.detailsAction(...args));
|