@configuratorware/configurator-frontendgui 1.35.2 → 1.36.0-beta.0

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.
@@ -11,8 +11,6 @@ var _react = _interopRequireDefault(require("react"));
11
11
 
12
12
  var _lodash = _interopRequireDefault(require("lodash"));
13
13
 
14
- var _reactSwipeable = require("react-swipeable");
15
-
16
14
  var _clsx2 = _interopRequireDefault(require("clsx"));
17
15
 
18
16
  var _Button = _interopRequireDefault(require("@material-ui/core/Button"));
@@ -45,6 +43,8 @@ var _Markdown = _interopRequireDefault(require("../../../../../Framework/Compone
45
43
 
46
44
  var _ZoomImage = _interopRequireDefault(require("./ZoomImage"));
47
45
 
46
+ var _Swipeable = require("../../../../../Shared/Components/Swipeable");
47
+
48
48
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
49
49
 
50
50
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -214,14 +214,11 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
214
214
  }
215
215
  });
216
216
 
217
- _defineProperty(_assertThisInitialized(_this), "swiped", function (e, deltaX, deltaY) {
218
- // use only horizontal swiping
219
- if (Math.abs(deltaX) >= Math.abs(deltaY)) {
220
- if (deltaX > 0) {
221
- _this.next();
222
- } else {
223
- _this.prev();
224
- }
217
+ _defineProperty(_assertThisInitialized(_this), "swiped", function (e) {
218
+ if (e.dir === _Swipeable.LEFT) {
219
+ _this.next();
220
+ } else if (e.dir === _Swipeable.RIGHT) {
221
+ _this.prev();
225
222
  }
226
223
  });
227
224
 
@@ -428,12 +425,12 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
428
425
  }
429
426
  }, /*#__PURE__*/_react["default"].createElement(LoadingComponent, {
430
427
  show: loading
431
- })) : /*#__PURE__*/_react["default"].createElement(_reactSwipeable.Swipeable, {
432
- disabled: !showNav,
433
- trackMouse: true,
434
- onSwiped: this.swiped,
435
- delta: Optiondetail.swipeDelta
436
- }, /*#__PURE__*/_react["default"].createElement("div", {
428
+ })) : /*#__PURE__*/_react["default"].createElement(_Swipeable.Swipeable, {
429
+ options: {
430
+ trackMouse: true,
431
+ onSwiped: showNav && this.swiped,
432
+ delta: Optiondetail.swipeDelta
433
+ },
437
434
  ref: this.setDetailsContainerRef,
438
435
  className: showNav ? classes.detailContainerWithNav : classes.detailContainer
439
436
  }, showNav && /*#__PURE__*/_react["default"].createElement("div", {
@@ -453,7 +450,7 @@ var Optiondetail = /*#__PURE__*/function (_React$Component) {
453
450
  })), detailsContent) : detailsContent, showNav && /*#__PURE__*/_react["default"].createElement("div", {
454
451
  className: (0, _clsx2["default"])(classes.detailNav, 'next'),
455
452
  onClick: this.next
456
- })))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
453
+ }))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement("div", {
457
454
  className: classes.detailFooter
458
455
  }, this.renderControls())), /*#__PURE__*/_react["default"].createElement(_ZoomImage["default"], {
459
456
  onClose: this.toggleZoomImage,
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.CreatorScreen = CreatorScreen;
9
+ exports["default"] = void 0;
9
10
 
10
11
  var _react = _interopRequireWildcard(require("react"));
11
12
 
@@ -304,4 +305,6 @@ CreatorScreen.defaultProps = {
304
305
  },
305
306
  Layout: _DefaultLayout["default"],
306
307
  OptionsListContainer: _OptionsList["default"]
307
- };
308
+ };
309
+ var _default = CreatorScreen;
310
+ exports["default"] = _default;
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  value: true
7
7
  });
8
8
  exports.DesignerScreen = DesignerScreen;
9
+ exports["default"] = void 0;
9
10
 
10
11
  var React = _interopRequireWildcard(require("react"));
11
12
 
@@ -252,4 +253,6 @@ DesignerScreen.defaultProps = {
252
253
  TextEditorStateProvider: _DefaultCanvasProvider.DefaultTextEditorStateProvider,
253
254
  Layout: _DefaultLayout["default"],
254
255
  PopupArea: _PopupAreaProvider.PopupArea
255
- };
256
+ };
257
+ var _default = DesignerScreen;
258
+ exports["default"] = _default;
@@ -667,6 +667,6 @@ function configuratorReducer() {
667
667
 
668
668
  function filterOptionsWithDetails(options) {
669
669
  return _lodash["default"].filter(options, function (option) {
670
- return !!(option["abstract"] || option.description || option.detailImageExists === true);
670
+ return !!(option["abstract"] || option.description || option.detailImage);
671
671
  });
672
672
  }
@@ -83,6 +83,7 @@ var SendEmail = function SendEmail(props) {
83
83
  },
84
84
  id: "alert-dialog-description"
85
85
  }, (0, _i18n.t)('sendEmailDialog.info'))), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_MainButton["default"], {
86
+ target: "_blank",
86
87
  href: emailUrl,
87
88
  onClick: onClose,
88
89
  variant: "contained",
@@ -9,8 +9,6 @@ exports["default"] = void 0;
9
9
 
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
 
12
- var _reactSwipeable = require("react-swipeable");
13
-
14
12
  var _lodash = _interopRequireDefault(require("lodash"));
15
13
 
16
14
  require("./Styles.scss");
@@ -21,6 +19,8 @@ var _clsx = _interopRequireDefault(require("clsx"));
21
19
 
22
20
  var _styles = require("@material-ui/core/styles");
23
21
 
22
+ var _Swipeable = require("../../../Shared/Components/Swipeable");
23
+
24
24
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
25
25
 
26
26
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
@@ -186,18 +186,16 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
186
186
  });
187
187
 
188
188
  _defineProperty(_assertThisInitialized(_this), "swiped", function (e) {
189
- // if it's vertical deltaY should be the bigger
190
- if (_this.props.vertical && Math.abs(e.deltaY) >= Math.abs(e.deltaX)) {
191
- if (e.deltaY > 0) {
189
+ if (_this.props.vertical) {
190
+ if (e.dir === _Swipeable.UP) {
192
191
  _this.next();
193
- } else {
192
+ } else if (e.dir === _Swipeable.DOWN) {
194
193
  _this.prev();
195
194
  }
196
- } // if it's not vertical deltaX should be the bigger
197
- else if (!_this.props.vertical && Math.abs(e.deltaX) >= Math.abs(e.deltaY)) {
198
- if (e.deltaX > 0) {
195
+ } else {
196
+ if (e.dir === _Swipeable.LEFT) {
199
197
  _this.next();
200
- } else {
198
+ } else if (e.dir === _Swipeable.RIGHT) {
201
199
  _this.prev();
202
200
  }
203
201
  }
@@ -231,10 +229,13 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
231
229
  _createClass(Carousel, [{
232
230
  key: "componentDidMount",
233
231
  value: function componentDidMount() {
234
- this.init();
235
232
  var carousel = this.refs.carousel;
236
- var wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
237
- carousel.addEventListener(wheelEventName, this.scrolled);
233
+
234
+ if (carousel) {
235
+ this.init();
236
+ var wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
237
+ carousel.addEventListener(wheelEventName, this.scrolled);
238
+ }
238
239
  }
239
240
  }, {
240
241
  key: "componentDidUpdate",
@@ -278,11 +279,13 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
278
279
  className: (0, _clsx["default"])(classes.carousel, prevClassName),
279
280
  ref: "prev",
280
281
  onClick: this.prev
281
- }), /*#__PURE__*/_react["default"].createElement(_reactSwipeable.Swipeable, {
282
+ }), /*#__PURE__*/_react["default"].createElement(_Swipeable.Swipeable, {
282
283
  className: 'carousel-frame',
283
- trackMouse: true,
284
- onSwiping: this.swiping,
285
- onSwiped: this.swiped
284
+ options: {
285
+ trackMouse: true,
286
+ onSwiping: this.swiping,
287
+ onSwiped: this.swiped
288
+ }
286
289
  }, /*#__PURE__*/_react["default"].createElement("div", {
287
290
  className: "carousel-slider",
288
291
  style: {
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "UP", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _reactSwipeable.UP;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "DOWN", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _reactSwipeable.DOWN;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "LEFT", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _reactSwipeable.LEFT;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "RIGHT", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _reactSwipeable.RIGHT;
28
+ }
29
+ });
30
+ exports.Swipeable = void 0;
31
+
32
+ var _react = _interopRequireDefault(require("react"));
33
+
34
+ var _reactSwipeable = require("react-swipeable");
35
+
36
+ var _excluded = ["options"];
37
+
38
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
39
+
40
+ function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
41
+
42
+ function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
43
+
44
+ function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
45
+
46
+ // eslint-disable-next-line react/prop-types,react/display-name
47
+ var Swipeable = /*#__PURE__*/_react["default"].forwardRef(function (_ref, ref) {
48
+ var options = _ref.options,
49
+ props = _objectWithoutProperties(_ref, _excluded);
50
+
51
+ var handlers = (0, _reactSwipeable.useSwipeable)(options);
52
+ return /*#__PURE__*/_react["default"].createElement("div", _extends({}, handlers, props, {
53
+ ref: ref
54
+ }));
55
+ });
56
+
57
+ exports.Swipeable = Swipeable;
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.35.2",
3
+ "version": "1.36.0-beta.0",
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.35.2",
10
- "@hot-loader/react-dom": "^17.0.1",
9
+ "@configuratorware/scripts": "1.36.0-beta.0",
10
+ "@hot-loader/react-dom": "^17.0.2",
11
11
  "@material-ui/core": "^4.12.2",
12
12
  "@material-ui/icons": "^4.11.2",
13
13
  "@material-ui/lab": "^4.0.0-alpha.60",
@@ -26,9 +26,9 @@
26
26
  "path-browserify": "^1.0.1",
27
27
  "prop-types": "^15.7.2",
28
28
  "qs": "^6.10.1",
29
- "react": "^16.14.0",
29
+ "react": "^17.0.2",
30
30
  "react-custom-scrollbars": "^4.2.1",
31
- "react-dom": "^16.14.0",
31
+ "react-dom": "^17.0.2",
32
32
  "react-file-drop": "^0.2.8",
33
33
  "react-hot-loader": "^4.13.0",
34
34
  "react-hyphen": "^1.4.0",
@@ -37,10 +37,10 @@
37
37
  "react-redux-i18n": "^1.9.3",
38
38
  "react-router": "^5.2.0",
39
39
  "react-router-dom": "^5.2.0",
40
- "react-swipeable": "^5.5.1",
40
+ "react-swipeable": "^6.2.2",
41
41
  "react-zoom-pan-pinch": "^2.1.3",
42
- "redhotmagma-graphics-editor": "1.35.2",
43
- "redhotmagma-visualization": "1.35.2",
42
+ "redhotmagma-graphics-editor": "1.36.0-beta.0",
43
+ "redhotmagma-visualization": "1.36.0-beta.0",
44
44
  "redux": "^4.1.0",
45
45
  "redux-logger": "^3.0.6",
46
46
  "redux-persist": "^5.10.0",
@@ -52,25 +52,18 @@
52
52
  "uuid": "^3.4.0"
53
53
  },
54
54
  "peerDependencies": {
55
- "@babel/plugin-proposal-class-properties": "^7.13.0",
56
- "@babel/plugin-proposal-decorators": "^7.13.5",
57
- "@babel/plugin-syntax-dynamic-import": "^7.8.3",
58
- "@babel/preset-env": "^7.13.12",
59
- "@babel/preset-react": "^7.13.13",
60
- "@babel/preset-typescript": "^7.13.0",
61
55
  "babel-loader": "^8.2.2",
62
- "babel-plugin-module-resolver": "^4.1.0",
63
- "css-loader": "^5.2.0",
56
+ "css-loader": "^5.2.7",
64
57
  "file-loader": "^6.2.0",
65
- "mini-css-extract-plugin": "^1.4.0",
66
- "node-sass": "^5.0.0",
67
- "optimize-css-assets-webpack-plugin": "^5.0.4",
68
- "resolve-url-loader": "^3.1.2",
69
- "sass-loader": "^11.0.1",
58
+ "mini-css-extract-plugin": "^2.1.0",
59
+ "resolve-url-loader": "^3.1.4",
60
+ "sass": "^1.53.0",
61
+ "sass-loader": "^13.0.2",
70
62
  "style-loader": "^2.0.0",
63
+ "terser-webpack-plugin": "^5.1.4",
71
64
  "url-loader": "^4.1.1",
72
- "webpack": "^5.28.0",
73
- "webpack-cli": "^4.6.0",
65
+ "webpack": "^5.46.0",
66
+ "webpack-cli": "^4.7.2",
74
67
  "webpack-dev-server": "^3.11.2"
75
68
  },
76
69
  "scripts": {
@@ -5,30 +5,28 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders as a modal screen
5
5
  <div
6
6
  class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
7
7
  >
8
- <div>
9
- <div
10
- class="Optiondetail-detailContainer-4"
11
- >
12
- <div>
13
- <div
14
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
15
- >
16
- <p>
17
- Das sind schwarze Reissverschlüsse
18
- </p>
19
- </div>
20
- <div
21
- class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
22
- >
23
- 0,00 €
24
- </div>
25
- <div
26
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
27
- >
28
- <p>
29
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
30
- </p>
31
- </div>
8
+ <div
9
+ class="Optiondetail-detailContainer-4"
10
+ >
11
+ <div>
12
+ <div
13
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
14
+ >
15
+ <p>
16
+ Das sind schwarze Reissverschlüsse
17
+ </p>
18
+ </div>
19
+ <div
20
+ class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
21
+ >
22
+ 0,00 €
23
+ </div>
24
+ <div
25
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
26
+ >
27
+ <p>
28
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
29
+ </p>
32
30
  </div>
33
31
  </div>
34
32
  </div>
@@ -62,30 +60,28 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders as full screen on
62
60
  <div
63
61
  class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
64
62
  >
65
- <div>
66
- <div
67
- class="Optiondetail-detailContainer-4"
68
- >
69
- <div>
70
- <div
71
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
72
- >
73
- <p>
74
- Das sind schwarze Reissverschlüsse
75
- </p>
76
- </div>
77
- <div
78
- class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
79
- >
80
- 0,00 €
81
- </div>
82
- <div
83
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
84
- >
85
- <p>
86
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
87
- </p>
88
- </div>
63
+ <div
64
+ class="Optiondetail-detailContainer-4"
65
+ >
66
+ <div>
67
+ <div
68
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
69
+ >
70
+ <p>
71
+ Das sind schwarze Reissverschlüsse
72
+ </p>
73
+ </div>
74
+ <div
75
+ class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
76
+ >
77
+ 0,00 €
78
+ </div>
79
+ <div
80
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
81
+ >
82
+ <p>
83
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
84
+ </p>
89
85
  </div>
90
86
  </div>
91
87
  </div>
@@ -119,38 +115,36 @@ exports[`Screens/Components/ImageEditDialog/MessageBox renders with previous and
119
115
  <div
120
116
  class="MuiDialogContent-root Optiondetail-detailDialogContentRoot-14"
121
117
  >
122
- <div>
118
+ <div
119
+ class="Optiondetail-detailContainerWithNav-3"
120
+ >
123
121
  <div
124
- class="Optiondetail-detailContainerWithNav-3"
125
- >
122
+ class="Optiondetail-detailNav-1 prev"
123
+ />
124
+ <div>
125
+ <div
126
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
127
+ >
128
+ <p>
129
+ Das sind schwarze Reissverschlüsse
130
+ </p>
131
+ </div>
126
132
  <div
127
- class="Optiondetail-detailNav-1 prev"
128
- />
129
- <div>
130
- <div
131
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
132
- >
133
- <p>
134
- Das sind schwarze Reissverschlüsse
135
- </p>
136
- </div>
137
- <div
138
- class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
139
- >
140
- 0,00 €
141
- </div>
142
- <div
143
- class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
144
- >
145
- <p>
146
- Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
147
- </p>
148
- </div>
133
+ class="MuiTypography-root Optiondetail-priceFormatted-6 MuiTypography-body2"
134
+ >
135
+ 0,00 €
149
136
  </div>
150
137
  <div
151
- class="Optiondetail-detailNav-1 next"
152
- />
138
+ class="MuiTypography-root Optiondetail-detailsTypography-8 MuiTypography-body2"
139
+ >
140
+ <p>
141
+ Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
142
+ </p>
143
+ </div>
153
144
  </div>
145
+ <div
146
+ class="Optiondetail-detailNav-1 next"
147
+ />
154
148
  </div>
155
149
  </div>
156
150
  <div
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  import _ from 'lodash';
3
- import { Swipeable } from 'react-swipeable';
4
3
  import clsx from 'clsx';
5
4
  import Button from '@material-ui/core/Button';
6
5
  import DialogContent from '@material-ui/core/DialogContent';
@@ -17,6 +16,7 @@ import OptionlistitemAmount from '../OptionAmount';
17
16
  import getImageUrl from '../../../../Utils/getImageUrl';
18
17
  import Markdown from '../../../../../Framework/Components/Markdown';
19
18
  import ZoomImage from './ZoomImage';
19
+ import { LEFT, RIGHT, Swipeable } from '../../../../../Shared/Components/Swipeable';
20
20
 
21
21
  const styles = theme => ({
22
22
  detailNav: {
@@ -189,14 +189,11 @@ class Optiondetail extends React.Component {
189
189
  }
190
190
  };
191
191
 
192
- swiped = (e, deltaX, deltaY) => {
193
- // use only horizontal swiping
194
- if (Math.abs(deltaX) >= Math.abs(deltaY)) {
195
- if (deltaX > 0) {
196
- this.next();
197
- } else {
198
- this.prev();
199
- }
192
+ swiped = e => {
193
+ if (e.dir === LEFT) {
194
+ this.next();
195
+ } else if (e.dir === RIGHT) {
196
+ this.prev();
200
197
  }
201
198
  };
202
199
 
@@ -351,55 +348,53 @@ class Optiondetail extends React.Component {
351
348
  </div>
352
349
  ) : (
353
350
  <Swipeable
354
- disabled={!showNav}
355
- trackMouse={true}
356
- onSwiped={this.swiped}
357
- delta={Optiondetail.swipeDelta}
351
+ options={{
352
+ trackMouse: true,
353
+ onSwiped: showNav && this.swiped,
354
+ delta: Optiondetail.swipeDelta,
355
+ }}
356
+ ref={this.setDetailsContainerRef}
357
+ className={showNav ? classes.detailContainerWithNav : classes.detailContainer}
358
358
  >
359
- <div
360
- ref={this.setDetailsContainerRef}
361
- className={showNav ? classes.detailContainerWithNav : classes.detailContainer}
362
- >
363
- {showNav && (
364
- <div className={clsx(classes.detailNav, 'prev')} onClick={this.prev} />
365
- )}
359
+ {showNav && (
360
+ <div className={clsx(classes.detailNav, 'prev')} onClick={this.prev} />
361
+ )}
366
362
 
367
- {detailImage ? (
363
+ {detailImage ? (
364
+ <div
365
+ className={clsx({
366
+ [classes.detailsWithImageContainer]: !showFullScreenModal,
367
+ })}
368
+ >
368
369
  <div
369
- className={clsx({
370
- [classes.detailsWithImageContainer]: !showFullScreenModal,
371
- })}
370
+ className={
371
+ this.state.hasZoom
372
+ ? classes.imageContainerWithZoom
373
+ : classes.imageContainer
374
+ }
375
+ onClick={this.state.hasZoom ? this.toggleZoomImage : null}
372
376
  >
373
- <div
377
+ <img
378
+ ref={this.setDetailsImageRef}
379
+ onLoad={this.handleImageLoaded}
374
380
  className={
375
- this.state.hasZoom
376
- ? classes.imageContainerWithZoom
377
- : classes.imageContainer
381
+ this.state.zoomImage && ['xs', 'sm'].includes(width)
382
+ ? classes.imageHidden
383
+ : classes.image
378
384
  }
379
- onClick={this.state.hasZoom ? this.toggleZoomImage : null}
380
- >
381
- <img
382
- ref={this.setDetailsImageRef}
383
- onLoad={this.handleImageLoaded}
384
- className={
385
- this.state.zoomImage && ['xs', 'sm'].includes(width)
386
- ? classes.imageHidden
387
- : classes.image
388
- }
389
- src={getImageUrl(detailImage)}
390
- alt={details.title}
391
- />
392
- </div>
393
- {detailsContent}
385
+ src={getImageUrl(detailImage)}
386
+ alt={details.title}
387
+ />
394
388
  </div>
395
- ) : (
396
- detailsContent
397
- )}
389
+ {detailsContent}
390
+ </div>
391
+ ) : (
392
+ detailsContent
393
+ )}
398
394
 
399
- {showNav && (
400
- <div className={clsx(classes.detailNav, 'next')} onClick={this.next} />
401
- )}
402
- </div>
395
+ {showNav && (
396
+ <div className={clsx(classes.detailNav, 'next')} onClick={this.next} />
397
+ )}
403
398
  </Swipeable>
404
399
  )}
405
400
  </DialogContent>
@@ -310,3 +310,5 @@ CreatorScreen.defaultProps = {
310
310
  Layout: DefaultLayout,
311
311
  OptionsListContainer,
312
312
  };
313
+
314
+ export default CreatorScreen;
@@ -280,3 +280,5 @@ DesignerScreen.defaultProps = {
280
280
  Layout: DefaultLayout,
281
281
  PopupArea: DefaultPopupArea,
282
282
  };
283
+
284
+ export default DesignerScreen;
@@ -628,8 +628,5 @@ export default function configuratorReducer(prevState = initialState, action = {
628
628
  }
629
629
 
630
630
  function filterOptionsWithDetails(options) {
631
- return _.filter(
632
- options,
633
- option => !!(option.abstract || option.description || option.detailImageExists === true)
634
- );
631
+ return _.filter(options, option => !!(option.abstract || option.description || option.detailImage));
635
632
  }
@@ -70,6 +70,7 @@ const SendEmail = props => {
70
70
  </DialogContent>
71
71
  <DialogActions>
72
72
  <MainButton
73
+ target="_blank"
73
74
  href={emailUrl}
74
75
  onClick={onClose}
75
76
  variant="contained"
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
- import { Swipeable } from 'react-swipeable';
3
2
  import _ from 'lodash';
4
3
 
5
4
  import './Styles.scss';
6
5
  import PropTypes from 'prop-types';
7
6
  import clsx from 'clsx';
8
7
  import { withStyles } from '@material-ui/core/styles';
8
+ import { DOWN, LEFT, RIGHT, Swipeable, UP } from '../../../Shared/Components/Swipeable';
9
9
 
10
10
  const styles = theme => ({
11
11
  carousel: {
@@ -37,10 +37,12 @@ class Carousel extends React.Component {
37
37
  }
38
38
 
39
39
  componentDidMount() {
40
- this.init();
41
40
  const { carousel } = this.refs;
42
- const wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
43
- carousel.addEventListener(wheelEventName, this.scrolled);
41
+ if (carousel) {
42
+ this.init();
43
+ const wheelEventName = 'onwheel' in carousel ? 'wheel' : 'mousewheel';
44
+ carousel.addEventListener(wheelEventName, this.scrolled);
45
+ }
44
46
  }
45
47
 
46
48
  componentDidUpdate() {
@@ -140,19 +142,16 @@ class Carousel extends React.Component {
140
142
  };
141
143
 
142
144
  swiped = e => {
143
- // if it's vertical deltaY should be the bigger
144
- if (this.props.vertical && Math.abs(e.deltaY) >= Math.abs(e.deltaX)) {
145
- if (e.deltaY > 0) {
145
+ if (this.props.vertical) {
146
+ if (e.dir === UP) {
146
147
  this.next();
147
- } else {
148
+ } else if (e.dir === DOWN) {
148
149
  this.prev();
149
150
  }
150
- }
151
- // if it's not vertical deltaX should be the bigger
152
- else if (!this.props.vertical && Math.abs(e.deltaX) >= Math.abs(e.deltaY)) {
153
- if (e.deltaX > 0) {
151
+ } else {
152
+ if (e.dir === LEFT) {
154
153
  this.next();
155
- } else {
154
+ } else if (e.dir === RIGHT) {
156
155
  this.prev();
157
156
  }
158
157
  }
@@ -199,9 +198,11 @@ class Carousel extends React.Component {
199
198
  )}
200
199
  <Swipeable
201
200
  className={'carousel-frame'}
202
- trackMouse={true}
203
- onSwiping={this.swiping}
204
- onSwiped={this.swiped}
201
+ options={{
202
+ trackMouse: true,
203
+ onSwiping: this.swiping,
204
+ onSwiped: this.swiped,
205
+ }}
205
206
  >
206
207
  <div
207
208
  className="carousel-slider"
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import { useSwipeable, UP, DOWN, LEFT, RIGHT } from 'react-swipeable';
3
+
4
+ export { UP, DOWN, LEFT, RIGHT };
5
+
6
+ // eslint-disable-next-line react/prop-types,react/display-name
7
+ export const Swipeable = React.forwardRef(({ options, ...props }, ref) => {
8
+ const handlers = useSwipeable(options);
9
+ return <div {...handlers} {...props} ref={ref} />;
10
+ });