@configuratorware/configurator-frontendgui 1.56.1 → 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
@@ -37,32 +37,33 @@ var mockUploadFunction = function mockUploadFunction(files) {
37
37
  });
38
38
  };
39
39
  var styles = function styles(theme) {
40
+ var _root;
40
41
  return {
41
- root: _defineProperty(_defineProperty(_defineProperty(_defineProperty({
42
+ root: (_root = {
42
43
  flexShrink: 1,
43
44
  flexBasis: '100%',
44
45
  display: 'flex',
45
46
  flexDirection: 'column',
46
47
  maxWidth: '100%',
47
48
  alignItems: 'center'
48
- }, theme.breakpoints.down('xs'), {
49
+ }, _defineProperty(_root, theme.breakpoints.down('xs'), {
49
50
  minHeight: '150px'
50
- }), '&:before', {
51
+ }), _defineProperty(_root, '&:before', {
51
52
  content: "''",
52
53
  display: 'block',
53
54
  marginTop: 'auto'
54
- }), '&:after', {
55
+ }), _defineProperty(_root, '&:after', {
55
56
  content: "''",
56
57
  display: 'block',
57
58
  marginBottom: 'auto'
58
- }), '& > :not(.resize-sensor)', {
59
+ }), _defineProperty(_root, '& > :not(.resize-sensor)', {
59
60
  /**
60
61
  * The pointer events are passed through in the "main" class of DefaultLayout,
61
62
  * but the contained elements may need it (like the Designer and its controls)
62
63
  * @see DefaultLayout
63
64
  */
64
65
  pointerEvents: 'all'
65
- }),
66
+ }), _root),
66
67
  checkerBoardBackground: _objectSpread({}, (0, _createCheckerBoardBackground.createCheckerBoardBackground)({
67
68
  darkColor: 'rgba(0, 0, 0, 0.1)',
68
69
  lightColor: 'rgba(0, 0, 0, 0.01)'
@@ -15,6 +15,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  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); }
17
17
  var styles = function styles(theme) {
18
+ var _$main, _container, _designer;
18
19
  return {
19
20
  root: {
20
21
  display: 'flex',
@@ -26,11 +27,11 @@ var styles = function styles(theme) {
26
27
  right: 0,
27
28
  overflowX: 'hidden',
28
29
  '&$fallbackMode': {
29
- '& $main': _defineProperty(_defineProperty({}, theme.breakpoints.up('md'), {
30
+ '& $main': (_$main = {}, _defineProperty(_$main, theme.breakpoints.up('md'), {
30
31
  width: "calc(100% - ".concat(theme.layout.sidebar.width, "px)")
31
- }), '@media (orientation: landscape)', {
32
+ }), _defineProperty(_$main, '@media (orientation: landscape)', {
32
33
  flexDirection: 'row'
33
- })
34
+ }), _$main)
34
35
  },
35
36
  // helper classes can be used on contained elements
36
37
  '& .noShrink': {
@@ -45,18 +46,18 @@ var styles = function styles(theme) {
45
46
  },
46
47
  fallbackMode: {},
47
48
  header: {},
48
- container: _defineProperty(_defineProperty(_defineProperty(_defineProperty({
49
+ container: (_container = {
49
50
  flex: 1,
50
51
  display: 'flex',
51
52
  flexDirection: 'row'
52
- }, theme.breakpoints.up('md'), {
53
+ }, _defineProperty(_container, theme.breakpoints.up('md'), {
53
54
  margin: '8px 20px 24px 8px'
54
- }), theme.breakpoints.down('md'), {
55
+ }), _defineProperty(_container, theme.breakpoints.down('md'), {
55
56
  margin: '8px 20px 16px 8px'
56
- }), theme.breakpoints.down('xs'), {
57
+ }), _defineProperty(_container, theme.breakpoints.down('xs'), {
57
58
  flexDirection: 'column',
58
59
  margin: theme.smallScreen.padding
59
- }), "position", 'relative'),
60
+ }), _defineProperty(_container, "position", 'relative'), _container),
60
61
  containerTabletPortrait: {
61
62
  flexDirection: 'column'
62
63
  },
@@ -68,23 +69,25 @@ var styles = function styles(theme) {
68
69
  // the pointer events should be passed through to the visualization component
69
70
  pointerEvents: 'none' // important: don't remove this
70
71
  },
72
+
71
73
  sidebar: function sidebar(_ref) {
74
+ var _ref2;
72
75
  var isPortraitMode = _ref.isPortraitMode;
73
- return _defineProperty(_defineProperty(_defineProperty(_defineProperty({
76
+ return _ref2 = {
74
77
  position: 'relative',
75
78
  display: 'flex',
76
79
  flexDirection: 'column',
77
80
  marginTop: theme.spacing(1),
78
81
  width: !isPortraitMode ? theme.layout.sidebar.width : ''
79
- }, theme.breakpoints.up('sm'), {
82
+ }, _defineProperty(_ref2, theme.breakpoints.up('sm'), {
80
83
  marginTop: 0,
81
84
  marginLeft: theme.spacing(1)
82
- }), theme.breakpoints.down('xs'), {
85
+ }), _defineProperty(_ref2, theme.breakpoints.down('xs'), {
83
86
  maxWidth: 'none'
84
- }), '& > *', {
87
+ }), _defineProperty(_ref2, '& > *', {
85
88
  // make the components in the sidebar overlap the visualization
86
89
  zIndex: 1
87
- }), "pointerEvents", 'none');
90
+ }), _defineProperty(_ref2, "pointerEvents", 'none'), _ref2;
88
91
  },
89
92
  visualization: _defineProperty({
90
93
  // the visualization is in the background with absolute positioning
@@ -99,20 +102,20 @@ var styles = function styles(theme) {
99
102
  pointerEvents: 'none',
100
103
  zIndex: 1
101
104
  },
102
- designer: _defineProperty(_defineProperty({
105
+ designer: (_designer = {
103
106
  position: 'absolute',
104
107
  width: '100%',
105
108
  height: 'calc(100% - 342px)',
106
109
  display: 'flex',
107
110
  pointerEvents: 'none',
108
111
  top: 60
109
- }, theme.breakpoints.up('sm'), {
112
+ }, _defineProperty(_designer, theme.breakpoints.up('sm'), {
110
113
  top: 0
111
- }), theme.orientation.landscape, {
114
+ }), _defineProperty(_designer, theme.orientation.landscape, {
112
115
  width: 'calc(100% - 366px)',
113
116
  height: 'calc(100% - 150px)',
114
117
  top: 0
115
- }),
118
+ }), _designer),
116
119
  toBottom: {
117
120
  marginTop: 'auto'
118
121
  },
@@ -16,13 +16,13 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
16
16
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
17
17
  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); } }
18
18
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
19
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
19
+ 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); }
20
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
+ 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); }; }
20
22
  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); }
21
23
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
22
24
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
23
25
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
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
26
  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; }
27
27
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
28
28
  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); }
@@ -36,8 +36,9 @@ var PopupAreaContext = /*#__PURE__*/_react["default"].createContext({
36
36
  }
37
37
  });
38
38
  var styles = function styles(theme) {
39
+ var _defaultWrapper, _portalWrapper;
39
40
  return {
40
- defaultWrapper: _defineProperty(_defineProperty({
41
+ defaultWrapper: (_defaultWrapper = {
41
42
  flex: 1,
42
43
  flexDirection: 'inherit',
43
44
  display: 'inherit',
@@ -49,32 +50,34 @@ var styles = function styles(theme) {
49
50
  '& > *': {
50
51
  pointerEvents: 'all' // needed to catch the pointer events again
51
52
  }
52
- }, theme.breakpoints.up('md'), {
53
+ }, _defineProperty(_defaultWrapper, theme.breakpoints.up('md'), {
53
54
  marginTop: '16px 16px 16px 0'
54
- }), theme.breakpoints.up('sm'), {
55
+ }), _defineProperty(_defaultWrapper, theme.breakpoints.up('sm'), {
55
56
  marginTop: 8
56
- }),
57
- portalWrapper: _defineProperty(_defineProperty({
57
+ }), _defaultWrapper),
58
+ portalWrapper: (_portalWrapper = {
58
59
  position: 'absolute',
59
60
  background: '#ffffff',
60
61
  top: 0,
61
62
  left: 0,
62
63
  bottom: 0,
63
64
  zIndex: 1
64
- }, theme.breakpoints.down('xs'), {
65
+ }, _defineProperty(_portalWrapper, theme.breakpoints.down('xs'), {
65
66
  zIndex: 5 // Used 5 inorder to have higher zIndex value than viewsContainer which contains preview button in FullScreenView
66
- }), '& div', {})
67
+ }), _defineProperty(_portalWrapper, '& div', {}), _portalWrapper)
67
68
  };
68
69
  };
69
70
  var PopupAreaProvider = /*#__PURE__*/function (_React$Component) {
71
+ _inherits(PopupAreaProvider, _React$Component);
72
+ var _super = _createSuper(PopupAreaProvider);
70
73
  function PopupAreaProvider() {
71
74
  var _this;
72
75
  _classCallCheck(this, PopupAreaProvider);
73
76
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
74
77
  args[_key] = arguments[_key];
75
78
  }
76
- _this = _callSuper(this, PopupAreaProvider, [].concat(args));
77
- _defineProperty(_this, "state", {
79
+ _this = _super.call.apply(_super, [this].concat(args));
80
+ _defineProperty(_assertThisInitialized(_this), "state", {
78
81
  content: null,
79
82
  options: {
80
83
  hideChildren: false
@@ -94,8 +97,7 @@ var PopupAreaProvider = /*#__PURE__*/function (_React$Component) {
94
97
  });
95
98
  return _this;
96
99
  }
97
- _inherits(PopupAreaProvider, _React$Component);
98
- return _createClass(PopupAreaProvider, [{
100
+ _createClass(PopupAreaProvider, [{
99
101
  key: "render",
100
102
  value: function render() {
101
103
  var _this$props = this.props,
@@ -110,11 +112,12 @@ var PopupAreaProvider = /*#__PURE__*/function (_React$Component) {
110
112
  }, /*#__PURE__*/_react["default"].createElement("div", {
111
113
  className: classes.defaultWrapper,
112
114
  "data-state": content && hideChildren ? 'hidden' : 'show'
113
- }, this.props.children), content && (isPortalBreakPoint(width) ? /*#__PURE__*/_reactDom["default"].createPortal(/*#__PURE__*/_react["default"].createElement("div", {
115
+ }, this.props.children), content && (isPortalBreakPoint(width) ? /*#__PURE__*/_reactDom["default"].createPortal( /*#__PURE__*/_react["default"].createElement("div", {
114
116
  className: classes.portalWrapper
115
117
  }, content), document.getElementById('frame')) : content));
116
118
  }
117
119
  }]);
120
+ return PopupAreaProvider;
118
121
  }(_react["default"].Component);
119
122
  _defineProperty(PopupAreaProvider, "defaultProps", {
120
123
  isPortalBreakPoint: function isPortalBreakPoint(width) {
@@ -14,8 +14,15 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default":
14
14
  function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
15
15
  function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
16
16
  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); }
17
+ 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 }; })(); }
18
+ 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"); }
19
+ 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; }; }
20
+ 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(); }); }
21
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
22
+ 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); }
17
23
  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 }; })(); }
18
24
  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); }
25
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
19
26
  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); }
20
27
  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); }); }; }
21
28
  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; }
@@ -50,7 +57,7 @@ var prepareImageObjectData = exports.prepareImageObjectData = function prepareIm
50
57
  src: fixSrcURL(rawObject.src)
51
58
  });
52
59
  data.transformImageSrc = /*#__PURE__*/function () {
53
- var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(url) {
60
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(url) {
54
61
  var _ref2,
55
62
  operations,
56
63
  displayColorPreview,
@@ -59,31 +66,34 @@ var prepareImageObjectData = exports.prepareImageObjectData = function prepareIm
59
66
  originalVector,
60
67
  svgContent,
61
68
  _args = arguments;
62
- return _regenerator().w(function (_context) {
63
- while (1) switch (_context.n) {
69
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
70
+ while (1) switch (_context.prev = _context.next) {
64
71
  case 0:
65
72
  _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, operations = _ref2.operations;
66
73
  if ((0, _Selectors.isEditableVectorImage)({
67
74
  url: url
68
75
  })) {
69
- _context.n = 1;
76
+ _context.next = 3;
70
77
  break;
71
78
  }
72
- return _context.a(2, noCache(url));
73
- case 1:
79
+ return _context.abrupt("return", noCache(url));
80
+ case 3:
74
81
  displayColorPreview = image.displayColorPreview, gallery = image.gallery, isPlaceHolderImage = image.isPlaceHolderImage;
75
82
  originalVector = isOriginalVector(image);
76
83
  if (!(!originalVector && !displayColorPreview && !gallery && !isPlaceHolderImage)) {
77
- _context.n = 2;
84
+ _context.next = 7;
78
85
  break;
79
86
  }
80
- return _context.a(2, noCache(fixSrcURL(getRasterURL((0, _get["default"])(image, 'preview.url', '')))));
81
- case 2:
82
- _context.n = 3;
87
+ return _context.abrupt("return", noCache(fixSrcURL(getRasterURL((0, _get["default"])(image, 'preview.url', '')))));
88
+ case 7:
89
+ _context.next = 9;
83
90
  return (0, _DesignDataService.getSvgContent)(url, true);
84
- case 3:
85
- svgContent = _context.v;
86
- return _context.a(2, (0, _DesignDataService.applySvgContentOperations)(image.original, image.preview, displayColorPreview || gallery || originalVector ? operations ? operations : image.operations : null, svgContent));
91
+ case 9:
92
+ svgContent = _context.sent;
93
+ return _context.abrupt("return", (0, _DesignDataService.applySvgContentOperations)(image.original, image.preview, displayColorPreview || gallery || originalVector ? operations ? operations : image.operations : null, svgContent));
94
+ case 11:
95
+ case "end":
96
+ return _context.stop();
87
97
  }
88
98
  }, _callee);
89
99
  }));
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
 
3
+ 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); }
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
@@ -11,8 +12,15 @@ var _configuration = require("../../configuration");
11
12
  var _Transformers = require("./Utils/Transformers");
12
13
  var _withActiveCanvas = require("./withActiveCanvas");
13
14
  var _createDebounceManager = require("../../../Utils/Function/createDebounceManager");
15
+ 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 }; })(); }
16
+ 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"); }
17
+ 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; }; }
18
+ 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(); }); }
19
+ function _regeneratorAsyncGen(r, e, t, o, n) { return new _regeneratorAsyncIterator(_regenerator().w(r, e, t, o), n || Promise); }
20
+ 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); }
14
21
  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 }; })(); }
15
22
  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); }
23
+ function _OverloadYield(e, d) { this.v = e, this.k = d; }
16
24
  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); }
17
25
  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); }); }; }
18
26
  var CHANGE_DEBOUNCE_TIMEOUT = 200;
@@ -114,11 +122,11 @@ var setupDesigner = exports.setupDesigner = function setupDesigner(designDataSer
114
122
  designDataService.registerGetCanvas(function (designArea) {
115
123
  return canvasMap.has(designArea) ? canvasMap.get(designArea) : false;
116
124
  });
117
- designDataService.registerInitCanvas(/*#__PURE__*/function () {
118
- var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref2) {
119
- var designArea, prevDesignArea, canvasSize, maskData, colorOverlayData, canvas, isNew, _t;
120
- return _regenerator().w(function (_context) {
121
- while (1) switch (_context.p = _context.n) {
125
+ designDataService.registerInitCanvas( /*#__PURE__*/function () {
126
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref2) {
127
+ var designArea, prevDesignArea, canvasSize, maskData, colorOverlayData, canvas, isNew;
128
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
129
+ while (1) switch (_context.prev = _context.next) {
122
130
  case 0:
123
131
  designArea = _ref2.designArea, prevDesignArea = _ref2.prevDesignArea, canvasSize = _ref2.canvasSize, maskData = _ref2.maskData, colorOverlayData = _ref2.colorOverlayData;
124
132
  if (canvasMap.has(prevDesignArea)) {
@@ -131,28 +139,31 @@ var setupDesigner = exports.setupDesigner = function setupDesigner(designDataSer
131
139
  canvas = canvasRepository.requestCanvas(designArea, canvasSize);
132
140
  isNew = true;
133
141
  }
134
- _context.p = 1;
135
- _context.n = 2;
142
+ _context.prev = 2;
143
+ _context.next = 5;
136
144
  return canvas.useMask(maskData);
137
- case 2:
138
- _context.n = 4;
145
+ case 5:
146
+ _context.next = 11;
139
147
  break;
140
- case 3:
141
- _context.p = 3;
142
- _t = _context.v;
148
+ case 7:
149
+ _context.prev = 7;
150
+ _context.t0 = _context["catch"](2);
143
151
  // eslint-disable-next-line no-console
144
- console.error('Error while applying mask:', _t);
152
+ console.error('Error while applying mask:', _context.t0);
145
153
  // eslint-disable-next-line no-console
146
154
  console.error('Mask data:', maskData);
147
- case 4:
155
+ case 11:
148
156
  canvas.useColorOverlay(colorOverlayData);
149
- return _context.a(2, {
157
+ return _context.abrupt("return", {
150
158
  canvas: canvas,
151
159
  designArea: designArea,
152
160
  isNew: isNew
153
161
  });
162
+ case 13:
163
+ case "end":
164
+ return _context.stop();
154
165
  }
155
- }, _callee, null, [[1, 3]]);
166
+ }, _callee, null, [[2, 7]]);
156
167
  }));
157
168
  return function (_x) {
158
169
  return _ref3.apply(this, arguments);
@@ -11,13 +11,13 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
11
11
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
12
12
  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); } }
13
13
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
14
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
14
+ 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); }
15
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
16
+ 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); }; }
15
17
  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); }
16
18
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
17
19
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
18
20
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
19
- 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); }
20
- function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
21
21
  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; }
22
22
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
23
23
  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,25 +45,26 @@ var updateProviders = exports.updateProviders = function updateProviders(canvas)
45
45
  */
46
46
  var withActiveCanvas = exports.withActiveCanvas = function withActiveCanvas(Component) {
47
47
  return /*#__PURE__*/function (_React$Component) {
48
+ _inherits(ActiveCanvasProvider, _React$Component);
49
+ var _super = _createSuper(ActiveCanvasProvider);
48
50
  function ActiveCanvasProvider() {
49
51
  var _this;
50
52
  _classCallCheck(this, ActiveCanvasProvider);
51
53
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
52
54
  args[_key] = arguments[_key];
53
55
  }
54
- _this = _callSuper(this, ActiveCanvasProvider, [].concat(args));
55
- _defineProperty(_this, "state", {
56
+ _this = _super.call.apply(_super, [this].concat(args));
57
+ _defineProperty(_assertThisInitialized(_this), "state", {
56
58
  canvas: currentCanvas
57
59
  });
58
- _defineProperty(_this, "setCanvas", function (canvas) {
60
+ _defineProperty(_assertThisInitialized(_this), "setCanvas", function (canvas) {
59
61
  return _this.setState({
60
62
  canvas: canvas
61
63
  });
62
64
  });
63
65
  return _this;
64
66
  }
65
- _inherits(ActiveCanvasProvider, _React$Component);
66
- return _createClass(ActiveCanvasProvider, [{
67
+ _createClass(ActiveCanvasProvider, [{
67
68
  key: "componentDidMount",
68
69
  value: function componentDidMount() {
69
70
  providerList.push(this);
@@ -82,5 +83,6 @@ var withActiveCanvas = exports.withActiveCanvas = function withActiveCanvas(Comp
82
83
  }, this.props.children);
83
84
  }
84
85
  }]);
86
+ return ActiveCanvasProvider;
85
87
  }(_react["default"].Component);
86
88
  };
@@ -22,6 +22,7 @@ var style = {
22
22
  pointerEvents: 'inherit' // important: don't remove this
23
23
  }
24
24
  };
25
+
25
26
  var AlignTargetContainer = exports.AlignTargetContainer = (0, _styles.withStyles)(style, {
26
27
  name: 'AlignTargetContainer'
27
28
  })((0, _AlignTargetProvider.withAlignTarget)(function (_ref) {
@@ -15,32 +15,33 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
15
15
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
16
16
  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); }
17
17
  var styles = function styles(theme) {
18
+ var _withDesignViews, _root;
18
19
  return {
19
- root: _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({
20
+ root: (_root = {
20
21
  marginTop: 36
21
- }, theme.breakpoints.down('xs'), {
22
+ }, _defineProperty(_root, theme.breakpoints.down('xs'), {
22
23
  maxHeight: 'calc(100% - 270px)'
23
- }), theme.breakpoints.up('sm'), _defineProperty({
24
+ }), _defineProperty(_root, theme.breakpoints.up('sm'), _defineProperty({
24
25
  maxHeight: 'calc(100% - 58px)'
25
26
  }, theme.orientation.portrait, {
26
27
  maxHeight: 'calc(100% - 260px)'
27
- })), theme.breakpoints.up(theme.creator.viewSelectBreakpoint), {
28
+ })), _defineProperty(_root, theme.breakpoints.up(theme.creator.viewSelectBreakpoint), {
28
29
  marginTop: 0
29
- }), theme.breakpoints.between(theme.creator.viewSelectBreakpoint, 'lg'), {
30
+ }), _defineProperty(_root, theme.breakpoints.between(theme.creator.viewSelectBreakpoint, 'lg'), {
30
31
  maxHeight: 'calc(100% - 152px)'
31
- }), theme.breakpoints.up('lg'), {
32
+ }), _defineProperty(_root, theme.breakpoints.up('lg'), {
32
33
  maxHeight: 'calc(100% - 154px)'
33
- }), '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
34
+ }), _defineProperty(_root, '@media (min-aspect-ratio: 13/9) and (min-height: 280px) and (max-width: 950px)', {
34
35
  maxHeight: '100%'
35
- }), '&.withDesignViews', _defineProperty(_defineProperty(_defineProperty({}, theme.breakpoints.up('sm'), _defineProperty({
36
+ }), _defineProperty(_root, '&.withDesignViews', (_withDesignViews = {}, _defineProperty(_withDesignViews, theme.breakpoints.up('sm'), _defineProperty({
36
37
  maxHeight: 'calc(100% - 136px)'
37
38
  }, theme.orientation.portrait, {
38
39
  maxHeight: 'calc(100% - 260px)'
39
- })), theme.breakpoints.between(theme.creator.viewSelectBreakpoint, 'lg'), {
40
+ })), _defineProperty(_withDesignViews, theme.breakpoints.between(theme.creator.viewSelectBreakpoint, 'lg'), {
40
41
  maxHeight: 'calc(100% - 156px)'
41
- }), theme.breakpoints.up('lg'), {
42
+ }), _defineProperty(_withDesignViews, theme.breakpoints.up('lg'), {
42
43
  maxHeight: 'calc(100% - 196px)'
43
- }))
44
+ }), _withDesignViews)), _root)
44
45
  };
45
46
  };
46
47
  var StyledAlignTargetContainer = (0, _styles.withStyles)(styles, {
@@ -14,28 +14,30 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" ==
14
14
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
15
15
  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); } }
16
16
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
17
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
17
+ 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); }
18
+ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
19
+ 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); }; }
18
20
  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); }
19
21
  function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
20
22
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
21
23
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
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
24
  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; }
25
25
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
26
26
  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); }
27
27
  var DefaultVisualizationProvider = exports.DefaultVisualizationProvider = /*#__PURE__*/function (_React$Component) {
28
+ _inherits(DefaultVisualizationProvider, _React$Component);
29
+ var _super = _createSuper(DefaultVisualizationProvider);
28
30
  function DefaultVisualizationProvider() {
29
31
  var _this;
30
32
  _classCallCheck(this, DefaultVisualizationProvider);
31
33
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
32
34
  args[_key] = arguments[_key];
33
35
  }
34
- _this = _callSuper(this, DefaultVisualizationProvider, [].concat(args));
35
- _defineProperty(_this, "state", {
36
+ _this = _super.call.apply(_super, [this].concat(args));
37
+ _defineProperty(_assertThisInitialized(_this), "state", {
36
38
  visualization: null
37
39
  });
38
- _defineProperty(_this, "onComponentChange", function (_ref) {
40
+ _defineProperty(_assertThisInitialized(_this), "onComponentChange", function (_ref) {
39
41
  var component = _ref.data.component;
40
42
  _this.setState({
41
43
  visualization: component
@@ -43,8 +45,7 @@ var DefaultVisualizationProvider = exports.DefaultVisualizationProvider = /*#__P
43
45
  });
44
46
  return _this;
45
47
  }
46
- _inherits(DefaultVisualizationProvider, _React$Component);
47
- return _createClass(DefaultVisualizationProvider, [{
48
+ _createClass(DefaultVisualizationProvider, [{
48
49
  key: "componentDidMount",
49
50
  value: function componentDidMount() {
50
51
  var visualization = _ServiceLocator.Services.visualization.getComponent();
@@ -68,4 +69,5 @@ var DefaultVisualizationProvider = exports.DefaultVisualizationProvider = /*#__P
68
69
  }, /*#__PURE__*/_react["default"].createElement(_AlignTargetProvider.AlignTargetProvider, null, children));
69
70
  }
70
71
  }]);
72
+ return DefaultVisualizationProvider;
71
73
  }(_react["default"].Component);