kitchen-simulator 1.1.1-test.20 → 1.1.1-test.22
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.
- package/es/KitchenConfigurator.js +1 -1
- package/es/KitchenConfiguratorApp.js +1 -1
- package/es/catalog/properties/property-checkbox.js +1 -3
- package/es/catalog/properties/property-color.js +1 -1
- package/es/catalog/properties/property-enum.js +1 -1
- package/es/catalog/properties/property-hidden.js +1 -1
- package/es/catalog/properties/property-lenght-measure.js +1 -1
- package/es/catalog/properties/property-length-measure.js +1 -1
- package/es/catalog/properties/property-length-measure_hole.js +1 -1
- package/es/catalog/properties/property-number.js +1 -1
- package/es/catalog/properties/property-read-only.js +1 -1
- package/es/catalog/properties/property-string.js +1 -1
- package/es/catalog/properties/property-toggle.js +1 -1
- package/es/class/item.js +7 -9
- package/es/components/content.js +1 -1
- package/es/components/style/button.js +1 -1
- package/es/components/style/content-container.js +1 -1
- package/es/components/style/content-title.js +1 -1
- package/es/components/style/form-number-input.js +1 -1
- package/es/components/style/form-number-input_2.js +1 -1
- package/es/components/viewer2d/area.js +1 -1
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +1 -1
- package/es/components/viewer2d/grids/grid-streak.js +1 -1
- package/es/components/viewer2d/grids/grid-vertical-streak.js +1 -1
- package/es/components/viewer2d/grids/grids.js +1 -1
- package/es/components/viewer2d/group.js +1 -1
- package/es/components/viewer2d/item.js +1 -1
- package/es/components/viewer2d/layer.js +1 -1
- package/es/components/viewer2d/line.js +1 -1
- package/es/components/viewer2d/ruler.js +1 -1
- package/es/components/viewer2d/rulerDist.js +1 -1
- package/es/components/viewer2d/rulerX.js +1 -1
- package/es/components/viewer2d/rulerY.js +1 -1
- package/es/components/viewer2d/scene.js +1 -1
- package/es/components/viewer2d/snap.js +1 -1
- package/es/components/viewer2d/state.js +1 -1
- package/es/components/viewer2d/vertex.js +1 -1
- package/es/components/viewer2d/viewer2d.js +1 -1
- package/es/components/viewer3d/viewer3d-first-person.js +1 -1
- package/es/components/viewer3d/viewer3d.js +11 -13
- package/es/utils/react-if.js +1 -1
- package/lib/KitchenConfigurator.js +20 -20
- package/lib/KitchenConfiguratorApp.js +27 -27
- package/lib/catalog/properties/property-checkbox.js +7 -10
- package/lib/catalog/properties/property-color.js +7 -9
- package/lib/catalog/properties/property-enum.js +7 -9
- package/lib/catalog/properties/property-hidden.js +7 -9
- package/lib/catalog/properties/property-lenght-measure.js +9 -11
- package/lib/catalog/properties/property-length-measure.js +9 -11
- package/lib/catalog/properties/property-length-measure_hole.js +9 -11
- package/lib/catalog/properties/property-number.js +8 -10
- package/lib/catalog/properties/property-read-only.js +7 -9
- package/lib/catalog/properties/property-string.js +7 -9
- package/lib/catalog/properties/property-toggle.js +7 -9
- package/lib/class/item.js +3 -5
- package/lib/components/content.js +6 -6
- package/lib/components/style/button.js +6 -5
- package/lib/components/style/content-container.js +4 -5
- package/lib/components/style/content-title.js +2 -2
- package/lib/components/style/form-number-input.js +15 -15
- package/lib/components/style/form-number-input_2.js +13 -12
- package/lib/components/viewer2d/area.js +4 -6
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +4 -6
- package/lib/components/viewer2d/grids/grid-streak.js +4 -6
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +4 -6
- package/lib/components/viewer2d/grids/grids.js +2 -2
- package/lib/components/viewer2d/group.js +6 -6
- package/lib/components/viewer2d/item.js +6 -6
- package/lib/components/viewer2d/layer.js +4 -6
- package/lib/components/viewer2d/line.js +5 -5
- package/lib/components/viewer2d/ruler.js +4 -6
- package/lib/components/viewer2d/rulerDist.js +4 -6
- package/lib/components/viewer2d/rulerX.js +13 -12
- package/lib/components/viewer2d/rulerY.js +11 -10
- package/lib/components/viewer2d/scene.js +6 -5
- package/lib/components/viewer2d/snap.js +4 -4
- package/lib/components/viewer2d/state.js +4 -4
- package/lib/components/viewer2d/vertex.js +3 -3
- package/lib/components/viewer2d/viewer2d.js +12 -12
- package/lib/components/viewer3d/viewer3d-first-person.js +10 -10
- package/lib/components/viewer3d/viewer3d.js +17 -18
- package/lib/utils/react-if.js +3 -5
- package/package.json +1 -1
|
@@ -31,7 +31,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
31
31
|
import axios from 'axios';
|
|
32
32
|
import * as convert from 'convert-units';
|
|
33
33
|
import { Plugins as PlannerPlugins } from "./index";
|
|
34
|
-
import
|
|
34
|
+
import PropTypes from 'prop-types';
|
|
35
35
|
import React, { Component } from 'react';
|
|
36
36
|
import ReactGA from 'react-ga4';
|
|
37
37
|
import { hotjar } from 'react-hotjar';
|
|
@@ -19,7 +19,7 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
19
19
|
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; }
|
|
20
20
|
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; }
|
|
21
21
|
import React, { useEffect } from 'react';
|
|
22
|
-
import
|
|
22
|
+
import PropTypes from 'prop-types';
|
|
23
23
|
import { Provider } from 'react-redux';
|
|
24
24
|
import { createStore } from 'redux';
|
|
25
25
|
import * as Models from "./models";
|
|
@@ -7,9 +7,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
|
7
7
|
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); }
|
|
8
8
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import
|
|
11
|
-
import { FormLabel } from "../../components/style/export";
|
|
12
|
-
import PropertyStyle from "./shared-property-style";
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
13
11
|
import styled from 'styled-components';
|
|
14
12
|
import { DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
15
13
|
var FlipWrapper = styled.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n margin: 15px 0;\n justify-content: space-between;\n"])));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, FormColorInput } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyColor(_ref) {
|
|
@@ -7,7 +7,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
7
7
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
8
8
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
9
9
|
import React from 'react';
|
|
10
|
-
import
|
|
10
|
+
import PropTypes from 'prop-types';
|
|
11
11
|
import { Seq } from 'immutable';
|
|
12
12
|
import { FormLabel, FormSelect } from "../../components/style/export";
|
|
13
13
|
import PropertyStyle from "./shared-property-style";
|
|
@@ -3,7 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
7
|
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNITS_LENGTH, UNIT_INCH } from "./../../constants";
|
|
8
8
|
import convert from 'convert-units';
|
|
9
9
|
import { FormLabel, FormNumberInput, FormSelect } from "../../components/style/export";
|
|
@@ -5,7 +5,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
5
5
|
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
6
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
9
|
import { UNITS_LENGTH, UNIT_INCH, UNIT_CENTIMETER, DEFAULT_FONT_FAMILY, TEXT_COLOR_NEUTRAL_0, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
10
10
|
import convert from 'convert-units';
|
|
11
11
|
import { FormLabel, FormNumberInput, FormSelect } from "../../components/style/export";
|
|
@@ -3,7 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
7
|
import { UNITS_LENGTH, UNIT_INCH, UNIT_CENTIMETER, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
8
8
|
import convert from 'convert-units';
|
|
9
9
|
import { FormLabel, FormNumberInput1, FormSelect } from "../../components/style/export";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, FormNumberInput } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyNumber(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyReadOnly(_ref) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, FormTextInput } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
var tableStyle = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import { FormLabel, Button } from "../../components/style/export";
|
|
4
4
|
import PropertyStyle from "./shared-property-style";
|
|
5
5
|
export default function PropertyToggle(_ref) {
|
package/es/class/item.js
CHANGED
|
@@ -14,13 +14,11 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
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); }
|
|
16
16
|
import convert from 'convert-units';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import { MODE_IDLE, MODE_IDLE_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS, INSTALLATION_SUFFIX_TYPE } from "../constants";
|
|
17
|
+
import { Group, Hole, Layer } from "./export";
|
|
18
|
+
import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
|
|
19
|
+
import { fromJS, Map } from 'immutable';
|
|
20
|
+
import { INSTALLATION_SUFFIX_TYPE, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
|
|
22
21
|
import { debugUtil } from "../utils/helper";
|
|
23
|
-
import { isUndefined } from 'util';
|
|
24
22
|
import { hasMoldingLayout } from "../utils/molding";
|
|
25
23
|
import { getInstallationSuffix } from "../components/viewer2d/utils";
|
|
26
24
|
var allItemRect;
|
|
@@ -726,7 +724,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
726
724
|
value: function beginDraggingItem(state, layerID, itemID, x, y) {
|
|
727
725
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
728
726
|
time1 = debugUtil();
|
|
729
|
-
if (
|
|
727
|
+
if (!item) return;
|
|
730
728
|
state = state.merge({
|
|
731
729
|
mode: MODE_DRAGGING_ITEM,
|
|
732
730
|
draggingSupport: Map({
|
|
@@ -747,7 +745,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
747
745
|
value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
|
|
748
746
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
749
747
|
state = state.setIn(['scene', 'isEndDragging'], false);
|
|
750
|
-
if (
|
|
748
|
+
if (!item) return {
|
|
751
749
|
updatedState: state
|
|
752
750
|
};
|
|
753
751
|
state = state.merge({
|
|
@@ -780,7 +778,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
780
778
|
var diffX = startPointX - x;
|
|
781
779
|
var diffY = startPointY - y;
|
|
782
780
|
var item = scene.getIn(['layers', layerID, 'items', itemID]);
|
|
783
|
-
if (
|
|
781
|
+
if (!item) return {
|
|
784
782
|
updatedState: state
|
|
785
783
|
};
|
|
786
784
|
var tX = originalX - diffX;
|
package/es/components/content.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import Viewer2D from "./viewer2d/viewer2d";
|
|
4
4
|
import Viewer3D from "./viewer3d/viewer3d";
|
|
5
5
|
import Viewer3DFirstPerson from "./viewer3d/viewer3d-first-person";
|
|
@@ -16,7 +16,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
16
16
|
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); }
|
|
17
17
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
18
18
|
import React, { Component } from 'react';
|
|
19
|
-
import
|
|
19
|
+
import PropTypes from 'prop-types';
|
|
20
20
|
import * as SharedStyle from "../../shared-style";
|
|
21
21
|
var BASE_STYLE = {
|
|
22
22
|
display: 'inline-block',
|
|
@@ -5,7 +5,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
6
6
|
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); }
|
|
7
7
|
import React from 'react';
|
|
8
|
-
import
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
9
|
var STYLE = {
|
|
10
10
|
padding: '0 20px',
|
|
11
11
|
overflowY: 'auto'
|
|
@@ -9,7 +9,7 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
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; }
|
|
10
10
|
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; }
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import
|
|
12
|
+
import PropTypes from 'prop-types';
|
|
13
13
|
import * as SharedStyle from "../../shared-style";
|
|
14
14
|
var STYLE = {
|
|
15
15
|
color: SharedStyle.PRIMARY_COLOR.alt,
|
|
@@ -14,7 +14,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
14
14
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
15
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
16
|
import React, { Component } from 'react';
|
|
17
|
-
import
|
|
17
|
+
import PropTypes from 'prop-types';
|
|
18
18
|
import { KEYBOARD_BUTTON_CODE, TEXT_COLOR_NEUTRAL_0, SECONDARY_PURPLE_COLOR, DEFAULT_FONT_FAMILY } from "../../constants";
|
|
19
19
|
import styled from 'styled-components';
|
|
20
20
|
import { isValidNumber } from "../../utils/helper";
|
|
@@ -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
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
19
19
|
import * as SharedStyle from "../../shared-style";
|
|
20
20
|
import { MdUpdate } from 'react-icons/md';
|
|
21
21
|
import { KEYBOARD_BUTTON_CODE } from "../../constants";
|
|
@@ -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
|
|
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;
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
|
-
import
|
|
9
|
+
import PropTypes from 'prop-types';
|
|
10
10
|
import If from "../../utils/react-if";
|
|
11
11
|
import RulerDist from "./rulerDist";
|
|
12
12
|
import convert from 'convert-units';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
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";
|
|
@@ -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
|
|
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) {
|
|
@@ -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
|
|
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) {
|
|
@@ -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
|
|
25
|
+
import PropTypes from 'prop-types';
|
|
26
26
|
import { Layer, Grids } from "./export";
|
|
27
27
|
import { searchForSkuValue } from "./utils";
|
|
28
28
|
var Scene = /*#__PURE__*/function (_Component) {
|
|
@@ -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
|
|
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";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
3
|
import * as SharedStyle from "../../shared-style";
|
|
4
4
|
//Space from the center of the point(Use cases:x - vertexthickness,y + vertexthickness )
|
|
5
5
|
var vertexthickness = 4;
|
|
@@ -15,7 +15,7 @@ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length)
|
|
|
15
15
|
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; } }
|
|
16
16
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
17
17
|
import React, { useEffect, useRef, useState } from 'react';
|
|
18
|
-
import
|
|
18
|
+
import PropTypes from 'prop-types';
|
|
19
19
|
import { ReactSVGPanZoom, TOOL_AUTO, TOOL_NONE, TOOL_PAN, TOOL_ZOOM_IN, TOOL_ZOOM_OUT, zoom } from 'react-svg-pan-zoom';
|
|
20
20
|
import * as constants from "../../constants";
|
|
21
21
|
import State from "./state";
|
|
@@ -14,7 +14,7 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
14
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
15
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
16
16
|
import React from 'react';
|
|
17
|
-
import
|
|
17
|
+
import PropTypes from 'prop-types';
|
|
18
18
|
import ReactDOM from 'react-dom';
|
|
19
19
|
import * as Three from 'three';
|
|
20
20
|
import { parseData, updateScene } from "./scene-creator";
|
|
@@ -18,27 +18,25 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
18
18
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
19
19
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
20
20
|
import React from 'react';
|
|
21
|
-
import
|
|
21
|
+
import PropTypes from 'prop-types';
|
|
22
22
|
import ReactDOM from 'react-dom';
|
|
23
23
|
import * as Three from 'three';
|
|
24
|
-
import {
|
|
25
|
-
import { disposeScene } from "./three-memory-cleaner";
|
|
26
|
-
import { disposeObject } from "./three-memory-cleaner";
|
|
24
|
+
import { checkCabinetOverlap, createBacksplash, deleteSpecifiedMeshObjects, fVLine, getDistances, parseData, updateScene, visibleTransformBox } from "./scene-creator";
|
|
25
|
+
import { disposeObject, disposeScene } from "./three-memory-cleaner";
|
|
27
26
|
import diff from 'immutablediff';
|
|
28
27
|
import * as SharedStyle from "../../shared-style";
|
|
29
|
-
import {
|
|
30
|
-
import { isUndefined } from 'util';
|
|
28
|
+
import { BASE_CABINET_LAYOUTPOS, MODE_3D_VIEW, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_HOLE_3D, MODE_DRAWING_ITEM_3D, MODE_ELEVATION_VIEW, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, SECONDARY_PURPLE_COLOR, TALL_CABINET_LAYOUTPOS, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
31
29
|
import { verticesDistance } from "../../utils/geometry";
|
|
32
30
|
import convert from 'convert-units';
|
|
33
31
|
import { GeometryUtils } from "../../utils/export";
|
|
34
32
|
import { handleCamRect, isElevationView, isEmpty } from "../../utils/helper";
|
|
35
33
|
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader';
|
|
36
34
|
import CameraControls from 'camera-controls';
|
|
35
|
+
import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
|
|
36
|
+
import { getAllMeshes, vectorIntersectWithMesh } from "../../utils/objects-utils";
|
|
37
37
|
CameraControls.install({
|
|
38
38
|
THREE: Three
|
|
39
39
|
});
|
|
40
|
-
import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
|
|
41
|
-
import { getAllMeshes, vectorIntersectWithMesh } from "../../utils/objects-utils";
|
|
42
40
|
var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
43
41
|
function Scene3DViewer(props) {
|
|
44
42
|
var _this;
|
|
@@ -1293,7 +1291,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1293
1291
|
offsetX: event.offsetX - 50,
|
|
1294
1292
|
offsetY: event.offsetY
|
|
1295
1293
|
}, alti);
|
|
1296
|
-
if (
|
|
1294
|
+
if (!selectedItem) return;
|
|
1297
1295
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1298
1296
|
lastAngle = 0;
|
|
1299
1297
|
angleObj.position.set(planData.plan.position.x + Point.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : selItem.properties.get('altitude').get('length') + planData.plan.position.y, planData.plan.position.z - Point.y);
|
|
@@ -1464,7 +1462,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1464
1462
|
setTimeout(function () {
|
|
1465
1463
|
getDistances(layer);
|
|
1466
1464
|
var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1467
|
-
if (
|
|
1465
|
+
if (!selectedItem) return;
|
|
1468
1466
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1469
1467
|
var itemPos = selectedItem.position.clone();
|
|
1470
1468
|
if (intersects[_i10].object.parent && intersects[_i10].object.parent.parent.userData.itemId === selectedItem.userData.itemId) {
|
|
@@ -1546,7 +1544,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1546
1544
|
if (bRotate) {
|
|
1547
1545
|
var _intersects$_i;
|
|
1548
1546
|
var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1549
|
-
if (
|
|
1547
|
+
if (!selectedItem) return;
|
|
1550
1548
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1551
1549
|
var itemPos = selectedItem.position.clone();
|
|
1552
1550
|
if (((_intersects$_i = intersects[_i10]) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.object) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.userData) === null || _intersects$_i === void 0 ? void 0 : _intersects$_i.itemId) === selectedItem.userData.itemId) {
|
|
@@ -1564,7 +1562,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
1564
1562
|
if (bMove) {
|
|
1565
1563
|
bMove = false;
|
|
1566
1564
|
var _selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
1567
|
-
if (
|
|
1565
|
+
if (!_selectedItem) return;
|
|
1568
1566
|
var _selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
1569
1567
|
var _itemPos = _selectedItem.position.clone();
|
|
1570
1568
|
if (intersects[_i10].object.parent.parent.userData.itemId === _selectedItem.userData.itemId) {
|
|
@@ -2044,7 +2042,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
|
|
|
2044
2042
|
setTimeout(function () {
|
|
2045
2043
|
try {
|
|
2046
2044
|
currentObject = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
|
|
2047
|
-
if (
|
|
2045
|
+
if (!currentObject) return;
|
|
2048
2046
|
var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
|
|
2049
2047
|
var itemPos = currentObject.position.clone();
|
|
2050
2048
|
toolObj.position.set(planData.plan.position.x + itemPos.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : planData.plan.position.y + currentObject.children[0].position.y, planData.plan.position.z + itemPos.z);
|
package/es/utils/react-if.js
CHANGED
|
@@ -7,7 +7,7 @@ exports["default"] = void 0;
|
|
|
7
7
|
var _axios = _interopRequireDefault(require("axios"));
|
|
8
8
|
var convert = _interopRequireWildcard(require("convert-units"));
|
|
9
9
|
var _index = require("./index");
|
|
10
|
-
var
|
|
10
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactGa = _interopRequireDefault(require("react-ga4"));
|
|
13
13
|
var _reactHotjar = require("react-hotjar");
|
|
@@ -608,30 +608,30 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
608
608
|
}]);
|
|
609
609
|
}(_react.Component);
|
|
610
610
|
KitchenConfigurator.propTypes = {
|
|
611
|
-
translator:
|
|
612
|
-
catalog:
|
|
613
|
-
allowProjectFileSupport:
|
|
614
|
-
plugins:
|
|
615
|
-
autosaveKey:
|
|
616
|
-
autosaveDelay:
|
|
617
|
-
width:
|
|
618
|
-
height:
|
|
619
|
-
stateExtractor:
|
|
620
|
-
toolbarButtons:
|
|
621
|
-
sidebarComponents:
|
|
622
|
-
footerbarComponents:
|
|
623
|
-
customContents:
|
|
624
|
-
softwareSignature:
|
|
625
|
-
configData:
|
|
611
|
+
translator: _propTypes["default"].instanceOf(_translator["default"]),
|
|
612
|
+
catalog: _propTypes["default"].instanceOf(_catalog["default"]),
|
|
613
|
+
allowProjectFileSupport: _propTypes["default"].bool,
|
|
614
|
+
plugins: _propTypes["default"].arrayOf(_propTypes["default"].func),
|
|
615
|
+
autosaveKey: _propTypes["default"].string,
|
|
616
|
+
autosaveDelay: _propTypes["default"].number,
|
|
617
|
+
width: _propTypes["default"].number.isRequired,
|
|
618
|
+
height: _propTypes["default"].number.isRequired,
|
|
619
|
+
stateExtractor: _propTypes["default"].func.isRequired,
|
|
620
|
+
toolbarButtons: _propTypes["default"].array,
|
|
621
|
+
sidebarComponents: _propTypes["default"].array,
|
|
622
|
+
footerbarComponents: _propTypes["default"].array,
|
|
623
|
+
customContents: _propTypes["default"].object,
|
|
624
|
+
softwareSignature: _propTypes["default"].string,
|
|
625
|
+
configData: _propTypes["default"].object
|
|
626
626
|
};
|
|
627
627
|
KitchenConfigurator.contextTypes = {
|
|
628
|
-
store:
|
|
628
|
+
store: _propTypes["default"].object.isRequired
|
|
629
629
|
};
|
|
630
630
|
KitchenConfigurator.childContextTypes = _objectSpread(_objectSpread({}, (0, _objectsUtils.objectsMap)(_export["default"], function () {
|
|
631
|
-
return
|
|
631
|
+
return _propTypes["default"].object;
|
|
632
632
|
})), {}, {
|
|
633
|
-
translator:
|
|
634
|
-
catalog:
|
|
633
|
+
translator: _propTypes["default"].object,
|
|
634
|
+
catalog: _propTypes["default"].object
|
|
635
635
|
});
|
|
636
636
|
KitchenConfigurator.defaultProps = {
|
|
637
637
|
translator: new _translator["default"](),
|