@configuratorware/configurator-admingui 1.31.1 → 1.31.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.
- package/App/Reducers/Api/Actions.js +12 -1
- package/App/Reducers/Api/Reducer.js +6 -0
- package/App/Reducers/Entity/Actions.js +6 -2
- package/Components/DefaultForm.js +3 -2
- package/Components/DefaultList.js +1 -1
- package/Screens/Client/Containers/Edit.js +15 -4
- package/Screens/Client/Translations.js +3 -1
- package/Screens/ColorPalettes/Components/DefaultColorSwitch.js +21 -11
- package/Screens/Creator/Components/VisualizationAndMediaData/Components/ImageEditTools.js +78 -28
- package/Screens/Creator/Components/VisualizationAndMediaData/Translations.js +4 -2
- package/Screens/CurrentClient/Containers/Edit.js +15 -4
- package/Screens/CurrentClient/Reducers/Reducer.js +1 -4
- package/Screens/DefaultClient/Containers/Edit.js +15 -4
- package/Screens/DefaultClient/Reducers/Reducer.js +1 -4
- package/Screens/Designer/Containers/List.js +1 -1
- package/Screens/Designer/SubScreens/Visualization/Containers/List.js +1 -1
- package/Screens/Group/Reducers/Actions.js +4 -2
- package/Screens/Item/Components/Variants/VariantsEditor.js +4 -2
- package/Screens/Item/Components/Variants/VariantsEditorPopup.js +34 -0
- package/Screens/Login/Reducers/Actions.js +4 -5
- package/package.json +2 -2
- package/src/App/Reducers/Api/Actions.js +6 -0
- package/src/App/Reducers/Api/Reducer.js +7 -0
- package/src/App/Reducers/Entity/Actions.js +5 -2
- package/src/Components/DefaultForm.js +2 -1
- package/src/Components/DefaultList.js +1 -1
- package/src/Components/TranslationFinder.js +1 -0
- package/src/Screens/Client/Containers/Edit.js +15 -2
- package/src/Screens/Client/Translations.js +3 -1
- package/src/Screens/ColorPalettes/Components/DefaultColorSwitch.js +18 -11
- package/src/Screens/Creator/Components/VisualizationAndMediaData/Components/ImageEditTools.js +65 -40
- package/src/Screens/Creator/Components/VisualizationAndMediaData/Translations.js +2 -0
- package/src/Screens/Creator/Components/VisualizationAndMediaData/VisualizationAndMediaData.js +1 -0
- package/src/Screens/Creator/Components/VisualizationAndMediaData/VisualizationAndMediaData.test.js +1 -0
- package/src/Screens/CurrentClient/Containers/Edit.js +15 -2
- package/src/Screens/CurrentClient/Reducers/Reducer.js +1 -1
- package/src/Screens/DefaultClient/Containers/Edit.js +15 -2
- package/src/Screens/DefaultClient/Reducers/Reducer.js +1 -1
- package/src/Screens/Designer/Containers/List.js +1 -1
- package/src/Screens/Designer/SubScreens/Visualization/Containers/List.js +1 -1
- package/src/Screens/Group/Reducers/Actions.js +1 -1
- package/src/Screens/Item/Components/Variants/VariantsEditor.js +3 -2
- package/src/Screens/Item/Components/Variants/VariantsEditorPopup.js +11 -1
- package/src/Screens/Login/Reducers/Actions.js +1 -5
- package/Screens/Client/Components/TextFields.js +0 -163
- package/src/Screens/Client/Components/TextFields.js +0 -77
|
@@ -5,7 +5,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.dismissRequest = exports.deleteData = exports.postData = exports.fetchDataIfNeeded = exports.fetchData = exports.expiredResponse = exports.deleteRequest = exports.postRequest = exports.networkError = exports.receiveData = exports.requestData = exports.invalidateSource = exports.EXPIRED_RESPONSE = exports.CANCEL_REQUEST = exports.DELETE_DATA = exports.POST_DATA = exports.HANDLED_NETWORK_ERROR = exports.NETWORK_ERROR = exports.INVALIDATE_SOURCE = exports.RECEIVE_DATA = exports.REQUEST_DATA = void 0;
|
|
8
|
+
exports.dismissRequest = exports.deleteData = exports.postData = exports.fetchDataIfNeeded = exports.fetchData = exports.expiredResponse = exports.deleteRequest = exports.postRequest = exports.networkError = exports.receiveData = exports.requestData = exports.resetDidInvalidate = exports.invalidateSource = exports.RESET_DID_INVALIDATE = exports.EXPIRED_RESPONSE = exports.CANCEL_REQUEST = exports.DELETE_DATA = exports.POST_DATA = exports.HANDLED_NETWORK_ERROR = exports.NETWORK_ERROR = exports.INVALIDATE_SOURCE = exports.RECEIVE_DATA = exports.REQUEST_DATA = void 0;
|
|
9
9
|
|
|
10
10
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
11
11
|
|
|
@@ -41,6 +41,8 @@ var CANCEL_REQUEST = 'CANCEL_REQUEST';
|
|
|
41
41
|
exports.CANCEL_REQUEST = CANCEL_REQUEST;
|
|
42
42
|
var EXPIRED_RESPONSE = 'EXPIRED_RESPONSE';
|
|
43
43
|
exports.EXPIRED_RESPONSE = EXPIRED_RESPONSE;
|
|
44
|
+
var RESET_DID_INVALIDATE = 'RESET_DID_INVALIDATE';
|
|
45
|
+
exports.RESET_DID_INVALIDATE = RESET_DID_INVALIDATE;
|
|
44
46
|
|
|
45
47
|
var invalidateSource = function invalidateSource(key) {
|
|
46
48
|
return {
|
|
@@ -51,6 +53,15 @@ var invalidateSource = function invalidateSource(key) {
|
|
|
51
53
|
|
|
52
54
|
exports.invalidateSource = invalidateSource;
|
|
53
55
|
|
|
56
|
+
var resetDidInvalidate = function resetDidInvalidate(key) {
|
|
57
|
+
return {
|
|
58
|
+
type: RESET_DID_INVALIDATE,
|
|
59
|
+
key: key
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
exports.resetDidInvalidate = resetDidInvalidate;
|
|
64
|
+
|
|
54
65
|
var requestData = function requestData(source, key) {
|
|
55
66
|
return {
|
|
56
67
|
type: REQUEST_DATA,
|
|
@@ -31,6 +31,11 @@ var data = function data() {
|
|
|
31
31
|
data: null
|
|
32
32
|
});
|
|
33
33
|
|
|
34
|
+
case _Actions.RESET_DID_INVALIDATE:
|
|
35
|
+
return _objectSpread(_objectSpread({}, state), {}, {
|
|
36
|
+
didInvalidate: false
|
|
37
|
+
});
|
|
38
|
+
|
|
34
39
|
case _Actions.REQUEST_DATA:
|
|
35
40
|
return _objectSpread(_objectSpread({}, state), {}, {
|
|
36
41
|
isFetching: true,
|
|
@@ -97,6 +102,7 @@ var dataBySource = function dataBySource() {
|
|
|
97
102
|
case _Actions.DELETE_DATA:
|
|
98
103
|
case _Actions.CANCEL_REQUEST:
|
|
99
104
|
case _Actions.EXPIRED_RESPONSE:
|
|
105
|
+
case _Actions.RESET_DID_INVALIDATE:
|
|
100
106
|
return _objectSpread(_objectSpread({}, state), {}, _defineProperty({}, action.key, data(state[action.key], action)));
|
|
101
107
|
|
|
102
108
|
default:
|
|
@@ -49,12 +49,16 @@ var reportUnsavedEntity = function reportUnsavedEntity(reducerName, entityState,
|
|
|
49
49
|
|
|
50
50
|
exports.reportUnsavedEntity = reportUnsavedEntity;
|
|
51
51
|
|
|
52
|
-
var releaseUnsavedEntity = function releaseUnsavedEntity() {
|
|
52
|
+
var releaseUnsavedEntity = function releaseUnsavedEntity(targetReducerName) {
|
|
53
53
|
return function (dispatch, getState) {
|
|
54
54
|
var state = getState();
|
|
55
55
|
var entity = state.entity;
|
|
56
56
|
var reducerName = entity.unsavedEntity.reducerName;
|
|
57
57
|
|
|
58
|
+
if (targetReducerName && targetReducerName !== reducerName) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
|
|
58
62
|
if (reducerName) {
|
|
59
63
|
if (state[reducerName].showDetails) {
|
|
60
64
|
dispatch({
|
|
@@ -555,7 +559,7 @@ var generateDefaultActions = function generateDefaultActions(listKey, dataKey, r
|
|
|
555
559
|
// onDelete callback
|
|
556
560
|
(0, _Helpers.dispatchDeleteData)(dispatch)(listKey, url, ids).then(function () {
|
|
557
561
|
dispatch(hideDetails(false));
|
|
558
|
-
dispatch(releaseUnsavedEntity());
|
|
562
|
+
dispatch(releaseUnsavedEntity(reducerName));
|
|
559
563
|
dispatch((0, _Helpers.invalidateSource)(listKey));
|
|
560
564
|
dispatch(cancelDeleteEntitiesDialog());
|
|
561
565
|
ctx.afterDelete && dispatch(ctx.afterDelete(ids));
|
|
@@ -63,9 +63,10 @@ var DefaultForm = /*#__PURE__*/function (_Component) {
|
|
|
63
63
|
onCancel = _this$props.onCancel,
|
|
64
64
|
onAction = _this$props.onAction,
|
|
65
65
|
config = _this$props.config,
|
|
66
|
-
closeAfterSave = _this$props.closeAfterSave
|
|
66
|
+
closeAfterSave = _this$props.closeAfterSave,
|
|
67
|
+
customPostData = _this$props.customPostData;
|
|
67
68
|
var actionButtons = config.actionButtons;
|
|
68
|
-
var onSubmit = !closeAfterSave ? postData : function () {
|
|
69
|
+
var onSubmit = customPostData ? customPostData : !closeAfterSave ? postData : function () {
|
|
69
70
|
return postData(true);
|
|
70
71
|
};
|
|
71
72
|
return entityState.isReady ? /*#__PURE__*/_react["default"].createElement(_Form["default"], {
|
|
@@ -236,7 +236,7 @@ var DefaultList = /*#__PURE__*/function (_Component) {
|
|
|
236
236
|
_createClass(DefaultList, [{
|
|
237
237
|
key: "componentDidUpdate",
|
|
238
238
|
value: function componentDidUpdate(prevProps) {
|
|
239
|
-
if (prevProps.selected
|
|
239
|
+
if (this.props.selected && !_lodash["default"].isEqual(prevProps.selected, this.props.selected)) {
|
|
240
240
|
this.setState({
|
|
241
241
|
selectedRows: this.props.selected
|
|
242
242
|
});
|
|
@@ -13,8 +13,6 @@ var _SimpleNestedData = _interopRequireDefault(require("../../../Components/Form
|
|
|
13
13
|
|
|
14
14
|
var _DefaultConnectedForm = _interopRequireDefault(require("../../../Components/DefaultConnectedForm"));
|
|
15
15
|
|
|
16
|
-
var _TextFields = _interopRequireDefault(require("../Components/TextFields"));
|
|
17
|
-
|
|
18
16
|
var _ColorTextField = _interopRequireDefault(require("../Components/ColorTextField"));
|
|
19
17
|
|
|
20
18
|
var _i18n = require("../../../App/i18n");
|
|
@@ -147,8 +145,21 @@ var formFields = [{
|
|
|
147
145
|
}],
|
|
148
146
|
dynamicDefaultLabel: false
|
|
149
147
|
}, {
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
name: 'texts',
|
|
149
|
+
label: 'termsAndConditionsLink',
|
|
150
|
+
type: 'intl',
|
|
151
|
+
intl: {
|
|
152
|
+
name: 'termsAndConditionsLink',
|
|
153
|
+
type: 'text'
|
|
154
|
+
}
|
|
155
|
+
}, {
|
|
156
|
+
name: 'texts',
|
|
157
|
+
label: 'dataPrivacyLink',
|
|
158
|
+
type: 'intl',
|
|
159
|
+
intl: {
|
|
160
|
+
name: 'dataPrivacyLink',
|
|
161
|
+
type: 'text'
|
|
162
|
+
}
|
|
152
163
|
}, {
|
|
153
164
|
name: 'channels',
|
|
154
165
|
label: 'channels',
|
|
@@ -6,6 +6,7 @@ require("../../App/i18n").use({
|
|
|
6
6
|
Users: 'Users',
|
|
7
7
|
'Theme - Highlight color': 'Theme - Highlight color',
|
|
8
8
|
termsAndConditionsLink: 'Terms and conditions link',
|
|
9
|
+
dataPrivacyLink: 'Data privacy Link',
|
|
9
10
|
themeColorError: 'Please enter a valid hex color (e.g. #0000ff)"',
|
|
10
11
|
client: {
|
|
11
12
|
addButtonLabel: 'Add Client',
|
|
@@ -22,7 +23,8 @@ require("../../App/i18n").use({
|
|
|
22
23
|
Users: 'Benutzer',
|
|
23
24
|
'Theme - Highlight color': 'Theme - Highlightfarbe',
|
|
24
25
|
'Theme - Font': 'Theme - Font',
|
|
25
|
-
termsAndConditionsLink: '
|
|
26
|
+
termsAndConditionsLink: 'Link zu den Nutzungsbedingungen',
|
|
27
|
+
dataPrivacyLink: 'Link zu den Datenschutzbestimmungen',
|
|
26
28
|
'Clientname / Shopname': 'Bezeichner/ Shopname',
|
|
27
29
|
'E-mail (contact)': 'E-Mail (Kontakt)',
|
|
28
30
|
'Street / no': 'Straße / Hausnummer',
|
|
@@ -72,7 +72,11 @@ var DefaultColorSwitch = /*#__PURE__*/function (_Component) {
|
|
|
72
72
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
73
73
|
|
|
74
74
|
_defineProperty(_assertThisInitialized(_this), "onToggle", function (e) {
|
|
75
|
-
|
|
75
|
+
var colorId = (0, _get["default"])(_this.props.color, 'id', null);
|
|
76
|
+
|
|
77
|
+
if (colorId) {
|
|
78
|
+
_this.props.setDefaultColor(_this.props.isDefaultColor ? null : _this.props.color);
|
|
79
|
+
}
|
|
76
80
|
});
|
|
77
81
|
|
|
78
82
|
return _this;
|
|
@@ -82,15 +86,21 @@ var DefaultColorSwitch = /*#__PURE__*/function (_Component) {
|
|
|
82
86
|
key: "render",
|
|
83
87
|
value: function render() {
|
|
84
88
|
var classes = this.props.classes;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
89
|
+
var colorId = (0, _get["default"])(this.props.color, 'id', null);
|
|
90
|
+
|
|
91
|
+
if (colorId) {
|
|
92
|
+
return /*#__PURE__*/_react["default"].createElement(_Switch["default"], {
|
|
93
|
+
classes: {
|
|
94
|
+
switchBase: classes.switchBase
|
|
95
|
+
},
|
|
96
|
+
checked: this.props.isDefaultColor,
|
|
97
|
+
onClick: this.onToggle,
|
|
98
|
+
name: "isDefaultColor",
|
|
99
|
+
color: "primary"
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return null;
|
|
94
104
|
}
|
|
95
105
|
}]);
|
|
96
106
|
|
|
@@ -109,7 +119,7 @@ var mapStateToProps = function mapStateToProps(state, ownProps) {
|
|
|
109
119
|
var colorId = (0, _get["default"])(ownProps.color, 'id', null);
|
|
110
120
|
var defaultColorId = (0, _get["default"])(state, "".concat(_Actions.COLORPALETTES_REDUCER_NAME, ".data.defaultColor.value.id"), null);
|
|
111
121
|
return {
|
|
112
|
-
isDefaultColor: colorId === defaultColorId
|
|
122
|
+
isDefaultColor: colorId === defaultColorId && colorId !== null && defaultColorId !== null
|
|
113
123
|
};
|
|
114
124
|
};
|
|
115
125
|
|
|
@@ -25,10 +25,14 @@ var _Api = _interopRequireDefault(require("../../../../../App/Api"));
|
|
|
25
25
|
|
|
26
26
|
var _Actions = require("../../../../../App/Reducers/Api/Actions");
|
|
27
27
|
|
|
28
|
+
var _Actions2 = require("../../../../../App/Reducers/Frame/Actions");
|
|
29
|
+
|
|
28
30
|
var _reactRedux = require("react-redux");
|
|
29
31
|
|
|
30
32
|
var _core = require("@material-ui/core");
|
|
31
33
|
|
|
34
|
+
var _reactFileDrop = _interopRequireDefault(require("react-file-drop"));
|
|
35
|
+
|
|
32
36
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
33
37
|
|
|
34
38
|
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); }
|
|
@@ -57,6 +61,14 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
57
61
|
},
|
|
58
62
|
fileInput: {
|
|
59
63
|
display: 'none'
|
|
64
|
+
},
|
|
65
|
+
fileDrop: {
|
|
66
|
+
position: 'absolute',
|
|
67
|
+
top: 0,
|
|
68
|
+
left: '50%',
|
|
69
|
+
width: 150,
|
|
70
|
+
marginLeft: -75,
|
|
71
|
+
height: 100
|
|
60
72
|
}
|
|
61
73
|
})(function (_ref) {
|
|
62
74
|
var classes = _ref.classes,
|
|
@@ -76,43 +88,54 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
76
88
|
|
|
77
89
|
var uploadImage = /*#__PURE__*/function () {
|
|
78
90
|
var _ref2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(image) {
|
|
79
|
-
var data;
|
|
91
|
+
var allowedFormats, data;
|
|
80
92
|
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
81
93
|
while (1) {
|
|
82
94
|
switch (_context.prev = _context.next) {
|
|
83
95
|
case 0:
|
|
96
|
+
allowedFormats = ['image/jpeg', 'image/jpg', 'image/png'];
|
|
97
|
+
|
|
84
98
|
if (uploadUrl) {
|
|
85
|
-
_context.next =
|
|
99
|
+
_context.next = 3;
|
|
86
100
|
break;
|
|
87
101
|
}
|
|
88
102
|
|
|
89
103
|
throw new Error('uploadUrl is not provided!');
|
|
90
104
|
|
|
91
|
-
case
|
|
92
|
-
|
|
105
|
+
case 3:
|
|
106
|
+
if (!(allowedFormats.indexOf(image.type) === -1)) {
|
|
107
|
+
_context.next = 5;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return _context.abrupt("return", dispatch((0, _Actions2.showErrorMessage)((0, _i18n.t)('visualizationAndMediaData.unsupportedFileTypeError'))));
|
|
112
|
+
|
|
113
|
+
case 5:
|
|
114
|
+
_context.prev = 5;
|
|
93
115
|
data = new FormData();
|
|
94
116
|
data.append('file', image);
|
|
95
|
-
|
|
117
|
+
dispatch((0, _Actions2.cancelErrorMessage)());
|
|
118
|
+
_context.next = 11;
|
|
96
119
|
return _Api["default"].request({
|
|
97
120
|
method: 'post',
|
|
98
121
|
url: uploadUrl,
|
|
99
122
|
data: data
|
|
100
123
|
});
|
|
101
124
|
|
|
102
|
-
case
|
|
125
|
+
case 11:
|
|
103
126
|
return _context.abrupt("return", _context.sent);
|
|
104
127
|
|
|
105
|
-
case
|
|
106
|
-
_context.prev =
|
|
107
|
-
_context.t0 = _context["catch"](
|
|
128
|
+
case 14:
|
|
129
|
+
_context.prev = 14;
|
|
130
|
+
_context.t0 = _context["catch"](5);
|
|
108
131
|
dispatch((0, _Actions.networkError)('image', 'image', _context.t0));
|
|
109
132
|
|
|
110
|
-
case
|
|
133
|
+
case 17:
|
|
111
134
|
case "end":
|
|
112
135
|
return _context.stop();
|
|
113
136
|
}
|
|
114
137
|
}
|
|
115
|
-
}, _callee, null, [[
|
|
138
|
+
}, _callee, null, [[5, 14]]);
|
|
116
139
|
}));
|
|
117
140
|
|
|
118
141
|
return function uploadImage(_x) {
|
|
@@ -162,7 +185,34 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
162
185
|
};
|
|
163
186
|
}();
|
|
164
187
|
|
|
165
|
-
return /*#__PURE__*/_react["default"].createElement("
|
|
188
|
+
return /*#__PURE__*/_react["default"].createElement(_reactFileDrop["default"], {
|
|
189
|
+
className: classes.fileDrop,
|
|
190
|
+
onDrop: /*#__PURE__*/function () {
|
|
191
|
+
var _ref4 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3(files) {
|
|
192
|
+
return regeneratorRuntime.wrap(function _callee3$(_context3) {
|
|
193
|
+
while (1) {
|
|
194
|
+
switch (_context3.prev = _context3.next) {
|
|
195
|
+
case 0:
|
|
196
|
+
_context3.next = 2;
|
|
197
|
+
return uploadImage(files[0]);
|
|
198
|
+
|
|
199
|
+
case 2:
|
|
200
|
+
onUpdate && onUpdate();
|
|
201
|
+
|
|
202
|
+
case 3:
|
|
203
|
+
case "end":
|
|
204
|
+
return _context3.stop();
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}, _callee3);
|
|
208
|
+
}));
|
|
209
|
+
|
|
210
|
+
return function (_x2) {
|
|
211
|
+
return _ref4.apply(this, arguments);
|
|
212
|
+
};
|
|
213
|
+
}(),
|
|
214
|
+
multiple: false
|
|
215
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
166
216
|
className: "".concat(classes.root, " ").concat(className)
|
|
167
217
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
168
218
|
ref: fileInputRef,
|
|
@@ -170,17 +220,17 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
170
220
|
accept: "image/jpeg, image/png",
|
|
171
221
|
className: classes.fileInput,
|
|
172
222
|
onChange: /*#__PURE__*/function () {
|
|
173
|
-
var
|
|
174
|
-
return regeneratorRuntime.wrap(function
|
|
223
|
+
var _ref5 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(evt) {
|
|
224
|
+
return regeneratorRuntime.wrap(function _callee4$(_context4) {
|
|
175
225
|
while (1) {
|
|
176
|
-
switch (
|
|
226
|
+
switch (_context4.prev = _context4.next) {
|
|
177
227
|
case 0:
|
|
178
228
|
if (!evt.target.files.length) {
|
|
179
|
-
|
|
229
|
+
_context4.next = 4;
|
|
180
230
|
break;
|
|
181
231
|
}
|
|
182
232
|
|
|
183
|
-
|
|
233
|
+
_context4.next = 3;
|
|
184
234
|
return uploadImage(evt.target.files[0]);
|
|
185
235
|
|
|
186
236
|
case 3:
|
|
@@ -188,14 +238,14 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
188
238
|
|
|
189
239
|
case 4:
|
|
190
240
|
case "end":
|
|
191
|
-
return
|
|
241
|
+
return _context4.stop();
|
|
192
242
|
}
|
|
193
243
|
}
|
|
194
|
-
},
|
|
244
|
+
}, _callee4);
|
|
195
245
|
}));
|
|
196
246
|
|
|
197
|
-
return function (
|
|
198
|
-
return
|
|
247
|
+
return function (_x3) {
|
|
248
|
+
return _ref5.apply(this, arguments);
|
|
199
249
|
};
|
|
200
250
|
}()
|
|
201
251
|
}), /*#__PURE__*/_react["default"].createElement("label", null, /*#__PURE__*/_react["default"].createElement(_core.Tooltip, {
|
|
@@ -215,12 +265,12 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
215
265
|
onCancel: function onCancel() {
|
|
216
266
|
return setShowDeleteConfirm(false);
|
|
217
267
|
},
|
|
218
|
-
onConfirm: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function
|
|
219
|
-
return regeneratorRuntime.wrap(function
|
|
268
|
+
onConfirm: /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5() {
|
|
269
|
+
return regeneratorRuntime.wrap(function _callee5$(_context5) {
|
|
220
270
|
while (1) {
|
|
221
|
-
switch (
|
|
271
|
+
switch (_context5.prev = _context5.next) {
|
|
222
272
|
case 0:
|
|
223
|
-
|
|
273
|
+
_context5.next = 2;
|
|
224
274
|
return removeImage();
|
|
225
275
|
|
|
226
276
|
case 2:
|
|
@@ -229,14 +279,14 @@ var ImageEditTools = (0, _withStyles["default"])({
|
|
|
229
279
|
|
|
230
280
|
case 4:
|
|
231
281
|
case "end":
|
|
232
|
-
return
|
|
282
|
+
return _context5.stop();
|
|
233
283
|
}
|
|
234
284
|
}
|
|
235
|
-
},
|
|
285
|
+
}, _callee5);
|
|
236
286
|
})),
|
|
237
287
|
title: (0, _i18n.t)('visualizationAndMediaData.imageDeleteConfirm.title'),
|
|
238
288
|
message: (0, _i18n.t)('visualizationAndMediaData.imageDeleteConfirm.message')
|
|
239
|
-
}));
|
|
289
|
+
})));
|
|
240
290
|
});
|
|
241
291
|
var _default = ImageEditTools;
|
|
242
292
|
exports["default"] = _default;
|
|
@@ -37,7 +37,8 @@ require("../../../../App/i18n").use({
|
|
|
37
37
|
imageDeleteConfirm: {
|
|
38
38
|
title: 'Delete image',
|
|
39
39
|
message: 'Do you really want to delete this image?'
|
|
40
|
-
}
|
|
40
|
+
},
|
|
41
|
+
unsupportedFileTypeError: 'Unsupported file format'
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
de: {
|
|
@@ -76,7 +77,8 @@ require("../../../../App/i18n").use({
|
|
|
76
77
|
imageDeleteConfirm: {
|
|
77
78
|
title: 'Bild löschen',
|
|
78
79
|
message: 'Möchtest du dieses Bild wirklich löschen?'
|
|
79
|
-
}
|
|
80
|
+
},
|
|
81
|
+
unsupportedFileTypeError: 'Nicht unterstütztes Dateiformat'
|
|
80
82
|
}
|
|
81
83
|
}
|
|
82
84
|
}, true);
|
|
@@ -13,8 +13,6 @@ var _SimpleNestedData = _interopRequireDefault(require("../../../Components/Form
|
|
|
13
13
|
|
|
14
14
|
var _DefaultConnectedForm = _interopRequireDefault(require("../../../Components/DefaultConnectedForm"));
|
|
15
15
|
|
|
16
|
-
var _TextFields = _interopRequireDefault(require("../../Client/Components/TextFields"));
|
|
17
|
-
|
|
18
16
|
var _withLoadAction = require("../../../Components/withLoadAction");
|
|
19
17
|
|
|
20
18
|
var _i18n = require("../../../App/i18n");
|
|
@@ -110,8 +108,21 @@ var formFields = [{
|
|
|
110
108
|
}],
|
|
111
109
|
dynamicDefaultLabel: false
|
|
112
110
|
}, {
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
name: 'texts',
|
|
112
|
+
label: 'termsAndConditionsLink',
|
|
113
|
+
type: 'intl',
|
|
114
|
+
intl: {
|
|
115
|
+
name: 'termsAndConditionsLink',
|
|
116
|
+
type: 'text'
|
|
117
|
+
}
|
|
118
|
+
}, {
|
|
119
|
+
name: 'texts',
|
|
120
|
+
label: 'Title',
|
|
121
|
+
type: 'dataPrivacyLink',
|
|
122
|
+
intl: {
|
|
123
|
+
name: 'dataPrivacyLink',
|
|
124
|
+
type: 'text'
|
|
125
|
+
}
|
|
115
126
|
}, {
|
|
116
127
|
name: 'customCss',
|
|
117
128
|
label: 'customCss',
|
|
@@ -22,10 +22,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
22
22
|
var initialState = _objectSpread({}, (0, _Reducer.getDefaultEntityState)({
|
|
23
23
|
id: null,
|
|
24
24
|
texts: {
|
|
25
|
-
value: []
|
|
26
|
-
constraints: {
|
|
27
|
-
presence: true
|
|
28
|
-
}
|
|
25
|
+
value: []
|
|
29
26
|
},
|
|
30
27
|
theme: {
|
|
31
28
|
value: {},
|
|
@@ -17,8 +17,6 @@ var _SimpleNestedData = _interopRequireDefault(require("../../../Components/Form
|
|
|
17
17
|
|
|
18
18
|
var _i18n = require("../../../App/i18n");
|
|
19
19
|
|
|
20
|
-
var _TextFields = _interopRequireDefault(require("../../Client/Components/TextFields"));
|
|
21
|
-
|
|
22
20
|
var _PdfMarkdownField = _interopRequireDefault(require("../../Client/Components/PdfMarkdownField"));
|
|
23
21
|
|
|
24
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
@@ -123,8 +121,21 @@ var formFields = [{
|
|
|
123
121
|
id: 'none'
|
|
124
122
|
}]
|
|
125
123
|
}, {
|
|
126
|
-
|
|
127
|
-
|
|
124
|
+
name: 'texts',
|
|
125
|
+
label: 'termsAndConditionsLink',
|
|
126
|
+
type: 'intl',
|
|
127
|
+
intl: {
|
|
128
|
+
name: 'termsAndConditionsLink',
|
|
129
|
+
type: 'text'
|
|
130
|
+
}
|
|
131
|
+
}, {
|
|
132
|
+
name: 'texts',
|
|
133
|
+
label: 'dataPrivacyLink',
|
|
134
|
+
type: 'intl',
|
|
135
|
+
intl: {
|
|
136
|
+
name: 'dataPrivacyLink',
|
|
137
|
+
type: 'text'
|
|
138
|
+
}
|
|
128
139
|
}, {
|
|
129
140
|
name: 'customCss',
|
|
130
141
|
label: 'customCss',
|
|
@@ -40,7 +40,7 @@ var _default = (0, _DefaultConnectedList["default"])(columns, listParams, _Actio
|
|
|
40
40
|
false, // skip remove entity
|
|
41
41
|
{
|
|
42
42
|
reducerName: _Actions.DESIGNER_REDUCER_NAME,
|
|
43
|
-
entityIdKey: '
|
|
43
|
+
entityIdKey: 'id.value'
|
|
44
44
|
});
|
|
45
45
|
|
|
46
46
|
exports["default"] = _default;
|
|
@@ -164,7 +164,7 @@ var VisualizationSettings = /*#__PURE__*/function (_React$Component) {
|
|
|
164
164
|
|
|
165
165
|
_defineProperty(VisualizationSettings, "propTypes", {
|
|
166
166
|
loadDetails: _propTypes["default"].func.isRequired,
|
|
167
|
-
|
|
167
|
+
setState: _propTypes["default"].func.isRequired,
|
|
168
168
|
onDeleteItems: _propTypes["default"].func.isRequired
|
|
169
169
|
});
|
|
170
170
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports["default"] = exports.loadEntity = exports.hideDetails = exports.GROUPS_URL = exports.REDUCER_NAME = exports.DATA_KEY = exports.LIST_KEY = void 0;
|
|
6
|
+
exports["default"] = exports.postData = exports.loadEntity = exports.hideDetails = exports.GROUPS_URL = exports.REDUCER_NAME = exports.DATA_KEY = exports.LIST_KEY = void 0;
|
|
7
7
|
|
|
8
8
|
var _Actions = require("../../../App/Reducers/Entity/Actions");
|
|
9
9
|
|
|
@@ -17,7 +17,9 @@ var GROUPS_URL = 'groups';
|
|
|
17
17
|
exports.GROUPS_URL = GROUPS_URL;
|
|
18
18
|
var actions = (0, _Actions.generateDefaultActions)(LIST_KEY, DATA_KEY, REDUCER_NAME, GROUPS_URL);
|
|
19
19
|
var hideDetails = actions.hideDetails,
|
|
20
|
-
loadEntity = actions.loadEntity
|
|
20
|
+
loadEntity = actions.loadEntity,
|
|
21
|
+
postData = actions.postData;
|
|
22
|
+
exports.postData = postData;
|
|
21
23
|
exports.loadEntity = loadEntity;
|
|
22
24
|
exports.hideDetails = hideDetails;
|
|
23
25
|
var _default = actions;
|
|
@@ -27,6 +27,8 @@ var _Checkbox = _interopRequireDefault(require("@material-ui/core/Checkbox/Check
|
|
|
27
27
|
|
|
28
28
|
var _TablePagination = _interopRequireDefault(require("@material-ui/core/TablePagination"));
|
|
29
29
|
|
|
30
|
+
var _uniq = _interopRequireDefault(require("lodash/uniq"));
|
|
31
|
+
|
|
30
32
|
var _ReduxListener = require("../../../../App/ReduxListener");
|
|
31
33
|
|
|
32
34
|
var _i18n = require("../../../../App/i18n");
|
|
@@ -159,7 +161,7 @@ var getGroupsFromChildren = function getGroupsFromChildren(children) {
|
|
|
159
161
|
|
|
160
162
|
return {
|
|
161
163
|
groups: groups,
|
|
162
|
-
groupIdsInOrder: groupIdsInOrder
|
|
164
|
+
groupIdsInOrder: (0, _uniq["default"])(groupIdsInOrder)
|
|
163
165
|
};
|
|
164
166
|
};
|
|
165
167
|
|
|
@@ -330,7 +332,7 @@ var VariantsEditor = /*#__PURE__*/function (_Component) {
|
|
|
330
332
|
|
|
331
333
|
_this.setState({
|
|
332
334
|
groups: groups,
|
|
333
|
-
groupIdsInOrder: groupIdsInOrder
|
|
335
|
+
groupIdsInOrder: (0, _uniq["default"])(groupIdsInOrder)
|
|
334
336
|
});
|
|
335
337
|
});
|
|
336
338
|
|
|
@@ -23,12 +23,18 @@ var GroupEntryActions = _interopRequireWildcard(require("../../../GroupEntry/Red
|
|
|
23
23
|
|
|
24
24
|
var _i18n = require("../../../../App/i18n");
|
|
25
25
|
|
|
26
|
+
var _Actions3 = require("../../../../App/Reducers/Api/Actions");
|
|
27
|
+
|
|
26
28
|
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); }
|
|
27
29
|
|
|
28
30
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
31
33
|
|
|
34
|
+
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
|
35
|
+
|
|
36
|
+
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
|
37
|
+
|
|
32
38
|
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
33
39
|
|
|
34
40
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -72,6 +78,7 @@ var VariantsEditorPopup = /*#__PURE__*/function (_React$Component) {
|
|
|
72
78
|
open: showGroupEditor,
|
|
73
79
|
scroll: 'paper'
|
|
74
80
|
}, /*#__PURE__*/_react["default"].createElement(_Edit["default"], {
|
|
81
|
+
customPostData: this.props.customPostData,
|
|
75
82
|
onCancel: this.props.cancelGroup,
|
|
76
83
|
closeAfterSave: true
|
|
77
84
|
})), /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
|
|
@@ -106,6 +113,33 @@ var renderDispatchToProps = function renderDispatchToProps(dispatch) {
|
|
|
106
113
|
cancelGroup: function cancelGroup() {
|
|
107
114
|
dispatch(GroupActions.hideDetails(false));
|
|
108
115
|
},
|
|
116
|
+
customPostData: function () {
|
|
117
|
+
var _customPostData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
|
|
118
|
+
return regeneratorRuntime.wrap(function _callee$(_context) {
|
|
119
|
+
while (1) {
|
|
120
|
+
switch (_context.prev = _context.next) {
|
|
121
|
+
case 0:
|
|
122
|
+
_context.next = 2;
|
|
123
|
+
return dispatch(GroupActions.postData(true));
|
|
124
|
+
|
|
125
|
+
case 2:
|
|
126
|
+
// need to reset didInvalidate flag as it is set on save of group which is blocking to reloadList
|
|
127
|
+
dispatch((0, _Actions3.resetDidInvalidate)(GroupActions.GROUPS_URL));
|
|
128
|
+
|
|
129
|
+
case 3:
|
|
130
|
+
case "end":
|
|
131
|
+
return _context.stop();
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}, _callee);
|
|
135
|
+
}));
|
|
136
|
+
|
|
137
|
+
function customPostData() {
|
|
138
|
+
return _customPostData.apply(this, arguments);
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return customPostData;
|
|
142
|
+
}(),
|
|
109
143
|
cancelGroupEntry: function cancelGroupEntry() {
|
|
110
144
|
dispatch(GroupEntryActions.hideDetails(false));
|
|
111
145
|
}
|