@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
@@ -682,13 +682,52 @@ var DesignDataService = /*#__PURE__*/function () {
682
682
  };
683
683
  }());
684
684
 
685
- _defineProperty(this, "checkColorUsageForDesignProductionMethod", /*#__PURE__*/function () {
685
+ _defineProperty(this, "handleDesignProductionMethodChangeToMandatoryVectorization", /*#__PURE__*/function () {
686
686
  var _ref6 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee4(designProductionMethodIdentifier) {
687
- var state, _getSelectedDesignAre2, maxColorAmount, designProductionMethod, newProductionMethod, newMaxColorAmount, currentVectorsRequired, newVectorsRequired, designArea, colorPreviewRequired, canvas, images, missingColorPalettesColors;
687
+ var state, _getMandatoryVectoriz, currentVectorsMandatory, newVectorsMandatory, designArea, nonColorizedImages;
688
688
 
689
689
  return regeneratorRuntime.wrap(function _callee4$(_context4) {
690
690
  while (1) {
691
691
  switch (_context4.prev = _context4.next) {
692
+ case 0:
693
+ state = _ServiceLocator.Services.store.state;
694
+ _getMandatoryVectoriz = (0, _Selectors.getMandatoryVectorizationForDesignProductionMethods)(state, designProductionMethodIdentifier), currentVectorsMandatory = _getMandatoryVectoriz.currentVectorsMandatory, newVectorsMandatory = _getMandatoryVectoriz.newVectorsMandatory;
695
+ designArea = (0, _Selectors.getSelectedDesignArea)(state);
696
+ nonColorizedImages = (0, _Selectors.getImagesByDesignArea)(state, designArea.identifier).filter(function (obj) {
697
+ return !(0, _get2["default"])(obj, 'imageData.gallery') && !(0, _get2["default"])(obj, 'imageData.displayColorPreview');
698
+ });
699
+
700
+ if (!(nonColorizedImages.length === 1 && (!currentVectorsMandatory && newVectorsMandatory || !(0, _Selectors2.isColorPreviewCompatible)(state, nonColorizedImages[0].imageData, designProductionMethodIdentifier)))) {
701
+ _context4.next = 8;
702
+ break;
703
+ }
704
+
705
+ _context4.next = 7;
706
+ return _ServiceLocator.Services.store.dispatch((0, _Actions.showSwitchToProductionMethodWithVectorization)());
707
+
708
+ case 7:
709
+ return _context4.abrupt("return", true);
710
+
711
+ case 8:
712
+ case "end":
713
+ return _context4.stop();
714
+ }
715
+ }
716
+ }, _callee4);
717
+ }));
718
+
719
+ return function (_x3) {
720
+ return _ref6.apply(this, arguments);
721
+ };
722
+ }());
723
+
724
+ _defineProperty(this, "checkColorUsageForDesignProductionMethod", /*#__PURE__*/function () {
725
+ var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(designProductionMethodIdentifier) {
726
+ var state, _getSelectedDesignAre2, maxColorAmount, designProductionMethod, newProductionMethod, newMaxColorAmount, currentVectorsRequired, newVectorsRequired, designArea, colorPreviewRequired, canvas, images, missingColorPalettesColors;
727
+
728
+ return regeneratorRuntime.wrap(function _callee5$(_context5) {
729
+ while (1) {
730
+ switch (_context5.prev = _context5.next) {
692
731
  case 0:
693
732
  state = _ServiceLocator.Services.store.state;
694
733
  _getSelectedDesignAre2 = (0, _Selectors.getSelectedDesignAreaProperties)(state), maxColorAmount = _getSelectedDesignAre2.maxColorAmount, designProductionMethod = _getSelectedDesignAre2.designProductionMethod;
@@ -697,10 +736,10 @@ var DesignDataService = /*#__PURE__*/function () {
697
736
  currentVectorsRequired = !!(0, _get2["default"])(designProductionMethod, 'options.vectorsRequired');
698
737
  newVectorsRequired = !!(0, _get2["default"])(newProductionMethod, 'options.vectorsRequired');
699
738
  designArea = (0, _Selectors.getSelectedDesignArea)(state);
700
- colorPreviewRequired = (0, _Selectors.designProductionMethodHasEmbroideryVisualizationEffect)(newProductionMethod);
739
+ colorPreviewRequired = (0, _Selectors.designProductionMethodHasEmbroideryVisualizationEffect)(newProductionMethod) || (0, _Selectors.isVectorizedLogoMandatory)(newProductionMethod);
701
740
 
702
741
  if (!(newMaxColorAmount !== 0 && newMaxColorAmount < maxColorAmount || !currentVectorsRequired && newVectorsRequired || colorPreviewRequired)) {
703
- _context4.next = 15;
742
+ _context5.next = 17;
704
743
  break;
705
744
  }
706
745
 
@@ -714,69 +753,71 @@ var DesignDataService = /*#__PURE__*/function () {
714
753
  }) : [];
715
754
 
716
755
  if (!(images.length > 1)) {
717
- _context4.next = 15;
756
+ _context5.next = 17;
718
757
  break;
719
758
  }
720
759
 
721
- _context4.next = 14;
760
+ _context5.next = 14;
722
761
  return _ServiceLocator.Services.store.dispatch((0, _Actions.showProductionMethodRemoveImagesConfirm)());
723
762
 
724
763
  case 14:
725
764
  images.forEach(function (object) {
726
765
  object.remove();
727
766
  });
767
+ _context5.next = 17;
768
+ return _this2.updateCanvasData(canvas);
728
769
 
729
- case 15:
770
+ case 17:
730
771
  missingColorPalettesColors = getMissingColorPalettesColors((0, _Selectors.getColorsWithPalette)(state), newProductionMethod.colorPalettes, !currentVectorsRequired && newVectorsRequired);
731
772
 
732
773
  if (!missingColorPalettesColors.length) {
733
- _context4.next = 22;
774
+ _context5.next = 24;
734
775
  break;
735
776
  }
736
777
 
737
778
  if ((0, _Selectors.isColoringDisabled)(state, newProductionMethod.identifier)) {
738
- _context4.next = 22;
779
+ _context5.next = 24;
739
780
  break;
740
781
  }
741
782
 
742
- _context4.next = 20;
783
+ _context5.next = 22;
743
784
  return _ServiceLocator.Services.store.dispatch((0, _Actions.showProductionMethodChangeColorsConfirm)());
744
785
 
745
- case 20:
746
- _context4.next = 22;
786
+ case 22:
787
+ _context5.next = 24;
747
788
  return _this2.replaceSelectedDesignAreaElementsColor(missingColorPalettesColors, newProductionMethod);
748
789
 
749
- case 22:
790
+ case 24:
750
791
  case "end":
751
- return _context4.stop();
792
+ return _context5.stop();
752
793
  }
753
794
  }
754
- }, _callee4);
795
+ }, _callee5);
755
796
  }));
756
797
 
757
- return function (_x3) {
758
- return _ref6.apply(this, arguments);
798
+ return function (_x4) {
799
+ return _ref7.apply(this, arguments);
759
800
  };
760
801
  }());
761
802
 
762
803
  _defineProperty(this, "replaceSelectedDesignAreaElementsColor", /*#__PURE__*/function () {
763
- var _ref7 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee5(missingColorPalettesColors, designProductionMethod) {
804
+ var _ref8 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(missingColorPalettesColors, designProductionMethod) {
764
805
  var state, designArea, designData, objects, _iterator7, _step7, missingColor;
765
806
 
766
- return regeneratorRuntime.wrap(function _callee5$(_context5) {
807
+ return regeneratorRuntime.wrap(function _callee6$(_context6) {
767
808
  while (1) {
768
- switch (_context5.prev = _context5.next) {
809
+ switch (_context6.prev = _context6.next) {
769
810
  case 0:
770
811
  state = _ServiceLocator.Services.store.state;
771
812
  designArea = (0, _Selectors.getSelectedDesignArea)(state);
772
813
  designData = (0, _Selectors.getDesignDataByDesignAreaIdentifier)(state, designArea.identifier);
773
814
  objects = (0, _get2["default"])(designData, 'canvasData.objects', []);
774
- _context5.next = 6;
775
- return Promise.all(objects.filter(function (_ref8) {
776
- var type = _ref8.type;
815
+ _context6.next = 6;
816
+ return Promise.all(objects.filter(function (_ref9) {
817
+ var type = _ref9.type;
777
818
  return type === 'Image';
778
- }).map(function (_ref9) {
779
- var imageData = _ref9.imageData;
819
+ }).map(function (_ref10) {
820
+ var imageData = _ref10.imageData;
780
821
  return (0, _Selectors2.getUserImage)(state, imageData.identifier);
781
822
  }).filter(function (image, idx, arr) {
782
823
  return arr.indexOf(image) === idx && // uniq
@@ -810,19 +851,19 @@ var DesignDataService = /*#__PURE__*/function () {
810
851
  _iterator7.f();
811
852
  }
812
853
 
813
- _context5.next = 10;
854
+ _context6.next = 10;
814
855
  return _this2.loadCanvasDataFromState([designArea]);
815
856
 
816
857
  case 10:
817
858
  case "end":
818
- return _context5.stop();
859
+ return _context6.stop();
819
860
  }
820
861
  }
821
- }, _callee5);
862
+ }, _callee6);
822
863
  }));
823
864
 
824
- return function (_x4, _x5) {
825
- return _ref7.apply(this, arguments);
865
+ return function (_x5, _x6) {
866
+ return _ref8.apply(this, arguments);
826
867
  };
827
868
  }());
828
869
  }
@@ -835,36 +876,36 @@ var DesignDataService = /*#__PURE__*/function () {
835
876
  _ServiceLocator.Services.store.observeStore(function (state) {
836
877
  return state.designArea.filteredDesignAreas;
837
878
  }, /*#__PURE__*/function () {
838
- var _ref10 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee6(filteredDesignAreas, prevDesignAreas) {
879
+ var _ref11 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(filteredDesignAreas, prevDesignAreas) {
839
880
  var initList, areasToLoad;
840
- return regeneratorRuntime.wrap(function _callee6$(_context6) {
881
+ return regeneratorRuntime.wrap(function _callee7$(_context7) {
841
882
  while (1) {
842
- switch (_context6.prev = _context6.next) {
883
+ switch (_context7.prev = _context7.next) {
843
884
  case 0:
844
- _context6.prev = 0;
845
- _context6.next = 3;
885
+ _context7.prev = 0;
886
+ _context7.next = 3;
846
887
  return _this3.initCanvases(filteredDesignAreas, prevDesignAreas);
847
888
 
848
889
  case 3:
849
- initList = _context6.sent;
890
+ initList = _context7.sent;
850
891
  // only the newly initialized canvases has to be loaded
851
- areasToLoad = initList.filter(function (_ref11) {
852
- var isNew = _ref11.isNew;
892
+ areasToLoad = initList.filter(function (_ref12) {
893
+ var isNew = _ref12.isNew;
853
894
  return isNew;
854
- }).map(function (_ref12) {
855
- var designArea = _ref12.designArea;
895
+ }).map(function (_ref13) {
896
+ var designArea = _ref13.designArea;
856
897
  return designArea;
857
898
  }); // the canvas data is there first with the configuration, but since the canvas instances are
858
899
  // associated with the design areas the data can be loaded only when the design areas are available
859
900
 
860
- _context6.t0 = !(0, _Selectors3.isDesignerProductPreviewMode)() && areasToLoad.length;
901
+ _context7.t0 = !(0, _Selectors3.isDesignerProductPreviewMode)() && areasToLoad.length;
861
902
 
862
- if (!_context6.t0) {
863
- _context6.next = 9;
903
+ if (!_context7.t0) {
904
+ _context7.next = 9;
864
905
  break;
865
906
  }
866
907
 
867
- _context6.next = 9;
908
+ _context7.next = 9;
868
909
  return _this3.loadCanvasDataFromState(areasToLoad);
869
910
 
870
911
  case 9:
@@ -872,25 +913,25 @@ var DesignDataService = /*#__PURE__*/function () {
872
913
 
873
914
  _this3.designAreaListChangeListener(filteredDesignAreas, prevDesignAreas);
874
915
 
875
- _context6.next = 16;
916
+ _context7.next = 16;
876
917
  break;
877
918
 
878
919
  case 13:
879
- _context6.prev = 13;
880
- _context6.t1 = _context6["catch"](0);
920
+ _context7.prev = 13;
921
+ _context7.t1 = _context7["catch"](0);
881
922
  // eslint-disable-next-line no-console
882
- console.error('Error occurred in processing design area list change:', _context6.t1);
923
+ console.error('Error occurred in processing design area list change:', _context7.t1);
883
924
 
884
925
  case 16:
885
926
  case "end":
886
- return _context6.stop();
927
+ return _context7.stop();
887
928
  }
888
929
  }
889
- }, _callee6, null, [[0, 13]]);
930
+ }, _callee7, null, [[0, 13]]);
890
931
  }));
891
932
 
892
- return function (_x6, _x7) {
893
- return _ref10.apply(this, arguments);
933
+ return function (_x7, _x8) {
934
+ return _ref11.apply(this, arguments);
894
935
  };
895
936
  }());
896
937
 
@@ -910,8 +951,8 @@ var DesignDataService = /*#__PURE__*/function () {
910
951
  });
911
952
  }
912
953
 
913
- _ServiceLocator.Services.store.observeStore(function (_ref13) {
914
- var selectedoptionclassification = _ref13.configurator.selectedoptionclassification;
954
+ _ServiceLocator.Services.store.observeStore(function (_ref14) {
955
+ var selectedoptionclassification = _ref14.configurator.selectedoptionclassification;
915
956
  return selectedoptionclassification;
916
957
  }, this.componentChangeHandler.bind(this));
917
958
 
@@ -1011,13 +1052,13 @@ var DesignDataService = /*#__PURE__*/function () {
1011
1052
  }, {
1012
1053
  key: "initCanvases",
1013
1054
  value: function () {
1014
- var _initCanvases = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee7(designAreas, prevDesignAreas) {
1055
+ var _initCanvases = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8(designAreas, prevDesignAreas) {
1015
1056
  var _this4 = this;
1016
1057
 
1017
1058
  var state;
1018
- return regeneratorRuntime.wrap(function _callee7$(_context7) {
1059
+ return regeneratorRuntime.wrap(function _callee8$(_context8) {
1019
1060
  while (1) {
1020
- switch (_context7.prev = _context7.next) {
1061
+ switch (_context8.prev = _context8.next) {
1021
1062
  case 0:
1022
1063
  // clean up first: remove canvases that are not mapped to any design areas
1023
1064
  this._removeCanvas && prevDesignAreas.filter(function (prevArea) {
@@ -1028,7 +1069,7 @@ var DesignDataService = /*#__PURE__*/function () {
1028
1069
  return _this4._removeCanvas(prevArea);
1029
1070
  });
1030
1071
  state = _ServiceLocator.Services.store.state;
1031
- _context7.next = 4;
1072
+ _context8.next = 4;
1032
1073
  return Promise.all(designAreas.map(function (designArea) {
1033
1074
  var maskData = (0, _Selectors.getMaskDataForDesignArea)(state, designArea);
1034
1075
  var canvasSize = (0, _Selectors.getCanvasSizeFromDesignArea)(state, designArea);
@@ -1044,17 +1085,17 @@ var DesignDataService = /*#__PURE__*/function () {
1044
1085
  }));
1045
1086
 
1046
1087
  case 4:
1047
- return _context7.abrupt("return", _context7.sent);
1088
+ return _context8.abrupt("return", _context8.sent);
1048
1089
 
1049
1090
  case 5:
1050
1091
  case "end":
1051
- return _context7.stop();
1092
+ return _context8.stop();
1052
1093
  }
1053
1094
  }
1054
- }, _callee7, this);
1095
+ }, _callee8, this);
1055
1096
  }));
1056
1097
 
1057
- function initCanvases(_x8, _x9) {
1098
+ function initCanvases(_x9, _x10) {
1058
1099
  return _initCanvases.apply(this, arguments);
1059
1100
  }
1060
1101
 
@@ -1068,26 +1109,26 @@ var DesignDataService = /*#__PURE__*/function () {
1068
1109
  }, {
1069
1110
  key: "updateCanvasDataFromState",
1070
1111
  value: function () {
1071
- var _updateCanvasDataFromState = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee8() {
1112
+ var _updateCanvasDataFromState = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
1072
1113
  var designAreas,
1073
- _args8 = arguments;
1074
- return regeneratorRuntime.wrap(function _callee8$(_context8) {
1114
+ _args9 = arguments;
1115
+ return regeneratorRuntime.wrap(function _callee9$(_context9) {
1075
1116
  while (1) {
1076
- switch (_context8.prev = _context8.next) {
1117
+ switch (_context9.prev = _context9.next) {
1077
1118
  case 0:
1078
- designAreas = _args8.length > 0 && _args8[0] !== undefined ? _args8[0] : this.getDesignAreas();
1079
- _context8.next = 3;
1119
+ designAreas = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : this.getDesignAreas();
1120
+ _context9.next = 3;
1080
1121
  return this.syncCanvases(this._updateCanvasData, designAreas);
1081
1122
 
1082
1123
  case 3:
1083
- return _context8.abrupt("return", _context8.sent);
1124
+ return _context9.abrupt("return", _context9.sent);
1084
1125
 
1085
1126
  case 4:
1086
1127
  case "end":
1087
- return _context8.stop();
1128
+ return _context9.stop();
1088
1129
  }
1089
1130
  }
1090
- }, _callee8, this);
1131
+ }, _callee9, this);
1091
1132
  }));
1092
1133
 
1093
1134
  function updateCanvasDataFromState() {
@@ -1104,26 +1145,26 @@ var DesignDataService = /*#__PURE__*/function () {
1104
1145
  }, {
1105
1146
  key: "loadCanvasDataFromState",
1106
1147
  value: function () {
1107
- var _loadCanvasDataFromState = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee9() {
1148
+ var _loadCanvasDataFromState = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10() {
1108
1149
  var designAreas,
1109
- _args9 = arguments;
1110
- return regeneratorRuntime.wrap(function _callee9$(_context9) {
1150
+ _args10 = arguments;
1151
+ return regeneratorRuntime.wrap(function _callee10$(_context10) {
1111
1152
  while (1) {
1112
- switch (_context9.prev = _context9.next) {
1153
+ switch (_context10.prev = _context10.next) {
1113
1154
  case 0:
1114
- designAreas = _args9.length > 0 && _args9[0] !== undefined ? _args9[0] : this.getDesignAreas();
1115
- _context9.next = 3;
1155
+ designAreas = _args10.length > 0 && _args10[0] !== undefined ? _args10[0] : this.getDesignAreas();
1156
+ _context10.next = 3;
1116
1157
  return this.syncCanvases(this._loadCanvasData, designAreas);
1117
1158
 
1118
1159
  case 3:
1119
- return _context9.abrupt("return", _context9.sent);
1160
+ return _context10.abrupt("return", _context10.sent);
1120
1161
 
1121
1162
  case 4:
1122
1163
  case "end":
1123
- return _context9.stop();
1164
+ return _context10.stop();
1124
1165
  }
1125
1166
  }
1126
- }, _callee9, this);
1167
+ }, _callee10, this);
1127
1168
  }));
1128
1169
 
1129
1170
  function loadCanvasDataFromState() {
@@ -1143,48 +1184,48 @@ var DesignDataService = /*#__PURE__*/function () {
1143
1184
  }, {
1144
1185
  key: "syncCanvases",
1145
1186
  value: function () {
1146
- var _syncCanvases = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(updateFn, designAreas) {
1187
+ var _syncCanvases = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(updateFn, designAreas) {
1147
1188
  var _this5 = this;
1148
1189
 
1149
1190
  var state;
1150
- return regeneratorRuntime.wrap(function _callee11$(_context11) {
1191
+ return regeneratorRuntime.wrap(function _callee12$(_context12) {
1151
1192
  while (1) {
1152
- switch (_context11.prev = _context11.next) {
1193
+ switch (_context12.prev = _context12.next) {
1153
1194
  case 0:
1154
1195
  state = _ServiceLocator.Services.store.state;
1155
- _context11.next = 3;
1196
+ _context12.next = 3;
1156
1197
  return Promise.all(designAreas.map( /*#__PURE__*/function () {
1157
- var _ref14 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee10(designArea) {
1198
+ var _ref15 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee11(designArea) {
1158
1199
  var designData, canvasData, canvasSize;
1159
- return regeneratorRuntime.wrap(function _callee10$(_context10) {
1200
+ return regeneratorRuntime.wrap(function _callee11$(_context11) {
1160
1201
  while (1) {
1161
- switch (_context10.prev = _context10.next) {
1202
+ switch (_context11.prev = _context11.next) {
1162
1203
  case 0:
1163
1204
  designData = (0, _Selectors.getDesignDataByDesignAreaIdentifier)(state, designArea.identifier);
1164
1205
  canvasData = (0, _get2["default"])(designData, 'canvasData');
1165
1206
 
1166
1207
  if (!canvasData) {
1167
- _context10.next = 7;
1208
+ _context11.next = 7;
1168
1209
  break;
1169
1210
  }
1170
1211
 
1171
- _context10.next = 5;
1212
+ _context11.next = 5;
1172
1213
  return preloadFonts(canvasData);
1173
1214
 
1174
1215
  case 5:
1175
1216
  canvasSize = (0, _Selectors.getCanvasSizeFromDesignArea)(state, designArea);
1176
- return _context10.abrupt("return", updateFn && updateFn(canvasData, designArea, canvasSize));
1217
+ return _context11.abrupt("return", updateFn && updateFn(canvasData, designArea, canvasSize));
1177
1218
 
1178
1219
  case 7:
1179
1220
  case "end":
1180
- return _context10.stop();
1221
+ return _context11.stop();
1181
1222
  }
1182
1223
  }
1183
- }, _callee10);
1224
+ }, _callee11);
1184
1225
  }));
1185
1226
 
1186
- return function (_x12) {
1187
- return _ref14.apply(this, arguments);
1227
+ return function (_x13) {
1228
+ return _ref15.apply(this, arguments);
1188
1229
  };
1189
1230
  }()));
1190
1231
 
@@ -1195,13 +1236,13 @@ var DesignDataService = /*#__PURE__*/function () {
1195
1236
 
1196
1237
  case 4:
1197
1238
  case "end":
1198
- return _context11.stop();
1239
+ return _context12.stop();
1199
1240
  }
1200
1241
  }
1201
- }, _callee11);
1242
+ }, _callee12);
1202
1243
  }));
1203
1244
 
1204
- function syncCanvases(_x10, _x11) {
1245
+ function syncCanvases(_x11, _x12) {
1205
1246
  return _syncCanvases.apply(this, arguments);
1206
1247
  }
1207
1248
 
@@ -1217,8 +1258,8 @@ var DesignDataService = /*#__PURE__*/function () {
1217
1258
  }, {
1218
1259
  key: "getDesignAreaByIdentifier",
1219
1260
  value: function getDesignAreaByIdentifier(designAreaIdentifier) {
1220
- return this.getDesignAreas().find(function (_ref15) {
1221
- var identifier = _ref15.identifier;
1261
+ return this.getDesignAreas().find(function (_ref16) {
1262
+ var identifier = _ref16.identifier;
1222
1263
  return identifier === designAreaIdentifier;
1223
1264
  });
1224
1265
  }
@@ -1258,15 +1299,15 @@ var DesignDataService = /*#__PURE__*/function () {
1258
1299
  }, {
1259
1300
  key: "updateCanvasData",
1260
1301
  value: function () {
1261
- var _updateCanvasData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee12(canvas, eventData) {
1302
+ var _updateCanvasData = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13(canvas, eventData) {
1262
1303
  var canvasDataJSON, showAlert, _getDesignDataForSele, canvasData;
1263
1304
 
1264
- return regeneratorRuntime.wrap(function _callee12$(_context12) {
1305
+ return regeneratorRuntime.wrap(function _callee13$(_context13) {
1265
1306
  while (1) {
1266
- switch (_context12.prev = _context12.next) {
1307
+ switch (_context13.prev = _context13.next) {
1267
1308
  case 0:
1268
1309
  if (this._serializeCanvas) {
1269
- _context12.next = 2;
1310
+ _context13.next = 2;
1270
1311
  break;
1271
1312
  }
1272
1313
 
@@ -1281,7 +1322,7 @@ var DesignDataService = /*#__PURE__*/function () {
1281
1322
  showAlert = eventData ? checkColorUsage(canvasDataJSON, eventData.changeEvent) : false;
1282
1323
 
1283
1324
  if (!(showAlert && (0, _configuration.getConf)('displayColorAmountWarnings', true))) {
1284
- _context12.next = 9;
1325
+ _context13.next = 9;
1285
1326
  break;
1286
1327
  }
1287
1328
 
@@ -1290,20 +1331,20 @@ var DesignDataService = /*#__PURE__*/function () {
1290
1331
  _getDesignDataForSele = (0, _Selectors.getDesignDataForSelectedDesignArea)(_ServiceLocator.Services.store.state), canvasData = _getDesignDataForSele.canvasData; // Restore Graphics Editor state
1291
1332
 
1292
1333
  this._loadCanvasData && this._loadCanvasData(canvasData);
1293
- return _context12.abrupt("return");
1334
+ return _context13.abrupt("return");
1294
1335
 
1295
1336
  case 9:
1296
1337
  this.setCanvasData(canvasDataJSON);
1297
1338
 
1298
1339
  case 10:
1299
1340
  case "end":
1300
- return _context12.stop();
1341
+ return _context13.stop();
1301
1342
  }
1302
1343
  }
1303
- }, _callee12, this);
1344
+ }, _callee13, this);
1304
1345
  }));
1305
1346
 
1306
- function updateCanvasData(_x13, _x14) {
1347
+ function updateCanvasData(_x14, _x15) {
1307
1348
  return _updateCanvasData.apply(this, arguments);
1308
1349
  }
1309
1350
 
@@ -1311,31 +1352,31 @@ var DesignDataService = /*#__PURE__*/function () {
1311
1352
  }()
1312
1353
  }, {
1313
1354
  key: "createCanvasChangeListener",
1314
- value: function createCanvasChangeListener(_ref16) {
1355
+ value: function createCanvasChangeListener(_ref17) {
1315
1356
  var _this6 = this;
1316
1357
 
1317
- var syncCanvasChange = _ref16.syncCanvasChange;
1358
+ var syncCanvasChange = _ref17.syncCanvasChange;
1318
1359
  this._syncCanvasChange = syncCanvasChange;
1319
- return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee13() {
1320
- var _args13 = arguments;
1321
- return regeneratorRuntime.wrap(function _callee13$(_context13) {
1360
+ return /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14() {
1361
+ var _args14 = arguments;
1362
+ return regeneratorRuntime.wrap(function _callee14$(_context14) {
1322
1363
  while (1) {
1323
- switch (_context13.prev = _context13.next) {
1364
+ switch (_context14.prev = _context14.next) {
1324
1365
  case 0:
1325
1366
  if (!_this6._isCanvasDataUpdateEnabled) {
1326
- _context13.next = 3;
1367
+ _context14.next = 3;
1327
1368
  break;
1328
1369
  }
1329
1370
 
1330
- _context13.next = 3;
1331
- return _this6.updateCanvasData.apply(_this6, _args13);
1371
+ _context14.next = 3;
1372
+ return _this6.updateCanvasData.apply(_this6, _args14);
1332
1373
 
1333
1374
  case 3:
1334
1375
  case "end":
1335
- return _context13.stop();
1376
+ return _context14.stop();
1336
1377
  }
1337
1378
  }
1338
- }, _callee13);
1379
+ }, _callee14);
1339
1380
  }));
1340
1381
  }
1341
1382
  }, {
@@ -1587,20 +1628,34 @@ var DesignDataService = /*#__PURE__*/function () {
1587
1628
  }, {
1588
1629
  key: "vectorizeSingleImageAndShowEditDialog",
1589
1630
  value: function () {
1590
- var _vectorizeSingleImageAndShowEditDialog = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee14(identifier) {
1591
- var showImageEditDialog, state, designArea, canvas, firstNonVectorizedImage, operations, imageData, imageToSelect;
1592
- return regeneratorRuntime.wrap(function _callee14$(_context14) {
1631
+ var _vectorizeSingleImageAndShowEditDialog = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(identifier) {
1632
+ var showImageEditDialog, state, designArea, canvas, images, firstNonVectorizedImage, operations, imageData, imageToSelect;
1633
+ return regeneratorRuntime.wrap(function _callee15$(_context15) {
1593
1634
  while (1) {
1594
- switch (_context14.prev = _context14.next) {
1635
+ switch (_context15.prev = _context15.next) {
1595
1636
  case 0:
1596
- _context14.next = 2;
1637
+ _context15.next = 2;
1597
1638
  return this.handleDesignProductionMethodChangeFromNonVectorizationToVectorization(identifier);
1598
1639
 
1599
1640
  case 2:
1600
- showImageEditDialog = _context14.sent;
1641
+ _context15.t0 = _context15.sent;
1642
+
1643
+ if (_context15.t0) {
1644
+ _context15.next = 7;
1645
+ break;
1646
+ }
1647
+
1648
+ _context15.next = 6;
1649
+ return this.handleDesignProductionMethodChangeToMandatoryVectorization(identifier);
1650
+
1651
+ case 6:
1652
+ _context15.t0 = _context15.sent;
1653
+
1654
+ case 7:
1655
+ showImageEditDialog = _context15.t0;
1601
1656
 
1602
1657
  if (!showImageEditDialog) {
1603
- _context14.next = 23;
1658
+ _context15.next = 29;
1604
1659
  break;
1605
1660
  }
1606
1661
 
@@ -1609,57 +1664,58 @@ var DesignDataService = /*#__PURE__*/function () {
1609
1664
  state = _ServiceLocator.Services.store.state;
1610
1665
  designArea = (0, _Selectors.getSelectedDesignArea)(state);
1611
1666
  canvas = this._getCanvas(designArea);
1612
- firstNonVectorizedImage = (0, _Selectors.getImagesByDesignArea)(state, designArea.identifier).find(function (obj) {
1613
- return !(0, _get2["default"])(obj, 'imageData.operations.vectorize');
1667
+ images = (0, _Selectors.getImagesByDesignArea)(state, designArea.identifier);
1668
+ firstNonVectorizedImage = images.find(function (obj) {
1669
+ return !(0, _get2["default"])(obj, 'imageData.gallery') && (!(0, _get2["default"])(obj, 'imageData.operations.vectorize') || !(0, _get2["default"])(obj, 'imageData.displayColorPreview'));
1614
1670
  });
1671
+ _context15.prev = 15;
1615
1672
  operations = _objectSpread(_objectSpread({}, firstNonVectorizedImage.imageData.operations), {}, {
1616
1673
  vectorize: true
1617
1674
  });
1618
- imageData = firstNonVectorizedImage.imageData;
1619
- _context14.prev = 11;
1675
+ imageData = firstNonVectorizedImage.imageData; //returing if placeHolderImage, from executing edit operations
1620
1676
 
1621
1677
  if (!imageData.isPlaceHolderImage) {
1622
- _context14.next = 14;
1678
+ _context15.next = 20;
1623
1679
  break;
1624
1680
  }
1625
1681
 
1626
- return _context14.abrupt("return");
1682
+ return _context15.abrupt("return");
1627
1683
 
1628
- case 14:
1629
- _context14.next = 16;
1684
+ case 20:
1685
+ _context15.next = 22;
1630
1686
  return _ServiceLocator.Services.designData.editFile(operations, imageData, {
1631
1687
  immediateCommit: true
1632
1688
  });
1633
1689
 
1634
- case 16:
1690
+ case 22:
1635
1691
  imageToSelect = canvas.objects.filter(function (object) {
1636
1692
  return object.type === 'Image';
1637
1693
  }).find(function (obj) {
1638
1694
  return obj._imageData.identifier === imageData.identifier;
1639
1695
  });
1640
1696
  imageToSelect.selected = true;
1641
- _context14.next = 20;
1697
+ _context15.next = 26;
1642
1698
  return _ServiceLocator.Services.designer.openImageEditDialog(firstNonVectorizedImage.imageData.identifier, canvas, {
1643
1699
  placeholderImageUpdate: false,
1644
1700
  submitOnExitClick: true
1645
1701
  });
1646
1702
 
1647
- case 20:
1648
- _context14.prev = 20;
1703
+ case 26:
1704
+ _context15.prev = 26;
1649
1705
 
1650
1706
  _ServiceLocator.Services.ui.hide('globalLoader');
1651
1707
 
1652
- return _context14.finish(20);
1708
+ return _context15.finish(26);
1653
1709
 
1654
- case 23:
1710
+ case 29:
1655
1711
  case "end":
1656
- return _context14.stop();
1712
+ return _context15.stop();
1657
1713
  }
1658
1714
  }
1659
- }, _callee14, this, [[11,, 20, 23]]);
1715
+ }, _callee15, this, [[15,, 26, 29]]);
1660
1716
  }));
1661
1717
 
1662
- function vectorizeSingleImageAndShowEditDialog(_x15) {
1718
+ function vectorizeSingleImageAndShowEditDialog(_x16) {
1663
1719
  return _vectorizeSingleImageAndShowEditDialog.apply(this, arguments);
1664
1720
  }
1665
1721
 
@@ -1668,21 +1724,21 @@ var DesignDataService = /*#__PURE__*/function () {
1668
1724
  }, {
1669
1725
  key: "restoreVectorizedImages",
1670
1726
  value: function () {
1671
- var _restoreVectorizedImages = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee15(identifier) {
1727
+ var _restoreVectorizedImages = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(identifier) {
1672
1728
  var displayImagesAsUnVectorized, state, designArea, images, _iterator8, _step8, image, operations;
1673
1729
 
1674
- return regeneratorRuntime.wrap(function _callee15$(_context15) {
1730
+ return regeneratorRuntime.wrap(function _callee16$(_context16) {
1675
1731
  while (1) {
1676
- switch (_context15.prev = _context15.next) {
1732
+ switch (_context16.prev = _context16.next) {
1677
1733
  case 0:
1678
- _context15.next = 2;
1734
+ _context16.next = 2;
1679
1735
  return this.handleDesignProductionMethodChangeFromVectorizationToNonVectorization(identifier);
1680
1736
 
1681
1737
  case 2:
1682
- displayImagesAsUnVectorized = _context15.sent;
1738
+ displayImagesAsUnVectorized = _context16.sent;
1683
1739
 
1684
1740
  if (!displayImagesAsUnVectorized) {
1685
- _context15.next = 28;
1741
+ _context16.next = 28;
1686
1742
  break;
1687
1743
  }
1688
1744
 
@@ -1694,58 +1750,58 @@ var DesignDataService = /*#__PURE__*/function () {
1694
1750
  }); //excluding placeHolderImage from executing edit operations
1695
1751
 
1696
1752
  _iterator8 = _createForOfIteratorHelper(images);
1697
- _context15.prev = 9;
1753
+ _context16.prev = 9;
1698
1754
 
1699
1755
  _iterator8.s();
1700
1756
 
1701
1757
  case 11:
1702
1758
  if ((_step8 = _iterator8.n()).done) {
1703
- _context15.next = 18;
1759
+ _context16.next = 18;
1704
1760
  break;
1705
1761
  }
1706
1762
 
1707
1763
  image = _step8.value;
1708
1764
  operations = (0, _Modifiers.removeVectorizeFromOperations)(image.imageData.operations);
1709
- _context15.next = 16;
1765
+ _context16.next = 16;
1710
1766
  return _ServiceLocator.Services.designData.editFile(operations, image.imageData, {
1711
1767
  immediateCommit: true,
1712
1768
  displayColorPreview: (0, _configuration.getConf)('autoPreviewVectorization', true)
1713
1769
  });
1714
1770
 
1715
1771
  case 16:
1716
- _context15.next = 11;
1772
+ _context16.next = 11;
1717
1773
  break;
1718
1774
 
1719
1775
  case 18:
1720
- _context15.next = 23;
1776
+ _context16.next = 23;
1721
1777
  break;
1722
1778
 
1723
1779
  case 20:
1724
- _context15.prev = 20;
1725
- _context15.t0 = _context15["catch"](9);
1780
+ _context16.prev = 20;
1781
+ _context16.t0 = _context16["catch"](9);
1726
1782
 
1727
- _iterator8.e(_context15.t0);
1783
+ _iterator8.e(_context16.t0);
1728
1784
 
1729
1785
  case 23:
1730
- _context15.prev = 23;
1786
+ _context16.prev = 23;
1731
1787
 
1732
1788
  _iterator8.f();
1733
1789
 
1734
- return _context15.finish(23);
1790
+ return _context16.finish(23);
1735
1791
 
1736
1792
  case 26:
1737
- _context15.next = 28;
1793
+ _context16.next = 28;
1738
1794
  return this.loadCanvasDataFromState([designArea]);
1739
1795
 
1740
1796
  case 28:
1741
1797
  case "end":
1742
- return _context15.stop();
1798
+ return _context16.stop();
1743
1799
  }
1744
1800
  }
1745
- }, _callee15, this, [[9, 20, 23, 26]]);
1801
+ }, _callee16, this, [[9, 20, 23, 26]]);
1746
1802
  }));
1747
1803
 
1748
- function restoreVectorizedImages(_x16) {
1804
+ function restoreVectorizedImages(_x17) {
1749
1805
  return _restoreVectorizedImages.apply(this, arguments);
1750
1806
  }
1751
1807
 
@@ -1754,50 +1810,50 @@ var DesignDataService = /*#__PURE__*/function () {
1754
1810
  }, {
1755
1811
  key: "updateObjectsAfterProductionMethodChange",
1756
1812
  value: function () {
1757
- var _updateObjectsAfterProductionMethodChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee16(oldProductionMethod, newProductionMethod) {
1813
+ var _updateObjectsAfterProductionMethodChange = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(oldProductionMethod, newProductionMethod) {
1758
1814
  var _getDesignDataForSele2, canvasData, objects, newObjects, designArea;
1759
1815
 
1760
- return regeneratorRuntime.wrap(function _callee16$(_context16) {
1816
+ return regeneratorRuntime.wrap(function _callee17$(_context17) {
1761
1817
  while (1) {
1762
- switch (_context16.prev = _context16.next) {
1818
+ switch (_context17.prev = _context17.next) {
1763
1819
  case 0:
1764
1820
  _getDesignDataForSele2 = (0, _Selectors.getDesignDataForSelectedDesignArea)(_ServiceLocator.Services.store.state), canvasData = _getDesignDataForSele2.canvasData;
1765
1821
 
1766
1822
  if (canvasData) {
1767
- _context16.next = 3;
1823
+ _context17.next = 3;
1768
1824
  break;
1769
1825
  }
1770
1826
 
1771
- return _context16.abrupt("return");
1827
+ return _context17.abrupt("return");
1772
1828
 
1773
1829
  case 3:
1774
1830
  objects = canvasData.objects;
1775
1831
  newObjects = (0, _Modifiers.applyProductionMethodChangeToCanvasObjects)(newProductionMethod, oldProductionMethod, objects);
1776
1832
 
1777
1833
  if (!(newObjects === objects)) {
1778
- _context16.next = 7;
1834
+ _context17.next = 7;
1779
1835
  break;
1780
1836
  }
1781
1837
 
1782
- return _context16.abrupt("return");
1838
+ return _context17.abrupt("return");
1783
1839
 
1784
1840
  case 7:
1785
1841
  this.setCanvasData(_objectSpread(_objectSpread({}, canvasData), {}, {
1786
1842
  objects: newObjects
1787
1843
  }));
1788
1844
  designArea = (0, _Selectors.getSelectedDesignArea)(_ServiceLocator.Services.store.state);
1789
- _context16.next = 11;
1845
+ _context17.next = 11;
1790
1846
  return this.updateCanvasDataFromState([designArea]);
1791
1847
 
1792
1848
  case 11:
1793
1849
  case "end":
1794
- return _context16.stop();
1850
+ return _context17.stop();
1795
1851
  }
1796
1852
  }
1797
- }, _callee16, this);
1853
+ }, _callee17, this);
1798
1854
  }));
1799
1855
 
1800
- function updateObjectsAfterProductionMethodChange(_x17, _x18) {
1856
+ function updateObjectsAfterProductionMethodChange(_x18, _x19) {
1801
1857
  return _updateObjectsAfterProductionMethodChange.apply(this, arguments);
1802
1858
  }
1803
1859
 
@@ -1822,18 +1878,18 @@ var DesignDataService = /*#__PURE__*/function () {
1822
1878
  }, {
1823
1879
  key: "setDesignProductionMethod",
1824
1880
  value: function () {
1825
- var _setDesignProductionMethod2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee17(identifier) {
1881
+ var _setDesignProductionMethod2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(identifier) {
1826
1882
  var state, designData, selectedDesignProduction, bulkNameSelected, fontSizeMin, smallestFontSize, oldDesignProductionMethod;
1827
- return regeneratorRuntime.wrap(function _callee17$(_context17) {
1883
+ return regeneratorRuntime.wrap(function _callee18$(_context18) {
1828
1884
  while (1) {
1829
- switch (_context17.prev = _context17.next) {
1885
+ switch (_context18.prev = _context18.next) {
1830
1886
  case 0:
1831
1887
  if (this.checkDesignElementRestrictions(identifier)) {
1832
- _context17.next = 2;
1888
+ _context18.next = 2;
1833
1889
  break;
1834
1890
  }
1835
1891
 
1836
- return _context17.abrupt("return");
1892
+ return _context18.abrupt("return");
1837
1893
 
1838
1894
  case 2:
1839
1895
  this.clearSelectionOnCurrentDesignArea(); // check if the selected design production method has a higher minimum font size
@@ -1845,83 +1901,83 @@ var DesignDataService = /*#__PURE__*/function () {
1845
1901
  bulkNameSelected = (0, _Selectors.hasSelectedBulkName)(designData);
1846
1902
 
1847
1903
  if (isWidget(location.pathname)) {
1848
- _context17.next = 44;
1904
+ _context18.next = 44;
1849
1905
  break;
1850
1906
  }
1851
1907
 
1852
1908
  fontSizeMin = (0, _Selectors.getFontSizeMin)(state, identifier);
1853
1909
  smallestFontSize = (0, _Selectors.findSmallestFontSizeInCanvasData)(designData.canvasData);
1854
- _context17.prev = 10;
1855
- _context17.t0 = smallestFontSize < fontSizeMin;
1910
+ _context18.prev = 10;
1911
+ _context18.t0 = smallestFontSize < fontSizeMin;
1856
1912
 
1857
- if (!_context17.t0) {
1858
- _context17.next = 15;
1913
+ if (!_context18.t0) {
1914
+ _context18.next = 15;
1859
1915
  break;
1860
1916
  }
1861
1917
 
1862
- _context17.next = 15;
1918
+ _context18.next = 15;
1863
1919
  return _ServiceLocator.Services.store.dispatch((0, _Actions.showMinFontSizeConfirm)(fontSizeMin));
1864
1920
 
1865
1921
  case 15:
1866
- _context17.next = 20;
1922
+ _context18.next = 20;
1867
1923
  break;
1868
1924
 
1869
1925
  case 17:
1870
- _context17.prev = 17;
1871
- _context17.t1 = _context17["catch"](10);
1872
- return _context17.abrupt("return");
1926
+ _context18.prev = 17;
1927
+ _context18.t1 = _context18["catch"](10);
1928
+ return _context18.abrupt("return");
1873
1929
 
1874
1930
  case 20:
1875
- _context17.prev = 20;
1876
- _context17.next = 23;
1931
+ _context18.prev = 20;
1932
+ _context18.next = 23;
1877
1933
  return this.checkColorUsageForDesignProductionMethod(identifier);
1878
1934
 
1879
1935
  case 23:
1880
- _context17.next = 25;
1936
+ _context18.next = 25;
1881
1937
  return this.vectorizeSingleImageAndShowEditDialog(identifier);
1882
1938
 
1883
1939
  case 25:
1884
- _context17.next = 27;
1940
+ _context18.next = 27;
1885
1941
  return this.restoreVectorizedImages(identifier);
1886
1942
 
1887
1943
  case 27:
1888
- _context17.next = 34;
1944
+ _context18.next = 34;
1889
1945
  break;
1890
1946
 
1891
1947
  case 29:
1892
- _context17.prev = 29;
1893
- _context17.t2 = _context17["catch"](20);
1948
+ _context18.prev = 29;
1949
+ _context18.t2 = _context18["catch"](20);
1894
1950
 
1895
- if (!(0, _Actions5.isConfirmResult)(_context17.t2)) {
1896
- _context17.next = 33;
1951
+ if (!(0, _Actions5.isConfirmResult)(_context18.t2)) {
1952
+ _context18.next = 33;
1897
1953
  break;
1898
1954
  }
1899
1955
 
1900
- return _context17.abrupt("return");
1956
+ return _context18.abrupt("return");
1901
1957
 
1902
1958
  case 33:
1903
- throw _context17.t2;
1959
+ throw _context18.t2;
1904
1960
 
1905
1961
  case 34:
1906
- _context17.prev = 34;
1907
- _context17.t3 = bulkNameSelected && !selectedDesignProduction.allowBulkNames;
1962
+ _context18.prev = 34;
1963
+ _context18.t3 = bulkNameSelected && !selectedDesignProduction.allowBulkNames;
1908
1964
 
1909
- if (!_context17.t3) {
1910
- _context17.next = 39;
1965
+ if (!_context18.t3) {
1966
+ _context18.next = 39;
1911
1967
  break;
1912
1968
  }
1913
1969
 
1914
- _context17.next = 39;
1970
+ _context18.next = 39;
1915
1971
  return _ServiceLocator.Services.store.dispatch((0, _Actions.showProductionMethodChangeConfirm)());
1916
1972
 
1917
1973
  case 39:
1918
- _context17.next = 44;
1974
+ _context18.next = 44;
1919
1975
  break;
1920
1976
 
1921
1977
  case 41:
1922
- _context17.prev = 41;
1923
- _context17.t4 = _context17["catch"](34);
1924
- return _context17.abrupt("return");
1978
+ _context18.prev = 41;
1979
+ _context18.t4 = _context18["catch"](34);
1980
+ return _context18.abrupt("return");
1925
1981
 
1926
1982
  case 44:
1927
1983
  oldDesignProductionMethod = (0, _Selectors.getSelectedDesignProductionMethod)(state);
@@ -1939,18 +1995,18 @@ var DesignDataService = /*#__PURE__*/function () {
1939
1995
  !(0, _Selectors.isBulkNamesSelected)(_ServiceLocator.Services.store.state.configurator) && _ServiceLocator.Services.configurator.clearBulkNames();
1940
1996
  }
1941
1997
 
1942
- _context17.next = 51;
1998
+ _context18.next = 51;
1943
1999
  return this.updateObjectsAfterProductionMethodChange(oldDesignProductionMethod, selectedDesignProduction);
1944
2000
 
1945
2001
  case 51:
1946
2002
  case "end":
1947
- return _context17.stop();
2003
+ return _context18.stop();
1948
2004
  }
1949
2005
  }
1950
- }, _callee17, this, [[10, 17], [20, 29], [34, 41]]);
2006
+ }, _callee18, this, [[10, 17], [20, 29], [34, 41]]);
1951
2007
  }));
1952
2008
 
1953
- function setDesignProductionMethod(_x19) {
2009
+ function setDesignProductionMethod(_x20) {
1954
2010
  return _setDesignProductionMethod2.apply(this, arguments);
1955
2011
  }
1956
2012
 
@@ -1982,11 +2038,11 @@ var DesignDataService = /*#__PURE__*/function () {
1982
2038
  }, {
1983
2039
  key: "setColorAmount",
1984
2040
  value: function () {
1985
- var _setColorAmount2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee18(maxColorCount) {
2041
+ var _setColorAmount2 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19(maxColorCount) {
1986
2042
  var currentColorCount, colorCount;
1987
- return regeneratorRuntime.wrap(function _callee18$(_context18) {
2043
+ return regeneratorRuntime.wrap(function _callee19$(_context19) {
1988
2044
  while (1) {
1989
- switch (_context18.prev = _context18.next) {
2045
+ switch (_context19.prev = _context19.next) {
1990
2046
  case 0:
1991
2047
  // check the current color usage before applying the selected color count
1992
2048
  // so if the color count is more than the selected maxColorCount the user can decide to
@@ -1996,35 +2052,35 @@ var DesignDataService = /*#__PURE__*/function () {
1996
2052
  colorCount = (0, _Selectors.getColors)(_ServiceLocator.Services.store.state).length;
1997
2053
 
1998
2054
  if (!(maxColorCount && colorCount > maxColorCount && !isWidget(location.pathname) && (0, _configuration.getConf)('displayColorAmountWarnings', true))) {
1999
- _context18.next = 11;
2055
+ _context19.next = 11;
2000
2056
  break;
2001
2057
  }
2002
2058
 
2003
- _context18.prev = 3;
2004
- _context18.next = 6;
2059
+ _context19.prev = 3;
2060
+ _context19.next = 6;
2005
2061
  return _ServiceLocator.Services.store.dispatch((0, _Actions.showMaxColorChangeConfirm)(colorCount, maxColorCount, currentColorCount));
2006
2062
 
2007
2063
  case 6:
2008
- _context18.next = 11;
2064
+ _context19.next = 11;
2009
2065
  break;
2010
2066
 
2011
2067
  case 8:
2012
- _context18.prev = 8;
2013
- _context18.t0 = _context18["catch"](3);
2014
- return _context18.abrupt("return");
2068
+ _context19.prev = 8;
2069
+ _context19.t0 = _context19["catch"](3);
2070
+ return _context19.abrupt("return");
2015
2071
 
2016
2072
  case 11:
2017
2073
  _ServiceLocator.Services.store.dispatch((0, _Actions.setColorAmount)(maxColorCount));
2018
2074
 
2019
2075
  case 12:
2020
2076
  case "end":
2021
- return _context18.stop();
2077
+ return _context19.stop();
2022
2078
  }
2023
2079
  }
2024
- }, _callee18, null, [[3, 8]]);
2080
+ }, _callee19, null, [[3, 8]]);
2025
2081
  }));
2026
2082
 
2027
- function setColorAmount(_x20) {
2083
+ function setColorAmount(_x21) {
2028
2084
  return _setColorAmount2.apply(this, arguments);
2029
2085
  }
2030
2086
 
@@ -2039,42 +2095,42 @@ var DesignDataService = /*#__PURE__*/function () {
2039
2095
  }, {
2040
2096
  key: "updateVisualization",
2041
2097
  value: function () {
2042
- var _updateVisualization = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee19() {
2098
+ var _updateVisualization = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20() {
2043
2099
  var updateEventObject,
2044
2100
  isDesignAreaSelected,
2045
2101
  isDesignerOpen,
2046
2102
  isScreenshotEvent,
2047
2103
  drawingFunction,
2048
- _args19 = arguments;
2049
- return regeneratorRuntime.wrap(function _callee19$(_context19) {
2104
+ _args20 = arguments;
2105
+ return regeneratorRuntime.wrap(function _callee20$(_context20) {
2050
2106
  while (1) {
2051
- switch (_context19.prev = _context19.next) {
2107
+ switch (_context20.prev = _context20.next) {
2052
2108
  case 0:
2053
- updateEventObject = _args19.length > 0 && _args19[0] !== undefined ? _args19[0] : {};
2109
+ updateEventObject = _args20.length > 0 && _args20[0] !== undefined ? _args20[0] : {};
2054
2110
 
2055
2111
  if (_ServiceLocator.Services.visualization.isReadyToRender()) {
2056
- _context19.next = 3;
2112
+ _context20.next = 3;
2057
2113
  break;
2058
2114
  }
2059
2115
 
2060
- return _context19.abrupt("return");
2116
+ return _context20.abrupt("return");
2061
2117
 
2062
2118
  case 3:
2063
2119
  if (_ServiceLocator.Services.visualization.isReadyToRenderCustomDesign()) {
2064
- _context19.next = 6;
2120
+ _context20.next = 6;
2065
2121
  break;
2066
2122
  }
2067
2123
 
2068
2124
  _ServiceLocator.Services.visualization.render();
2069
2125
 
2070
- return _context19.abrupt("return");
2126
+ return _context20.abrupt("return");
2071
2127
 
2072
2128
  case 6:
2073
2129
  isDesignAreaSelected = !!(0, _Selectors.getSelectedDesignArea)(_ServiceLocator.Services.store.state).identifier;
2074
2130
  isDesignerOpen = isDesignAreaSelected && _ServiceLocator.Services.ui.isVisible('designer');
2075
2131
  isScreenshotEvent = (0, _get2["default"])(updateEventObject, 'data.screenshot');
2076
2132
  drawingFunction = isDesignerOpen && !isScreenshotEvent && !this.isInPreviewMode ? this.redrawEmptyAreas : this.redrawAllDesignAreas;
2077
- _context19.next = 12;
2133
+ _context20.next = 12;
2078
2134
  return _ServiceLocator.Services.visualization.updateTexture({
2079
2135
  updateEventObject: updateEventObject,
2080
2136
  drawingFunction: drawingFunction.bind(this)
@@ -2082,10 +2138,10 @@ var DesignDataService = /*#__PURE__*/function () {
2082
2138
 
2083
2139
  case 12:
2084
2140
  case "end":
2085
- return _context19.stop();
2141
+ return _context20.stop();
2086
2142
  }
2087
2143
  }
2088
- }, _callee19, this);
2144
+ }, _callee20, this);
2089
2145
  }));
2090
2146
 
2091
2147
  function updateVisualization() {
@@ -2109,13 +2165,13 @@ var DesignDataService = /*#__PURE__*/function () {
2109
2165
  }, {
2110
2166
  key: "redrawAllDesignAreas",
2111
2167
  value: function () {
2112
- var _redrawAllDesignAreas = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21(getDrawingContext, updateEventObject) {
2168
+ var _redrawAllDesignAreas = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22(getDrawingContext, updateEventObject) {
2113
2169
  var _this8 = this;
2114
2170
 
2115
2171
  var state, showHighlight, textureBuilderConfig, variantIdentifier, effectEnabled, drawingFn;
2116
- return regeneratorRuntime.wrap(function _callee21$(_context22) {
2172
+ return regeneratorRuntime.wrap(function _callee22$(_context23) {
2117
2173
  while (1) {
2118
- switch (_context22.prev = _context22.next) {
2174
+ switch (_context23.prev = _context23.next) {
2119
2175
  case 0:
2120
2176
  state = _ServiceLocator.Services.store.state;
2121
2177
  showHighlight = (0, _get2["default"])(state, 'designArea.showHighlight');
@@ -2129,7 +2185,7 @@ var DesignDataService = /*#__PURE__*/function () {
2129
2185
  effectEnabled = !(0, _Selectors3.isDesignerProductPreviewMode)();
2130
2186
 
2131
2187
  drawingFn = /*#__PURE__*/function () {
2132
- var _ref18 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee20(textureCtx, getTextureBuilder) {
2188
+ var _ref19 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee21(textureCtx, getTextureBuilder) {
2133
2189
  var designAreas,
2134
2190
  _getTextureBuilder,
2135
2191
  getTextureImage,
@@ -2140,23 +2196,23 @@ var DesignDataService = /*#__PURE__*/function () {
2140
2196
  _iterator9,
2141
2197
  _step9,
2142
2198
  _loop,
2143
- _args21 = arguments;
2199
+ _args22 = arguments;
2144
2200
 
2145
- return regeneratorRuntime.wrap(function _callee20$(_context21) {
2201
+ return regeneratorRuntime.wrap(function _callee21$(_context22) {
2146
2202
  while (1) {
2147
- switch (_context21.prev = _context21.next) {
2203
+ switch (_context22.prev = _context22.next) {
2148
2204
  case 0:
2149
- designAreas = _args21.length > 2 && _args21[2] !== undefined ? _args21[2] : _this8.getDesignAreas();
2205
+ designAreas = _args22.length > 2 && _args22[2] !== undefined ? _args22[2] : _this8.getDesignAreas();
2150
2206
  _getTextureBuilder = getTextureBuilder(textureBuilderConfig), getTextureImage = _getTextureBuilder.getTextureImage, drawCanvasToArea = _getTextureBuilder.drawCanvasToArea, highlightDesignAreas = _getTextureBuilder.highlightDesignAreas, drawOn = _getTextureBuilder.drawOn, getParams = _getTextureBuilder.getParams;
2151
2207
 
2152
2208
  if (getTextureImage()) {
2153
- _context21.next = 5;
2209
+ _context22.next = 5;
2154
2210
  break;
2155
2211
  }
2156
2212
 
2157
2213
  // eslint-disable-next-line no-console
2158
2214
  console.warn('Texture image is missing!', designAreas);
2159
- return _context21.abrupt("return");
2215
+ return _context22.abrupt("return");
2160
2216
 
2161
2217
  case 5:
2162
2218
  if (showHighlight) {
@@ -2168,26 +2224,26 @@ var DesignDataService = /*#__PURE__*/function () {
2168
2224
  }
2169
2225
 
2170
2226
  _iterator9 = _createForOfIteratorHelper(designAreas);
2171
- _context21.prev = 7;
2227
+ _context22.prev = 7;
2172
2228
  _loop = /*#__PURE__*/regeneratorRuntime.mark(function _loop() {
2173
2229
  var designArea, canvas, releaseLock, selectedObject, maskHandler, restoreOutlineVisibility, drawToContext, getSvg;
2174
- return regeneratorRuntime.wrap(function _loop$(_context20) {
2230
+ return regeneratorRuntime.wrap(function _loop$(_context21) {
2175
2231
  while (1) {
2176
- switch (_context20.prev = _context20.next) {
2232
+ switch (_context21.prev = _context21.next) {
2177
2233
  case 0:
2178
2234
  designArea = _step9.value;
2179
2235
  canvas = _this8._getCanvas(_this8.getDesignAreaByIdentifier(designArea.identifier));
2180
2236
 
2181
2237
  if (!canvas) {
2182
- _context20.next = 16;
2238
+ _context21.next = 16;
2183
2239
  break;
2184
2240
  }
2185
2241
 
2186
- _context20.next = 5;
2242
+ _context21.next = 5;
2187
2243
  return (0, _ObjectLock.requestLock)(canvas);
2188
2244
 
2189
2245
  case 5:
2190
- releaseLock = _context20.sent;
2246
+ releaseLock = _context21.sent;
2191
2247
  selectedObject = (0, _get2["default"])(canvas, 'selectedObject');
2192
2248
 
2193
2249
  if (selectedObject) {
@@ -2198,8 +2254,8 @@ var DesignDataService = /*#__PURE__*/function () {
2198
2254
 
2199
2255
  if (maskHandler) {
2200
2256
  restoreOutlineVisibility = maskHandler.toggleOutline(showHighlight, {
2201
- getZoomFactor: function getZoomFactor(_ref19) {
2202
- var zoom = _ref19.zoom;
2257
+ getZoomFactor: function getZoomFactor(_ref20) {
2258
+ var zoom = _ref20.zoom;
2203
2259
  // currentZoom is only available for 2D, for 3D it is always 1
2204
2260
  var threeFactor = Math.min(getParams().currentZoom, 1) || 1;
2205
2261
  return zoom * threeFactor;
@@ -2213,7 +2269,7 @@ var DesignDataService = /*#__PURE__*/function () {
2213
2269
  return canvas.getScreenshot((0, _Selectors4.getFontMapping)(state));
2214
2270
  };
2215
2271
 
2216
- _context20.next = 14;
2272
+ _context21.next = 14;
2217
2273
  return drawCanvasToArea(_objectSpread({
2218
2274
  drawToContext: drawToContext,
2219
2275
  designArea: designArea,
@@ -2229,7 +2285,7 @@ var DesignDataService = /*#__PURE__*/function () {
2229
2285
 
2230
2286
  case 16:
2231
2287
  case "end":
2232
- return _context20.stop();
2288
+ return _context21.stop();
2233
2289
  }
2234
2290
  }
2235
2291
  }, _loop);
@@ -2239,51 +2295,51 @@ var DesignDataService = /*#__PURE__*/function () {
2239
2295
 
2240
2296
  case 10:
2241
2297
  if ((_step9 = _iterator9.n()).done) {
2242
- _context21.next = 14;
2298
+ _context22.next = 14;
2243
2299
  break;
2244
2300
  }
2245
2301
 
2246
- return _context21.delegateYield(_loop(), "t0", 12);
2302
+ return _context22.delegateYield(_loop(), "t0", 12);
2247
2303
 
2248
2304
  case 12:
2249
- _context21.next = 10;
2305
+ _context22.next = 10;
2250
2306
  break;
2251
2307
 
2252
2308
  case 14:
2253
- _context21.next = 19;
2309
+ _context22.next = 19;
2254
2310
  break;
2255
2311
 
2256
2312
  case 16:
2257
- _context21.prev = 16;
2258
- _context21.t1 = _context21["catch"](7);
2313
+ _context22.prev = 16;
2314
+ _context22.t1 = _context22["catch"](7);
2259
2315
 
2260
- _iterator9.e(_context21.t1);
2316
+ _iterator9.e(_context22.t1);
2261
2317
 
2262
2318
  case 19:
2263
- _context21.prev = 19;
2319
+ _context22.prev = 19;
2264
2320
 
2265
2321
  _iterator9.f();
2266
2322
 
2267
- return _context21.finish(19);
2323
+ return _context22.finish(19);
2268
2324
 
2269
2325
  case 22:
2270
2326
  drawOn(textureCtx);
2271
2327
 
2272
2328
  case 23:
2273
2329
  case "end":
2274
- return _context21.stop();
2330
+ return _context22.stop();
2275
2331
  }
2276
2332
  }
2277
- }, _callee20, null, [[7, 16, 19, 22]]);
2333
+ }, _callee21, null, [[7, 16, 19, 22]]);
2278
2334
  }));
2279
2335
 
2280
- return function drawingFn(_x23, _x24) {
2281
- return _ref18.apply(this, arguments);
2336
+ return function drawingFn(_x24, _x25) {
2337
+ return _ref19.apply(this, arguments);
2282
2338
  };
2283
2339
  }();
2284
2340
 
2285
- _context22.prev = 6;
2286
- _context22.next = 9;
2341
+ _context23.prev = 6;
2342
+ _context23.next = 9;
2287
2343
  return getDrawingContext(drawingFn, true
2288
2344
  /* update alpha */
2289
2345
  , true
@@ -2291,24 +2347,24 @@ var DesignDataService = /*#__PURE__*/function () {
2291
2347
  );
2292
2348
 
2293
2349
  case 9:
2294
- _context22.next = 14;
2350
+ _context23.next = 14;
2295
2351
  break;
2296
2352
 
2297
2353
  case 11:
2298
- _context22.prev = 11;
2299
- _context22.t0 = _context22["catch"](6);
2354
+ _context23.prev = 11;
2355
+ _context23.t0 = _context23["catch"](6);
2300
2356
  // eslint-disable-next-line no-console
2301
- console.warn('Could not get drawing context, texture update is skipped!', _context22.t0.message);
2357
+ console.warn('Could not get drawing context, texture update is skipped!', _context23.t0.message);
2302
2358
 
2303
2359
  case 14:
2304
2360
  case "end":
2305
- return _context22.stop();
2361
+ return _context23.stop();
2306
2362
  }
2307
2363
  }
2308
- }, _callee21, null, [[6, 11]]);
2364
+ }, _callee22, null, [[6, 11]]);
2309
2365
  }));
2310
2366
 
2311
- function redrawAllDesignAreas(_x21, _x22) {
2367
+ function redrawAllDesignAreas(_x22, _x23) {
2312
2368
  return _redrawAllDesignAreas.apply(this, arguments);
2313
2369
  }
2314
2370
 
@@ -2317,16 +2373,16 @@ var DesignDataService = /*#__PURE__*/function () {
2317
2373
  }, {
2318
2374
  key: "redrawEmptyAreas",
2319
2375
  value: function redrawEmptyAreas(getDrawingContext) {
2320
- getDrawingContext( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee22() {
2321
- return regeneratorRuntime.wrap(function _callee22$(_context23) {
2376
+ getDrawingContext( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee23() {
2377
+ return regeneratorRuntime.wrap(function _callee23$(_context24) {
2322
2378
  while (1) {
2323
- switch (_context23.prev = _context23.next) {
2379
+ switch (_context24.prev = _context24.next) {
2324
2380
  case 0:
2325
2381
  case "end":
2326
- return _context23.stop();
2382
+ return _context24.stop();
2327
2383
  }
2328
2384
  }
2329
- }, _callee22);
2385
+ }, _callee23);
2330
2386
  })), true
2331
2387
  /* update alpha */
2332
2388
  , true
@@ -2373,86 +2429,86 @@ var DesignDataService = /*#__PURE__*/function () {
2373
2429
  }, {
2374
2430
  key: "getScreenshots",
2375
2431
  value: function () {
2376
- var _getScreenshots = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24(fontMapping) {
2432
+ var _getScreenshots = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee25(fontMapping) {
2377
2433
  var _this10 = this;
2378
2434
 
2379
2435
  var options,
2380
2436
  _options$screenshotFn,
2381
2437
  screenshotFn,
2382
- _args25 = arguments;
2438
+ _args26 = arguments;
2383
2439
 
2384
- return regeneratorRuntime.wrap(function _callee24$(_context25) {
2440
+ return regeneratorRuntime.wrap(function _callee25$(_context26) {
2385
2441
  while (1) {
2386
- switch (_context25.prev = _context25.next) {
2442
+ switch (_context26.prev = _context26.next) {
2387
2443
  case 0:
2388
- options = _args25.length > 1 && _args25[1] !== undefined ? _args25[1] : {};
2444
+ options = _args26.length > 1 && _args26[1] !== undefined ? _args26[1] : {};
2389
2445
  _options$screenshotFn = options.screenshotFn, screenshotFn = _options$screenshotFn === void 0 ? 'getScreenshot' : _options$screenshotFn;
2390
- _context25.next = 4;
2446
+ _context26.next = 4;
2391
2447
  return Promise.all(this.getDesignAreas().map(function (area) {
2392
2448
  return {
2393
2449
  id: area.identifier,
2394
2450
  canvas: _this10._getCanvas(area)
2395
2451
  };
2396
- }).filter(function (_ref21) {
2397
- var canvas = _ref21.canvas;
2452
+ }).filter(function (_ref22) {
2453
+ var canvas = _ref22.canvas;
2398
2454
  return canvas && canvas[screenshotFn] && canvas.objects && canvas.objects.length > 0;
2399
2455
  }).map( /*#__PURE__*/function () {
2400
- var _ref23 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee23(_ref22) {
2456
+ var _ref24 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee24(_ref23) {
2401
2457
  var id, canvas, releaseLock, maskHandler, restoreOutlineVisibility, result;
2402
- return regeneratorRuntime.wrap(function _callee23$(_context24) {
2458
+ return regeneratorRuntime.wrap(function _callee24$(_context25) {
2403
2459
  while (1) {
2404
- switch (_context24.prev = _context24.next) {
2460
+ switch (_context25.prev = _context25.next) {
2405
2461
  case 0:
2406
- id = _ref22.id, canvas = _ref22.canvas;
2407
- _context24.next = 3;
2462
+ id = _ref23.id, canvas = _ref23.canvas;
2463
+ _context25.next = 3;
2408
2464
  return (0, _ObjectLock.requestLock)(canvas);
2409
2465
 
2410
2466
  case 3:
2411
- releaseLock = _context24.sent;
2467
+ releaseLock = _context25.sent;
2412
2468
  maskHandler = canvas.getMaskHandler();
2413
2469
  restoreOutlineVisibility = maskHandler && maskHandler.toggleOutline(false);
2414
- _context24.t0 = id;
2415
- _context24.next = 9;
2470
+ _context25.t0 = id;
2471
+ _context25.next = 9;
2416
2472
  return canvas[screenshotFn](fontMapping);
2417
2473
 
2418
2474
  case 9:
2419
- _context24.t1 = _context24.sent;
2420
- result = [_context24.t0, _context24.t1];
2475
+ _context25.t1 = _context25.sent;
2476
+ result = [_context25.t0, _context25.t1];
2421
2477
  restoreOutlineVisibility && restoreOutlineVisibility();
2422
2478
  releaseLock();
2423
- return _context24.abrupt("return", result);
2479
+ return _context25.abrupt("return", result);
2424
2480
 
2425
2481
  case 14:
2426
2482
  case "end":
2427
- return _context24.stop();
2483
+ return _context25.stop();
2428
2484
  }
2429
2485
  }
2430
- }, _callee23);
2486
+ }, _callee24);
2431
2487
  }));
2432
2488
 
2433
- return function (_x26) {
2434
- return _ref23.apply(this, arguments);
2489
+ return function (_x27) {
2490
+ return _ref24.apply(this, arguments);
2435
2491
  };
2436
2492
  }()));
2437
2493
 
2438
2494
  case 4:
2439
- return _context25.abrupt("return", _context25.sent.reduce(function (screenShots, _ref24) {
2440
- var _ref25 = _slicedToArray(_ref24, 2),
2441
- id = _ref25[0],
2442
- screenshot = _ref25[1];
2495
+ return _context26.abrupt("return", _context26.sent.reduce(function (screenShots, _ref25) {
2496
+ var _ref26 = _slicedToArray(_ref25, 2),
2497
+ id = _ref26[0],
2498
+ screenshot = _ref26[1];
2443
2499
 
2444
2500
  return _objectSpread(_objectSpread({}, screenShots), {}, _defineProperty({}, id, screenshot));
2445
2501
  }, {}));
2446
2502
 
2447
2503
  case 5:
2448
2504
  case "end":
2449
- return _context25.stop();
2505
+ return _context26.stop();
2450
2506
  }
2451
2507
  }
2452
- }, _callee24, this);
2508
+ }, _callee25, this);
2453
2509
  }));
2454
2510
 
2455
- function getScreenshots(_x25) {
2511
+ function getScreenshots(_x26) {
2456
2512
  return _getScreenshots.apply(this, arguments);
2457
2513
  }
2458
2514
 
@@ -2461,28 +2517,28 @@ var DesignDataService = /*#__PURE__*/function () {
2461
2517
  }, {
2462
2518
  key: "getScreenshotsOfElements",
2463
2519
  value: function () {
2464
- var _getScreenshotsOfElements = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee25(fontMapping) {
2465
- return regeneratorRuntime.wrap(function _callee25$(_context26) {
2520
+ var _getScreenshotsOfElements = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee26(fontMapping) {
2521
+ return regeneratorRuntime.wrap(function _callee26$(_context27) {
2466
2522
  while (1) {
2467
- switch (_context26.prev = _context26.next) {
2523
+ switch (_context27.prev = _context27.next) {
2468
2524
  case 0:
2469
- _context26.next = 2;
2525
+ _context27.next = 2;
2470
2526
  return this.getScreenshots(fontMapping, {
2471
2527
  screenshotFn: 'getScreenshotsOfElements'
2472
2528
  });
2473
2529
 
2474
2530
  case 2:
2475
- return _context26.abrupt("return", _context26.sent);
2531
+ return _context27.abrupt("return", _context27.sent);
2476
2532
 
2477
2533
  case 3:
2478
2534
  case "end":
2479
- return _context26.stop();
2535
+ return _context27.stop();
2480
2536
  }
2481
2537
  }
2482
- }, _callee25, this);
2538
+ }, _callee26, this);
2483
2539
  }));
2484
2540
 
2485
- function getScreenshotsOfElements(_x27) {
2541
+ function getScreenshotsOfElements(_x28) {
2486
2542
  return _getScreenshotsOfElements.apply(this, arguments);
2487
2543
  }
2488
2544
 
@@ -2571,20 +2627,20 @@ var DesignDataService = /*#__PURE__*/function () {
2571
2627
  }, {
2572
2628
  key: "addSampleImageForDesignAreas",
2573
2629
  value: function () {
2574
- var _addSampleImageForDesignAreas = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee27(designAreaIdentifiers, active) {
2630
+ var _addSampleImageForDesignAreas = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee28(designAreaIdentifiers, active) {
2575
2631
  var _this12 = this;
2576
2632
 
2577
- return regeneratorRuntime.wrap(function _callee27$(_context28) {
2633
+ return regeneratorRuntime.wrap(function _callee28$(_context29) {
2578
2634
  while (1) {
2579
- switch (_context28.prev = _context28.next) {
2635
+ switch (_context29.prev = _context29.next) {
2580
2636
  case 0:
2581
- _context28.next = 2;
2637
+ _context29.next = 2;
2582
2638
  return Promise.all(designAreaIdentifiers.map( /*#__PURE__*/function () {
2583
- var _ref26 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee26(designAreaIdentifier) {
2639
+ var _ref27 = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee27(designAreaIdentifier) {
2584
2640
  var designArea, canvas, state, imageSrc, imageData, canvasDataJSON, designData, canvasData, objects;
2585
- return regeneratorRuntime.wrap(function _callee26$(_context27) {
2641
+ return regeneratorRuntime.wrap(function _callee27$(_context28) {
2586
2642
  while (1) {
2587
- switch (_context27.prev = _context27.next) {
2643
+ switch (_context28.prev = _context28.next) {
2588
2644
  case 0:
2589
2645
  designArea = _this12.getDesignAreaByIdentifier(designAreaIdentifier);
2590
2646
  canvas = _this12._getCanvas(designArea);
@@ -2592,7 +2648,7 @@ var DesignDataService = /*#__PURE__*/function () {
2592
2648
  imageSrc = _designer_placeholder_logo["default"];
2593
2649
 
2594
2650
  if (!active) {
2595
- _context27.next = 13;
2651
+ _context28.next = 13;
2596
2652
  break;
2597
2653
  }
2598
2654
 
@@ -2603,7 +2659,7 @@ var DesignDataService = /*#__PURE__*/function () {
2603
2659
  isPlaceHolderImage: true,
2604
2660
  galleryImage: false
2605
2661
  });
2606
- _context27.next = 8;
2662
+ _context28.next = 8;
2607
2663
  return _ServiceLocator.Services.designer.addImageFromUrl(canvas, (0, _Selectors2.getPreviewUrlFromImageData)(imageData.preview), imageData, {
2608
2664
  enlargeImage: true
2609
2665
  });
@@ -2616,7 +2672,7 @@ var DesignDataService = /*#__PURE__*/function () {
2616
2672
 
2617
2673
  _this12.setCanvasData(canvasDataJSON, designAreaIdentifier);
2618
2674
 
2619
- _context27.next = 21;
2675
+ _context28.next = 21;
2620
2676
  break;
2621
2677
 
2622
2678
  case 13:
@@ -2624,11 +2680,11 @@ var DesignDataService = /*#__PURE__*/function () {
2624
2680
  canvasData = designData.canvasData;
2625
2681
 
2626
2682
  if (canvasData) {
2627
- _context27.next = 17;
2683
+ _context28.next = 17;
2628
2684
  break;
2629
2685
  }
2630
2686
 
2631
- return _context27.abrupt("return");
2687
+ return _context28.abrupt("return");
2632
2688
 
2633
2689
  case 17:
2634
2690
  objects = canvasData ? canvasData.objects.filter(function (obj) {
@@ -2639,37 +2695,37 @@ var DesignDataService = /*#__PURE__*/function () {
2639
2695
  objects: objects
2640
2696
  }), designAreaIdentifier);
2641
2697
 
2642
- _context27.next = 21;
2698
+ _context28.next = 21;
2643
2699
  return _this12.loadCanvasDataFromState([designArea]);
2644
2700
 
2645
2701
  case 21:
2646
- return _context27.abrupt("return", {
2702
+ return _context28.abrupt("return", {
2647
2703
  canvas: canvas,
2648
2704
  designAreaIdentifier: designAreaIdentifier
2649
2705
  });
2650
2706
 
2651
2707
  case 22:
2652
2708
  case "end":
2653
- return _context27.stop();
2709
+ return _context28.stop();
2654
2710
  }
2655
2711
  }
2656
- }, _callee26);
2712
+ }, _callee27);
2657
2713
  }));
2658
2714
 
2659
- return function (_x30) {
2660
- return _ref26.apply(this, arguments);
2715
+ return function (_x31) {
2716
+ return _ref27.apply(this, arguments);
2661
2717
  };
2662
2718
  }()));
2663
2719
 
2664
2720
  case 2:
2665
2721
  case "end":
2666
- return _context28.stop();
2722
+ return _context29.stop();
2667
2723
  }
2668
2724
  }
2669
- }, _callee27);
2725
+ }, _callee28);
2670
2726
  }));
2671
2727
 
2672
- function addSampleImageForDesignAreas(_x28, _x29) {
2728
+ function addSampleImageForDesignAreas(_x29, _x30) {
2673
2729
  return _addSampleImageForDesignAreas.apply(this, arguments);
2674
2730
  }
2675
2731
 
@@ -2678,23 +2734,23 @@ var DesignDataService = /*#__PURE__*/function () {
2678
2734
  }, {
2679
2735
  key: "addImageToDesignArea",
2680
2736
  value: function () {
2681
- var _addImageToDesignArea = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee28(designArea, imageData) {
2737
+ var _addImageToDesignArea = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee29(designArea, imageData) {
2682
2738
  var canvas;
2683
- return regeneratorRuntime.wrap(function _callee28$(_context29) {
2739
+ return regeneratorRuntime.wrap(function _callee29$(_context30) {
2684
2740
  while (1) {
2685
- switch (_context29.prev = _context29.next) {
2741
+ switch (_context30.prev = _context30.next) {
2686
2742
  case 0:
2687
2743
  canvas = this._getCanvas(designArea);
2688
2744
 
2689
2745
  if (canvas) {
2690
- _context29.next = 3;
2746
+ _context30.next = 3;
2691
2747
  break;
2692
2748
  }
2693
2749
 
2694
- return _context29.abrupt("return", false);
2750
+ return _context30.abrupt("return", false);
2695
2751
 
2696
2752
  case 3:
2697
- _context29.next = 5;
2753
+ _context30.next = 5;
2698
2754
  return _ServiceLocator.Services.designer.addImageFromUrl(canvas, (0, _Selectors2.getPreviewUrlFromImageData)(imageData.preview), imageData, {
2699
2755
  enlargeImage: true,
2700
2756
  scaleToHalf: false,
@@ -2702,17 +2758,17 @@ var DesignDataService = /*#__PURE__*/function () {
2702
2758
  });
2703
2759
 
2704
2760
  case 5:
2705
- return _context29.abrupt("return", _context29.sent);
2761
+ return _context30.abrupt("return", _context30.sent);
2706
2762
 
2707
2763
  case 6:
2708
2764
  case "end":
2709
- return _context29.stop();
2765
+ return _context30.stop();
2710
2766
  }
2711
2767
  }
2712
- }, _callee28, this);
2768
+ }, _callee29, this);
2713
2769
  }));
2714
2770
 
2715
- function addImageToDesignArea(_x31, _x32) {
2771
+ function addImageToDesignArea(_x32, _x33) {
2716
2772
  return _addImageToDesignArea.apply(this, arguments);
2717
2773
  }
2718
2774
 
@@ -2794,19 +2850,19 @@ var DesignDataService = /*#__PURE__*/function () {
2794
2850
  }, {
2795
2851
  key: "setImageAndTextColor",
2796
2852
  value: function () {
2797
- var _setImageAndTextColor = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee29(color) {
2853
+ var _setImageAndTextColor = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee30(color) {
2798
2854
  var designArea, designData, objects, hasmultipleObjects, canvas, isImageSelected, selectedImageIdentifier, _iterator11, _step11, object, image, operations;
2799
2855
 
2800
- return regeneratorRuntime.wrap(function _callee29$(_context30) {
2856
+ return regeneratorRuntime.wrap(function _callee30$(_context31) {
2801
2857
  while (1) {
2802
- switch (_context30.prev = _context30.next) {
2858
+ switch (_context31.prev = _context31.next) {
2803
2859
  case 0:
2804
2860
  if (this.changeAllColorsNeeded()) {
2805
- _context30.next = 2;
2861
+ _context31.next = 2;
2806
2862
  break;
2807
2863
  }
2808
2864
 
2809
- return _context30.abrupt("return");
2865
+ return _context31.abrupt("return");
2810
2866
 
2811
2867
  case 2:
2812
2868
  designArea = (0, _Selectors.getSelectedDesignArea)(_ServiceLocator.Services.store.state);
@@ -2815,11 +2871,11 @@ var DesignDataService = /*#__PURE__*/function () {
2815
2871
  hasmultipleObjects = objects.length > 1;
2816
2872
 
2817
2873
  if (hasmultipleObjects) {
2818
- _context30.next = 8;
2874
+ _context31.next = 8;
2819
2875
  break;
2820
2876
  }
2821
2877
 
2822
- return _context30.abrupt("return");
2878
+ return _context31.abrupt("return");
2823
2879
 
2824
2880
  case 8:
2825
2881
  canvas = this._getCanvas(designArea);
@@ -2829,62 +2885,62 @@ var DesignDataService = /*#__PURE__*/function () {
2829
2885
  _ServiceLocator.Services.store.dispatch((0, _Actions.setDesignAreaTextsColor)(designArea.identifier, color));
2830
2886
 
2831
2887
  _iterator11 = _createForOfIteratorHelper(objects);
2832
- _context30.prev = 13;
2888
+ _context31.prev = 13;
2833
2889
 
2834
2890
  _iterator11.s();
2835
2891
 
2836
2892
  case 15:
2837
2893
  if ((_step11 = _iterator11.n()).done) {
2838
- _context30.next = 24;
2894
+ _context31.next = 24;
2839
2895
  break;
2840
2896
  }
2841
2897
 
2842
2898
  object = _step11.value;
2843
2899
 
2844
2900
  if (!(object.type === 'Image' && object.imageData.identifier !== selectedImageIdentifier)) {
2845
- _context30.next = 22;
2901
+ _context31.next = 22;
2846
2902
  break;
2847
2903
  }
2848
2904
 
2849
2905
  image = (0, _Selectors2.getUserImage)(_ServiceLocator.Services.store.state, object.imageData.identifier);
2850
2906
  operations = (0, _Modifiers.setColorOnOperations)(image.operations, color);
2851
- _context30.next = 22;
2907
+ _context31.next = 22;
2852
2908
  return _ServiceLocator.Services.designData.editFile(operations, image);
2853
2909
 
2854
2910
  case 22:
2855
- _context30.next = 15;
2911
+ _context31.next = 15;
2856
2912
  break;
2857
2913
 
2858
2914
  case 24:
2859
- _context30.next = 29;
2915
+ _context31.next = 29;
2860
2916
  break;
2861
2917
 
2862
2918
  case 26:
2863
- _context30.prev = 26;
2864
- _context30.t0 = _context30["catch"](13);
2919
+ _context31.prev = 26;
2920
+ _context31.t0 = _context31["catch"](13);
2865
2921
 
2866
- _iterator11.e(_context30.t0);
2922
+ _iterator11.e(_context31.t0);
2867
2923
 
2868
2924
  case 29:
2869
- _context30.prev = 29;
2925
+ _context31.prev = 29;
2870
2926
 
2871
2927
  _iterator11.f();
2872
2928
 
2873
- return _context30.finish(29);
2929
+ return _context31.finish(29);
2874
2930
 
2875
2931
  case 32:
2876
- _context30.next = 34;
2932
+ _context31.next = 34;
2877
2933
  return this.updateCanvasDataFromState([designArea]);
2878
2934
 
2879
2935
  case 34:
2880
2936
  case "end":
2881
- return _context30.stop();
2937
+ return _context31.stop();
2882
2938
  }
2883
2939
  }
2884
- }, _callee29, this, [[13, 26, 29, 32]]);
2940
+ }, _callee30, this, [[13, 26, 29, 32]]);
2885
2941
  }));
2886
2942
 
2887
- function setImageAndTextColor(_x33) {
2943
+ function setImageAndTextColor(_x34) {
2888
2944
  return _setImageAndTextColor.apply(this, arguments);
2889
2945
  }
2890
2946
 
@@ -2893,29 +2949,29 @@ var DesignDataService = /*#__PURE__*/function () {
2893
2949
  }, {
2894
2950
  key: "getGalleryImageColors",
2895
2951
  value: function () {
2896
- var _getGalleryImageColors = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee30(url) {
2952
+ var _getGalleryImageColors = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee31(url) {
2897
2953
  var svgContent, designProductionMethod;
2898
- return regeneratorRuntime.wrap(function _callee30$(_context31) {
2954
+ return regeneratorRuntime.wrap(function _callee31$(_context32) {
2899
2955
  while (1) {
2900
- switch (_context31.prev = _context31.next) {
2956
+ switch (_context32.prev = _context32.next) {
2901
2957
  case 0:
2902
- _context31.next = 2;
2958
+ _context32.next = 2;
2903
2959
  return getSvgContent(url);
2904
2960
 
2905
2961
  case 2:
2906
- svgContent = _context31.sent;
2962
+ svgContent = _context32.sent;
2907
2963
  designProductionMethod = (0, _Selectors.getSelectedDesignProductionMethod)(_ServiceLocator.Services.store.state);
2908
- return _context31.abrupt("return", (0, _Modifiers.createVectorizeColorsMap)({}, getSvgColors(svgContent, designProductionMethod)));
2964
+ return _context32.abrupt("return", (0, _Modifiers.createVectorizeColorsMap)({}, getSvgColors(svgContent, designProductionMethod)));
2909
2965
 
2910
2966
  case 5:
2911
2967
  case "end":
2912
- return _context31.stop();
2968
+ return _context32.stop();
2913
2969
  }
2914
2970
  }
2915
- }, _callee30);
2971
+ }, _callee31);
2916
2972
  }));
2917
2973
 
2918
- function getGalleryImageColors(_x34) {
2974
+ function getGalleryImageColors(_x35) {
2919
2975
  return _getGalleryImageColors.apply(this, arguments);
2920
2976
  }
2921
2977
 
@@ -2941,41 +2997,41 @@ var DesignDataService = /*#__PURE__*/function () {
2941
2997
  }, {
2942
2998
  key: "editFileQueued",
2943
2999
  value: function () {
2944
- var _editFileQueued = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee31(operations, image) {
3000
+ var _editFileQueued = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee32(operations, image) {
2945
3001
  var options,
2946
3002
  releaseLock,
2947
- _args32 = arguments;
2948
- return regeneratorRuntime.wrap(function _callee31$(_context32) {
3003
+ _args33 = arguments;
3004
+ return regeneratorRuntime.wrap(function _callee32$(_context33) {
2949
3005
  while (1) {
2950
- switch (_context32.prev = _context32.next) {
3006
+ switch (_context33.prev = _context33.next) {
2951
3007
  case 0:
2952
- options = _args32.length > 2 && _args32[2] !== undefined ? _args32[2] : {};
2953
- _context32.next = 3;
3008
+ options = _args33.length > 2 && _args33[2] !== undefined ? _args33[2] : {};
3009
+ _context33.next = 3;
2954
3010
  return (0, _ObjectLock.requestLock)(this);
2955
3011
 
2956
3012
  case 3:
2957
- releaseLock = _context32.sent;
2958
- _context32.prev = 4;
2959
- _context32.next = 7;
3013
+ releaseLock = _context33.sent;
3014
+ _context33.prev = 4;
3015
+ _context33.next = 7;
2960
3016
  return this.editFile(operations, image, options);
2961
3017
 
2962
3018
  case 7:
2963
- return _context32.abrupt("return", _context32.sent);
3019
+ return _context33.abrupt("return", _context33.sent);
2964
3020
 
2965
3021
  case 8:
2966
- _context32.prev = 8;
3022
+ _context33.prev = 8;
2967
3023
  releaseLock();
2968
- return _context32.finish(8);
3024
+ return _context33.finish(8);
2969
3025
 
2970
3026
  case 11:
2971
3027
  case "end":
2972
- return _context32.stop();
3028
+ return _context33.stop();
2973
3029
  }
2974
3030
  }
2975
- }, _callee31, this, [[4,, 8, 11]]);
3031
+ }, _callee32, this, [[4,, 8, 11]]);
2976
3032
  }));
2977
3033
 
2978
- function editFileQueued(_x35, _x36) {
3034
+ function editFileQueued(_x36, _x37) {
2979
3035
  return _editFileQueued.apply(this, arguments);
2980
3036
  }
2981
3037
 
@@ -2984,7 +3040,7 @@ var DesignDataService = /*#__PURE__*/function () {
2984
3040
  }, {
2985
3041
  key: "editFile",
2986
3042
  value: function () {
2987
- var _editFile = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee32(operations, image) {
3043
+ var _editFile = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee33(operations, image) {
2988
3044
  var options,
2989
3045
  _options$immediateCom,
2990
3046
  immediateCommit,
@@ -2998,6 +3054,7 @@ var DesignDataService = /*#__PURE__*/function () {
2998
3054
  compatibilityInfoHash,
2999
3055
  imageIsCompatible,
3000
3056
  operationsMatching,
3057
+ vectorizedLogoMandatory,
3001
3058
  colorPreviewRequired,
3002
3059
  imageDataPatch,
3003
3060
  _getImageUsageInfo,
@@ -3017,13 +3074,13 @@ var DesignDataService = /*#__PURE__*/function () {
3017
3074
  vectorizeOriginalColorsMap,
3018
3075
  numberOfAggregatedColors,
3019
3076
  numberOfColorsToRemove,
3020
- _args33 = arguments;
3077
+ _args34 = arguments;
3021
3078
 
3022
- return regeneratorRuntime.wrap(function _callee32$(_context33) {
3079
+ return regeneratorRuntime.wrap(function _callee33$(_context34) {
3023
3080
  while (1) {
3024
- switch (_context33.prev = _context33.next) {
3081
+ switch (_context34.prev = _context34.next) {
3025
3082
  case 0:
3026
- options = _args33.length > 2 && _args33[2] !== undefined ? _args33[2] : {};
3083
+ options = _args34.length > 2 && _args34[2] !== undefined ? _args34[2] : {};
3027
3084
  // patch operations to keep other unchanged values
3028
3085
  operations = _objectSpread(_objectSpread({}, image.operations), operations);
3029
3086
  _options$immediateCom = options.immediateCommit, immediateCommit = _options$immediateCom === void 0 ? false : _options$immediateCom, _options$designProduc = options.designProductionMethod, designProductionMethod = _options$designProduc === void 0 ? (0, _Selectors.getSelectedDesignProductionMethod)(_ServiceLocator.Services.store.state) : _options$designProduc, _options$addMode = options.addMode, addMode = _options$addMode === void 0 ? false : _options$addMode, displayColorPreview = options.displayColorPreview;
@@ -3032,16 +3089,18 @@ var DesignDataService = /*#__PURE__*/function () {
3032
3089
  compatibilityInfoHash = (0, _Selectors.getDesignAreaImageCompatibilityInfo)(designProductionMethod);
3033
3090
  imageIsCompatible = (0, _Selectors.areHashesCompatible)(image.compatibilityInfoHash, compatibilityInfoHash);
3034
3091
  operationsMatching = (0, _Modifiers.compareOperations)(image.operations, operations);
3035
- colorPreviewRequired = (0, _Selectors.designProductionMethodHasEmbroideryVisualizationEffect)(designProductionMethod);
3092
+ vectorizedLogoMandatory = (0, _Selectors.isVectorizedLogoMandatory)(designProductionMethod);
3093
+ colorPreviewRequired = (0, _Selectors.designProductionMethodHasEmbroideryVisualizationEffect)(designProductionMethod) || vectorizedLogoMandatory;
3036
3094
  imageDataPatch = _objectSpread({
3037
3095
  compatibilityInfoHash: compatibilityInfoHash,
3038
- colorPreviewRequired: colorPreviewRequired
3096
+ colorPreviewRequired: colorPreviewRequired,
3097
+ vectorizedLogoMandatory: vectorizedLogoMandatory
3039
3098
  }, displayColorPreview !== undefined && {
3040
3099
  displayColorPreview: displayColorPreview
3041
3100
  });
3042
3101
 
3043
3102
  if (!(!operationsMatching || !imageIsCompatible)) {
3044
- _context33.next = 28;
3103
+ _context34.next = 29;
3045
3104
  break;
3046
3105
  }
3047
3106
 
@@ -3052,17 +3111,17 @@ var DesignDataService = /*#__PURE__*/function () {
3052
3111
  operations = makeOperationsCompatible(operations, compatibilityInfoHash, designProductionMethod.colorPalettes);
3053
3112
 
3054
3113
  if (!image.gallery) {
3055
- _context33.next = 17;
3114
+ _context34.next = 18;
3056
3115
  break;
3057
3116
  }
3058
3117
 
3059
3118
  operations = _objectSpread(_objectSpread({}, operations || {}), {}, {
3060
3119
  vectorizeColorsMap: operations.vectorizeColorsMap
3061
3120
  });
3062
- _context33.next = 28;
3121
+ _context34.next = 29;
3063
3122
  break;
3064
3123
 
3065
- case 17:
3124
+ case 18:
3066
3125
  _getImageUsageInfo = (0, _Selectors2.getImageUsageInfo)(_ServiceLocator.Services.store.state, image.identifier), designAreas = _getImageUsageInfo.designAreas, count = _getImageUsageInfo.count;
3067
3126
  createCopy = !!(designAreas > 1 && image.compatibilityInfoHash && !imageIsCompatible) || !operationsMatching && count > (addMode ? 0 : 1);
3068
3127
  editData = (0, _Modifiers.getEditDataFromOperations)(image.fileName, operations, designProductionMethod);
@@ -3070,11 +3129,11 @@ var DesignDataService = /*#__PURE__*/function () {
3070
3129
  isBackendNeeded = createCopy || !(0, _isEqual["default"])(editData, currentEditData);
3071
3130
 
3072
3131
  if (!isBackendNeeded) {
3073
- _context33.next = 28;
3132
+ _context34.next = 29;
3074
3133
  break;
3075
3134
  }
3076
3135
 
3077
- _context33.next = 25;
3136
+ _context34.next = 26;
3078
3137
  return _ServiceLocator.Services.store.dispatch((0, _Actions2.editImage)(_objectSpread(_objectSpread({}, editData), {}, {
3079
3138
  createCopy: createCopy
3080
3139
  }), _objectSpread(_objectSpread({}, imageDataPatch), {}, {
@@ -3085,31 +3144,31 @@ var DesignDataService = /*#__PURE__*/function () {
3085
3144
  immediateCommit: immediateCommit
3086
3145
  }));
3087
3146
 
3088
- case 25:
3147
+ case 26:
3089
3148
  selectedImage = _ServiceLocator.Services.store.state.imageGallery.selectedImage;
3090
3149
  preview = (0, _get2["default"])(selectedImage, 'preview');
3091
3150
  imageIdentifier = (0, _get2["default"])(selectedImage, 'identifier');
3092
3151
 
3093
- case 28:
3152
+ case 29:
3094
3153
  if (!(!preview || !preview.url)) {
3095
- _context33.next = 30;
3154
+ _context34.next = 31;
3096
3155
  break;
3097
3156
  }
3098
3157
 
3099
3158
  throw new Error('Preview image url is not specified!');
3100
3159
 
3101
- case 30:
3160
+ case 31:
3102
3161
  if (!(0, _Selectors2.isEditableVectorImage)(preview)) {
3103
- _context33.next = 39;
3162
+ _context34.next = 40;
3104
3163
  break;
3105
3164
  }
3106
3165
 
3107
3166
  _designProductionMethod = (0, _Selectors.getSelectedDesignProductionMethod)(_ServiceLocator.Services.store.state);
3108
- _context33.next = 34;
3167
+ _context34.next = 35;
3109
3168
  return getSvgContent(preview.url, false, !operationsMatching);
3110
3169
 
3111
- case 34:
3112
- svgContent = _context33.sent;
3170
+ case 35:
3171
+ svgContent = _context34.sent;
3113
3172
  svgColors = getSvgColors(svgContent, _designProductionMethod);
3114
3173
  vectorizeColorsMap = (0, _Modifiers.createVectorizeColorsMap)(operations.vectorizeColorsMap, svgColors);
3115
3174
  thresholdChanged = operations.vectorizeThreshold !== (0, _get2["default"])(image, 'operations.vectorizeThreshold', 0); // prepare initial values for the vectorize feature
@@ -3140,7 +3199,7 @@ var DesignDataService = /*#__PURE__*/function () {
3140
3199
  operations.vectorizeColorsMap = vectorizeColorsMap;
3141
3200
  }
3142
3201
 
3143
- case 39:
3202
+ case 40:
3144
3203
  _ServiceLocator.Services.store.dispatch((0, _Actions2.updateImage)(imageIdentifier, _objectSpread(_objectSpread({
3145
3204
  operations: operations
3146
3205
  }, imageDataPatch), {}, {
@@ -3151,22 +3210,22 @@ var DesignDataService = /*#__PURE__*/function () {
3151
3210
  this.updateDesignAreaImagesWithSelectedImageData(image.identifier);
3152
3211
  }
3153
3212
 
3154
- return _context33.abrupt("return", {
3213
+ return _context34.abrupt("return", {
3155
3214
  vectorizeColorsMap: operations.vectorizeColorsMap,
3156
3215
  vectorizeThreshold: operations.vectorizeThreshold,
3157
3216
  vectorizeMaxColorAmount: operations.vectorizeMaxColorAmount,
3158
3217
  vectorizeOriginalColorsMap: operations.vectorizeOriginalColorsMap
3159
3218
  });
3160
3219
 
3161
- case 42:
3220
+ case 43:
3162
3221
  case "end":
3163
- return _context33.stop();
3222
+ return _context34.stop();
3164
3223
  }
3165
3224
  }
3166
- }, _callee32, this);
3225
+ }, _callee33, this);
3167
3226
  }));
3168
3227
 
3169
- function editFile(_x37, _x38) {
3228
+ function editFile(_x38, _x39) {
3170
3229
  return _editFile.apply(this, arguments);
3171
3230
  }
3172
3231
 
@@ -3175,12 +3234,12 @@ var DesignDataService = /*#__PURE__*/function () {
3175
3234
  }, {
3176
3235
  key: "resetEditedFile",
3177
3236
  value: function () {
3178
- var _resetEditedFile = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee33(image) {
3237
+ var _resetEditedFile = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee34(image) {
3179
3238
  var state, _image, operations, vectorizeColorsMap, resetOperations, designProductionMethod;
3180
3239
 
3181
- return regeneratorRuntime.wrap(function _callee33$(_context34) {
3240
+ return regeneratorRuntime.wrap(function _callee34$(_context35) {
3182
3241
  while (1) {
3183
- switch (_context34.prev = _context34.next) {
3242
+ switch (_context35.prev = _context35.next) {
3184
3243
  case 0:
3185
3244
  state = _ServiceLocator.Services.store.state;
3186
3245
 
@@ -3203,21 +3262,21 @@ var DesignDataService = /*#__PURE__*/function () {
3203
3262
  });
3204
3263
  }
3205
3264
 
3206
- _context34.next = 7;
3265
+ _context35.next = 7;
3207
3266
  return this.editFileQueued(resetOperations, image);
3208
3267
 
3209
3268
  case 7:
3210
- return _context34.abrupt("return", _context34.sent);
3269
+ return _context35.abrupt("return", _context35.sent);
3211
3270
 
3212
3271
  case 8:
3213
3272
  case "end":
3214
- return _context34.stop();
3273
+ return _context35.stop();
3215
3274
  }
3216
3275
  }
3217
- }, _callee33, this);
3276
+ }, _callee34, this);
3218
3277
  }));
3219
3278
 
3220
- function resetEditedFile(_x39) {
3279
+ function resetEditedFile(_x40) {
3221
3280
  return _resetEditedFile.apply(this, arguments);
3222
3281
  }
3223
3282