kitchen-simulator 1.1.1-test.30 → 1.1.1-test.31

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 (106) hide show
  1. package/es/KitchenConfigurator.js +28 -27
  2. package/es/KitchenConfiguratorApp.js +33 -35
  3. package/es/catalog/catalog.js +2 -2
  4. package/es/catalog/molding/molding-dcm/planner-element.js +2 -0
  5. package/es/catalog/molding/molding-fbm/planner-element.js +2 -0
  6. package/es/catalog/molding/molding-lrm/planner-element.js +2 -0
  7. package/es/catalog/properties/property-checkbox.js +72 -26
  8. package/es/catalog/properties/property-color.js +10 -12
  9. package/es/catalog/properties/property-enum.js +58 -16
  10. package/es/catalog/properties/property-hidden.js +10 -11
  11. package/es/catalog/properties/property-lenght-measure.js +15 -16
  12. package/es/catalog/properties/property-length-measure.js +69 -21
  13. package/es/catalog/properties/property-length-measure_hole.js +15 -16
  14. package/es/catalog/properties/property-number.js +10 -11
  15. package/es/catalog/properties/property-read-only.js +9 -10
  16. package/es/catalog/properties/property-string.js +9 -10
  17. package/es/catalog/properties/property-toggle.js +10 -11
  18. package/es/components/content.js +11 -11
  19. package/es/components/disclaimer/disclaimer.js +86 -66
  20. package/es/components/style/button.js +7 -8
  21. package/es/components/style/content-container.js +1 -2
  22. package/es/components/style/content-title.js +1 -1
  23. package/es/components/style/form-number-input.js +50 -25
  24. package/es/components/style/form-number-input_2.js +17 -16
  25. package/es/components/style/form-select.js +55 -6
  26. package/es/components/style/form-text-input.js +30 -10
  27. package/es/components/viewer2d/area.js +6 -7
  28. package/es/components/viewer2d/grids/grid-horizontal-streak.js +7 -7
  29. package/es/components/viewer2d/grids/grid-streak.js +7 -7
  30. package/es/components/viewer2d/grids/grid-vertical-streak.js +7 -7
  31. package/es/components/viewer2d/grids/grids.js +4 -6
  32. package/es/components/viewer2d/group.js +10 -12
  33. package/es/components/viewer2d/item.js +14 -14
  34. package/es/components/viewer2d/layer.js +7 -8
  35. package/es/components/viewer2d/line.js +7 -8
  36. package/es/components/viewer2d/ruler.js +8 -8
  37. package/es/components/viewer2d/rulerDist.js +6 -7
  38. package/es/components/viewer2d/rulerX.js +17 -17
  39. package/es/components/viewer2d/rulerY.js +15 -15
  40. package/es/components/viewer2d/scene.js +12 -10
  41. package/es/components/viewer2d/snap.js +6 -7
  42. package/es/components/viewer2d/state.js +6 -7
  43. package/es/components/viewer2d/utils.js +1 -1
  44. package/es/components/viewer2d/vertex.js +5 -6
  45. package/es/components/viewer2d/viewer2d.js +16 -18
  46. package/es/components/viewer3d/front3D.js +1 -1
  47. package/es/components/viewer3d/grids/grid-streak.js +1 -0
  48. package/es/components/viewer3d/ruler-utils/layer3D.js +1 -1
  49. package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -1
  50. package/es/components/viewer3d/ruler-utils/scene3D.js +1 -0
  51. package/es/components/viewer3d/viewer3d-first-person.js +16 -15
  52. package/es/components/viewer3d/viewer3d.js +18 -17
  53. package/es/utils/geometry.js +3 -3
  54. package/es/utils/react-if.js +5 -6
  55. package/es/utils/snap-scene.js +2 -2
  56. package/es/utils/snap.js +1 -1
  57. package/lib/KitchenConfigurator.js +29 -27
  58. package/lib/KitchenConfiguratorApp.js +34 -35
  59. package/lib/catalog/molding/molding-dcm/planner-element.js +5 -0
  60. package/lib/catalog/molding/molding-fbm/planner-element.js +5 -0
  61. package/lib/catalog/molding/molding-lrm/planner-element.js +5 -0
  62. package/lib/catalog/properties/property-checkbox.js +73 -26
  63. package/lib/catalog/properties/property-color.js +9 -11
  64. package/lib/catalog/properties/property-enum.js +58 -15
  65. package/lib/catalog/properties/property-hidden.js +11 -11
  66. package/lib/catalog/properties/property-lenght-measure.js +15 -15
  67. package/lib/catalog/properties/property-length-measure.js +69 -20
  68. package/lib/catalog/properties/property-length-measure_hole.js +15 -15
  69. package/lib/catalog/properties/property-number.js +10 -12
  70. package/lib/catalog/properties/property-read-only.js +9 -11
  71. package/lib/catalog/properties/property-string.js +9 -11
  72. package/lib/catalog/properties/property-toggle.js +9 -11
  73. package/lib/components/content.js +11 -12
  74. package/lib/components/disclaimer/disclaimer.js +86 -66
  75. package/lib/components/style/button.js +9 -8
  76. package/lib/components/style/content-container.js +4 -5
  77. package/lib/components/style/content-title.js +3 -2
  78. package/lib/components/style/form-number-input.js +50 -24
  79. package/lib/components/style/form-number-input_2.js +19 -16
  80. package/lib/components/style/form-select.js +55 -6
  81. package/lib/components/style/form-text-input.js +30 -11
  82. package/lib/components/viewer2d/area.js +6 -8
  83. package/lib/components/viewer2d/grids/grid-horizontal-streak.js +7 -8
  84. package/lib/components/viewer2d/grids/grid-streak.js +7 -8
  85. package/lib/components/viewer2d/grids/grid-vertical-streak.js +7 -8
  86. package/lib/components/viewer2d/grids/grids.js +5 -5
  87. package/lib/components/viewer2d/group.js +10 -13
  88. package/lib/components/viewer2d/item.js +12 -12
  89. package/lib/components/viewer2d/layer.js +6 -8
  90. package/lib/components/viewer2d/line.js +7 -9
  91. package/lib/components/viewer2d/ruler.js +7 -8
  92. package/lib/components/viewer2d/rulerDist.js +6 -8
  93. package/lib/components/viewer2d/rulerX.js +19 -17
  94. package/lib/components/viewer2d/rulerY.js +17 -15
  95. package/lib/components/viewer2d/scene.js +13 -9
  96. package/lib/components/viewer2d/snap.js +6 -8
  97. package/lib/components/viewer2d/state.js +7 -7
  98. package/lib/components/viewer2d/vertex.js +5 -7
  99. package/lib/components/viewer2d/viewer2d.js +17 -18
  100. package/lib/components/viewer3d/grids/grid-streak.js +1 -0
  101. package/lib/components/viewer3d/ruler-utils/scene3D.js +1 -0
  102. package/lib/components/viewer3d/viewer3d-first-person.js +16 -14
  103. package/lib/components/viewer3d/viewer3d.js +18 -16
  104. package/lib/utils/geometry.js +1 -1
  105. package/lib/utils/react-if.js +5 -7
  106. package/package.json +5 -24
@@ -1,19 +1,68 @@
1
+ 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); }
1
2
  var _excluded = ["children", "style"];
2
- var _templateObject;
3
3
  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); }
4
+ 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; }
5
+ 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; }
6
+ 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; }
7
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
8
+ 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); }
9
+ function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
10
+ 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."); }
11
+ 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; } }
12
+ 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; }
13
+ 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; } }
14
+ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
4
15
  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; }
5
16
  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; }
6
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
7
17
  import React from 'react';
8
- import styled from 'styled-components';
9
18
  import { DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_3 } from "../../constants";
10
- var StyledSelect = styled.select(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n width: 120px;\n float: right;\n padding: 15px 10px 12px 0px;\n color: ", ";\n border: 2px solid;\n font-family: ", ";\n font-size: 12px;\n font-weight: 600;\n line-height: 17px;\n text-align: right;\n outline: none;\n border-radius: 5px;\n :hover {\n border-color: ", ";\n }\n :focus {\n border-color: ", ";\n }\n"])), TEXT_COLOR_NEUTRAL_3, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, SECONDARY_PURPLE_COLOR);
19
+ var styles = {
20
+ select: {
21
+ display: 'block',
22
+ width: 120,
23
+ "float": 'right',
24
+ padding: '15px 10px 12px 0px',
25
+ color: TEXT_COLOR_NEUTRAL_3,
26
+ border: '2px solid',
27
+ fontFamily: DEFAULT_FONT_FAMILY,
28
+ fontSize: 12,
29
+ fontWeight: 600,
30
+ lineHeight: '17px',
31
+ textAlign: 'right',
32
+ outline: 'none',
33
+ borderRadius: 5,
34
+ transition: 'border-color 0.2s'
35
+ }
36
+ };
11
37
  export default function FormSelect(_ref) {
12
38
  var children = _ref.children,
13
39
  style = _ref.style,
14
40
  rest = _objectWithoutProperties(_ref, _excluded);
15
- return /*#__PURE__*/React.createElement(StyledSelect, _extends({
41
+ var _React$useState = React.useState(false),
42
+ _React$useState2 = _slicedToArray(_React$useState, 2),
43
+ focus = _React$useState2[0],
44
+ setFocus = _React$useState2[1];
45
+ var _React$useState3 = React.useState(false),
46
+ _React$useState4 = _slicedToArray(_React$useState3, 2),
47
+ hover = _React$useState4[0],
48
+ setHover = _React$useState4[1];
49
+ var borderColor = focus || hover ? SECONDARY_PURPLE_COLOR : undefined;
50
+ return /*#__PURE__*/React.createElement("select", _extends({
16
51
  type: "text",
17
- style: style
52
+ style: _objectSpread(_objectSpread({}, styles.select), {}, {
53
+ borderColor: borderColor
54
+ }, style),
55
+ onFocus: function onFocus() {
56
+ return setFocus(true);
57
+ },
58
+ onBlur: function onBlur() {
59
+ return setFocus(false);
60
+ },
61
+ onMouseEnter: function onMouseEnter() {
62
+ return setHover(true);
63
+ },
64
+ onMouseLeave: function onMouseLeave() {
65
+ return setHover(false);
66
+ }
18
67
  }, rest), children);
19
68
  }
@@ -1,7 +1,9 @@
1
1
  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); }
2
2
  var _excluded = ["style"];
3
- var _templateObject;
4
3
  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); }
4
+ 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; }
5
+ 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; }
6
+ 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; }
5
7
  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; }
6
8
  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; }
7
9
  function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
@@ -16,11 +18,27 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
16
18
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
17
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); }
18
20
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
19
- function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
20
21
  import React, { Component } from 'react';
21
22
  import { BG_COLOR_0, DEFAULT_FONT_FAMILY, PROJECT_NAME_LENGTH_LIMIT, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_3 } from "../../constants";
22
- import styled from 'styled-components';
23
- var StyledInput = styled.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n padding: 15px 10px 12px 0px;\n width: 120px;\n font-family: ", ";\n font-size: 12px;\n font-weight: 600;\n line-height: 17px;\n color: ", ";\n background-color: ", ";\n border: 2px solid;\n text-align: right;\n float: right;\n border-radius: 5px;\n outline: 0;\n :focus {\n border-color: ", ";\n }\n"])), DEFAULT_FONT_FAMILY, TEXT_COLOR_NEUTRAL_3, BG_COLOR_0, SECONDARY_PURPLE_COLOR);
23
+ var styles = {
24
+ input: {
25
+ display: 'block',
26
+ padding: '15px 10px 12px 0px',
27
+ width: 120,
28
+ fontFamily: DEFAULT_FONT_FAMILY,
29
+ fontSize: 12,
30
+ fontWeight: 600,
31
+ lineHeight: '17px',
32
+ color: TEXT_COLOR_NEUTRAL_3,
33
+ backgroundColor: BG_COLOR_0,
34
+ border: '2px solid',
35
+ textAlign: 'right',
36
+ "float": 'right',
37
+ borderRadius: 5,
38
+ outline: 0,
39
+ transition: 'border-color 0.2s'
40
+ }
41
+ };
24
42
  var FormTextInput = /*#__PURE__*/function (_Component) {
25
43
  function FormTextInput(props) {
26
44
  var _this;
@@ -47,21 +65,23 @@ var FormTextInput = /*#__PURE__*/function (_Component) {
47
65
  var _this$props = this.props,
48
66
  style = _this$props.style,
49
67
  rest = _objectWithoutProperties(_this$props, _excluded);
50
- return /*#__PURE__*/React.createElement(StyledInput, _extends({
68
+ var focus = this.state.focus;
69
+ var inputStyle = _objectSpread(_objectSpread({}, styles.input), {}, {
70
+ borderColor: focus ? SECONDARY_PURPLE_COLOR : undefined
71
+ }, style);
72
+ return /*#__PURE__*/React.createElement("input", _extends({
51
73
  ref: this.input,
52
- onFocus: function onFocus(e) {
74
+ onFocus: function onFocus() {
53
75
  return _this2.setState({
54
76
  focus: true
55
77
  });
56
78
  },
57
- onBlur: function onBlur(e) {
79
+ onBlur: function onBlur() {
58
80
  return _this2.setState({
59
81
  focus: false
60
82
  });
61
83
  },
62
- style: style
63
- // autoFocus
64
- ,
84
+ style: inputStyle,
65
85
  type: "text"
66
86
  }, rest, {
67
87
  maxLength: PROJECT_NAME_LENGTH_LIMIT
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import polylabel from 'polylabel';
4
4
  import areapolygon from 'area-polygon';
5
5
  import convert from 'convert-units';
@@ -74,9 +74,8 @@ export default function Area(_ref) {
74
74
  }
75
75
  }, rendered, renderedAreaSize);
76
76
  }
77
-
78
- // Area.propTypes = {
79
- // area: PropTypes.object.isRequired,
80
- // layer: PropTypes.object.isRequired,
81
- // catalog: PropTypes.object.isRequired
82
- // };
77
+ Area.propTypes = {
78
+ area: PropTypes.object.isRequired,
79
+ layer: PropTypes.object.isRequired,
80
+ catalog: PropTypes.object.isRequired
81
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import { List } from 'immutable';
4
+ import convert from 'convert-units';
4
5
  export default function GridHorizontalStreak(_ref) {
5
6
  var width = _ref.width,
6
7
  height = _ref.height,
@@ -29,9 +30,8 @@ export default function GridHorizontalStreak(_ref) {
29
30
  }
30
31
  return /*#__PURE__*/React.createElement("g", null, rendered);
31
32
  }
32
-
33
- // GridHorizontalStreak.propTypes = {
34
- // width: PropTypes.number.isRequired,
35
- // height: PropTypes.number.isRequired,
36
- // grid: PropTypes.object.isRequired
37
- // };
33
+ GridHorizontalStreak.propTypes = {
34
+ width: PropTypes.number.isRequired,
35
+ height: PropTypes.number.isRequired,
36
+ grid: PropTypes.object.isRequired
37
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import { List } from 'immutable';
4
+ import convert from 'convert-units';
4
5
  export default function GridStreak(_ref) {
5
6
  var width = _ref.width,
6
7
  height = _ref.height,
@@ -29,9 +30,8 @@ export default function GridStreak(_ref) {
29
30
  }
30
31
  return /*#__PURE__*/React.createElement("g", null, rendered);
31
32
  }
32
-
33
- // GridStreak.propTypes = {
34
- // width: PropTypes.number.isRequired,
35
- // height: PropTypes.number.isRequired,
36
- // grid: PropTypes.object.isRequired
37
- // };
33
+ GridStreak.propTypes = {
34
+ width: PropTypes.number.isRequired,
35
+ height: PropTypes.number.isRequired,
36
+ grid: PropTypes.object.isRequired
37
+ };
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import { List } from 'immutable';
4
+ import convert from 'convert-units';
4
5
  export default function GridVerticalStreak(_ref) {
5
6
  var width = _ref.width,
6
7
  height = _ref.height,
@@ -29,9 +30,8 @@ export default function GridVerticalStreak(_ref) {
29
30
  }
30
31
  return /*#__PURE__*/React.createElement("g", null, rendered);
31
32
  }
32
-
33
- // GridVerticalStreak.propTypes = {
34
- // width: PropTypes.number.isRequired,
35
- // height: PropTypes.number.isRequired,
36
- // grid: PropTypes.object.isRequired
37
- // };
33
+ GridVerticalStreak.propTypes = {
34
+ width: PropTypes.number.isRequired,
35
+ height: PropTypes.number.isRequired,
36
+ grid: PropTypes.object.isRequired
37
+ };
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
5
5
  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; } }
6
6
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
7
  import React, { memo } from 'react';
8
- //import PropTypes from 'prop-types';
8
+ import PropTypes from 'prop-types';
9
9
  import GridStreak from "./grid-streak";
10
10
  var propsAreEqual = function propsAreEqual(oldScene, newScene) {
11
11
  return oldScene.scene.width === newScene.scene.width && oldScene.scene.height === newScene.scene.height && oldScene.scene.grids === newScene.scene.grids;
@@ -29,9 +29,7 @@ var drawGrid = function drawGrid(_ref) {
29
29
  return /*#__PURE__*/React.createElement("g", null, renderedGrids);
30
30
  };
31
31
  var Grids = /*#__PURE__*/memo(drawGrid, propsAreEqual);
32
-
33
- // Grids.propTypes = {
34
- // scene: PropTypes.object.isRequired
35
- // };
36
-
32
+ Grids.propTypes = {
33
+ scene: PropTypes.object.isRequired
34
+ };
37
35
  export default Grids;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import If from "../../utils/react-if";
4
4
  import * as sharedStyles from "../../shared-style";
5
5
  var cx = 0;
@@ -42,14 +42,12 @@ export default function Group(_ref, _ref2) {
42
42
  style: STYLE_CIRCLE
43
43
  }, /*#__PURE__*/React.createElement("title", null, translator.t("Group's Barycenter"))))));
44
44
  }
45
-
46
- // Group.propTypes = {
47
- // group: PropTypes.object.isRequired,
48
- // layer: PropTypes.object.isRequired,
49
- // scene: PropTypes.object.isRequired,
50
- // catalog: PropTypes.object.isRequired
51
- // };
52
-
53
- // Group.contextTypes = {
54
- // translator: PropTypes.object.isRequired
55
- // };
45
+ Group.propTypes = {
46
+ group: PropTypes.object.isRequired,
47
+ layer: PropTypes.object.isRequired,
48
+ scene: PropTypes.object.isRequired,
49
+ catalog: PropTypes.object.isRequired
50
+ };
51
+ Group.contextTypes = {
52
+ translator: PropTypes.object.isRequired
53
+ };
@@ -4,12 +4,14 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
4
4
  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; }
5
5
  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; } }
6
6
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
- import React, { useState } from 'react';
8
- //import PropTypes from 'prop-types';
7
+ import React from 'react';
8
+ import { useState } from 'react';
9
+ import PropTypes from 'prop-types';
10
+ import If from "../../utils/react-if";
9
11
  import RulerDist from "./rulerDist";
10
12
  import convert from 'convert-units';
11
13
  import { GeometryUtils } from "../../utils/export";
12
- import { MODE_ROTATING_ITEM, WALL_CABINET_LAYOUTPOS } from "../../constants";
14
+ import { MODE_ROTATING_ITEM, SECONDARY_PURPLE_COLOR, STATUS_NEGATIVE_COLOR, BG_COLOR_1, STATUS_WARNING_COLOR, WALL_CABINET_LAYOUTPOS } from "../../constants";
13
15
  import { returnReplaceableDeepSearchType } from "./utils";
14
16
  var STYLE_LINE = {
15
17
  fill: '#0096fd',
@@ -500,14 +502,12 @@ export default function Item(_ref, _ref2) {
500
502
  }
501
503
  }, measure ? renderedRuler : null, parts, warning_buttons));
502
504
  }
503
-
504
- // Item.propTypes = {
505
- // item: PropTypes.object.isRequired,
506
- // layer: PropTypes.object.isRequired,
507
- // scene: PropTypes.object.isRequired,
508
- // catalog: PropTypes.object.isRequired
509
- // };
510
-
511
- // Item.contextTypes = {
512
- // itemsActions: PropTypes.object.isRequired
513
- // };
505
+ Item.propTypes = {
506
+ item: PropTypes.object.isRequired,
507
+ layer: PropTypes.object.isRequired,
508
+ scene: PropTypes.object.isRequired,
509
+ catalog: PropTypes.object.isRequired
510
+ };
511
+ Item.contextTypes = {
512
+ itemsActions: PropTypes.object.isRequired
513
+ };
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
3
- import { Area, Group, Item, Line, Vertex } from "./export";
2
+ import PropTypes from 'prop-types';
3
+ import { Line, Area, Vertex, Item, Group } from "./export";
4
4
  import { GeometryUtils } from "../../utils/export";
5
5
  import { MODE_DRAWING_LINE, WALL_CABINET_LAYOUTPOS } from "../../constants";
6
6
  import { returnReplaceableDeepSearchType } from "./utils";
@@ -157,9 +157,8 @@ export default function Layer(_ref) {
157
157
  });
158
158
  }));
159
159
  }
160
-
161
- // Layer.propTypes = {
162
- // layer: PropTypes.object.isRequired,
163
- // scene: PropTypes.object.isRequired,
164
- // catalog: PropTypes.object.isRequired
165
- // };
160
+ Layer.propTypes = {
161
+ layer: PropTypes.object.isRequired,
162
+ scene: PropTypes.object.isRequired,
163
+ catalog: PropTypes.object.isRequired
164
+ };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import { GeometryUtils } from "../../utils/export";
4
4
  import Ruler from "./ruler";
5
5
  import { BASE_CABINET_LAYOUTPOS, LINE_THICKNESS, WALL_CABINET_LAYOUTPOS } from "../../constants";
@@ -874,10 +874,9 @@ export default function Line(_ref) {
874
874
  "data-part": "remove"
875
875
  }));
876
876
  }
877
-
878
- // Line.propTypes = {
879
- // line: PropTypes.object.isRequired,
880
- // layer: PropTypes.object.isRequired,
881
- // scene: PropTypes.object.isRequired,
882
- // catalog: PropTypes.object.isRequired
883
- // };
877
+ Line.propTypes = {
878
+ line: PropTypes.object.isRequired,
879
+ layer: PropTypes.object.isRequired,
880
+ scene: PropTypes.object.isRequired,
881
+ catalog: PropTypes.object.isRequired
882
+ };
@@ -1,8 +1,9 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import convert from 'convert-units';
4
4
  import IDBroker from "../../utils/id-broker";
5
- import { LINE_THICKNESS, TEXT_COLOR_NEUTRAL_7 } from "../../constants";
5
+ import { FormNumberInput2 } from "../style/export";
6
+ import { LINE_THICKNESS, SHADE_LIGHT_BLUE_COLOR, TEXT_COLOR_NEUTRAL_7 } from "../../constants";
6
7
  var STYLE = {
7
8
  stroke: TEXT_COLOR_NEUTRAL_7,
8
9
  strokeWidth: '1px'
@@ -92,9 +93,8 @@ export default function Ruler(_ref) {
92
93
  style: STYLE
93
94
  }));
94
95
  }
95
-
96
- // Ruler.propTypes = {
97
- // length: PropTypes.number.isRequired,
98
- // unit: PropTypes.string.isRequired,
99
- // transform: PropTypes.string.isRequired
100
- // };
96
+ Ruler.propTypes = {
97
+ length: PropTypes.number.isRequired,
98
+ unit: PropTypes.string.isRequired,
99
+ transform: PropTypes.string.isRequired
100
+ };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import convert from 'convert-units';
4
4
  var ARROW_STYLE = {
5
5
  stroke: '#1183B7',
@@ -139,9 +139,8 @@ export default function RulerDist(_ref) {
139
139
  }));
140
140
  }
141
141
  }
142
-
143
- // RulerDist.propTypes = {
144
- // length: PropTypes.number.isRequired,
145
- // unit: PropTypes.string.isRequired,
146
- // transform: PropTypes.string.isRequired
147
- // };
142
+ RulerDist.propTypes = {
143
+ length: PropTypes.number.isRequired,
144
+ unit: PropTypes.string.isRequired,
145
+ transform: PropTypes.string.isRequired
146
+ };
@@ -15,7 +15,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
15
15
  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); }
16
16
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
17
17
  import React, { Component } from 'react';
18
- //import PropTypes from 'prop-types';
18
+ import PropTypes from 'prop-types';
19
19
  import * as SharedStyle from "../../shared-style";
20
20
  var RulerX = /*#__PURE__*/function (_Component) {
21
21
  function RulerX(props, context) {
@@ -125,19 +125,20 @@ var RulerX = /*#__PURE__*/function (_Component) {
125
125
  }, positiveDomElements));
126
126
  }
127
127
  }]);
128
- }(Component); // RulerX.propTypes = {
129
- // unitPixelSize: PropTypes.number.isRequired,
130
- // positiveUnitsNumber: PropTypes.number,
131
- // negativeUnitsNumber: PropTypes.number,
132
- // zoom: PropTypes.number.isRequired,
133
- // mouseX: PropTypes.number.isRequired,
134
- // width: PropTypes.number.isRequired,
135
- // zeroLeftPosition: PropTypes.number.isRequired,
136
- // backgroundColor: PropTypes.string,
137
- // fontColor: PropTypes.string,
138
- // markerColor: PropTypes.string
139
- // };
128
+ }(Component);
140
129
  export { RulerX as default };
130
+ RulerX.propTypes = {
131
+ unitPixelSize: PropTypes.number.isRequired,
132
+ positiveUnitsNumber: PropTypes.number,
133
+ negativeUnitsNumber: PropTypes.number,
134
+ zoom: PropTypes.number.isRequired,
135
+ mouseX: PropTypes.number.isRequired,
136
+ width: PropTypes.number.isRequired,
137
+ zeroLeftPosition: PropTypes.number.isRequired,
138
+ backgroundColor: PropTypes.string,
139
+ fontColor: PropTypes.string,
140
+ markerColor: PropTypes.string
141
+ };
141
142
  RulerX.defaultProps = {
142
143
  positiveUnitsNumber: 50,
143
144
  negativeUnitsNumber: 50,
@@ -145,7 +146,6 @@ RulerX.defaultProps = {
145
146
  fontColor: SharedStyle.COLORS.white,
146
147
  markerColor: SharedStyle.SECONDARY_COLOR.main
147
148
  };
148
-
149
- // RulerX.contextTypes = {
150
- // translator: PropTypes.object.isRequired
151
- // };
149
+ RulerX.contextTypes = {
150
+ translator: PropTypes.object.isRequired
151
+ };
@@ -15,7 +15,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
15
15
  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); }
16
16
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
17
17
  import React, { Component } from 'react';
18
- //import PropTypes from 'prop-types';
18
+ import PropTypes from 'prop-types';
19
19
  import * as SharedStyle from "../../shared-style";
20
20
  var RulerY = /*#__PURE__*/function (_Component) {
21
21
  function RulerY(props, context) {
@@ -129,17 +129,18 @@ var RulerY = /*#__PURE__*/function (_Component) {
129
129
  }, positiveDomElements));
130
130
  }
131
131
  }]);
132
- }(Component); // RulerY.propTypes = {
133
- // unitPixelSize: PropTypes.number.isRequired,
134
- // zoom: PropTypes.number.isRequired,
135
- // mouseY: PropTypes.number.isRequired,
136
- // height: PropTypes.number.isRequired,
137
- // zeroTopPosition: PropTypes.number.isRequired,
138
- // backgroundColor: PropTypes.string,
139
- // fontColor: PropTypes.string,
140
- // markerColor: PropTypes.string
141
- // };
132
+ }(Component);
142
133
  export { RulerY as default };
134
+ RulerY.propTypes = {
135
+ unitPixelSize: PropTypes.number.isRequired,
136
+ zoom: PropTypes.number.isRequired,
137
+ mouseY: PropTypes.number.isRequired,
138
+ height: PropTypes.number.isRequired,
139
+ zeroTopPosition: PropTypes.number.isRequired,
140
+ backgroundColor: PropTypes.string,
141
+ fontColor: PropTypes.string,
142
+ markerColor: PropTypes.string
143
+ };
143
144
  RulerY.defaultProps = {
144
145
  positiveUnitsNumber: 50,
145
146
  negativeUnitsNumber: 50,
@@ -147,7 +148,6 @@ RulerY.defaultProps = {
147
148
  fontColor: SharedStyle.COLORS.white,
148
149
  markerColor: SharedStyle.SECONDARY_COLOR.main
149
150
  };
150
-
151
- // RulerY.contextTypes = {
152
- // translator: PropTypes.object.isRequired
153
- // };
151
+ RulerY.contextTypes = {
152
+ translator: PropTypes.object.isRequired
153
+ };
@@ -22,7 +22,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
22
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
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
  import React, { Component } from 'react';
25
- //import PropTypes from 'prop-types';
25
+ import PropTypes from 'prop-types';
26
26
  import { Grids, Layer } from "./export";
27
27
  var Scene = /*#__PURE__*/function (_Component) {
28
28
  function Scene() {
@@ -42,6 +42,7 @@ var Scene = /*#__PURE__*/function (_Component) {
42
42
  if (this.props.scene.hashCode() !== nextProps.scene.hashCode()) {
43
43
  scene = nextProps.scene, catalog = nextProps.catalog;
44
44
  height = scene.height, layers = scene.layers;
45
+ console.log(layers.toJS());
45
46
  selectedLayer = layers.get(scene.selectedLayer);
46
47
  msg = '';
47
48
  isNotFoundInElements = false;
@@ -127,12 +128,13 @@ var Scene = /*#__PURE__*/function (_Component) {
127
128
  }));
128
129
  }
129
130
  }]);
130
- }(Component); // Scene.propTypes = {
131
- // scene: PropTypes.object.isRequired,
132
- // catalog: PropTypes.object.isRequired,
133
- // relatedLines: PropTypes.object.isRequired
134
- // };
135
- // Scene.contextTypes = {
136
- // projectActions: PropTypes.object.isRequired
137
- // };
138
- export { Scene as default };
131
+ }(Component);
132
+ export { Scene as default };
133
+ Scene.propTypes = {
134
+ scene: PropTypes.object.isRequired,
135
+ catalog: PropTypes.object.isRequired,
136
+ relatedLines: PropTypes.object.isRequired
137
+ };
138
+ Scene.contextTypes = {
139
+ projectActions: PropTypes.object.isRequired
140
+ };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- //import PropTypes from 'prop-types';
2
+ import PropTypes from 'prop-types';
3
3
  import * as Geometry from "../../utils/geometry";
4
4
  var STYLE = {
5
5
  stroke: '#D32F2F',
@@ -67,9 +67,8 @@ export default function ActiveDrawingHelper(_ref) {
67
67
  return null;
68
68
  }
69
69
  }
70
-
71
- // ActiveDrawingHelper.propTypes = {
72
- // snap: PropTypes.object.isRequired,
73
- // width: PropTypes.number.isRequired,
74
- // height: PropTypes.number.isRequired
75
- // };
70
+ ActiveDrawingHelper.propTypes = {
71
+ snap: PropTypes.object.isRequired,
72
+ width: PropTypes.number.isRequired,
73
+ height: PropTypes.number.isRequired
74
+ };
@@ -5,7 +5,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
5
5
  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; } }
6
6
  function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
7
7
  import React from 'react';
8
- //import PropTypes from 'prop-types';
8
+ import PropTypes from 'prop-types';
9
9
  import Scene from "./scene";
10
10
  import Snap from "./snap";
11
11
  import * as SharedStyle from "../../shared-style";
@@ -71,9 +71,8 @@ export default function State(_ref) {
71
71
  });
72
72
  }), activeSnapElement, snapElements));
73
73
  }
74
-
75
- // State.propTypes = {
76
- // state: PropTypes.object.isRequired,
77
- // catalog: PropTypes.object.isRequired,
78
- // relatedLines: PropTypes.object.isRequired
79
- // };
74
+ State.propTypes = {
75
+ state: PropTypes.object.isRequired,
76
+ catalog: PropTypes.object.isRequired,
77
+ relatedLines: PropTypes.object.isRequired
78
+ };