@configuratorware/configurator-frontendgui 1.56.2 → 1.56.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/App/Error/ErrorBoundary.js +8 -6
  2. package/App/Frame.js +8 -6
  3. package/App/Modules/Creator/Components/ConfigurationvariantItem/index.js +10 -8
  4. package/App/Modules/Creator/Components/ConfigurationvariantSelection/index.js +10 -8
  5. package/App/Modules/Creator/Components/CustomTitleEditor/index.js +10 -8
  6. package/App/Modules/Creator/Components/ExternalVisualization/index.js +9 -7
  7. package/App/Modules/Creator/Components/FastConfigurationRow/index.js +8 -6
  8. package/App/Modules/Creator/Components/FastConfigurationSelect/index.js +8 -6
  9. package/App/Modules/Creator/Components/FullScreenView/FullScreenView.js +11 -10
  10. package/App/Modules/Creator/Components/Incompatibility/OptionExclusionRule/index.js +8 -6
  11. package/App/Modules/Creator/Components/Incompatibility/OptionRule/index.js +8 -6
  12. package/App/Modules/Creator/Components/Incompatibility/RuleComponent.js +9 -7
  13. package/App/Modules/Creator/Components/Incompatibility/index.js +9 -8
  14. package/App/Modules/Creator/Components/Option/index.js +1 -0
  15. package/App/Modules/Creator/Components/OptionAmount/index.js +14 -6
  16. package/App/Modules/Creator/Components/Optiondetail/ZoomImage/index.js +7 -6
  17. package/App/Modules/Creator/Components/Optiondetail/index.js +17 -15
  18. package/App/Modules/Creator/Components/OptionsList/index.js +12 -11
  19. package/App/Modules/Creator/Components/Price/index.js +8 -6
  20. package/App/Modules/Creator/Components/ProductPart/index.js +8 -7
  21. package/App/Modules/Creator/Components/Tools/index.js +8 -6
  22. package/App/Modules/Creator/Layouts/DefaultLayout.js +30 -28
  23. package/App/Modules/Designer/Components/AddGalleryImage/index.js +11 -9
  24. package/App/Modules/Designer/Components/AddGalleryImage/index.story.js +4 -4
  25. package/App/Modules/Designer/Components/AddGalleryImage/index.test.js +6 -6
  26. package/App/Modules/Designer/Components/AddVisualElement/index.js +8 -6
  27. package/App/Modules/Designer/Components/AddVisualElement/index.test.js +3 -3
  28. package/App/Modules/Designer/Components/CloseDesignEditor/index.js +8 -6
  29. package/App/Modules/Designer/Components/CloseGraphicsEditorButton/index.js +5 -4
  30. package/App/Modules/Designer/Components/ColorPalettes/index.js +26 -21
  31. package/App/Modules/Designer/Components/ColorPalettes/index.test.js +3 -3
  32. package/App/Modules/Designer/Components/DesignAreaControlbox/index.js +23 -20
  33. package/App/Modules/Designer/Components/DesignAreaControlbox/index.test.js +7 -7
  34. package/App/Modules/Designer/Components/Dialog/index.js +13 -10
  35. package/App/Modules/Designer/Components/FeedbackNotice/index.js +9 -7
  36. package/App/Modules/Designer/Components/FeedbackNotice/index.test.js +1 -1
  37. package/App/Modules/Designer/Components/FullScreenView/FullScreenView.js +7 -6
  38. package/App/Modules/Designer/Components/ImageColorPicker/ImageColorPicker.js +12 -10
  39. package/App/Modules/Designer/Components/ImageColorize/index.js +39 -29
  40. package/App/Modules/Designer/Components/ImageControlbox/index.js +16 -13
  41. package/App/Modules/Designer/Components/ImageEditDialog/ImageThumbnail.js +24 -14
  42. package/App/Modules/Designer/Components/ImageEditDialog/ImageUpload.js +85 -69
  43. package/App/Modules/Designer/Components/ImageEditDialog/index.js +45 -42
  44. package/App/Modules/Designer/Components/ImageLibraryThumbnail/index.js +9 -7
  45. package/App/Modules/Designer/Components/ObjectTools/index.js +8 -6
  46. package/App/Modules/Designer/Components/Select/index.js +8 -6
  47. package/App/Modules/Designer/Components/TextControlbox/index.js +26 -21
  48. package/App/Modules/Designer/Components/TextControlbox/index.test.js +10 -10
  49. package/App/Modules/Designer/Containers/AddVisualElement.js +21 -11
  50. package/App/Modules/Designer/Containers/ImageEditDialog.js +173 -157
  51. package/App/Modules/Designer/Designer.js +7 -6
  52. package/App/Modules/Designer/Layouts/DefaultLayout.js +20 -17
  53. package/App/Modules/Designer/Layouts/PopupAreaProvider.js +18 -15
  54. package/App/Modules/Designer/Utils/Transformers.js +23 -13
  55. package/App/Modules/Designer/setupDesigner.js +27 -16
  56. package/App/Modules/Designer/withActiveCanvas.js +10 -8
  57. package/App/Modules/Visualization/AlignTargetContainer.js +1 -0
  58. package/App/Modules/Visualization/CreatorAlignTarget.js +12 -11
  59. package/App/Modules/Visualization/DefaultVisualizationProvider.js +10 -8
  60. package/App/Modules/Visualization/DesignerAlignTarget.js +10 -9
  61. package/App/Reducers/Actions.js +44 -36
  62. package/App/Reducers/Configurator/Actions.js +92 -78
  63. package/App/Reducers/Configurator/Selectors.js +5 -5
  64. package/App/Reducers/Confirm/Actions.js +16 -6
  65. package/App/Reducers/DesignArea/Selectors.js +2 -1
  66. package/App/Reducers/ImageGallery/Actions.js +31 -18
  67. package/App/Reducers/ImageGallery/Reducer.js +1 -0
  68. package/App/Reducers/ImageGallery/Selectors.js +1 -0
  69. package/App/Reducers/UI/Actions.js +40 -26
  70. package/App/Routing.js +8 -6
  71. package/App/Screens/Configurator/Components/AmountSelection/index.js +11 -9
  72. package/App/Screens/Configurator/Components/CalculationWidget/index.js +19 -17
  73. package/App/Screens/Configurator/Components/CalculationWidget/index.test.js +8 -8
  74. package/App/Screens/Configurator/Components/Confirm/index.js +8 -6
  75. package/App/Screens/Configurator/Components/Error/index.js +9 -7
  76. package/App/Screens/Configurator/Components/FullScreenView/index.js +24 -21
  77. package/App/Screens/Configurator/Components/FullScreenView/index.test.js +2 -2
  78. package/App/Screens/Configurator/Components/ItemTile/ItemTile.js +13 -5
  79. package/App/Screens/Configurator/Components/PreviewPortal/index.js +10 -8
  80. package/App/Screens/Configurator/Components/Thumbnail/index.js +27 -24
  81. package/App/Screens/Configurator/Components/Thumbnail/index.test.js +2 -2
  82. package/App/Screens/Configurator/Containers/AmountPrice.js +6 -5
  83. package/App/Screens/Configurator/Containers/ConfigurationModeSwitch.js +19 -10
  84. package/App/Screens/DesignerProductPreview/DesignerProductPreviewManager.js +88 -73
  85. package/App/Screens/DesignerProductPreview/Screen.js +21 -14
  86. package/App/Screens/ItemOverview/Components/ItemOverview.js +47 -32
  87. package/App/ServiceLocator.js +4 -2
  88. package/App/Services/AdminareaCommunicationService.js +24 -14
  89. package/App/Services/AnalyticsService.js +48 -47
  90. package/App/Services/ConfiguratorService.js +142 -121
  91. package/App/Services/DesignDataService.js +619 -555
  92. package/App/Services/DesignerService.js +100 -79
  93. package/App/Services/InteractionService.js +236 -210
  94. package/App/Services/UIService.js +10 -7
  95. package/App/Services/VisualizationService.js +104 -86
  96. package/App/Shared/Components/AcceptDesign/index.js +19 -16
  97. package/App/Shared/Components/AcceptPrivacy/index.js +8 -6
  98. package/App/Shared/Components/AddToBasket/index.js +8 -6
  99. package/App/Shared/Components/AlertDialog/index.js +9 -7
  100. package/App/Shared/Components/AmountInput/index.js +24 -21
  101. package/App/Shared/Components/AmountPrice/index.js +128 -115
  102. package/App/Shared/Components/AmountPrice/index.test.js +5 -5
  103. package/App/Shared/Components/BulkNames/index.js +8 -6
  104. package/App/Shared/Components/ConfigurationOverview/index.js +8 -6
  105. package/App/Shared/Components/InformationTag/InformationTag.js +11 -9
  106. package/App/Shared/Components/LicenseNotice/LicenseNotice.js +8 -6
  107. package/App/Shared/Components/LoadConfiguration/index.js +9 -7
  108. package/App/Shared/Components/Notification/index.js +8 -6
  109. package/App/Shared/Components/PdfDownload/index.js +25 -15
  110. package/App/Shared/Components/PriceList/index.js +16 -13
  111. package/App/Shared/Components/PriceOverview/index.js +13 -10
  112. package/App/Shared/Components/ProductVariant/index.js +25 -22
  113. package/App/Shared/Components/ProductVariant/index.story.js +1 -0
  114. package/App/Shared/Components/ReceiveOfferForm/index.js +12 -10
  115. package/App/Shared/Components/ReceiveOfferForm/index.test.js +2 -2
  116. package/App/Shared/Components/SaveConfiguration/index.js +32 -22
  117. package/App/Shared/Components/Stepper/index.js +10 -8
  118. package/App/Shared/Components/ToolbarList/index.js +11 -9
  119. package/App/Shared/Components/VariantChooser/index.js +13 -10
  120. package/App/Shared/Containers/BulkNames.js +15 -13
  121. package/App/Shared/Containers/Header/index.js +15 -7
  122. package/App/Shared/Containers/LoadConfiguration/LoadConfiguration.js +22 -15
  123. package/App/Shared/Containers/ProductVariant/ProductVariant.js +23 -15
  124. package/App/Translations.js +56 -40
  125. package/App/Utils/Request/lazyFetch.js +27 -19
  126. package/App/configuration.js +4 -0
  127. package/App/index.js +24 -14
  128. package/Framework/Api.js +2 -1
  129. package/Framework/ComponentContainer.js +14 -11
  130. package/Framework/Components/Carousel/index.js +13 -11
  131. package/Framework/Components/Dialog/index.js +35 -33
  132. package/Framework/Components/DialogSelect/index.js +19 -16
  133. package/Framework/Components/Input/index.js +12 -10
  134. package/Framework/CustomError.js +6 -5
  135. package/Framework/Helpers/TransitionDetect.js +2 -1
  136. package/Framework/Services/AbstractAdminareaCommunicationService.js +2 -1
  137. package/Framework/Services/AbstractAsyncService.js +2 -1
  138. package/Framework/Services/AbstractConfiguratorService.js +2 -1
  139. package/Framework/Services/AbstractInteractionService.js +2 -1
  140. package/Framework/Services/AbstractStoreService.js +2 -1
  141. package/Framework/Services/AbstractUIService.js +2 -1
  142. package/Framework/Services/AbstractVisualizationService.js +2 -1
  143. package/Framework/Services/AsyncService.js +8 -6
  144. package/Framework/Services/StoreService.js +27 -17
  145. package/Framework/bindDecorator.js +7 -6
  146. package/Framework/i18n.js +10 -8
  147. package/Shared/ErrorTypes/DeferredError.js +6 -5
  148. package/Shared/HOCs/ResizeDetect/ResizeDetect.js +11 -9
  149. package/Utils/Async/AsyncManager.js +30 -20
  150. package/Utils/Async/Deferred.js +4 -2
  151. package/Utils/Decorators/Observable.js +2 -1
  152. package/Utils/Dev/HOCs/withFilePicker.js +10 -8
  153. package/Utils/Immutable/set.js +6 -6
  154. package/Utils/Test/mountWithState.js +1 -1
  155. package/package.json +4 -4
@@ -19,36 +19,38 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
19
19
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
20
20
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
21
21
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
22
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
22
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
23
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
24
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
23
25
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
24
26
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
25
27
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
26
28
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
27
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
28
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
29
29
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
30
30
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
31
31
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
32
32
  var styles = function styles(theme) {
33
+ var _DialogIcon;
33
34
  return {
34
- DialogIcon: _defineProperty(_defineProperty({
35
+ DialogIcon: (_DialogIcon = {
35
36
  position: 'absolute',
36
37
  right: 24,
37
38
  top: 20
38
- }, theme.breakpoints.down('xs'), {
39
+ }, _defineProperty(_DialogIcon, theme.breakpoints.down('xs'), {
39
40
  right: theme.smallScreen.padding
40
- }), '&:hover', {
41
+ }), _defineProperty(_DialogIcon, '&:hover', {
41
42
  cursor: 'pointer'
42
- })
43
+ }), _DialogIcon)
43
44
  };
44
45
  };
45
46
  var UIDialog = /*#__PURE__*/function (_React$Component) {
47
+ _inherits(UIDialog, _React$Component);
48
+ var _super = _createSuper(UIDialog);
46
49
  function UIDialog() {
47
50
  _classCallCheck(this, UIDialog);
48
- return _callSuper(this, UIDialog, arguments);
51
+ return _super.apply(this, arguments);
49
52
  }
50
- _inherits(UIDialog, _React$Component);
51
- return _createClass(UIDialog, [{
53
+ _createClass(UIDialog, [{
52
54
  key: "render",
53
55
  value: function render() {
54
56
  var _this$props = this.props,
@@ -72,6 +74,7 @@ var UIDialog = /*#__PURE__*/function (_React$Component) {
72
74
  }, "close")), /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, children));
73
75
  }
74
76
  }]);
77
+ return UIDialog;
75
78
  }(_react["default"].Component);
76
79
  var _default = exports["default"] = (0, _styles.withStyles)(styles, {
77
80
  name: 'UIDialog'
@@ -15,13 +15,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
15
15
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
16
16
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
17
17
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
18
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
18
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
19
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
20
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
19
21
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
20
22
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
21
23
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
22
24
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
23
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
24
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
25
25
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
26
26
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
27
27
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -35,18 +35,19 @@ var styles = {
35
35
  }
36
36
  };
37
37
  var FeedbackNotice = /*#__PURE__*/function (_React$Component) {
38
+ _inherits(FeedbackNotice, _React$Component);
39
+ var _super = _createSuper(FeedbackNotice);
38
40
  function FeedbackNotice() {
39
41
  var _this;
40
42
  _classCallCheck(this, FeedbackNotice);
41
43
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
42
44
  args[_key] = arguments[_key];
43
45
  }
44
- _this = _callSuper(this, FeedbackNotice, [].concat(args));
45
- _defineProperty(_this, "state", {});
46
+ _this = _super.call.apply(_super, [this].concat(args));
47
+ _defineProperty(_assertThisInitialized(_this), "state", {});
46
48
  return _this;
47
49
  }
48
- _inherits(FeedbackNotice, _React$Component);
49
- return _createClass(FeedbackNotice, [{
50
+ _createClass(FeedbackNotice, [{
50
51
  key: "render",
51
52
  value: function render() {
52
53
  var _this$props = this.props,
@@ -66,6 +67,7 @@ var FeedbackNotice = /*#__PURE__*/function (_React$Component) {
66
67
  }, errorNotice));
67
68
  }
68
69
  }]);
70
+ return FeedbackNotice;
69
71
  }(_react["default"].Component);
70
72
  var _default = exports["default"] = (0, _styles.withStyles)(styles, {
71
73
  name: 'FeedbackNotice'
@@ -5,7 +5,7 @@ var _enzyme = require("enzyme");
5
5
  var _index = _interopRequireDefault(require("./index"));
6
6
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
7
7
  it('renders correctly', function () {
8
- var tree = (0, _enzyme.render)(/*#__PURE__*/_react["default"].createElement(_index["default"], {
8
+ var tree = (0, _enzyme.render)( /*#__PURE__*/_react["default"].createElement(_index["default"], {
9
9
  errorNotice: 'Image to large'
10
10
  }));
11
11
  expect(tree).toMatchSnapshot();
@@ -13,28 +13,29 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
13
13
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
14
14
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
15
15
  var styles = function styles(theme) {
16
+ var _thumbnailGrid;
16
17
  return {
17
18
  viewsContainer: _defineProperty({}, theme.orientation.landscape, {
18
19
  height: 136
19
20
  }),
20
- thumbnailGrid: _defineProperty(_defineProperty(_defineProperty(_defineProperty({
21
+ thumbnailGrid: (_thumbnailGrid = {
21
22
  bottom: -16
22
- }, theme.breakpoints.up('sm'), {
23
+ }, _defineProperty(_thumbnailGrid, theme.breakpoints.up('sm'), {
23
24
  minHeight: 136
24
- }), theme.breakpoints.up('md'), _defineProperty({
25
+ }), _defineProperty(_thumbnailGrid, theme.breakpoints.up('md'), _defineProperty({
25
26
  bottom: 0
26
27
  }, theme.orientation.portrait, {
27
28
  width: '25%'
28
- })), theme.orientation.landscape, {
29
+ })), _defineProperty(_thumbnailGrid, theme.orientation.landscape, {
29
30
  height: 136
30
- }), '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
31
+ }), _defineProperty(_thumbnailGrid, '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
31
32
  width: '100%',
32
33
  maxWidth: '100%',
33
34
  position: 'absolute',
34
35
  bottom: 0,
35
36
  height: 60,
36
37
  minHeight: 60
37
- }),
38
+ }), _thumbnailGrid),
38
39
  button: _defineProperty({}, theme.orientation.landscape, _defineProperty({}, theme.breakpoints.down('sm'), {
39
40
  left: '50%'
40
41
  })),
@@ -21,13 +21,13 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
21
21
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
22
22
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
23
23
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
24
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
24
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
25
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
26
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
25
27
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
26
28
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
27
29
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
28
30
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
29
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
30
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
31
31
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
32
32
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
33
33
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -137,24 +137,26 @@ var drawMarker = function drawMarker(ctx, x, y) {
137
137
  return [x - padding, y - padding, (padding + shadowBlur) * 2];
138
138
  };
139
139
  var ImageColorPicker = exports.ImageColorPicker = /*#__PURE__*/function (_React$Component) {
140
+ _inherits(ImageColorPicker, _React$Component);
141
+ var _super = _createSuper(ImageColorPicker);
140
142
  function ImageColorPicker() {
141
143
  var _this;
142
144
  _classCallCheck(this, ImageColorPicker);
143
145
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
144
146
  args[_key] = arguments[_key];
145
147
  }
146
- _this = _callSuper(this, ImageColorPicker, [].concat(args));
147
- _defineProperty(_this, "state", {
148
+ _this = _super.call.apply(_super, [this].concat(args));
149
+ _defineProperty(_assertThisInitialized(_this), "state", {
148
150
  loadingImage: false
149
151
  });
150
- _defineProperty(_this, "canvasRef", /*#__PURE__*/_react["default"].createRef());
151
- _defineProperty(_this, "reportError", function (e) {
152
+ _defineProperty(_assertThisInitialized(_this), "canvasRef", /*#__PURE__*/_react["default"].createRef());
153
+ _defineProperty(_assertThisInitialized(_this), "reportError", function (e) {
152
154
  // eslint-disable-next-line no-console
153
155
  console.error(e);
154
156
  var onError = _this.props.onError;
155
157
  onError && onError(e);
156
158
  });
157
- _defineProperty(_this, "redrawMarker", function (evt) {
159
+ _defineProperty(_assertThisInitialized(_this), "redrawMarker", function (evt) {
158
160
  return setTimeout(function () {
159
161
  var _this$getRelativePosi = _this.getRelativePosition(evt),
160
162
  x = _this$getRelativePosi.x,
@@ -179,8 +181,7 @@ var ImageColorPicker = exports.ImageColorPicker = /*#__PURE__*/function (_React$
179
181
  });
180
182
  return _this;
181
183
  }
182
- _inherits(ImageColorPicker, _React$Component);
183
- return _createClass(ImageColorPicker, [{
184
+ _createClass(ImageColorPicker, [{
184
185
  key: "componentDidMount",
185
186
  value: function componentDidMount() {
186
187
  var _this2 = this;
@@ -324,6 +325,7 @@ var ImageColorPicker = exports.ImageColorPicker = /*#__PURE__*/function (_React$
324
325
  }));
325
326
  }
326
327
  }]);
328
+ return ImageColorPicker;
327
329
  }(_react["default"].Component);
328
330
  _defineProperty(ImageColorPicker, "defaultProps", {
329
331
  enabled: true
@@ -36,20 +36,27 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
36
36
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
37
37
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
38
38
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
39
+ function _regeneratorRuntime() { "use strict"; var r = _regenerator(), e = r.m(_regeneratorRuntime), t = (Object.getPrototypeOf ? Object.getPrototypeOf(e) : e.__proto__).constructor; function n(r) { var e = "function" == typeof r && r.constructor; return !!e && (e === t || "GeneratorFunction" === (e.displayName || e.name)); } var o = { "throw": 1, "return": 2, "break": 3, "continue": 3 }; function a(r) { var e, t; return function (n) { e || (e = { stop: function stop() { return t(n.a, 2); }, "catch": function _catch() { return n.v; }, abrupt: function abrupt(r, e) { return t(n.a, o[r], e); }, delegateYield: function delegateYield(r, o, a) { return e.resultName = o, t(n.d, _regeneratorValues(r), a); }, finish: function finish(r) { return t(n.f, r); } }, t = function t(r, _t, o) { n.p = e.prev, n.n = e.next; try { return r(_t, o); } finally { e.next = n.n; } }), e.resultName && (e[e.resultName] = n.v, e.resultName = void 0), e.sent = n.v, e.next = n.n; try { return r.call(this, e); } finally { n.p = e.prev, n.n = e.next; } }; } return (_regeneratorRuntime = function _regeneratorRuntime() { return { wrap: function wrap(e, t, n, o) { return r.w(a(e), t, n, o && o.reverse()); }, isGeneratorFunction: n, mark: r.m, awrap: function awrap(r, e) { return new _OverloadYield(r, e); }, AsyncIterator: _regeneratorAsyncIterator, async: function async(r, e, t, o, u) { return (n(e) ? _regeneratorAsyncGen : _regeneratorAsync)(a(r), e, t, o, u); }, keys: _regeneratorKeys, values: _regeneratorValues }; })(); }
40
+ function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
41
+ function _regeneratorKeys(e) { var n = Object(e), r = []; for (var t in n) r.unshift(t); return function e() { for (; r.length;) if ((t = r.pop()) in n) return e.value = t, e.done = !1, e; return e.done = !0, e; }; }
42
+ function _regeneratorAsync(n, e, r, t, o) { var a = _regeneratorAsyncGen(n, e, r, t, o); return a.next().then(function (n) { return n.done ? n.value : a.next(); }); }
43
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
44
+ function _regeneratorAsyncIterator(t, e) { function n(r, o, i, f) { try { var c = t[r](o), u = c.value; return u instanceof _OverloadYield ? e.resolve(u.v).then(function (t) { n("next", t, i, f); }, function (t) { n("throw", t, i, f); }) : e.resolve(u).then(function (t) { c.value = t, i(c); }, function (t) { return n("throw", t, i, f); }); } catch (t) { f(t); } } var r; this.next || (_regeneratorDefine2(_regeneratorAsyncIterator.prototype), _regeneratorDefine2(_regeneratorAsyncIterator.prototype, "function" == typeof Symbol && Symbol.asyncIterator || "@asyncIterator", function () { return this; })), _regeneratorDefine2(this, "_invoke", function (t, o, i) { function f() { return new e(function (e, r) { n(t, i, e, r); }); } return r = r ? r.then(f, f) : f(); }, !0); }
39
45
  function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
40
46
  function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
47
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
41
48
  function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
42
49
  function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
43
50
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
44
51
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
45
52
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
46
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
53
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
54
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
55
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
47
56
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
48
57
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
49
58
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
50
59
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
51
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
52
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
53
60
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
54
61
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
55
62
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
@@ -164,14 +171,16 @@ var styles = function styles(theme) {
164
171
  };
165
172
  };
166
173
  var ImageColorize = /*#__PURE__*/function (_React$Component) {
174
+ _inherits(ImageColorize, _React$Component);
175
+ var _super = _createSuper(ImageColorize);
167
176
  function ImageColorize() {
168
177
  var _this;
169
178
  _classCallCheck(this, ImageColorize);
170
179
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
171
180
  args[_key] = arguments[_key];
172
181
  }
173
- _this = _callSuper(this, ImageColorize, [].concat(args));
174
- _defineProperty(_this, "state", {
182
+ _this = _super.call.apply(_super, [this].concat(args));
183
+ _defineProperty(_assertThisInitialized(_this), "state", {
175
184
  selectedColor: null,
176
185
  selectedColorPalette: null,
177
186
  vectorizeThreshold: 0,
@@ -179,7 +188,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
179
188
  designProductionMethodName: '',
180
189
  vectorizeRequested: false
181
190
  });
182
- _defineProperty(_this, "onVectorizeThresholdChange", function (event) {
191
+ _defineProperty(_assertThisInitialized(_this), "onVectorizeThresholdChange", function (event) {
183
192
  var onVectorizeThresholdChange = _this.props.onVectorizeThresholdChange;
184
193
  var thresholdValue = event.target.value;
185
194
  _this.setState({
@@ -188,7 +197,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
188
197
  });
189
198
  onVectorizeThresholdChange && onVectorizeThresholdChange(thresholdValue);
190
199
  });
191
- _defineProperty(_this, "onColorSelectClick", function (value, identifier, paletteIdentifier, custom) {
200
+ _defineProperty(_assertThisInitialized(_this), "onColorSelectClick", function (value, identifier, paletteIdentifier, custom) {
192
201
  var onColorSelectClick = _this.props.onColorSelectClick;
193
202
  var colorKey = _this.state.selectedColor;
194
203
  _this.setState({
@@ -197,35 +206,36 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
197
206
  var createdColor = (0, _Selectors.createColorData)(identifier, paletteIdentifier, custom, '#' + value);
198
207
  onColorSelectClick && onColorSelectClick(colorKey, createdColor);
199
208
  });
200
- _defineProperty(_this, "onColorPaletteClose", function () {
209
+ _defineProperty(_assertThisInitialized(_this), "onColorPaletteClose", function () {
201
210
  _this.setState({
202
211
  selectedColor: null
203
212
  });
204
213
  });
205
- _defineProperty(_this, "onEditClick", function (colorKey) {
214
+ _defineProperty(_assertThisInitialized(_this), "onEditClick", function (colorKey) {
206
215
  _this.setState({
207
216
  selectedColor: colorKey
208
217
  });
209
218
  });
210
- _defineProperty(_this, "resetImageState", /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
211
- var onColorImageStateReset, _t;
212
- return _regenerator().w(function (_context) {
213
- while (1) switch (_context.n) {
219
+ _defineProperty(_assertThisInitialized(_this), "resetImageState", /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
220
+ var onColorImageStateReset;
221
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
222
+ while (1) switch (_context.prev = _context.next) {
214
223
  case 0:
215
224
  onColorImageStateReset = _this.props.onColorImageStateReset;
216
- _t = onColorImageStateReset;
217
- if (!_t) {
218
- _context.n = 1;
225
+ _context.t0 = onColorImageStateReset;
226
+ if (!_context.t0) {
227
+ _context.next = 5;
219
228
  break;
220
229
  }
221
- _context.n = 1;
230
+ _context.next = 5;
222
231
  return onColorImageStateReset();
223
- case 1:
224
- return _context.a(2);
232
+ case 5:
233
+ case "end":
234
+ return _context.stop();
225
235
  }
226
236
  }, _callee);
227
237
  })));
228
- _defineProperty(_this, "getColorName", function (color) {
238
+ _defineProperty(_assertThisInitialized(_this), "getColorName", function (color) {
229
239
  var colorPalettes = _this.props.colorPalettes;
230
240
  var data = (0, _Selectors.parseColorData)(color.identifier);
231
241
  if (!(0, _Selectors.isValidHex)(color.value)) {
@@ -245,24 +255,24 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
245
255
  }
246
256
  return paletteColor.title;
247
257
  });
248
- _defineProperty(_this, "getColorValue", function (color) {
258
+ _defineProperty(_assertThisInitialized(_this), "getColorValue", function (color) {
249
259
  var value = color.value;
250
260
  return (0, _Selectors.isValidHex)(value) ? value : '#000000';
251
261
  });
252
- _defineProperty(_this, "onVectorizeToggleChange", function (e, value) {
262
+ _defineProperty(_assertThisInitialized(_this), "onVectorizeToggleChange", function (e, value) {
253
263
  var onVectorizeToggleChange = _this.props.onVectorizeToggleChange;
254
264
  _this.setState({
255
265
  vectorizeRequested: value
256
266
  });
257
267
  onVectorizeToggleChange && onVectorizeToggleChange(value);
258
268
  });
259
- _defineProperty(_this, "validateAmount", function () {
269
+ _defineProperty(_assertThisInitialized(_this), "validateAmount", function () {
260
270
  var _this$props = _this.props,
261
271
  maxColorAmount = _this$props.maxColorAmount,
262
272
  colorAmount = _this$props.colorAmount;
263
273
  return !maxColorAmount || colorAmount <= maxColorAmount;
264
274
  });
265
- _defineProperty(_this, "getSelectedColorPalette", function (color) {
275
+ _defineProperty(_assertThisInitialized(_this), "getSelectedColorPalette", function (color) {
266
276
  var colorPalettes = _this.props.colorPalettes;
267
277
  var selectedColorPalette = _this.state.selectedColorPalette;
268
278
  var colorData = (0, _Selectors.parseColorData)(color.identifier);
@@ -271,7 +281,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
271
281
  });
272
282
  return colorPalette || colorPalettes[0];
273
283
  });
274
- _defineProperty(_this, "getColorAmountMessage", function () {
284
+ _defineProperty(_assertThisInitialized(_this), "getColorAmountMessage", function () {
275
285
  var _this$props2 = _this.props,
276
286
  colorAmount = _this$props2.colorAmount,
277
287
  maxColorAmount = _this$props2.maxColorAmount;
@@ -288,7 +298,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
288
298
  colorAmount: colorAmount
289
299
  });
290
300
  });
291
- _defineProperty(_this, "getColors", function (vectorizeColorsMap, colorPalettes) {
301
+ _defineProperty(_assertThisInitialized(_this), "getColors", function (vectorizeColorsMap, colorPalettes) {
292
302
  var usedColors = _this.props.usedColors;
293
303
  try {
294
304
  var imageColors = (0, _values["default"])(vectorizeColorsMap);
@@ -316,15 +326,14 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
316
326
  return null;
317
327
  }
318
328
  });
319
- _defineProperty(_this, "onColorPaletteChange", function (identifier) {
329
+ _defineProperty(_assertThisInitialized(_this), "onColorPaletteChange", function (identifier) {
320
330
  _this.setState({
321
331
  selectedColorPalette: identifier
322
332
  });
323
333
  });
324
334
  return _this;
325
335
  }
326
- _inherits(ImageColorize, _React$Component);
327
- return _createClass(ImageColorize, [{
336
+ _createClass(ImageColorize, [{
328
337
  key: "componentDidMount",
329
338
  value: function componentDidMount() {
330
339
  var vectorizeThreshold = this.props.vectorizeThreshold;
@@ -510,6 +519,7 @@ var ImageColorize = /*#__PURE__*/function (_React$Component) {
510
519
  }, (0, _i18n.t)('imageEditDialog.editColors')));
511
520
  }
512
521
  }]);
522
+ return ImageColorize;
513
523
  }(_react["default"].Component);
514
524
  var _default = exports["default"] = (0, _styles.withStyles)(styles, {
515
525
  name: 'ImageColorize'
@@ -32,17 +32,18 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
32
32
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
33
33
  function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
34
34
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
35
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
35
+ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
36
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
37
+ function _createSuper(t) { var r = _isNativeReflectConstruct(); return function () { var e, o = _getPrototypeOf(t); if (r) { var s = _getPrototypeOf(this).constructor; e = Reflect.construct(o, arguments, s); } else e = o.apply(this, arguments); return _possibleConstructorReturn(this, e); }; }
36
38
  function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
37
39
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
38
40
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
39
41
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
40
- function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
41
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
42
42
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
43
43
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
44
44
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
45
45
  var styles = function styles(theme) {
46
+ var _CardContentWrapper;
46
47
  return {
47
48
  card: {
48
49
  borderTop: '7px solid ' + theme.palette.primary.main,
@@ -54,18 +55,18 @@ var styles = function styles(theme) {
54
55
  boxShadow: 'none',
55
56
  borderRadius: 0
56
57
  },
57
- CardContentWrapper: _defineProperty(_defineProperty({
58
+ CardContentWrapper: (_CardContentWrapper = {
58
59
  padding: 8
59
- }, theme.breakpoints.down('xs'), {
60
+ }, _defineProperty(_CardContentWrapper, theme.breakpoints.down('xs'), {
60
61
  padding: '8px 0',
61
62
  '&:last-child': {
62
63
  paddingBottom: 12
63
64
  }
64
- }), '& .object-btn', _defineProperty({}, theme.breakpoints.down('xs'), {
65
+ }), _defineProperty(_CardContentWrapper, '& .object-btn', _defineProperty({}, theme.breakpoints.down('xs'), {
65
66
  height: 50,
66
67
  width: 50,
67
68
  margin: '15px 5px 0 0'
68
- })),
69
+ })), _CardContentWrapper),
69
70
  printQuality: _defineProperty({
70
71
  display: 'inline-flex',
71
72
  alignItems: 'center',
@@ -117,11 +118,13 @@ var styles = function styles(theme) {
117
118
  };
118
119
  };
119
120
  var ImageControlbox = /*#__PURE__*/function (_React$Component) {
121
+ _inherits(ImageControlbox, _React$Component);
122
+ var _super = _createSuper(ImageControlbox);
120
123
  function ImageControlbox(props) {
121
124
  var _this;
122
125
  _classCallCheck(this, ImageControlbox);
123
- _this = _callSuper(this, ImageControlbox, [props]);
124
- _defineProperty(_this, "onEditClick", function () {
126
+ _this = _super.call(this, props);
127
+ _defineProperty(_assertThisInitialized(_this), "onEditClick", function () {
125
128
  var _this$props = _this.props,
126
129
  imageData = _this$props.imageData,
127
130
  openImageEditDialog = _this$props.openImageEditDialog,
@@ -132,12 +135,12 @@ var ImageControlbox = /*#__PURE__*/function (_React$Component) {
132
135
  openImageEditDialog(imageData.identifier, canvas);
133
136
  }
134
137
  });
135
- _defineProperty(_this, "onPrintQualityInfoClick", function () {
138
+ _defineProperty(_assertThisInitialized(_this), "onPrintQualityInfoClick", function () {
136
139
  _this.setState({
137
140
  printQualityInfoDialogOpen: true
138
141
  });
139
142
  });
140
- _defineProperty(_this, "handlePrintQualityInfoDialogClose", function () {
143
+ _defineProperty(_assertThisInitialized(_this), "handlePrintQualityInfoDialogClose", function () {
141
144
  _this.setState({
142
145
  printQualityInfoDialogOpen: false
143
146
  });
@@ -147,8 +150,7 @@ var ImageControlbox = /*#__PURE__*/function (_React$Component) {
147
150
  };
148
151
  return _this;
149
152
  }
150
- _inherits(ImageControlbox, _React$Component);
151
- return _createClass(ImageControlbox, [{
153
+ _createClass(ImageControlbox, [{
152
154
  key: "render",
153
155
  value: function render() {
154
156
  var _this$props2 = this.props,
@@ -234,6 +236,7 @@ var ImageControlbox = /*#__PURE__*/function (_React$Component) {
234
236
  }, "OK"))));
235
237
  }
236
238
  }]);
239
+ return ImageControlbox;
237
240
  }(_react["default"].Component);
238
241
  var _default = exports["default"] = (0, _withWidth["default"])({
239
242
  initialWidth: 'lg'