@configuratorware/configurator-admingui 1.55.5 → 1.55.7

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.
@@ -31,7 +31,7 @@ var loadList = exports.loadList = function loadList(dispatch) {
31
31
  orderby: "".concat(entity, ".").concat(orderSequenceNumber),
32
32
  filters: _objectSpread({}, filters),
33
33
  offset: 0,
34
- limit: 1000
34
+ limit: 9999
35
35
  }
36
36
  });
37
37
  };
@@ -169,7 +169,7 @@ var watchZoomChange = function watchZoomChange(threeInstance, callback) {
169
169
  };
170
170
  var createThree2DEditor = exports.createThree2DEditor = /*#__PURE__*/function () {
171
171
  var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(threeInstance, onChange) {
172
- var baseShapeData, advancedMode, controls, maskObject, controlPointMode, textureRepo, triggerChange, createHelper, _clearScene, addControls, addControlPoints, createChessboardPattern, clearContextCanvas, addCenterLines, redrawCanvas, getIntersection, setupHitTest, getData, _prevBaseShapeData, updateBaseShapeData, removeHitTestListener, init, update, dispose, setAdvancedMode, setMask, setControlPointMode;
172
+ var baseShapeData, advancedMode, controls, maskObject, controlPointMode, textureRepo, triggerChange, createHelper, _clearScene, addControls, addControlPoints, createChessboardPattern, clearContextCanvas, addCenterLines, redrawCanvas, getIntersection, setupHitTest, getData, _prevBaseShapeData, updateBaseShapeData, removeHitTestListener, init, update, dispose, setAdvancedMode, setMask, setControlPointMode, getViewImageSize;
173
173
  return _regenerator().w(function (_context7) {
174
174
  while (1) switch (_context7.n) {
175
175
  case 0:
@@ -743,6 +743,16 @@ var createThree2DEditor = exports.createThree2DEditor = /*#__PURE__*/function ()
743
743
  }
744
744
  triggerChange();
745
745
  };
746
+ getViewImageSize = function getViewImageSize() {
747
+ var _threeInstance$_model;
748
+ var _ref11 = (threeInstance === null || threeInstance === void 0 || (_threeInstance$_model = threeInstance._model) === null || _threeInstance$_model === void 0 || (_threeInstance$_model = _threeInstance$_model.material) === null || _threeInstance$_model === void 0 || (_threeInstance$_model = _threeInstance$_model.map) === null || _threeInstance$_model === void 0 ? void 0 : _threeInstance$_model.image) || {},
749
+ width = _ref11.width,
750
+ height = _ref11.height;
751
+ return {
752
+ width: width || 0,
753
+ height: height || 0
754
+ };
755
+ };
746
756
  return _context7.a(2, {
747
757
  init: init,
748
758
  update: update,
@@ -751,7 +761,8 @@ var createThree2DEditor = exports.createThree2DEditor = /*#__PURE__*/function ()
751
761
  dispose: dispose,
752
762
  setAdvancedMode: setAdvancedMode,
753
763
  setMask: setMask,
754
- setControlPointMode: setControlPointMode
764
+ setControlPointMode: setControlPointMode,
765
+ getViewImageSize: getViewImageSize
755
766
  });
756
767
  }
757
768
  }, _callee7);
@@ -1,11 +1,13 @@
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
  });
6
7
  exports["default"] = exports.VisualizationSettingsEdit = exports.StyledVisualizationSettingsEdit = void 0;
7
8
  var _react = _interopRequireWildcard(require("react"));
8
9
  var _propTypes = _interopRequireDefault(require("prop-types"));
10
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
9
11
  var _find = _interopRequireDefault(require("lodash/find"));
10
12
  var _findIndex = _interopRequireDefault(require("lodash/findIndex"));
11
13
  var _get = _interopRequireDefault(require("lodash/get"));
@@ -43,9 +45,10 @@ var _FormControlLabel = _interopRequireDefault(require("../../../../../../UIComp
43
45
  var _sendMessage = require("../../../../../../Utils/Function/sendMessage");
44
46
  var _CircularProgress = _interopRequireDefault(require("@material-ui/core/CircularProgress"));
45
47
  var _AreaEditorForm = _interopRequireDefault(require("../../Components/AreaEditorForm"));
48
+ var _TextField = _interopRequireDefault(require("@material-ui/core/TextField"));
49
+ var _excluded = ["classes", "onChange", "value"];
46
50
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
47
51
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t4 in e) "default" !== _t4 && {}.hasOwnProperty.call(e, _t4) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t4)) && (i.get || i.set) ? o(f, _t4, i) : f[_t4] = e[_t4]); return f; })(e, t); }
48
- 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); }
49
52
  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
53
  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; }
51
54
  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 }; })(); }
@@ -65,6 +68,65 @@ function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf
65
68
  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; }
66
69
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
67
70
  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); }
71
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
72
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
73
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
74
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
75
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
76
+ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
77
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
78
+ 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; }
79
+ 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; }
80
+ function persistEvent(fn) {
81
+ return function (evt) {
82
+ evt.persist();
83
+ fn(evt);
84
+ };
85
+ }
86
+ var NumberInput = (0, _withStyles["default"])({
87
+ root: {
88
+ maxWidth: 60
89
+ }
90
+ })(function (_ref) {
91
+ var classes = _ref.classes,
92
+ onChange = _ref.onChange,
93
+ value = _ref.value,
94
+ props = _objectWithoutProperties(_ref, _excluded);
95
+ var _useState = (0, _react.useState)(value),
96
+ _useState2 = _slicedToArray(_useState, 2),
97
+ _value = _useState2[0],
98
+ _setValue = _useState2[1];
99
+ var _useState3 = (0, _react.useState)(false),
100
+ _useState4 = _slicedToArray(_useState3, 2),
101
+ focused = _useState4[0],
102
+ setFocused = _useState4[1];
103
+ var onFocus = function onFocus() {
104
+ return setFocused(true);
105
+ };
106
+ var onBlur = (0, _react.useMemo)(function () {
107
+ return function () {
108
+ _setValue(value);
109
+ setFocused(false);
110
+ };
111
+ }, [value]);
112
+ (0, _react.useEffect)(function () {
113
+ !focused && _setValue(value);
114
+ }, [value, focused]);
115
+ var onChangeDebounced = (0, _react.useMemo)(function () {
116
+ return persistEvent((0, _debounce["default"])(onChange, 50));
117
+ }, [onChange]);
118
+ return /*#__PURE__*/_react["default"].createElement(_TextField["default"], _extends({
119
+ type: "number",
120
+ className: classes.root,
121
+ onChange: function onChange(evt) {
122
+ _setValue(evt.target.value);
123
+ onChangeDebounced(evt);
124
+ },
125
+ onFocus: onFocus,
126
+ onBlur: onBlur,
127
+ value: _value
128
+ }, props));
129
+ });
68
130
  var styles = function styles(theme) {
69
131
  var breakPoint = {
70
132
  max: "@media screen and (max-width:".concat(1144 + 2 * theme.spacing.unit, "px)")
@@ -204,7 +266,14 @@ var styles = function styles(theme) {
204
266
  backgroundColor: 'rgba(255,255,255,0.3)'
205
267
  }
206
268
  },
207
- loaderContainerFullSize: {}
269
+ loaderContainerFullSize: {},
270
+ productSizeControls: {
271
+ display: 'flex',
272
+ flexDirection: 'row',
273
+ gap: "".concat(theme.spacing.unit, "px"),
274
+ alignItems: 'center',
275
+ flexWrap: 'wrap'
276
+ }
208
277
  };
209
278
  };
210
279
  function isKindOf2D(mode) {
@@ -228,7 +297,9 @@ var VisualizationSettingsEdit = exports.VisualizationSettingsEdit = /*#__PURE__*
228
297
  errorMessage: null,
229
298
  errorData: null,
230
299
  loading: true,
231
- advancedMode: false
300
+ advancedMode: false,
301
+ showProductSizeControls: false,
302
+ productVisualizationSize: null
232
303
  });
233
304
  _defineProperty(_this, "host", _network["default"].basePath.replace(/\/$/, ''));
234
305
  _defineProperty(_this, "adapterConfig", (0, _visualizationAdapterCreator.createAdapterConfig)({
@@ -354,6 +425,9 @@ var VisualizationSettingsEdit = exports.VisualizationSettingsEdit = /*#__PURE__*
354
425
  value: function componentDidMount() {
355
426
  if (this.props.item) {
356
427
  this.loadModel();
428
+ this.setState({
429
+ productVisualizationSize: this.readProductVisualizationSize()
430
+ });
357
431
  }
358
432
  }
359
433
  }, {
@@ -469,10 +543,70 @@ var VisualizationSettingsEdit = exports.VisualizationSettingsEdit = /*#__PURE__*
469
543
  y: _height / 2
470
544
  };
471
545
  }
546
+ Object.assign(options, this.calculateBaseShapeSize(designData));
472
547
  return (0, _VisualizationUtils.withDefaultBaseShape)(designData, _objectSpread({
473
548
  ratio: ratio
474
549
  }, options));
475
550
  }
551
+ }, {
552
+ key: "readProductVisualizationSize",
553
+ value: function readProductVisualizationSize() {
554
+ var _item$attributes$find, _item$attributes$find2;
555
+ var item = this.props.item;
556
+ if (!item) {
557
+ return null;
558
+ }
559
+ var width = (_item$attributes$find = item.attributes.find(function (attr) {
560
+ return attr.identifier === '__productvisualizationsize_x';
561
+ })) === null || _item$attributes$find === void 0 || (_item$attributes$find = _item$attributes$find.values) === null || _item$attributes$find === void 0 || (_item$attributes$find = _item$attributes$find[0]) === null || _item$attributes$find === void 0 ? void 0 : _item$attributes$find.value;
562
+ if (width) {
563
+ return {
564
+ value: width,
565
+ dimension: 'width'
566
+ };
567
+ }
568
+ var height = (_item$attributes$find2 = item.attributes.find(function (attr) {
569
+ return attr.identifier === '__productvisualizationsize_y';
570
+ })) === null || _item$attributes$find2 === void 0 || (_item$attributes$find2 = _item$attributes$find2.values) === null || _item$attributes$find2 === void 0 || (_item$attributes$find2 = _item$attributes$find2[0]) === null || _item$attributes$find2 === void 0 ? void 0 : _item$attributes$find2.value;
571
+ if (height) {
572
+ return {
573
+ value: height,
574
+ dimension: 'height'
575
+ };
576
+ }
577
+ return null;
578
+ }
579
+ }, {
580
+ key: "calculateBaseShapeSize",
581
+ value: function calculateBaseShapeSize() {
582
+ var designArea = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.props.designArea;
583
+ var prodVisSize = this.state.productVisualizationSize;
584
+ if (!prodVisSize || !this.baseShapeEditor) {
585
+ return null;
586
+ }
587
+ var prodVisSizeValue = prodVisSize.value,
588
+ prodVisSizeDimension = prodVisSize.dimension;
589
+ var areaWidth = designArea.width,
590
+ areaHeight = designArea.height;
591
+ var _this$baseShapeEditor = this.baseShapeEditor.getViewImageSize(),
592
+ imageWidth = _this$baseShapeEditor.width,
593
+ imageHeight = _this$baseShapeEditor.height;
594
+ if (prodVisSizeDimension === 'width') {
595
+ var ratio = areaWidth / prodVisSizeValue;
596
+ return {
597
+ width: imageWidth * ratio,
598
+ height: imageHeight * ratio
599
+ };
600
+ }
601
+ if (prodVisSizeDimension === 'height') {
602
+ var _ratio = areaHeight / prodVisSizeValue;
603
+ return {
604
+ width: imageWidth * _ratio,
605
+ height: imageHeight * _ratio
606
+ };
607
+ }
608
+ return null;
609
+ }
476
610
  }, {
477
611
  key: "getCurrentMaskObject",
478
612
  value: function getCurrentMaskObject() {
@@ -714,7 +848,7 @@ var VisualizationSettingsEdit = exports.VisualizationSettingsEdit = /*#__PURE__*
714
848
  className: classes.visualizationContainer
715
849
  })), /*#__PURE__*/_react["default"].createElement("div", {
716
850
  className: classes.rightSide
717
- }, this.renderHeader(designAreaData), /*#__PURE__*/_react["default"].createElement(_AdvancedShapeEditor["default"], {
851
+ }, this.renderHeader(designAreaData), this.renderProductSizeControls(), /*#__PURE__*/_react["default"].createElement(_AdvancedShapeEditor["default"], {
718
852
  show: this.state.advancedMode,
719
853
  onToggle: this.toggleAdvancedMode,
720
854
  designAreaData: designAreaData,
@@ -733,6 +867,63 @@ var VisualizationSettingsEdit = exports.VisualizationSettingsEdit = /*#__PURE__*
733
867
  }
734
868
  return null;
735
869
  }
870
+ }, {
871
+ key: "renderProductSizeControls",
872
+ value: function renderProductSizeControls() {
873
+ var _this5 = this;
874
+ var classes = this.props.classes;
875
+ var prodVisSize = this.state.productVisualizationSize;
876
+ return /*#__PURE__*/_react["default"].createElement("div", null, /*#__PURE__*/_react["default"].createElement(_RaisedButton["default"], {
877
+ label: (0, _i18n.t)("designer.productSizeControls.".concat(this.state.showProductSizeControls ? 'closeProductSizeControls' : 'openProductSizeControls')),
878
+ onClick: function onClick() {
879
+ _this5.setState({
880
+ showProductSizeControls: !_this5.state.showProductSizeControls
881
+ });
882
+ }
883
+ }), this.state.showProductSizeControls && /*#__PURE__*/_react["default"].createElement("div", {
884
+ className: classes.productSizeControls
885
+ }, /*#__PURE__*/_react["default"].createElement(_SelectField["default"], {
886
+ onChange: function onChange(evt) {
887
+ _this5.setState({
888
+ productVisualizationSize: _objectSpread(_objectSpread({}, prodVisSize), {}, {
889
+ dimension: evt.target.value
890
+ })
891
+ });
892
+ },
893
+ label: (0, _i18n.T)('designer.productSizeControls.dimension'),
894
+ disableUnderline: true,
895
+ value: prodVisSize.dimension
896
+ }, /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
897
+ value: "width"
898
+ }, (0, _i18n.T)('designer.productSizeControls.width')), /*#__PURE__*/_react["default"].createElement(_MenuItem["default"], {
899
+ value: "height"
900
+ }, (0, _i18n.T)('designer.productSizeControls.height'))), /*#__PURE__*/_react["default"].createElement(NumberInput, {
901
+ label: 'mm',
902
+ name: "productSize",
903
+ value: prodVisSize.value,
904
+ onChange: function onChange(evt) {
905
+ _this5.setState({
906
+ productVisualizationSize: _objectSpread(_objectSpread({}, prodVisSize), {}, {
907
+ value: evt.target.value
908
+ })
909
+ });
910
+ }
911
+ }), /*#__PURE__*/_react["default"].createElement(_RaisedButton["default"], {
912
+ label: (0, _i18n.T)('designer.productSizeControls.readFromItem'),
913
+ onClick: function onClick() {
914
+ _this5.setState({
915
+ productVisualizationSize: _this5.readProductVisualizationSize()
916
+ });
917
+ }
918
+ }), /*#__PURE__*/_react["default"].createElement(_RaisedButton["default"], {
919
+ label: (0, _i18n.T)('designer.productSizeControls.apply'),
920
+ onClick: function onClick() {
921
+ _this5.updateData({
922
+ baseShape: _this5.calculateBaseShapeSize()
923
+ });
924
+ }
925
+ })));
926
+ }
736
927
  }, {
737
928
  key: "render",
738
929
  value: function render() {
@@ -807,31 +998,31 @@ _defineProperty(VisualizationSettingsEdit, "propTypes", {
807
998
  _defineProperty(VisualizationSettingsEdit, "defaultProps", {
808
999
  classes: {}
809
1000
  });
810
- var ErrorComponent = (0, _withStyles["default"])(styles)(function (_ref3) {
811
- var classes = _ref3.classes;
1001
+ var ErrorComponent = (0, _withStyles["default"])(styles)(function (_ref4) {
1002
+ var classes = _ref4.classes;
812
1003
  return /*#__PURE__*/_react["default"].createElement("div", {
813
1004
  className: classes.errors
814
1005
  }, (0, _i18n.T)('designer.visualization.errors.failedToLoadItem'));
815
1006
  });
816
- var LoadingComponent = (0, _withStyles["default"])(styles)(function (_ref4) {
817
- var classes = _ref4.classes,
818
- fullSize = _ref4.fullSize;
1007
+ var LoadingComponent = (0, _withStyles["default"])(styles)(function (_ref5) {
1008
+ var classes = _ref5.classes,
1009
+ fullSize = _ref5.fullSize;
819
1010
  return /*#__PURE__*/_react["default"].createElement("div", {
820
1011
  className: "".concat(classes.loaderContainer, " ").concat(fullSize ? classes.loaderContainerFullSize : '')
821
1012
  }, /*#__PURE__*/_react["default"].createElement(_CircularProgress["default"], null));
822
1013
  });
823
- var StyledVisualizationSettingsEdit = exports.StyledVisualizationSettingsEdit = (0, _withStyles["default"])(styles)((0, _RemappedProps.withRemappedProps)(function (_ref5) {
824
- var entityState = _ref5.entityState;
1014
+ var StyledVisualizationSettingsEdit = exports.StyledVisualizationSettingsEdit = (0, _withStyles["default"])(styles)((0, _RemappedProps.withRemappedProps)(function (_ref6) {
1015
+ var entityState = _ref6.entityState;
825
1016
  return {
826
1017
  itemId: (0, _get["default"])(entityState, 'data.item.value.id') || (0, _get["default"])(entityState, 'source.itemId')
827
1018
  };
828
1019
  })((0, _AsyncProps.withAsyncProps)(/*#__PURE__*/function () {
829
- var _ref7 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(_ref6) {
1020
+ var _ref8 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(_ref7) {
830
1021
  var itemId, _item, item, _t2, _t3;
831
1022
  return _regenerator().w(function (_context5) {
832
1023
  while (1) switch (_context5.n) {
833
1024
  case 0:
834
- itemId = _ref6.itemId, _item = _ref6.item;
1025
+ itemId = _ref7.itemId, _item = _ref7.item;
835
1026
  _t2 = _item;
836
1027
  if (_t2) {
837
1028
  _context5.n = 3;
@@ -857,7 +1048,7 @@ var StyledVisualizationSettingsEdit = exports.StyledVisualizationSettingsEdit =
857
1048
  }, _callee5);
858
1049
  }));
859
1050
  return function (_x) {
860
- return _ref7.apply(this, arguments);
1051
+ return _ref8.apply(this, arguments);
861
1052
  };
862
1053
  }(), ['itemId'], {
863
1054
  renderError: function renderError() {
@@ -866,8 +1057,8 @@ var StyledVisualizationSettingsEdit = exports.StyledVisualizationSettingsEdit =
866
1057
  renderLoading: function renderLoading() {
867
1058
  return /*#__PURE__*/_react["default"].createElement(LoadingComponent, null);
868
1059
  }
869
- })((0, _RemappedProps.withRemappedProps)(function (_ref8) {
870
- var item = _ref8.item;
1060
+ })((0, _RemappedProps.withRemappedProps)(function (_ref9) {
1061
+ var item = _ref9.item;
871
1062
  var mode = (0, _get["default"])(item, 'visualizationMode.identifier', 'default');
872
1063
  return {
873
1064
  mode: mode
@@ -37,6 +37,15 @@ require("../../../../App/i18n").use({
37
37
  },
38
38
  designArea: {
39
39
  isDefaultView: 'Ist Standardansicht für die gewählte Designfläche'
40
+ },
41
+ productSizeControls: {
42
+ dimension: 'Größe',
43
+ openProductSizeControls: 'Größensteuerung öffnen',
44
+ closeProductSizeControls: 'Größensteuerung schließen',
45
+ width: 'Breite',
46
+ height: 'Höhe',
47
+ readFromItem: 'Aus Artikel auslesen',
48
+ apply: 'Anwenden'
40
49
  }
41
50
  }
42
51
  },
@@ -76,6 +85,15 @@ require("../../../../App/i18n").use({
76
85
  },
77
86
  designArea: {
78
87
  isDefaultView: 'Is default view for the selected designarea'
88
+ },
89
+ productSizeControls: {
90
+ dimension: 'Dimension',
91
+ openProductSizeControls: 'Set by product size',
92
+ closeProductSizeControls: 'Close producct size controls',
93
+ width: 'Width',
94
+ height: 'Height',
95
+ readFromItem: 'Read from item',
96
+ apply: 'Apply'
79
97
  }
80
98
  }
81
99
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@configuratorware/configurator-admingui",
3
- "version": "1.55.5",
3
+ "version": "1.55.7",
4
4
  "license": "UNLICENSED",
5
5
  "private": false,
6
6
  "dependencies": {
7
7
  "@babel/polyfill": "^7.12.1",
8
- "@configuratorware/scripts": "1.55.5",
8
+ "@configuratorware/scripts": "1.55.7",
9
9
  "@material-ui/core": "^3.9.4",
10
10
  "@material-ui/icons": "^3.0.2",
11
11
  "@tweenjs/tween.js": "^17.6.0",
@@ -29,7 +29,7 @@
29
29
  "react-redux-i18n": "^1.9.3",
30
30
  "react-router": "^3.2.6",
31
31
  "react-sortable-hoc": "^1.11.0",
32
- "redhotmagma-visualization": "1.55.5",
32
+ "redhotmagma-visualization": "1.55.7",
33
33
  "redux": "^4.1.0",
34
34
  "redux-logger": "^3.0.6",
35
35
  "redux-persist": "^5.10.0",