@configuratorware/configurator-frontendgui 1.40.6 → 1.41.1

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.
Files changed (29) hide show
  1. package/App/Modules/Designer/Containers/ImageEditDialog.js +28 -10
  2. package/App/Reducers/DesignArea/Selectors.js +44 -11
  3. package/App/Reducers/DesignData/Modifiers.js +3 -1
  4. package/App/Reducers/ImageGallery/Actions.js +25 -18
  5. package/App/Reducers/ImageGallery/Reducer.js +5 -0
  6. package/App/Reducers/ImageGallery/Selectors.js +1 -1
  7. package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +10 -9
  8. package/App/Services/DesignDataService.js +494 -435
  9. package/App/Shared/Components/AmountPrice/index.js +175 -46
  10. package/App/Shared/Components/ConfigurationOverview/index.js +114 -0
  11. package/App/Shared/Containers/AmountPrice/index.js +2 -1
  12. package/App/configuration.js +1 -1
  13. package/package.json +4 -4
  14. package/public/translations/de_DE.json +1 -0
  15. package/src/App/Modules/Designer/Containers/ImageEditDialog.js +33 -6
  16. package/src/App/Reducers/DesignArea/Selectors.js +39 -9
  17. package/src/App/Reducers/DesignArea/__tests__/Selectors.test.js +19 -0
  18. package/src/App/Reducers/DesignData/Modifiers.js +3 -0
  19. package/src/App/Reducers/ImageGallery/Actions.js +20 -5
  20. package/src/App/Reducers/ImageGallery/Reducer.js +5 -0
  21. package/src/App/Reducers/ImageGallery/Selectors.js +4 -3
  22. package/src/App/Reducers/ImageGallery/__tests__/Actions.test.js +81 -7
  23. package/src/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +4 -1
  24. package/src/App/Services/DesignDataService.js +56 -16
  25. package/src/App/Shared/Components/AmountPrice/__snapshots__/index.test.jsx.snap +133 -8
  26. package/src/App/Shared/Components/AmountPrice/index.js +109 -3
  27. package/src/App/Shared/Components/ConfigurationOverview/index.js +58 -0
  28. package/src/App/Shared/Containers/AmountPrice/index.js +2 -0
  29. package/src/App/configuration.js +1 -1
@@ -73,6 +73,10 @@ var _core = require("@material-ui/core");
73
73
 
74
74
  var _AcceptPrivacy = _interopRequireDefault(require("../AcceptPrivacy"));
75
75
 
76
+ var _ConfigurationOverview = _interopRequireDefault(require("../ConfigurationOverview"));
77
+
78
+ var _isMobileDevice = require("../../../../Framework/Helpers/isMobileDevice");
79
+
76
80
  var _excluded = ["onTouchMove"],
77
81
  _excluded2 = ["wrapperClass", "renderPriceBox"];
78
82
 
@@ -281,6 +285,22 @@ var styles = function styles(theme) {
281
285
  }), _defineProperty(_closeIcon, '&:hover', {
282
286
  cursor: 'pointer'
283
287
  }), _closeIcon),
288
+ configurationButton: {
289
+ '&:hover': {
290
+ cursor: 'pointer'
291
+ },
292
+ fontWeight: 'bold',
293
+ textTransform: 'none',
294
+ padding: '6px 15px',
295
+ marginRight: '5px'
296
+ },
297
+ summary: {
298
+ display: 'flex',
299
+ alignItems: 'center',
300
+ '& svg': {
301
+ marginRight: 5
302
+ }
303
+ },
284
304
  dialogTitleRoot: {
285
305
  padding: '20px 0'
286
306
  }
@@ -341,6 +361,7 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
341
361
 
342
362
  _defineProperty(_assertThisInitialized(_this), "state", {
343
363
  showPriceOverview: false,
364
+ showConfigurationOverview: false,
344
365
  notice: '',
345
366
  hasErrorReceiveOfferForm: false,
346
367
  bulkNameErrors: [],
@@ -481,8 +502,41 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
481
502
  }, _callee, null, [[0, 6]]);
482
503
  })));
483
504
 
505
+ _defineProperty(_assertThisInitialized(_this), "openConfigurationOverview", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
506
+ return regeneratorRuntime.wrap(function _callee2$(_context2) {
507
+ while (1) {
508
+ switch (_context2.prev = _context2.next) {
509
+ case 0:
510
+ _context2.prev = 0;
511
+ _context2.next = 3;
512
+ return _this.props.validateConfiguration();
513
+
514
+ case 3:
515
+ _this.setState({
516
+ showConfigurationOverview: true,
517
+ hasErrorReceiveOfferForm: false
518
+ });
519
+
520
+ _context2.next = 9;
521
+ break;
522
+
523
+ case 6:
524
+ _context2.prev = 6;
525
+ _context2.t0 = _context2["catch"](0);
526
+ // eslint-disable-next-line no-console
527
+ console.warn("Error while validating configuration: ".concat(_context2.t0));
528
+
529
+ case 9:
530
+ case "end":
531
+ return _context2.stop();
532
+ }
533
+ }
534
+ }, _callee2, null, [[0, 6]]);
535
+ })));
536
+
484
537
  _defineProperty(_assertThisInitialized(_this), "handleClose", function () {
485
538
  _this.setState({
539
+ showConfigurationOverview: false,
486
540
  showPriceOverview: false,
487
541
  bulkNameErrors: [],
488
542
  approval: {
@@ -495,24 +549,24 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
495
549
  _this.props.onClose();
496
550
  });
497
551
 
498
- _defineProperty(_assertThisInitialized(_this), "onReceiveOfferFormPress", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee2() {
552
+ _defineProperty(_assertThisInitialized(_this), "onReceiveOfferFormPress", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee3() {
499
553
  var formValidation, result;
500
- return regeneratorRuntime.wrap(function _callee2$(_context2) {
554
+ return regeneratorRuntime.wrap(function _callee3$(_context3) {
501
555
  while (1) {
502
- switch (_context2.prev = _context2.next) {
556
+ switch (_context3.prev = _context3.next) {
503
557
  case 0:
504
558
  formValidation = _this.receiveOfferFormComponentRef.current.validate();
505
559
 
506
560
  if (!(!_this.requestHasErrors() && formValidation)) {
507
- _context2.next = 9;
561
+ _context3.next = 9;
508
562
  break;
509
563
  }
510
564
 
511
- _context2.next = 4;
565
+ _context3.next = 4;
512
566
  return _this.props.sendReceiveOfferRequest(formValidation);
513
567
 
514
568
  case 4:
515
- result = _context2.sent;
569
+ result = _context3.sent;
516
570
 
517
571
  if (!result) {
518
572
  _this.setState({
@@ -528,7 +582,7 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
528
582
  });
529
583
  }
530
584
 
531
- _context2.next = 10;
585
+ _context3.next = 10;
532
586
  break;
533
587
 
534
588
  case 9:
@@ -536,10 +590,10 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
536
590
 
537
591
  case 10:
538
592
  case "end":
539
- return _context2.stop();
593
+ return _context3.stop();
540
594
  }
541
595
  }
542
- }, _callee2);
596
+ }, _callee3);
543
597
  })));
544
598
 
545
599
  _defineProperty(_assertThisInitialized(_this), "setConfigurationCommentDebounced", (0, _core.debounce)(function (value) {
@@ -596,6 +650,7 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
596
650
  showCallToAction = _this$props4.showCallToAction,
597
651
  showConfigurationModeSwitch = _this$props4.showConfigurationModeSwitch,
598
652
  ConfigurationModeSwitchComponent = _this$props4.ConfigurationModeSwitchComponent;
653
+ var isMobile = (0, _isMobileDevice.isMobileDevice)();
599
654
  var boxStyle = boxed ? classes.card : classes.cardUnboxed;
600
655
  return /*#__PURE__*/_react["default"].createElement(_Card["default"], {
601
656
  className: (0, _clsx["default"])(boxStyle, (0, _customClassName["default"])('cta-box'))
@@ -608,7 +663,21 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
608
663
  classes: {
609
664
  root: classes.AmountPriceContent
610
665
  }
666
+ }, !isMobile && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
667
+ container: true
611
668
  }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
669
+ item: true,
670
+ xs: 12,
671
+ sm: 12,
672
+ md: 12,
673
+ lg: 12,
674
+ className: classes.summary
675
+ }, /*#__PURE__*/_react["default"].createElement(_Icon["default"], null, "list_alt"), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
676
+ className: classes.configurationButton,
677
+ variant: "text",
678
+ size: "small",
679
+ onClick: _this.openConfigurationOverview
680
+ }, (0, _i18n.t)('amountPrice.configurationOverview')))), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
612
681
  container: true
613
682
  }, !hidePieces && /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
614
683
  item: true,
@@ -708,12 +777,65 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
708
777
  onShowChange && onShowChange(showPriceOverview);
709
778
  }
710
779
 
780
+ var showConfigurationOverview = this.state.showConfigurationOverview;
781
+
782
+ if (showConfigurationOverview !== prevState.showConfigurationOverview) {
783
+ var _onShowChange = this.props.onShowChange;
784
+ _onShowChange && _onShowChange(showConfigurationOverview);
785
+ }
786
+
711
787
  if (this.state.notice === prevState.notice && this.props.userComment !== this.state.notice) {
712
788
  this.setState({
713
789
  notice: this.props.userComment
714
790
  });
715
791
  }
716
792
  }
793
+ }, {
794
+ key: "renderConfigurationOverview",
795
+ value: function renderConfigurationOverview() {
796
+ var showConfigurationOverview = this.state.showConfigurationOverview;
797
+ var _this$props6 = this.props,
798
+ ConfigurationOverviewComponent = _this$props6.ConfigurationOverviewComponent,
799
+ userConfiguration = _this$props6.userConfiguration,
800
+ width = _this$props6.width,
801
+ classes = _this$props6.classes;
802
+ return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
803
+ "aria-labelledby": "alert-dialog-title",
804
+ "aria-describedby": "alert-dialog-description",
805
+ classes: {
806
+ paper: classes.dialogWrapper,
807
+ container: width === 'md' || width === 'xs' ? classes.dialogPositioning : '',
808
+ root: classes.dialogPositioning
809
+ },
810
+ BackdropProps: {
811
+ className: classes.dialogPositioning
812
+ },
813
+ onClose: this.handleClose.bind(this),
814
+ open: showConfigurationOverview,
815
+ fullWidth: true,
816
+ fullScreen: width === 'sm' || width === 'xs',
817
+ scroll: "paper"
818
+ }, /*#__PURE__*/_react["default"].createElement(_LoadingOverlay["default"], {
819
+ show: this.props.addToCartPopUpLoader
820
+ }), /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
821
+ classes: {
822
+ root: classes.dialogTitleRoot
823
+ }
824
+ }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
825
+ variant: "body1"
826
+ }, /*#__PURE__*/_react["default"].createElement("b", null, (0, _i18n.t)('amountPrice.configurationOverview'))), /*#__PURE__*/_react["default"].createElement(_Icon["default"], {
827
+ className: classes.closeIcon,
828
+ onClick: this.handleClose.bind(this)
829
+ }, "close")), /*#__PURE__*/_react["default"].createElement(_RootRef["default"], {
830
+ rootRef: this.dialogContentRef
831
+ }, /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], {
832
+ classes: {
833
+ root: classes.contentPositioning
834
+ }
835
+ }, /*#__PURE__*/_react["default"].createElement(ConfigurationOverviewComponent, {
836
+ optionclassifications: userConfiguration.optionclassifications
837
+ }))));
838
+ }
717
839
  }, {
718
840
  key: "renderPriceOverview",
719
841
  value: function renderPriceOverview() {
@@ -727,31 +849,31 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
727
849
  showErrors = _this$state.showErrors,
728
850
  bulkNameErrors = _this$state.bulkNameErrors,
729
851
  dataPrivacyAccepted = _this$state.dataPrivacyAccepted;
730
- var _this$props6 = this.props,
731
- amount = _this$props6.amount,
732
- priceList = _this$props6.priceList,
733
- priceFormatted = _this$props6.priceFormatted,
734
- onSelectableChanged = _this$props6.onSelectableChanged,
735
- showProductVariants = _this$props6.showProductVariants,
736
- ProductVariantComponent = _this$props6.ProductVariantComponent,
737
- error = _this$props6.error,
738
- width = _this$props6.width,
739
- hidePrices = _this$props6.hidePrices,
740
- title = _this$props6.title,
741
- classes = _this$props6.classes,
742
- showReceiveOfferForm = _this$props6.showReceiveOfferForm,
743
- vatNotice = _this$props6.vatNotice,
744
- clientTexts = _this$props6.clientTexts,
745
- displayAcceptDesign = _this$props6.displayAcceptDesign,
746
- notifications = _this$props6.notifications,
747
- showCallToAction = _this$props6.showCallToAction,
748
- ReceiveOfferFormComponent = _this$props6.ReceiveOfferFormComponent,
749
- AcceptDesignComponent = _this$props6.AcceptDesignComponent,
750
- PriceOverviewComponent = _this$props6.PriceOverviewComponent,
751
- NotificationComponent = _this$props6.NotificationComponent,
752
- PriceListComponent = _this$props6.PriceListComponent,
753
- AddToCartComponent = _this$props6.AddToCartComponent,
754
- AcceptPrivacyComponent = _this$props6.AcceptPrivacyComponent;
852
+ var _this$props7 = this.props,
853
+ amount = _this$props7.amount,
854
+ priceList = _this$props7.priceList,
855
+ priceFormatted = _this$props7.priceFormatted,
856
+ onSelectableChanged = _this$props7.onSelectableChanged,
857
+ showProductVariants = _this$props7.showProductVariants,
858
+ ProductVariantComponent = _this$props7.ProductVariantComponent,
859
+ error = _this$props7.error,
860
+ width = _this$props7.width,
861
+ hidePrices = _this$props7.hidePrices,
862
+ title = _this$props7.title,
863
+ classes = _this$props7.classes,
864
+ showReceiveOfferForm = _this$props7.showReceiveOfferForm,
865
+ vatNotice = _this$props7.vatNotice,
866
+ clientTexts = _this$props7.clientTexts,
867
+ displayAcceptDesign = _this$props7.displayAcceptDesign,
868
+ notifications = _this$props7.notifications,
869
+ showCallToAction = _this$props7.showCallToAction,
870
+ ReceiveOfferFormComponent = _this$props7.ReceiveOfferFormComponent,
871
+ AcceptDesignComponent = _this$props7.AcceptDesignComponent,
872
+ PriceOverviewComponent = _this$props7.PriceOverviewComponent,
873
+ NotificationComponent = _this$props7.NotificationComponent,
874
+ PriceListComponent = _this$props7.PriceListComponent,
875
+ AddToCartComponent = _this$props7.AddToCartComponent,
876
+ AcceptPrivacyComponent = _this$props7.AcceptPrivacyComponent;
755
877
  var termsAndConditionsLink = clientTexts.termsAndConditionsLink,
756
878
  dataPrivacyLink = clientTexts.dataPrivacyLink;
757
879
  var mergedNotifications = _toConsumableArray(notifications) || [];
@@ -830,10 +952,10 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
830
952
  closeProductOverviewDialog: this.handleClose,
831
953
  displayNote: false
832
954
  })) : null,
833
- notificationComponent: mergedNotifications.map(function (_ref4, key) {
834
- var message = _ref4.message,
835
- level = _ref4.level,
836
- color = _ref4.color;
955
+ notificationComponent: mergedNotifications.map(function (_ref5, key) {
956
+ var message = _ref5.message,
957
+ level = _ref5.level,
958
+ color = _ref5.color;
837
959
  return /*#__PURE__*/_react["default"].createElement(NotificationComponent, {
838
960
  key: key,
839
961
  icon: level,
@@ -884,20 +1006,24 @@ var AmountPrice = /*#__PURE__*/function (_React$Component) {
884
1006
  }, {
885
1007
  key: "render",
886
1008
  value: function render() {
887
- var _this$props7 = this.props,
888
- wrapperClass = _this$props7.wrapperClass,
889
- renderPriceBox = _this$props7.renderPriceBox,
890
- props = _objectWithoutProperties(_this$props7, _excluded2);
891
-
892
- var showPriceOverview = this.state.showPriceOverview;
1009
+ var _this$props8 = this.props,
1010
+ wrapperClass = _this$props8.wrapperClass,
1011
+ renderPriceBox = _this$props8.renderPriceBox,
1012
+ props = _objectWithoutProperties(_this$props8, _excluded2);
1013
+
1014
+ var _this$state2 = this.state,
1015
+ showPriceOverview = _this$state2.showPriceOverview,
1016
+ showConfigurationOverview = _this$state2.showConfigurationOverview;
893
1017
  var openPriceOverview = this.openPriceOverview,
1018
+ openConfigurationOverview = this.openConfigurationOverview,
894
1019
  renderDefaultPriceBox = this.renderDefaultPriceBox;
895
1020
  return /*#__PURE__*/_react["default"].createElement("div", {
896
1021
  className: wrapperClass
897
1022
  }, renderPriceBox ? renderPriceBox(_objectSpread(_objectSpread({}, props), {}, {
898
1023
  openPriceOverview: openPriceOverview,
1024
+ openConfigurationOverview: openConfigurationOverview,
899
1025
  renderDefaultPriceBox: renderDefaultPriceBox
900
- })) : this.renderDefaultPriceBox(), showPriceOverview && this.renderPriceOverview());
1026
+ })) : this.renderDefaultPriceBox(), showPriceOverview && this.renderPriceOverview(), showConfigurationOverview && this.renderConfigurationOverview());
901
1027
  }
902
1028
  }]);
903
1029
 
@@ -940,12 +1066,14 @@ _defineProperty(AmountPrice, "propTypes", {
940
1066
  ReceiveOfferFormComponent: _propTypes["default"].elementType,
941
1067
  AcceptDesignComponent: _propTypes["default"].elementType,
942
1068
  PriceOverviewComponent: _propTypes["default"].elementType,
1069
+ ConfigurationOverviewComponent: _propTypes["default"].elementType,
943
1070
  NotificationComponent: _propTypes["default"].elementType,
944
1071
  PriceListComponent: _propTypes["default"].elementType,
945
1072
  AddToCartComponent: _propTypes["default"].elementType,
946
1073
  renderPriceBox: _propTypes["default"].func,
947
1074
  userComment: _propTypes["default"].string,
948
- AcceptPrivacyComponent: _propTypes["default"].elementType
1075
+ AcceptPrivacyComponent: _propTypes["default"].elementType,
1076
+ userConfiguration: _propTypes["default"].object
949
1077
  });
950
1078
 
951
1079
  _defineProperty(AmountPrice, "defaultProps", {
@@ -959,6 +1087,7 @@ _defineProperty(AmountPrice, "defaultProps", {
959
1087
  ReceiveOfferFormComponent: _ReceiveOfferForm["default"],
960
1088
  AcceptDesignComponent: _AcceptDesign["default"],
961
1089
  PriceOverviewComponent: _PriceOverview["default"],
1090
+ ConfigurationOverviewComponent: _ConfigurationOverview["default"],
962
1091
  NotificationComponent: _Notification["default"],
963
1092
  PriceListComponent: _PriceList["default"],
964
1093
  AddToCartComponent: _AddToBasket["default"],
@@ -0,0 +1,114 @@
1
+ "use strict";
2
+
3
+ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _styles = require("@material-ui/core/styles");
13
+
14
+ var _Grid = _interopRequireDefault(require("@material-ui/core/Grid/Grid"));
15
+
16
+ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography"));
17
+
18
+ var _propTypes = _interopRequireDefault(require("prop-types"));
19
+
20
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
21
+
22
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
23
+
24
+ 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); } }
25
+
26
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
27
+
28
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
29
+
30
+ function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
31
+
32
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
33
+
34
+ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
35
+
36
+ function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
37
+
38
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
39
+
40
+ function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
41
+
42
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
43
+
44
+ var styles = function styles() {
45
+ return {
46
+ li: {
47
+ listStyle: 'none'
48
+ },
49
+ gridWrapper: {
50
+ padding: '10px 0 25px 0'
51
+ },
52
+ title: {
53
+ fontWeight: 'bold'
54
+ }
55
+ };
56
+ };
57
+
58
+ var ConfigurationOverview = /*#__PURE__*/function (_React$Component) {
59
+ _inherits(ConfigurationOverview, _React$Component);
60
+
61
+ var _super = _createSuper(ConfigurationOverview);
62
+
63
+ function ConfigurationOverview() {
64
+ _classCallCheck(this, ConfigurationOverview);
65
+
66
+ return _super.apply(this, arguments);
67
+ }
68
+
69
+ _createClass(ConfigurationOverview, [{
70
+ key: "render",
71
+ value: function render() {
72
+ var _this$props = this.props,
73
+ optionclassifications = _this$props.optionclassifications,
74
+ classes = _this$props.classes;
75
+ return /*#__PURE__*/_react["default"].createElement("div", {
76
+ className: classes.gridWrapper
77
+ }, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
78
+ container: true,
79
+ spacing: 2
80
+ }, optionclassifications === null || optionclassifications === void 0 ? void 0 : optionclassifications.map(function (optionclassification) {
81
+ var _optionclassification;
82
+
83
+ return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
84
+ item: true,
85
+ xs: 6,
86
+ key: optionclassification.identifier
87
+ }, /*#__PURE__*/_react["default"].createElement(_Typography["default"], {
88
+ className: classes.title
89
+ }, optionclassification.title)), /*#__PURE__*/_react["default"].createElement(_Grid["default"], {
90
+ item: true,
91
+ xs: 6
92
+ }, (_optionclassification = optionclassification.selectedoptions) === null || _optionclassification === void 0 ? void 0 : _optionclassification.map(function (option) {
93
+ return /*#__PURE__*/_react["default"].createElement("li", {
94
+ key: option.identifier,
95
+ className: classes.li
96
+ }, option.amount !== 1 ? /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, option.amount, " x ", option.title) : /*#__PURE__*/_react["default"].createElement(_Typography["default"], null, option.title));
97
+ })));
98
+ })));
99
+ }
100
+ }]);
101
+
102
+ return ConfigurationOverview;
103
+ }(_react["default"].Component);
104
+
105
+ _defineProperty(ConfigurationOverview, "propTypes", {
106
+ optionclassifications: _propTypes["default"].array,
107
+ classes: _propTypes["default"].object
108
+ });
109
+
110
+ var _default = (0, _styles.withStyles)(styles, {
111
+ name: 'ConfigurationOverview'
112
+ })(ConfigurationOverview);
113
+
114
+ exports["default"] = _default;
@@ -244,7 +244,8 @@ var mapStateToProps = function mapStateToProps(_ref) {
244
244
  }, createAmountPropsFromState(configurator)), priceProps), {}, {
245
245
  clientTexts: (0, _Selectors.getClientTexts)(configurator),
246
246
  addToCartPopUpLoader: (0, _Selectors2.getVisibilityMapProperty)(ui, 'addToCartPopUpLoader'),
247
- userComment: (0, _get["default"])(configurator, 'configuration.customdata.comment', '')
247
+ userComment: (0, _get["default"])(configurator, 'configuration.customdata.comment', ''),
248
+ userConfiguration: (0, _Selectors.getConfiguration)(configurator)
248
249
  });
249
250
  };
250
251
 
@@ -31,7 +31,7 @@ var DEVELOPMENT_HOST_INT = 'http://int.configuratorware.local'; // eslint-disabl
31
31
  var DEVELOPMENT_HOST_LOCAL = 'http://localhost:10030';
32
32
  var hostsByNodeEnv = {
33
33
  production: '',
34
- development: DEVELOPMENT_HOST_INT,
34
+ development: DEVELOPMENT_HOST_LOCAL,
35
35
  test: ''
36
36
  };
37
37
  var resourceUrlsByNodeEnv = {
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-frontendgui",
3
- "version": "1.40.6",
3
+ "version": "1.41.1",
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.40.6",
9
+ "@configuratorware/scripts": "1.41.1",
10
10
  "@hot-loader/react-dom": "^17.0.1",
11
11
  "@material-ui/core": "^4.12.2",
12
12
  "@material-ui/icons": "^4.11.2",
@@ -39,8 +39,8 @@
39
39
  "react-router-dom": "^5.2.0",
40
40
  "react-swipeable": "^5.5.1",
41
41
  "react-zoom-pan-pinch": "^2.1.3",
42
- "redhotmagma-graphics-editor": "1.40.6",
43
- "redhotmagma-visualization": "1.40.6",
42
+ "redhotmagma-graphics-editor": "1.41.1",
43
+ "redhotmagma-visualization": "1.41.1",
44
44
  "redux": "^4.1.0",
45
45
  "redux-logger": "^3.0.6",
46
46
  "redux-persist": "^5.10.0",
@@ -27,6 +27,7 @@
27
27
  },
28
28
  "amountPrice": {
29
29
  "priceOverview": "Preisübersicht",
30
+ "configurationOverview": "Meine Konfiguration",
30
31
  "productVariants": "Produktvarianten",
31
32
  "contactData": "Kontaktdaten",
32
33
  "pieces": "Stück",
@@ -97,6 +97,7 @@ export class ImageEditDialogContainer extends React.Component {
97
97
  open: PropTypes.bool,
98
98
  editMode: PropTypes.bool,
99
99
  vectorsRequired: PropTypes.bool,
100
+ vectorizedLogoMandatory: PropTypes.bool,
100
101
  colorDisabled: PropTypes.bool,
101
102
  loading: PropTypes.bool,
102
103
  errorCode: PropTypes.string,
@@ -180,6 +181,7 @@ export class ImageEditDialogContainer extends React.Component {
180
181
  isImageCompatible,
181
182
  isColorMappingCompatible,
182
183
  vectorsRequired,
184
+ vectorizedLogoMandatory,
183
185
  } = this.props;
184
186
 
185
187
  const { vectorize, vectorizeColorsMap, activeTabIndex, originalImagePreview } = this.state;
@@ -256,13 +258,32 @@ export class ImageEditDialogContainer extends React.Component {
256
258
  Object.assign(newState, { vectorizeColorsMap });
257
259
  }
258
260
 
259
- if (activeTabIndex === 2 && vectorsRequired && !vectorize && !image.gallery) {
261
+ if (
262
+ activeTabIndex === 2 &&
263
+ (vectorsRequired || vectorizedLogoMandatory) &&
264
+ !vectorize &&
265
+ !image.gallery
266
+ ) {
260
267
  Object.assign(newState, {
261
268
  vectorize: true,
262
269
  });
263
270
  }
264
271
 
265
- !isMatch(this.state, newState) && this.handleStateChange(newState);
272
+ let options;
273
+ if (
274
+ activeTabIndex === 2 &&
275
+ !image.gallery &&
276
+ vectorizedLogoMandatory &&
277
+ !image.displayColorPreview &&
278
+ !this.state.displayColorPreview
279
+ ) {
280
+ options = { displayColorPreview: true };
281
+ Object.assign(newState, {
282
+ displayColorPreview: true,
283
+ });
284
+ }
285
+
286
+ (!isMatch(this.state, newState) || options) && this.handleStateChange(newState, options);
266
287
 
267
288
  if ((justOpened || imageChanged) && !image.incomplete) {
268
289
  this.updatePreview(null, { forceFetch: operationsChanged });
@@ -514,10 +535,12 @@ export class ImageEditDialogContainer extends React.Component {
514
535
  if (forceUpdate) {
515
536
  this.previewVersion = Math.random();
516
537
  }
517
- preview =
518
- getPreviewUrlFromImageData(previewUrl) +
519
- (this.previewVersion ? `?${this.previewVersion}` : '');
520
- originalImagePreview = preview;
538
+ if (previewUrl) {
539
+ preview =
540
+ getPreviewUrlFromImageData(previewUrl) +
541
+ (this.previewVersion ? `?${this.previewVersion}` : '');
542
+ originalImagePreview = preview;
543
+ }
521
544
  }
522
545
  }
523
546
 
@@ -641,6 +664,7 @@ export class ImageEditDialogContainer extends React.Component {
641
664
  maxColorAmount,
642
665
  colorDisabled,
643
666
  vectorsRequired,
667
+ vectorizedLogoMandatory,
644
668
  image,
645
669
  usedColors,
646
670
  imageColorsWereEdited,
@@ -680,6 +704,7 @@ export class ImageEditDialogContainer extends React.Component {
680
704
  activeTabIndex === 2 &&
681
705
  colorCount > 0 &&
682
706
  !isGalleryImage &&
707
+ !vectorizedLogoMandatory &&
683
708
  (colorPreviewEnabled || !colorPreviewRequirementFulfilled);
684
709
 
685
710
  return (
@@ -779,6 +804,7 @@ const mapStateToProps = state => {
779
804
  const colorPalettes = getColorPalettes(state);
780
805
  const designProductionMethod = getSelectedDesignProductionMethod(state);
781
806
  const vectorsRequired = !!get(designProductionMethod, 'options.vectorsRequired');
807
+ const vectorizedLogoMandatory = !!get(designProductionMethod, 'options.vectorizedLogoMandatory');
782
808
  const colorDisabled = isColoringDisabled(state);
783
809
  const userImages = getUserImages(imageGallery);
784
810
  const hasPlaceHolderImage = hasPlaceHolderImagesForActiveDesignArea(state);
@@ -818,6 +844,7 @@ const mapStateToProps = state => {
818
844
  userImages,
819
845
  colorPalettes,
820
846
  vectorsRequired,
847
+ vectorizedLogoMandatory,
821
848
  colorDisabled,
822
849
  uploadSize,
823
850
  galleryHasImages,