kitchen-simulator 1.1.1-test.53 → 1.1.1-test.55
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 +3 -3
- package/es/KitchenConfiguratorApp.js +5 -3
- package/es/catalog/factories/wall-factory-3d.js +1 -1
- package/es/catalog/properties/property-lenght-measure.js +2 -2
- package/es/catalog/properties/property-length-measure.js +1 -1
- package/es/catalog/properties/property-length-measure_hole.js +2 -2
- package/es/catalog/utils/exporter.js +1 -1
- package/es/catalog/utils/item-loader.js +1 -1
- package/es/class/item.js +1 -1
- package/es/components/viewer2d/area.js +1 -1
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/es/components/viewer2d/item.js +3 -5
- package/es/components/viewer2d/ruler.js +2 -3
- package/es/components/viewer2d/rulerDist.js +1 -1
- package/es/components/viewer2d/viewer2d.js +2 -2
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +2 -2
- package/es/components/viewer3d/ruler-utils/scene3D.js +1 -1
- package/es/components/viewer3d/scene-creator.js +1 -1
- package/es/components/viewer3d/viewer3d.js +1 -1
- package/es/index.js +1 -5
- package/es/models.js +3 -2
- package/es/reducers/viewer2d-reducer.js +1 -1
- package/es/reducers/viewer3d-reducer.js +1 -1
- package/es/utils/convert-units-lite.js +21 -0
- package/es/utils/geometry.js +4 -4
- package/es/utils/helper.js +1 -1
- package/es/utils/molding.js +34 -34
- package/lib/KitchenConfigurator.js +11 -11
- package/lib/KitchenConfiguratorApp.js +7 -5
- package/lib/catalog/factories/wall-factory-3d.js +2 -2
- package/lib/catalog/properties/property-lenght-measure.js +3 -3
- package/lib/catalog/properties/property-length-measure.js +5 -5
- package/lib/catalog/properties/property-length-measure_hole.js +3 -3
- package/lib/catalog/utils/exporter.js +5 -6
- package/lib/catalog/utils/item-loader.js +20 -21
- package/lib/class/item.js +10 -11
- package/lib/components/viewer2d/area.js +2 -2
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/lib/components/viewer2d/grids/grid-streak.js +0 -1
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/lib/components/viewer2d/item.js +7 -8
- package/lib/components/viewer2d/ruler.js +6 -7
- package/lib/components/viewer2d/rulerDist.js +4 -4
- package/lib/components/viewer2d/viewer2d.js +17 -15
- package/lib/components/viewer3d/ruler-utils/itemRect.js +7 -7
- package/lib/components/viewer3d/ruler-utils/layer3D.js +32 -32
- package/lib/components/viewer3d/ruler-utils/scene3D.js +2 -2
- package/lib/components/viewer3d/scene-creator.js +24 -24
- package/lib/components/viewer3d/viewer3d.js +11 -11
- package/lib/index.js +0 -26
- package/lib/models.js +7 -7
- package/lib/reducers/viewer2d-reducer.js +3 -4
- package/lib/reducers/viewer3d-reducer.js +3 -4
- package/lib/utils/convert-units-lite.js +27 -0
- package/lib/utils/geometry.js +9 -10
- package/lib/utils/helper.js +6 -7
- package/lib/utils/molding.js +52 -52
- package/package.json +1 -3
|
@@ -29,8 +29,8 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
|
|
|
29
29
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
30
|
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); }
|
|
31
31
|
import axios from 'axios';
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
32
|
+
import { convert } from "./utils/convert-units-lite";
|
|
33
|
+
import { Autosave } from "./plugins/export";
|
|
34
34
|
import PropTypes from 'prop-types';
|
|
35
35
|
import React, { Component } from 'react';
|
|
36
36
|
import { connect } from 'react-redux';
|
|
@@ -378,7 +378,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
378
378
|
return;
|
|
379
379
|
}
|
|
380
380
|
if (match && match.params.pid === undefined) {
|
|
381
|
-
var newplugins = [].concat(_toConsumableArray(plugins), [
|
|
381
|
+
var newplugins = [].concat(_toConsumableArray(plugins), [Autosave('KitchenConfigurator_v0', false)]);
|
|
382
382
|
newplugins.forEach(function (newplugin) {
|
|
383
383
|
return newplugin(store, stateExtractor);
|
|
384
384
|
});
|
|
@@ -23,6 +23,8 @@ 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";
|
|
26
|
+
import { State } from "./models";
|
|
27
|
+
import PlannerReducer from "./reducers/reducer";
|
|
26
28
|
import KitchenConfigurator from "./KitchenConfigurator";
|
|
27
29
|
import AppContext from "./AppContext";
|
|
28
30
|
import Catalog from "./catalog/catalog";
|
|
@@ -33,7 +35,7 @@ import * as Areas from "./catalog/areas/area/planner-element";
|
|
|
33
35
|
import * as Lines from "./catalog/lines/wall/planner-element";
|
|
34
36
|
import * as Holes from "./catalog/holes/export";
|
|
35
37
|
import { render2DItem, render3DApplianceItem, render3DItem, render3DLightingItem } from "./catalog/utils/item-loader";
|
|
36
|
-
import {
|
|
38
|
+
import { ConsoleDebugger, Keyboard } from "./plugins/export";
|
|
37
39
|
import { Map } from 'immutable';
|
|
38
40
|
import * as Sentry from '@sentry/react';
|
|
39
41
|
import { loadProject, rename } from "./actions/project-actions";
|
|
@@ -44,7 +46,7 @@ if (typeof window !== 'undefined') window.THREE = THREE;
|
|
|
44
46
|
/* ============================== component ============================= */
|
|
45
47
|
var MyCatalog = new Catalog();
|
|
46
48
|
var AppState = Map({
|
|
47
|
-
KitchenConfigurator: new
|
|
49
|
+
KitchenConfigurator: new State()
|
|
48
50
|
});
|
|
49
51
|
console.log('Version: 378.45-202509_DIY-364-mbox-crash');
|
|
50
52
|
isProduction && Sentry.init({
|
|
@@ -86,7 +88,7 @@ var store = createStore(reducer, null, !isProduction && window.devToolsExtension
|
|
|
86
88
|
}) : function (f) {
|
|
87
89
|
return f;
|
|
88
90
|
});
|
|
89
|
-
var plugins = [
|
|
91
|
+
var plugins = [Keyboard(), ConsoleDebugger()];
|
|
90
92
|
export default function KitchenConfiguratorApp(props) {
|
|
91
93
|
var width = props.width,
|
|
92
94
|
height = props.height,
|
|
@@ -4,7 +4,7 @@ import { verticesDistance } from "../../utils/geometry";
|
|
|
4
4
|
import { isElevationView } from "../../utils/helper";
|
|
5
5
|
import * as SharedStyle from "../../shared-style";
|
|
6
6
|
import { LINE_THICKNESS, UNIT_CENTIMETER } from "../../constants";
|
|
7
|
-
import convert from
|
|
7
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
8
8
|
import ThreeBSP from "../../utils/threeCSG.es6";
|
|
9
9
|
var params = {
|
|
10
10
|
envMap: 'HDR',
|
|
@@ -4,8 +4,8 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, 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
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS,
|
|
8
|
-
import convert from
|
|
7
|
+
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNIT_INCH, UNITS_LENGTH } from "./../../constants";
|
|
8
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
9
9
|
import { FormLabel, FormNumberInput, FormSelect } from "../../components/style/export";
|
|
10
10
|
import { Map } from 'immutable';
|
|
11
11
|
import { toFixedFloat } from "../../utils/math";
|
|
@@ -11,7 +11,7 @@ function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t =
|
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
13
|
import { BASE_CABINET_LAYOUTPOS, DEFAULT_FONT_FAMILY, TALL_CABINET_LAYOUTPOS, TEXT_COLOR_NEUTRAL_0, UNIT_CENTIMETER, UNIT_INCH } from "../../constants";
|
|
14
|
-
import convert from
|
|
14
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
15
15
|
import { FormNumberInput } from "../../components/style/export";
|
|
16
16
|
import { Map } from 'immutable';
|
|
17
17
|
import { toFixedFloat } from "../../utils/math";
|
|
@@ -4,8 +4,8 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, 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
6
|
import PropTypes from 'prop-types';
|
|
7
|
-
import {
|
|
8
|
-
import convert from
|
|
7
|
+
import { BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS, UNIT_INCH, UNITS_LENGTH } from "../../constants";
|
|
8
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
9
9
|
import { FormLabel, FormNumberInput1, FormSelect } from "../../components/style/export";
|
|
10
10
|
import { Map } from 'immutable';
|
|
11
11
|
import { toFixedFloat } from "../../utils/math";
|
|
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
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
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
|
-
import convert from
|
|
7
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
8
8
|
export default function (_ref) {
|
|
9
9
|
var itemID = _ref.itemID,
|
|
10
10
|
type = _ref.type,
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
10
10
|
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; }
|
|
11
11
|
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; } }
|
|
12
12
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
13
|
-
import convert from
|
|
13
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
14
14
|
import { fromJS, Map } from 'immutable';
|
|
15
15
|
import React, { useState } from 'react';
|
|
16
16
|
import * as Three from 'three';
|
package/es/class/item.js
CHANGED
|
@@ -13,7 +13,7 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
13
13
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
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
|
-
import convert from
|
|
16
|
+
import { convert } from "../utils/convert-units-lite";
|
|
17
17
|
import { Group, Hole, Layer } from "./export";
|
|
18
18
|
import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
|
|
19
19
|
import { fromJS, Map } from 'immutable';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import polylabel from 'polylabel';
|
|
4
|
-
import convert from
|
|
4
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
5
5
|
import { formatNumber } from "../../utils/math";
|
|
6
6
|
import { DECIMAL_PLACES_2 } from "../../constants";
|
|
7
7
|
import { areaPolygon } from "./utils";
|
|
@@ -4,14 +4,12 @@ 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 from 'react';
|
|
8
|
-
import { useState } from 'react';
|
|
7
|
+
import React, { useState } from 'react';
|
|
9
8
|
import PropTypes from 'prop-types';
|
|
10
|
-
import If from "../../utils/react-if";
|
|
11
9
|
import RulerDist from "./rulerDist";
|
|
12
|
-
import convert from
|
|
10
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
13
11
|
import { GeometryUtils } from "../../utils/export";
|
|
14
|
-
import { MODE_ROTATING_ITEM,
|
|
12
|
+
import { MODE_ROTATING_ITEM, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
15
13
|
import { returnReplaceableDeepSearchType } from "./utils";
|
|
16
14
|
var STYLE_LINE = {
|
|
17
15
|
fill: '#0096fd',
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
4
4
|
import IDBroker from "../../utils/id-broker";
|
|
5
|
-
import {
|
|
6
|
-
import { LINE_THICKNESS, SHADE_LIGHT_BLUE_COLOR, TEXT_COLOR_NEUTRAL_7 } from "../../constants";
|
|
5
|
+
import { LINE_THICKNESS, TEXT_COLOR_NEUTRAL_7 } from "../../constants";
|
|
7
6
|
var STYLE = {
|
|
8
7
|
stroke: TEXT_COLOR_NEUTRAL_7,
|
|
9
8
|
strokeWidth: '1px'
|
|
@@ -24,10 +24,10 @@ import { RulerX, RulerY } from "./export";
|
|
|
24
24
|
import { DECIMAL_PLACES_2, LINE_THICKNESS, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_ELEVATION_VIEW, MODE_IDLE, UNIT_ANGLE } from "../../constants";
|
|
25
25
|
import { GeometryUtils } from "../../utils/export";
|
|
26
26
|
import FormNumberInput from "../style/form-number-input";
|
|
27
|
-
import convert from
|
|
27
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
28
28
|
import { Map } from 'immutable';
|
|
29
29
|
import { formatNumber } from "../../utils/math";
|
|
30
|
-
import { isEmpty } from "../../utils/helper";
|
|
30
|
+
import { isEmpty } from "../../utils/helper"; // variables
|
|
31
31
|
|
|
32
32
|
// variables
|
|
33
33
|
var pinFlag = false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { MODE_BACK_ELEVATION_VIEW, MODE_FRONT_ELEVATION_VIEW, MODE_LEFT_ELEVATION_VIEW, MODE_RIGHT_ELEVATION_VIEW } from "../../../constants";
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
4
4
|
export default function ItemRect(_ref) {
|
|
5
5
|
var scene = _ref.scene,
|
|
6
6
|
layer = _ref.layer,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import Ruler3D from "./ruler3D";
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
4
4
|
import { GeometryUtils } from "../../../utils/export";
|
|
5
5
|
import { returnReplaceableDeepSearchType } from "../../../components/viewer2d/utils";
|
|
6
|
-
import { DELTA, DISTANCE_EPSILON
|
|
6
|
+
import { DECIMAL_PLACES_2, DELTA, DISTANCE_EPSILON } from "../../../constants";
|
|
7
7
|
import { formatNumber, isNonZeroText } from "../../../utils/math";
|
|
8
8
|
export default function Layer3D(_ref) {
|
|
9
9
|
var layer = _ref.layer,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { verticesDistance } from "../../../utils/geometry";
|
|
3
|
-
import convert from
|
|
3
|
+
import { convert } from "../../../utils/convert-units-lite";
|
|
4
4
|
import Layer3D from "./layer3D";
|
|
5
5
|
export function compareVertices(v0, v1) {
|
|
6
6
|
return v0.x === v1.x ? v0.y - v1.y : v0.x - v1.x;
|
|
@@ -17,7 +17,7 @@ import createGrid from "./grid-creator";
|
|
|
17
17
|
import { disposeObject } from "./three-memory-cleaner";
|
|
18
18
|
import { ANIMATE_STEP_MAX, ANIMATE_STEP_MIN, ARRAY_3D_MODES, ARROW_TEXT_BACKCOLOR, ARROW_TEXT_FONTFACE, ARROW_TEXT_FORECOLOR, BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, DECIMAL_PLACES_2, DIFFERENT_VALUES_PATH_LENGTH, DISTANCE_EPSILON, EPSILON, MIDDLE_MOLDING_LOCATION, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, TOP_MOLDING_LOCATION, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
19
19
|
import { GeometryUtils, IDBroker, MoldingUtils } from "../../utils/export";
|
|
20
|
-
import convert from
|
|
20
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
21
21
|
import { verticesDistance } from "../../utils/geometry";
|
|
22
22
|
import * as GeomUtils from "../../catalog/utils/geom-utils";
|
|
23
23
|
import { loadTexture } from "../../catalog/utils/item-loader";
|
|
@@ -27,7 +27,7 @@ import diff from 'immutablediff';
|
|
|
27
27
|
import * as SharedStyle from "../../shared-style";
|
|
28
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";
|
|
29
29
|
import { verticesDistance } from "../../utils/geometry";
|
|
30
|
-
import convert from
|
|
30
|
+
import { convert } from "../../utils/convert-units-lite";
|
|
31
31
|
import { GeometryUtils } from "../../utils/export";
|
|
32
32
|
import { handleCamRect, isElevationView, isEmpty } from "../../utils/helper";
|
|
33
33
|
import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader';
|
package/es/index.js
CHANGED
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import * as Models from "./models";
|
|
2
|
-
import reducer from "./reducers/reducer";
|
|
3
1
|
import KitchenConfiguratorApp from "./KitchenConfiguratorApp";
|
|
4
|
-
|
|
5
|
-
import KitchenConfiguratorReducers from "./reducers/export";
|
|
6
|
-
export { Models, reducer, KitchenConfiguratorApp, Plugins, KitchenConfiguratorReducers };
|
|
2
|
+
export { KitchenConfiguratorApp };
|
|
7
3
|
export default KitchenConfiguratorApp;
|
package/es/models.js
CHANGED
|
@@ -18,7 +18,7 @@ import { fromJS, List, Map, Record } from 'immutable';
|
|
|
18
18
|
import { MODE_IDLE, UNIT_INCH } from "./constants";
|
|
19
19
|
import { SNAP_MASK } from "./utils/snap";
|
|
20
20
|
import { isEmpty } from "./utils/helper";
|
|
21
|
-
import convert from
|
|
21
|
+
import { convert } from "./utils/convert-units-lite";
|
|
22
22
|
var safeLoadMapList = function safeLoadMapList(mapList, Model, defaultMap) {
|
|
23
23
|
return mapList ? new Map(mapList).map(function (m) {
|
|
24
24
|
return new Model(m);
|
|
@@ -507,4 +507,5 @@ export var State = /*#__PURE__*/function (_Record12) {
|
|
|
507
507
|
userId: 0,
|
|
508
508
|
isHelp: false,
|
|
509
509
|
isCabinetDrawing: false
|
|
510
|
-
}, 'State'));
|
|
510
|
+
}, 'State'));
|
|
511
|
+
export default State;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WALL_LENGTH_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, MODE_2D_PAN, MODE_2D_ZOOM_IN, MODE_2D_ZOOM_OUT, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, UPDATE_2D_CAMERA, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
|
-
import convert from
|
|
2
|
+
import { convert } from "../utils/convert-units-lite";
|
|
3
3
|
export default function (state, action) {
|
|
4
4
|
var _state = state,
|
|
5
5
|
scene = _state.scene;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { MODE_3D_FIRST_PERSON, MODE_3D_VIEW, SELECT_TOOL_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
2
|
import { Project } from "../class/export";
|
|
3
3
|
import { history } from "../utils/export";
|
|
4
|
-
import convert from
|
|
4
|
+
import { convert } from "../utils/convert-units-lite";
|
|
5
5
|
export default function (state, action) {
|
|
6
6
|
state = state.merge({
|
|
7
7
|
sceneHistory: history.historyPush(state.sceneHistory, state.scene)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
var lengthFactors = {
|
|
2
|
+
m: 1,
|
|
3
|
+
cm: 100,
|
|
4
|
+
mm: 1000,
|
|
5
|
+
"in": 39.3701,
|
|
6
|
+
ft: 3.28084
|
|
7
|
+
};
|
|
8
|
+
export function convert(value) {
|
|
9
|
+
return {
|
|
10
|
+
from: function from(fromUnit) {
|
|
11
|
+
return {
|
|
12
|
+
to: function to(toUnit) {
|
|
13
|
+
if (!(fromUnit in lengthFactors) || !(toUnit in lengthFactors)) {
|
|
14
|
+
throw new Error("Unsupported unit conversion: ".concat(fromUnit, " \u2192 ").concat(toUnit));
|
|
15
|
+
}
|
|
16
|
+
return value / lengthFactors[fromUnit] * lengthFactors[toUnit];
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
}
|
package/es/utils/geometry.js
CHANGED
|
@@ -22,9 +22,9 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
22
22
|
* @param {number} y1 Vertex 1 y
|
|
23
23
|
* @return {number}
|
|
24
24
|
*/
|
|
25
|
-
import {
|
|
26
|
-
import { BASE_CABINET_LAYOUTPOS, EPSILON, LINE_THICKNESS, MEPSILON, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_NONE, OVERLAP_SAME, OVERLAP_SOME,
|
|
27
|
-
import convert from
|
|
25
|
+
import { fAbs, toFixedFloat } from "./math.js";
|
|
26
|
+
import { BASE_CABINET_LAYOUTPOS, EPSILON, LINE_THICKNESS, MEPSILON, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_NONE, OVERLAP_SAME, OVERLAP_SOME, UNIT_ANGLE, WALL_CABINET_LAYOUTPOS } from "../constants";
|
|
27
|
+
import { convert } from "./convert-units-lite";
|
|
28
28
|
import * as Three from 'three';
|
|
29
29
|
import { returnReplaceableDeepSearchType } from "../components/viewer2d/utils.js";
|
|
30
30
|
import { isEmpty } from "./helper.js";
|
|
@@ -2042,7 +2042,7 @@ export function isRightWall(v0, v1) {
|
|
|
2042
2042
|
* OVERLAP_LINK: two lines are linked at the common point, so they can be merged to one line
|
|
2043
2043
|
* OVERLAP_INCLUDED: destLine includes srcLine
|
|
2044
2044
|
* OVERLAP_SOME: two lines are overlapped with some common range, then returns the trimmed segments of srcLine
|
|
2045
|
-
*
|
|
2045
|
+
*
|
|
2046
2046
|
* //////// test - start /////////////
|
|
2047
2047
|
const p1 = { x1: 1413.1313131313132, y1: 1044.949494949495 };
|
|
2048
2048
|
const p2 = { x1: 1476.2626262626263, y1: 1108.0808080808079 };
|
package/es/utils/helper.js
CHANGED
|
@@ -8,7 +8,7 @@ import { HDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureL
|
|
|
8
8
|
import { ANIMATE_OBJECT_OPEN_DOOR_ROTATION_UNIT, ANIMATE_STEP_MAX, DECIMAL_PLACES_2, HDR_URLS, MODE_ELEVATION_VIEW } from "../constants";
|
|
9
9
|
import * as Three from 'three';
|
|
10
10
|
import { returnReplaceableDeepSearchType } from "./../components/viewer2d/utils";
|
|
11
|
-
import convert from
|
|
11
|
+
import { convert } from "./convert-units-lite";
|
|
12
12
|
import { formatNumber } from "./math";
|
|
13
13
|
export var textureCube = new HDRCubeTextureLoader().setPath('/catalog/envMap/').load(HDR_URLS, function () {
|
|
14
14
|
textureCube.magFilter = Three.LinearFilter;
|
package/es/utils/molding.js
CHANGED
|
@@ -13,7 +13,7 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
|
|
|
13
13
|
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; }
|
|
14
14
|
import { BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, EPSILON, MIDDLE_MOLDING_LOCATION, MOLDING_LOCATIONS, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_SAME, OVERLAP_SOME, TALL_CABINET_LAYOUTPOS, TOP_MOLDING_LOCATION, WALL_CABINET_LAYOUTPOS } from "../constants";
|
|
15
15
|
import * as Three from 'three';
|
|
16
|
-
import convert from
|
|
16
|
+
import { convert } from "./convert-units-lite";
|
|
17
17
|
import IDBroker from "./id-broker";
|
|
18
18
|
import { returnReplaceableDeepSearchType } from "../components/viewer2d/utils";
|
|
19
19
|
import { GeometryUtils } from "./export";
|
|
@@ -69,16 +69,16 @@ export function isEnableItemForMolding(layer, selItem) {
|
|
|
69
69
|
else return result && hasMoldingLayout(molding, selItem.layoutpos);
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
-
/**
|
|
73
|
-
* Check two line segments are overlap. The direction of the two line segments must be opposite.
|
|
74
|
-
* s1 c2 s2 c1
|
|
75
|
-
* |--------|------|-----------|
|
|
76
|
-
* Decision Formular: L(s1,c1) + L(s2, c2) = L(s1, s2) + L(c1, c2)
|
|
77
|
-
* @param {*} selRectPos1
|
|
78
|
-
* @param {*} selRectPos2
|
|
79
|
-
* @param {*} curRectPos1
|
|
80
|
-
* @param {*} curRectPos2
|
|
81
|
-
* @returns L(s1,c1) + L(s2, c2) - L(s1, s2) - L(c1, c2)
|
|
72
|
+
/**
|
|
73
|
+
* Check two line segments are overlap. The direction of the two line segments must be opposite.
|
|
74
|
+
* s1 c2 s2 c1
|
|
75
|
+
* |--------|------|-----------|
|
|
76
|
+
* Decision Formular: L(s1,c1) + L(s2, c2) = L(s1, s2) + L(c1, c2)
|
|
77
|
+
* @param {*} selRectPos1
|
|
78
|
+
* @param {*} selRectPos2
|
|
79
|
+
* @param {*} curRectPos1
|
|
80
|
+
* @param {*} curRectPos2
|
|
81
|
+
* @returns L(s1,c1) + L(s2, c2) - L(s1, s2) - L(c1, c2)
|
|
82
82
|
*/
|
|
83
83
|
function getDelta(selRectPos1, selRectPos2, curRectPos1, curRectPos2) {
|
|
84
84
|
return (
|
|
@@ -168,11 +168,11 @@ function tryMergeItemWithLocation(curItem, itemGroup, location) {
|
|
|
168
168
|
});
|
|
169
169
|
}
|
|
170
170
|
|
|
171
|
-
/**
|
|
172
|
-
* Make the molding group array with [items].
|
|
173
|
-
* @param {*} layer
|
|
174
|
-
* @param {*} items - Mergable snapped item group, if [items] is null then get all MG array of layer
|
|
175
|
-
* @returns MG array
|
|
171
|
+
/**
|
|
172
|
+
* Make the molding group array with [items].
|
|
173
|
+
* @param {*} layer
|
|
174
|
+
* @param {*} items - Mergable snapped item group, if [items] is null then get all MG array of layer
|
|
175
|
+
* @returns MG array
|
|
176
176
|
*/
|
|
177
177
|
export function getAllMoldingGroups(layer) {
|
|
178
178
|
var items = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
@@ -347,12 +347,12 @@ export function mergeOverlappedLines(line1, line2) {
|
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
349
|
|
|
350
|
-
/**
|
|
351
|
-
* Get the contour line array of moldingGroup items
|
|
352
|
-
* @param {*} moldingGroup
|
|
353
|
-
* @param {*} layer
|
|
354
|
-
* @param {*} catalog
|
|
355
|
-
* @returns contour line array of moldingGroup items
|
|
350
|
+
/**
|
|
351
|
+
* Get the contour line array of moldingGroup items
|
|
352
|
+
* @param {*} moldingGroup
|
|
353
|
+
* @param {*} layer
|
|
354
|
+
* @param {*} catalog
|
|
355
|
+
* @returns contour line array of moldingGroup items
|
|
356
356
|
*/
|
|
357
357
|
export function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
358
358
|
// wall lines
|
|
@@ -507,13 +507,13 @@ export function getLinesFromItems2(moldingGroup, layer, catalog) {
|
|
|
507
507
|
return newMGlines;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
-
/**
|
|
511
|
-
* Get the line that colinear linked with [line], and merge them to a new line
|
|
512
|
-
* @param {*} line
|
|
513
|
-
* @param {*} MGlines
|
|
514
|
-
* @returns
|
|
515
|
-
* - returns merged new line
|
|
516
|
-
* - returns filtered new line group (remove linked line from [MGlines])
|
|
510
|
+
/**
|
|
511
|
+
* Get the line that colinear linked with [line], and merge them to a new line
|
|
512
|
+
* @param {*} line
|
|
513
|
+
* @param {*} MGlines
|
|
514
|
+
* @returns
|
|
515
|
+
* - returns merged new line
|
|
516
|
+
* - returns filtered new line group (remove linked line from [MGlines])
|
|
517
517
|
*/
|
|
518
518
|
function getMergedLine(line, MGlines, cnt) {
|
|
519
519
|
try {
|
|
@@ -566,11 +566,11 @@ function getMergedLine(line, MGlines, cnt) {
|
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
568
|
|
|
569
|
-
/**
|
|
570
|
-
* Get the contour line segments from [lineSegs]
|
|
571
|
-
* @param {*} lineSegs
|
|
572
|
-
* @param {*} otherLines
|
|
573
|
-
* @returns
|
|
569
|
+
/**
|
|
570
|
+
* Get the contour line segments from [lineSegs]
|
|
571
|
+
* @param {*} lineSegs
|
|
572
|
+
* @param {*} otherLines
|
|
573
|
+
* @returns
|
|
574
574
|
*/
|
|
575
575
|
function getTrimmedContourLineSegs(lineSegs, otherLines, cnt) {
|
|
576
576
|
try {
|
|
@@ -5,17 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports["default"] = void 0;
|
|
7
7
|
var _axios = _interopRequireDefault(require("axios"));
|
|
8
|
-
var
|
|
9
|
-
var
|
|
8
|
+
var _convertUnitsLite = require("./utils/convert-units-lite");
|
|
9
|
+
var _export = require("./plugins/export");
|
|
10
10
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
11
|
var _react = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _reactRedux = require("react-redux");
|
|
13
13
|
var _redux = require("redux");
|
|
14
14
|
var constants = _interopRequireWildcard(require("./constants"));
|
|
15
15
|
var _helper = require("./utils/helper");
|
|
16
|
-
var
|
|
16
|
+
var _export2 = _interopRequireDefault(require("./actions/export"));
|
|
17
17
|
var _catalog = _interopRequireDefault(require("./catalog/catalog"));
|
|
18
|
-
var
|
|
18
|
+
var _export3 = require("./components/export");
|
|
19
19
|
var _translator = _interopRequireDefault(require("./translator/translator"));
|
|
20
20
|
var _objectsUtils = require("./utils/objects-utils");
|
|
21
21
|
var _version = require("./version");
|
|
@@ -346,7 +346,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
346
346
|
key: "getChildContext",
|
|
347
347
|
value: function getChildContext() {
|
|
348
348
|
var _this2 = this;
|
|
349
|
-
return _objectSpread(_objectSpread({}, (0, _objectsUtils.objectsMap)(
|
|
349
|
+
return _objectSpread(_objectSpread({}, (0, _objectsUtils.objectsMap)(_export2["default"], function (actionNamespace) {
|
|
350
350
|
return _this2.props[actionNamespace];
|
|
351
351
|
})), {}, {
|
|
352
352
|
translator: this.props.translator,
|
|
@@ -386,7 +386,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
386
386
|
return;
|
|
387
387
|
}
|
|
388
388
|
if (match && match.params.pid === undefined) {
|
|
389
|
-
var newplugins = [].concat(_toConsumableArray(plugins), [
|
|
389
|
+
var newplugins = [].concat(_toConsumableArray(plugins), [(0, _export.Autosave)('KitchenConfigurator_v0', false)]);
|
|
390
390
|
newplugins.forEach(function (newplugin) {
|
|
391
391
|
return newplugin(store, stateExtractor);
|
|
392
392
|
});
|
|
@@ -558,7 +558,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
558
558
|
var firstVisit = this.state.wizardStepOpend && this.isProjectEmpty(extractedState.scene);
|
|
559
559
|
var allVisible = firstVisit || signOpen || myProjectsOpen;
|
|
560
560
|
var _scene = extractedState.getIn(['scene']);
|
|
561
|
-
var len = convert(_scene.width).from(_scene.unit).to('cm');
|
|
561
|
+
var len = (0, _convertUnitsLite.convert)(_scene.width).from(_scene.unit).to('cm');
|
|
562
562
|
var _viewer2D = extractedState.getIn(['viewer2D']);
|
|
563
563
|
if (_viewer2D.size > 0) {
|
|
564
564
|
var scaleX = width / len * 3;
|
|
@@ -585,7 +585,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
585
585
|
display: 'flex',
|
|
586
586
|
justifyContent: 'center'
|
|
587
587
|
})
|
|
588
|
-
}, /*#__PURE__*/_react["default"].createElement(
|
|
588
|
+
}, /*#__PURE__*/_react["default"].createElement(_export3.Content, _extends({
|
|
589
589
|
width: contentW,
|
|
590
590
|
height: contentH,
|
|
591
591
|
catalog: this.props.catalog,
|
|
@@ -621,7 +621,7 @@ KitchenConfigurator.propTypes = {
|
|
|
621
621
|
KitchenConfigurator.contextTypes = {
|
|
622
622
|
store: _propTypes["default"].object.isRequired
|
|
623
623
|
};
|
|
624
|
-
KitchenConfigurator.childContextTypes = _objectSpread(_objectSpread({}, (0, _objectsUtils.objectsMap)(
|
|
624
|
+
KitchenConfigurator.childContextTypes = _objectSpread(_objectSpread({}, (0, _objectsUtils.objectsMap)(_export2["default"], function () {
|
|
625
625
|
return _propTypes["default"].object;
|
|
626
626
|
})), {}, {
|
|
627
627
|
translator: _propTypes["default"].object,
|
|
@@ -646,8 +646,8 @@ function mapStateToProps(reduxState) {
|
|
|
646
646
|
};
|
|
647
647
|
}
|
|
648
648
|
function mapDispatchToProps(dispatch) {
|
|
649
|
-
return (0, _objectsUtils.objectsMap)(
|
|
650
|
-
return (0, _redux.bindActionCreators)(
|
|
649
|
+
return (0, _objectsUtils.objectsMap)(_export2["default"], function (actionNamespace) {
|
|
650
|
+
return (0, _redux.bindActionCreators)(_export2["default"][actionNamespace], dispatch);
|
|
651
651
|
});
|
|
652
652
|
}
|
|
653
653
|
var _default = exports["default"] = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(KitchenConfigurator);
|
|
@@ -9,7 +9,9 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
10
|
var _reactRedux = require("react-redux");
|
|
11
11
|
var _redux = require("redux");
|
|
12
|
-
var
|
|
12
|
+
var _models = _interopRequireWildcard(require("./models"));
|
|
13
|
+
var Models = _models;
|
|
14
|
+
var _reducer = _interopRequireDefault(require("./reducers/reducer"));
|
|
13
15
|
var _KitchenConfigurator = _interopRequireDefault(require("./KitchenConfigurator"));
|
|
14
16
|
var _AppContext = _interopRequireDefault(require("./AppContext"));
|
|
15
17
|
var _catalog = _interopRequireDefault(require("./catalog/catalog"));
|
|
@@ -20,7 +22,7 @@ var Areas = _interopRequireWildcard(require("./catalog/areas/area/planner-elemen
|
|
|
20
22
|
var Lines = _interopRequireWildcard(require("./catalog/lines/wall/planner-element"));
|
|
21
23
|
var Holes = _interopRequireWildcard(require("./catalog/holes/export"));
|
|
22
24
|
var _itemLoader = require("./catalog/utils/item-loader");
|
|
23
|
-
var
|
|
25
|
+
var _export2 = require("./plugins/export");
|
|
24
26
|
var _immutable = require("immutable");
|
|
25
27
|
var Sentry = _interopRequireWildcard(require("@sentry/react"));
|
|
26
28
|
var _projectActions = require("./actions/project-actions");
|
|
@@ -52,7 +54,7 @@ if (typeof window !== 'undefined') window.THREE = THREE;
|
|
|
52
54
|
/* ============================== component ============================= */
|
|
53
55
|
var MyCatalog = new _catalog["default"]();
|
|
54
56
|
var AppState = (0, _immutable.Map)({
|
|
55
|
-
KitchenConfigurator: new
|
|
57
|
+
KitchenConfigurator: new _models.State()
|
|
56
58
|
});
|
|
57
59
|
console.log('Version: 378.45-202509_DIY-364-mbox-crash');
|
|
58
60
|
isProduction && Sentry.init({
|
|
@@ -64,7 +66,7 @@ isProduction && Sentry.init({
|
|
|
64
66
|
var reducer = function reducer(state, action) {
|
|
65
67
|
state = state || AppState;
|
|
66
68
|
state = state.update('KitchenConfigurator', function (plannerState) {
|
|
67
|
-
return (0,
|
|
69
|
+
return (0, _reducer["default"])(plannerState, action);
|
|
68
70
|
});
|
|
69
71
|
return state;
|
|
70
72
|
};
|
|
@@ -94,7 +96,7 @@ var store = (0, _redux.createStore)(reducer, null, !isProduction && window.devTo
|
|
|
94
96
|
}) : function (f) {
|
|
95
97
|
return f;
|
|
96
98
|
});
|
|
97
|
-
var plugins = [
|
|
99
|
+
var plugins = [(0, _export2.Keyboard)(), (0, _export2.ConsoleDebugger)()];
|
|
98
100
|
function KitchenConfiguratorApp(props) {
|
|
99
101
|
var width = props.width,
|
|
100
102
|
height = props.height,
|