kitchen-simulator 1.1.1-test.70 → 1.1.1-test.71
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/@history.js +2 -8
- package/es/AppContext.js +3 -8
- package/es/KitchenConfigurator.js +70 -77
- package/es/KitchenConfiguratorApp.js +98 -105
- package/es/actions/area-actions.js +5 -10
- package/es/actions/export.js +12 -27
- package/es/actions/groups-actions.js +27 -43
- package/es/actions/holes-actions.js +34 -53
- package/es/actions/items-actions.js +94 -143
- package/es/actions/lines-actions.js +21 -34
- package/es/actions/project-actions.js +94 -143
- package/es/actions/scene-actions.js +11 -19
- package/es/actions/vertices-actions.js +7 -13
- package/es/actions/viewer2d-actions.js +21 -34
- package/es/actions/viewer3d-actions.js +9 -16
- package/es/catalog/areas/area/planner-element.js +2 -7
- package/es/catalog/catalog.js +15 -19
- package/es/catalog/factories/area-factory-3d.js +22 -29
- package/es/catalog/factories/area-factory.js +11 -18
- package/es/catalog/factories/export.js +6 -12
- package/es/catalog/factories/wall-factory-3d.js +31 -39
- package/es/catalog/factories/wall-factory.js +21 -29
- package/es/catalog/holes/door-closet/planner-element.js +15 -22
- package/es/catalog/holes/door-double/planner-element.js +15 -22
- package/es/catalog/holes/door-exterior/planner-element.js +16 -23
- package/es/catalog/holes/door-interior/planner-element.js +16 -23
- package/es/catalog/holes/door-panic/planner-element.js +7 -14
- package/es/catalog/holes/door-panic-double/planner-element.js +15 -22
- package/es/catalog/holes/door-sliding/planner-element.js +16 -23
- package/es/catalog/holes/doorway-framed/planner-element.js +11 -18
- package/es/catalog/holes/doorway-frameless/planner-element.js +7 -14
- package/es/catalog/holes/export.js +13 -31
- package/es/catalog/holes/window-clear/planner-element.js +10 -17
- package/es/catalog/holes/window-cross/planner-element.js +10 -17
- package/es/catalog/holes/window-double-hung/planner-element.js +10 -17
- package/es/catalog/holes/window-vertical/planner-element.js +10 -17
- package/es/catalog/lines/wall/planner-element.js +2 -7
- package/es/catalog/molding/molding-dcm/planner-element.js +5 -12
- package/es/catalog/molding/molding-fbm/planner-element.js +5 -12
- package/es/catalog/molding/molding-lrm/planner-element.js +5 -12
- package/es/catalog/properties/export.js +20 -33
- package/es/catalog/properties/property-checkbox.js +24 -29
- package/es/catalog/properties/property-color.js +16 -21
- package/es/catalog/properties/property-enum.js +24 -29
- package/es/catalog/properties/property-hidden.js +9 -14
- package/es/catalog/properties/property-lenght-measure.js +38 -43
- package/es/catalog/properties/property-length-measure.js +36 -41
- package/es/catalog/properties/property-length-measure_hole.js +38 -43
- package/es/catalog/properties/property-number.js +17 -22
- package/es/catalog/properties/property-read-only.js +16 -21
- package/es/catalog/properties/property-string.js +16 -21
- package/es/catalog/properties/property-toggle.js +16 -21
- package/es/catalog/properties/shared-property-style.js +1 -5
- package/es/catalog/utils/FuseUtils.js +8 -13
- package/es/catalog/utils/exporter.js +8 -13
- package/es/catalog/utils/geom-utils.js +13 -27
- package/es/catalog/utils/item-loader.js +84 -95
- package/es/catalog/utils/load-obj.js +20 -26
- package/es/catalog/utils/mtl-loader.js +3 -6
- package/es/catalog/utils/obj-loader.js +3 -6
- package/es/class/FuseUtils.js +8 -13
- package/es/class/area.js +22 -26
- package/es/class/export.js +23 -38
- package/es/class/group.js +53 -57
- package/es/class/guide.js +15 -19
- package/es/class/hole.js +83 -87
- package/es/class/item.js +141 -145
- package/es/class/layer.js +59 -63
- package/es/class/line.js +135 -141
- package/es/class/project.js +90 -96
- package/es/class/vertex.js +29 -33
- package/es/components/content.js +19 -26
- package/es/components/disclaimer/disclaimer.js +10 -16
- package/es/components/export.js +8 -15
- package/es/components/style/button.js +23 -29
- package/es/components/style/cancel-button.js +7 -12
- package/es/components/style/content-container.js +9 -14
- package/es/components/style/content-title.js +11 -18
- package/es/components/style/delete-button.js +8 -15
- package/es/components/style/export.js +30 -48
- package/es/components/style/form-block.js +8 -13
- package/es/components/style/form-color-input.js +7 -12
- package/es/components/style/form-label.js +8 -13
- package/es/components/style/form-number-input.js +41 -47
- package/es/components/style/form-number-input_2.js +36 -42
- package/es/components/style/form-select.js +17 -22
- package/es/components/style/form-slider.js +10 -15
- package/es/components/style/form-submit-button.js +8 -15
- package/es/components/style/form-text-input.js +26 -32
- package/es/components/viewer2d/area.js +17 -22
- package/es/components/viewer2d/export.js +30 -48
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +10 -15
- package/es/components/viewer2d/grids/grid-streak.js +10 -15
- package/es/components/viewer2d/grids/grid-vertical-streak.js +10 -15
- package/es/components/viewer2d/grids/grids.js +10 -17
- package/es/components/viewer2d/group.js +15 -22
- package/es/components/viewer2d/item.js +61 -68
- package/es/components/viewer2d/layer.js +23 -28
- package/es/components/viewer2d/line.js +101 -109
- package/es/components/viewer2d/ruler.js +22 -27
- package/es/components/viewer2d/rulerDist.js +21 -26
- package/es/components/viewer2d/rulerX.js +39 -45
- package/es/components/viewer2d/rulerY.js +37 -43
- package/es/components/viewer2d/scene.js +30 -36
- package/es/components/viewer2d/snap.js +13 -20
- package/es/components/viewer2d/state.js +18 -25
- package/es/components/viewer2d/utils.js +24 -35
- package/es/components/viewer2d/vertex.js +8 -15
- package/es/components/viewer2d/viewer2d.js +153 -161
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +17 -21
- package/es/components/viewer3d/dcm.js +1 -5
- package/es/components/viewer3d/fbm.js +1 -5
- package/es/components/viewer3d/front3D.js +12 -19
- package/es/components/viewer3d/grid-creator.js +8 -15
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +6 -12
- package/es/components/viewer3d/grids/grid-streak.js +5 -11
- package/es/components/viewer3d/grids/grid-vertical-streak.js +6 -12
- package/es/components/viewer3d/libs/first-person-controls.js +2 -7
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1 -5
- package/es/components/viewer3d/libs/mtl-loader.js +1 -5
- package/es/components/viewer3d/libs/obj-loader.js +1 -5
- package/es/components/viewer3d/libs/orbit-controls.js +2 -6
- package/es/components/viewer3d/libs/pointer-lock-controls.js +2 -6
- package/es/components/viewer3d/lrm.js +1 -5
- package/es/components/viewer3d/model.js +1 -5
- package/es/components/viewer3d/pointer-lock-navigation.js +3 -8
- package/es/components/viewer3d/ruler-utils/itemRect.js +18 -23
- package/es/components/viewer3d/ruler-utils/layer3D.js +59 -64
- package/es/components/viewer3d/ruler-utils/ruler3D.js +39 -44
- package/es/components/viewer3d/ruler-utils/scene3D.js +9 -15
- package/es/components/viewer3d/ruler-utils/state3D.js +4 -9
- package/es/components/viewer3d/scene-creator.js +191 -224
- package/es/components/viewer3d/three-memory-cleaner.js +3 -10
- package/es/components/viewer3d/viewer3d-first-person.js +40 -44
- package/es/components/viewer3d/viewer3d.js +196 -200
- package/es/constants.js +349 -356
- package/es/index.js +7 -13
- package/es/models.js +177 -182
- package/es/plugins/SVGLoader.js +48 -51
- package/es/plugins/autosave.js +3 -7
- package/es/plugins/console-debugger.js +5 -10
- package/es/plugins/export.js +8 -15
- package/es/plugins/keyboard.js +29 -33
- package/es/reducers/areas-reducer.js +7 -11
- package/es/reducers/export.js +24 -39
- package/es/reducers/groups-reducer.js +31 -35
- package/es/reducers/holes-reducer.js +43 -47
- package/es/reducers/items-reducer.js +106 -110
- package/es/reducers/lines-reducer.js +28 -32
- package/es/reducers/project-reducer.js +105 -109
- package/es/reducers/reducer.js +16 -21
- package/es/reducers/scene-reducer.js +15 -19
- package/es/reducers/user-reducer.js +5 -9
- package/es/reducers/vertices-reducer.js +11 -15
- package/es/reducers/viewer2d-reducer.js +18 -22
- package/es/reducers/viewer3d-reducer.js +16 -20
- package/es/shared-style.js +10 -14
- package/es/styles/export.js +3 -9
- package/es/translator/en.js +1 -5
- package/es/translator/it.js +1 -5
- package/es/translator/ru.js +1 -5
- package/es/translator/translator.js +13 -17
- package/es/utils/browser.js +2 -7
- package/es/utils/convert-units-lite.js +1 -5
- package/es/utils/email-validator.js +1 -5
- package/es/utils/export.js +15 -32
- package/es/utils/geometry.js +181 -276
- package/es/utils/get-edges-of-subgraphs.js +2 -7
- package/es/utils/graph-cycles.js +8 -9
- package/es/utils/graph-inner-cycles.js +10 -16
- package/es/utils/graph.js +9 -15
- package/es/utils/helper.js +39 -61
- package/es/utils/history.js +8 -13
- package/es/utils/id-broker.js +8 -13
- package/es/utils/logger.js +1 -5
- package/es/utils/math.js +5 -10
- package/es/utils/molding.js +119 -142
- package/es/utils/name-generator.js +7 -11
- package/es/utils/objects-utils.js +7 -17
- package/es/utils/phone-validator.js +1 -5
- package/es/utils/process-black-list.js +3 -8
- package/es/utils/react-if.js +6 -10
- package/es/utils/snap-scene.js +27 -32
- package/es/utils/snap.js +45 -57
- package/es/utils/summarizeCart.js +1 -5
- package/es/utils/threeCSG.es6.js +13 -20
- package/es/version.js +1 -5
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
exports["default"] = void 0;
|
|
6
|
-
exports.renderKitchenSimulator = renderKitchenSimulator;
|
|
7
|
-
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _KitchenConfiguratorApp = _interopRequireDefault(require("./KitchenConfiguratorApp"));
|
|
10
|
-
function renderKitchenSimulator(container) {
|
|
1
|
+
import ReactDOM from 'react-dom';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import KitchenConfiguratorApp from "./KitchenConfiguratorApp";
|
|
4
|
+
export function renderKitchenSimulator(container) {
|
|
11
5
|
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
12
|
-
var root =
|
|
6
|
+
var root = ReactDOM.render(/*#__PURE__*/React.createElement(KitchenConfiguratorApp, props), container);
|
|
13
7
|
return {
|
|
14
8
|
root: root,
|
|
15
9
|
unmount: function unmount() {
|
|
16
|
-
|
|
10
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
17
11
|
}
|
|
18
12
|
};
|
|
19
13
|
}
|
|
20
|
-
|
|
14
|
+
export default renderKitchenSimulator;
|
package/es/models.js
CHANGED
|
@@ -1,44 +1,39 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/createClass"));
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/classCallCheck"));
|
|
9
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/possibleConstructorReturn"));
|
|
10
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/getPrototypeOf"));
|
|
11
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/inherits"));
|
|
12
|
-
var _immutable = require("immutable");
|
|
13
|
-
var _constants = require("./constants");
|
|
14
|
-
var _snap = require("./utils/snap");
|
|
15
|
-
var _helper = require("./utils/helper");
|
|
16
|
-
var _convertUnitsLite = require("./utils/convert-units-lite");
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
17
7
|
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; }
|
|
18
|
-
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) { (
|
|
19
|
-
function _callSuper(t, o, e) { return o = (
|
|
8
|
+
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; }
|
|
9
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
20
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
11
|
+
import { fromJS, List, Map, Record } from 'immutable';
|
|
12
|
+
import { MODE_IDLE, UNIT_INCH } from "./constants";
|
|
13
|
+
import { SNAP_MASK } from "./utils/snap";
|
|
14
|
+
import { isEmpty } from "./utils/helper";
|
|
15
|
+
import { convert } from "./utils/convert-units-lite";
|
|
21
16
|
var safeLoadMapList = function safeLoadMapList(mapList, Model, defaultMap) {
|
|
22
|
-
return mapList ? new
|
|
17
|
+
return mapList ? new Map(mapList).map(function (m) {
|
|
23
18
|
return new Model(m);
|
|
24
|
-
}).toMap() : defaultMap || new
|
|
19
|
+
}).toMap() : defaultMap || new Map();
|
|
25
20
|
};
|
|
26
|
-
var Grid =
|
|
21
|
+
export var Grid = /*#__PURE__*/function (_Record) {
|
|
27
22
|
function Grid() {
|
|
28
23
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
29
|
-
(
|
|
24
|
+
_classCallCheck(this, Grid);
|
|
30
25
|
return _callSuper(this, Grid, [_objectSpread(_objectSpread({}, json), {}, {
|
|
31
|
-
properties:
|
|
26
|
+
properties: fromJS(json.properties || {})
|
|
32
27
|
})]);
|
|
33
28
|
}
|
|
34
|
-
(
|
|
35
|
-
return (
|
|
36
|
-
}(
|
|
29
|
+
_inherits(Grid, _Record);
|
|
30
|
+
return _createClass(Grid);
|
|
31
|
+
}(Record({
|
|
37
32
|
id: '',
|
|
38
33
|
type: '',
|
|
39
|
-
properties:
|
|
34
|
+
properties: Map()
|
|
40
35
|
}, 'Grid'));
|
|
41
|
-
var DefaultGrids =
|
|
36
|
+
export var DefaultGrids = new Map({
|
|
42
37
|
h1: new Grid({
|
|
43
38
|
id: 'h1',
|
|
44
39
|
type: 'horizontal-streak',
|
|
@@ -56,94 +51,94 @@ var DefaultGrids = exports.DefaultGrids = new _immutable.Map({
|
|
|
56
51
|
}
|
|
57
52
|
})
|
|
58
53
|
});
|
|
59
|
-
var ElementsSet =
|
|
54
|
+
export var ElementsSet = /*#__PURE__*/function (_Record2) {
|
|
60
55
|
function ElementsSet() {
|
|
61
56
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
62
|
-
(
|
|
57
|
+
_classCallCheck(this, ElementsSet);
|
|
63
58
|
return _callSuper(this, ElementsSet, [{
|
|
64
|
-
vertices: new
|
|
65
|
-
lines: new
|
|
66
|
-
holes: new
|
|
67
|
-
areas: new
|
|
68
|
-
items: new
|
|
59
|
+
vertices: new List(json.vertices || []),
|
|
60
|
+
lines: new List(json.lines || []),
|
|
61
|
+
holes: new List(json.holes || []),
|
|
62
|
+
areas: new List(json.areas || []),
|
|
63
|
+
items: new List(json.items || [])
|
|
69
64
|
}]);
|
|
70
65
|
}
|
|
71
|
-
(
|
|
72
|
-
return (
|
|
73
|
-
}(
|
|
74
|
-
vertices: new
|
|
75
|
-
lines: new
|
|
76
|
-
holes: new
|
|
77
|
-
areas: new
|
|
78
|
-
items: new
|
|
66
|
+
_inherits(ElementsSet, _Record2);
|
|
67
|
+
return _createClass(ElementsSet);
|
|
68
|
+
}(Record({
|
|
69
|
+
vertices: new List(),
|
|
70
|
+
lines: new List(),
|
|
71
|
+
holes: new List(),
|
|
72
|
+
areas: new List(),
|
|
73
|
+
items: new List()
|
|
79
74
|
}, 'ElementsSet'));
|
|
80
75
|
var sharedAttributes = {
|
|
81
76
|
id: '',
|
|
82
77
|
type: '',
|
|
83
78
|
prototype: '',
|
|
84
79
|
name: '',
|
|
85
|
-
misc: new
|
|
80
|
+
misc: new Map(),
|
|
86
81
|
selected: false,
|
|
87
|
-
properties: new
|
|
82
|
+
properties: new Map(),
|
|
88
83
|
style: '',
|
|
89
84
|
category: '',
|
|
90
85
|
visible: true
|
|
91
86
|
};
|
|
92
|
-
var Vertex =
|
|
87
|
+
export var Vertex = /*#__PURE__*/function (_Record3) {
|
|
93
88
|
function Vertex() {
|
|
94
89
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
95
|
-
(
|
|
90
|
+
_classCallCheck(this, Vertex);
|
|
96
91
|
return _callSuper(this, Vertex, [_objectSpread(_objectSpread({}, json), {}, {
|
|
97
|
-
lines: new
|
|
98
|
-
areas: new
|
|
92
|
+
lines: new List(json.lines || []),
|
|
93
|
+
areas: new List(json.areas || [])
|
|
99
94
|
})]);
|
|
100
95
|
}
|
|
101
|
-
(
|
|
102
|
-
return (
|
|
103
|
-
}(
|
|
96
|
+
_inherits(Vertex, _Record3);
|
|
97
|
+
return _createClass(Vertex);
|
|
98
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
104
99
|
x: -1,
|
|
105
100
|
y: -1,
|
|
106
101
|
prototype: 'vertices',
|
|
107
|
-
lines: new
|
|
108
|
-
areas: new
|
|
102
|
+
lines: new List(),
|
|
103
|
+
areas: new List()
|
|
109
104
|
}), 'Vertex'));
|
|
110
|
-
var Line =
|
|
105
|
+
export var Line = /*#__PURE__*/function (_Record4) {
|
|
111
106
|
function Line() {
|
|
112
107
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
113
|
-
(
|
|
108
|
+
_classCallCheck(this, Line);
|
|
114
109
|
return _callSuper(this, Line, [_objectSpread(_objectSpread({}, json), {}, {
|
|
115
110
|
createdDateTime: json.createdDateTime !== undefined ? json.createdDateTime : new Date().getTime(),
|
|
116
|
-
properties:
|
|
117
|
-
vertices: new
|
|
118
|
-
holes: new
|
|
119
|
-
relatedVertices: new
|
|
111
|
+
properties: fromJS(json.properties || {}),
|
|
112
|
+
vertices: new List(json.vertices || []),
|
|
113
|
+
holes: new List(json.holes || []),
|
|
114
|
+
relatedVertices: new List(json.relatedVertices || []),
|
|
120
115
|
userData: {}
|
|
121
116
|
})]);
|
|
122
117
|
}
|
|
123
|
-
(
|
|
124
|
-
return (
|
|
125
|
-
}(
|
|
118
|
+
_inherits(Line, _Record4);
|
|
119
|
+
return _createClass(Line);
|
|
120
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
126
121
|
createdDateTime: new Date().getTime(),
|
|
127
122
|
prototype: 'lines',
|
|
128
|
-
vertices: new
|
|
129
|
-
relatedVertices: new
|
|
130
|
-
holes: new
|
|
123
|
+
vertices: new List(),
|
|
124
|
+
relatedVertices: new List(),
|
|
125
|
+
holes: new List(),
|
|
131
126
|
focus: false,
|
|
132
127
|
wallColor: '#dddddd',
|
|
133
128
|
userData: {}
|
|
134
129
|
}), 'Line'));
|
|
135
|
-
var Hole =
|
|
130
|
+
export var Hole = /*#__PURE__*/function (_Record5) {
|
|
136
131
|
function Hole() {
|
|
137
132
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
138
|
-
(
|
|
133
|
+
_classCallCheck(this, Hole);
|
|
139
134
|
return _callSuper(this, Hole, [_objectSpread(_objectSpread({}, json), {}, {
|
|
140
|
-
properties:
|
|
135
|
+
properties: fromJS(json.properties || {}),
|
|
141
136
|
userData: {}
|
|
142
137
|
})]);
|
|
143
138
|
}
|
|
144
|
-
(
|
|
145
|
-
return (
|
|
146
|
-
}(
|
|
139
|
+
_inherits(Hole, _Record5);
|
|
140
|
+
return _createClass(Hole);
|
|
141
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
147
142
|
prototype: 'holes',
|
|
148
143
|
offset: -1,
|
|
149
144
|
x: 0,
|
|
@@ -153,45 +148,45 @@ var Hole = exports.Hole = /*#__PURE__*/function (_Record5) {
|
|
|
153
148
|
url: '',
|
|
154
149
|
userData: {}
|
|
155
150
|
}), 'Hole'));
|
|
156
|
-
var Area =
|
|
151
|
+
export var Area = /*#__PURE__*/function (_Record6) {
|
|
157
152
|
function Area() {
|
|
158
153
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
159
|
-
(
|
|
154
|
+
_classCallCheck(this, Area);
|
|
160
155
|
return _callSuper(this, Area, [_objectSpread(_objectSpread({}, json), {}, {
|
|
161
|
-
properties:
|
|
162
|
-
vertices: new
|
|
156
|
+
properties: fromJS(json.properties || {}),
|
|
157
|
+
vertices: new List(json.vertices || [])
|
|
163
158
|
})]);
|
|
164
159
|
}
|
|
165
|
-
(
|
|
166
|
-
return (
|
|
167
|
-
}(
|
|
160
|
+
_inherits(Area, _Record6);
|
|
161
|
+
return _createClass(Area);
|
|
162
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
168
163
|
prototype: 'areas',
|
|
169
|
-
vertices: new
|
|
170
|
-
holes: new
|
|
164
|
+
vertices: new List(),
|
|
165
|
+
holes: new List(),
|
|
171
166
|
texture: {
|
|
172
167
|
roughness: 0.9,
|
|
173
168
|
metalness: 0,
|
|
174
169
|
uri: ''
|
|
175
170
|
}
|
|
176
171
|
}), 'Area'));
|
|
177
|
-
var Item =
|
|
172
|
+
export var Item = /*#__PURE__*/function (_Record7) {
|
|
178
173
|
function Item() {
|
|
179
174
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
180
|
-
(
|
|
175
|
+
_classCallCheck(this, Item);
|
|
181
176
|
return _callSuper(this, Item, [_objectSpread(_objectSpread({}, json), {}, {
|
|
182
|
-
properties:
|
|
177
|
+
properties: fromJS(json.properties || {})
|
|
183
178
|
})]);
|
|
184
179
|
}
|
|
185
|
-
(
|
|
186
|
-
return (
|
|
187
|
-
}(
|
|
180
|
+
_inherits(Item, _Record7);
|
|
181
|
+
return _createClass(Item);
|
|
182
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
188
183
|
prototype: 'items',
|
|
189
184
|
x: 0,
|
|
190
185
|
y: 0,
|
|
191
186
|
rotation: 0,
|
|
192
|
-
submodule: new
|
|
193
|
-
normalMap: new
|
|
194
|
-
doorStyle: new
|
|
187
|
+
submodule: new List(),
|
|
188
|
+
normalMap: new List(),
|
|
189
|
+
doorStyle: new Map(),
|
|
195
190
|
animate: 0,
|
|
196
191
|
animValue: 0,
|
|
197
192
|
itemID: -1,
|
|
@@ -211,10 +206,10 @@ var Item = exports.Item = /*#__PURE__*/function (_Record7) {
|
|
|
211
206
|
},
|
|
212
207
|
distArray: [[0, 0], [0, 0], [0, 0], [0, 0]]
|
|
213
208
|
}), 'Item'));
|
|
214
|
-
var Layer =
|
|
209
|
+
export var Layer = /*#__PURE__*/function (_Record8) {
|
|
215
210
|
function Layer() {
|
|
216
211
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
217
|
-
(
|
|
212
|
+
_classCallCheck(this, Layer);
|
|
218
213
|
return _callSuper(this, Layer, [_objectSpread(_objectSpread({}, json), {}, {
|
|
219
214
|
vertices: safeLoadMapList(json.vertices, Vertex),
|
|
220
215
|
lines: safeLoadMapList(json.lines, Line),
|
|
@@ -225,20 +220,20 @@ var Layer = exports.Layer = /*#__PURE__*/function (_Record8) {
|
|
|
225
220
|
selected: new ElementsSet(json.selected)
|
|
226
221
|
})]);
|
|
227
222
|
}
|
|
228
|
-
(
|
|
229
|
-
return (
|
|
230
|
-
}(
|
|
223
|
+
_inherits(Layer, _Record8);
|
|
224
|
+
return _createClass(Layer);
|
|
225
|
+
}(Record({
|
|
231
226
|
id: '',
|
|
232
227
|
altitude: 0,
|
|
233
228
|
order: 0,
|
|
234
229
|
opacity: 1,
|
|
235
230
|
name: '',
|
|
236
231
|
visible: true,
|
|
237
|
-
vertices: new
|
|
238
|
-
lines: new
|
|
239
|
-
holes: new
|
|
240
|
-
areas: new
|
|
241
|
-
items: new
|
|
232
|
+
vertices: new Map(),
|
|
233
|
+
lines: new Map(),
|
|
234
|
+
holes: new Map(),
|
|
235
|
+
areas: new Map(),
|
|
236
|
+
items: new Map(),
|
|
242
237
|
selected: new ElementsSet(),
|
|
243
238
|
counterTop: {},
|
|
244
239
|
wallColor: {},
|
|
@@ -253,36 +248,36 @@ var Layer = exports.Layer = /*#__PURE__*/function (_Record8) {
|
|
|
253
248
|
},
|
|
254
249
|
backsplashApplied: false,
|
|
255
250
|
ceilHeight: 96,
|
|
256
|
-
unit:
|
|
251
|
+
unit: UNIT_INCH
|
|
257
252
|
}, 'Layer'));
|
|
258
|
-
var Group =
|
|
253
|
+
export var Group = /*#__PURE__*/function (_Record9) {
|
|
259
254
|
function Group() {
|
|
260
255
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
261
|
-
(
|
|
256
|
+
_classCallCheck(this, Group);
|
|
262
257
|
return _callSuper(this, Group, [_objectSpread(_objectSpread({}, json), {}, {
|
|
263
|
-
properties:
|
|
264
|
-
elements:
|
|
258
|
+
properties: fromJS(json.properties || {}),
|
|
259
|
+
elements: fromJS(json.elements || {})
|
|
265
260
|
})]);
|
|
266
261
|
}
|
|
267
|
-
(
|
|
268
|
-
return (
|
|
269
|
-
}(
|
|
262
|
+
_inherits(Group, _Record9);
|
|
263
|
+
return _createClass(Group);
|
|
264
|
+
}(Record(_objectSpread(_objectSpread({}, sharedAttributes), {}, {
|
|
270
265
|
prototype: 'groups',
|
|
271
266
|
x: 0,
|
|
272
267
|
y: 0,
|
|
273
268
|
rotation: 0,
|
|
274
|
-
elements: new
|
|
269
|
+
elements: new Map()
|
|
275
270
|
}), 'Group'));
|
|
276
|
-
var DefaultLayers =
|
|
271
|
+
export var DefaultLayers = new Map({
|
|
277
272
|
'layer-1': new Layer({
|
|
278
273
|
id: 'layer-1',
|
|
279
274
|
name: 'default'
|
|
280
275
|
})
|
|
281
276
|
});
|
|
282
|
-
var Scene =
|
|
277
|
+
export var Scene = /*#__PURE__*/function (_Record0) {
|
|
283
278
|
function Scene() {
|
|
284
279
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
285
|
-
(
|
|
280
|
+
_classCallCheck(this, Scene);
|
|
286
281
|
var layers = safeLoadMapList(json.layers, Layer, DefaultLayers);
|
|
287
282
|
return _callSuper(this, Scene, [_objectSpread(_objectSpread({}, json), {}, {
|
|
288
283
|
// grids: safeLoadMapList(json.grids, Grid, DefaultGrids),
|
|
@@ -290,28 +285,28 @@ var Scene = exports.Scene = /*#__PURE__*/function (_Record0) {
|
|
|
290
285
|
layers: layers,
|
|
291
286
|
selectedLayer: layers.first().id,
|
|
292
287
|
groups: safeLoadMapList(json.groups || {}, Group),
|
|
293
|
-
meta: json.meta ?
|
|
294
|
-
guides: !
|
|
295
|
-
horizontal: new
|
|
296
|
-
vertical: new
|
|
297
|
-
circular: new
|
|
288
|
+
meta: json.meta ? fromJS(json.meta) : new Map(),
|
|
289
|
+
guides: !isEmpty(json.guides) ? fromJS(json.guides) : new Map({
|
|
290
|
+
horizontal: new Map(),
|
|
291
|
+
vertical: new Map(),
|
|
292
|
+
circular: new Map()
|
|
298
293
|
})
|
|
299
294
|
})]);
|
|
300
295
|
}
|
|
301
|
-
(
|
|
302
|
-
return (
|
|
303
|
-
}(
|
|
296
|
+
_inherits(Scene, _Record0);
|
|
297
|
+
return _createClass(Scene);
|
|
298
|
+
}(Record({
|
|
304
299
|
unit: 'cm',
|
|
305
300
|
rulerUnit: 'in',
|
|
306
|
-
layers: new
|
|
307
|
-
grids: new
|
|
301
|
+
layers: new Map(),
|
|
302
|
+
grids: new Map(),
|
|
308
303
|
selectedLayer: null,
|
|
309
|
-
groups: new
|
|
304
|
+
groups: new Map(),
|
|
310
305
|
width: 3000,
|
|
311
306
|
height: 2000,
|
|
312
|
-
meta: new
|
|
307
|
+
meta: new Map(),
|
|
313
308
|
//additional info
|
|
314
|
-
guides: new
|
|
309
|
+
guides: new Map(),
|
|
315
310
|
title: '',
|
|
316
311
|
currentProjectID: null,
|
|
317
312
|
showfg: true,
|
|
@@ -324,39 +319,39 @@ var Scene = exports.Scene = /*#__PURE__*/function (_Record0) {
|
|
|
324
319
|
isEndDragging: false,
|
|
325
320
|
setLineAttributes: false
|
|
326
321
|
}, 'Scene'));
|
|
327
|
-
var CatalogElement =
|
|
322
|
+
export var CatalogElement = /*#__PURE__*/function (_Record1) {
|
|
328
323
|
function CatalogElement() {
|
|
329
324
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
330
|
-
(
|
|
325
|
+
_classCallCheck(this, CatalogElement);
|
|
331
326
|
return _callSuper(this, CatalogElement, [_objectSpread(_objectSpread({}, json), {}, {
|
|
332
|
-
info:
|
|
333
|
-
properties:
|
|
334
|
-
obj:
|
|
327
|
+
info: fromJS(json.info),
|
|
328
|
+
properties: fromJS(json.properties),
|
|
329
|
+
obj: fromJS(json.obj)
|
|
335
330
|
})]);
|
|
336
331
|
}
|
|
337
|
-
(
|
|
338
|
-
return (
|
|
339
|
-
}(
|
|
332
|
+
_inherits(CatalogElement, _Record1);
|
|
333
|
+
return _createClass(CatalogElement);
|
|
334
|
+
}(Record({
|
|
340
335
|
itemID: -1,
|
|
341
336
|
name: '',
|
|
342
337
|
prototype: '',
|
|
343
|
-
info: new
|
|
344
|
-
properties: new
|
|
345
|
-
obj: new
|
|
338
|
+
info: new Map(),
|
|
339
|
+
properties: new Map(),
|
|
340
|
+
obj: new Map(),
|
|
346
341
|
type: ''
|
|
347
342
|
}, 'CatalogElement'));
|
|
348
|
-
var Catalog =
|
|
343
|
+
export var Catalog = /*#__PURE__*/function (_Record10) {
|
|
349
344
|
function Catalog() {
|
|
350
345
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
351
|
-
(
|
|
346
|
+
_classCallCheck(this, Catalog);
|
|
352
347
|
var elements = safeLoadMapList(json.elements, CatalogElement);
|
|
353
348
|
return _callSuper(this, Catalog, [{
|
|
354
349
|
elements: elements,
|
|
355
350
|
ready: !elements.isEmpty()
|
|
356
351
|
}]);
|
|
357
352
|
}
|
|
358
|
-
(
|
|
359
|
-
return (
|
|
353
|
+
_inherits(Catalog, _Record10);
|
|
354
|
+
return _createClass(Catalog, [{
|
|
360
355
|
key: "factoryElement",
|
|
361
356
|
value: function factoryElement(type, options, initialProperties, state) {
|
|
362
357
|
if (!this.elements.has(type)) {
|
|
@@ -390,20 +385,20 @@ var Catalog = exports.Catalog = /*#__PURE__*/function (_Record10) {
|
|
|
390
385
|
depth: element.getIn(['info', 'sizeinfo', 'depth'])
|
|
391
386
|
};
|
|
392
387
|
var _sizeinfo = {
|
|
393
|
-
width: new
|
|
388
|
+
width: new Map({
|
|
394
389
|
_length: temp.width,
|
|
395
390
|
_unit: 'in',
|
|
396
|
-
length:
|
|
391
|
+
length: convert(temp.width).from('in').to('cm')
|
|
397
392
|
}),
|
|
398
|
-
height: new
|
|
393
|
+
height: new Map({
|
|
399
394
|
_length: temp.height,
|
|
400
395
|
_unit: 'in',
|
|
401
|
-
length:
|
|
396
|
+
length: convert(temp.height).from('in').to('cm')
|
|
402
397
|
}),
|
|
403
|
-
depth: new
|
|
398
|
+
depth: new Map({
|
|
404
399
|
_length: temp.depth,
|
|
405
400
|
_unit: 'in',
|
|
406
|
-
length:
|
|
401
|
+
length: convert(temp.depth).from('in').to('cm')
|
|
407
402
|
})
|
|
408
403
|
};
|
|
409
404
|
properties = properties.set('width', _sizeinfo.width).set('height', _sizeinfo.height).set('depth', _sizeinfo.depth);
|
|
@@ -431,72 +426,72 @@ var Catalog = exports.Catalog = /*#__PURE__*/function (_Record10) {
|
|
|
431
426
|
}
|
|
432
427
|
}
|
|
433
428
|
}]);
|
|
434
|
-
}(
|
|
429
|
+
}(Record({
|
|
435
430
|
ready: false,
|
|
436
431
|
page: 'root',
|
|
437
|
-
path: new
|
|
438
|
-
elements: new
|
|
432
|
+
path: new List(),
|
|
433
|
+
elements: new Map()
|
|
439
434
|
}, 'Catalog'));
|
|
440
|
-
var HistoryStructure =
|
|
435
|
+
export var HistoryStructure = /*#__PURE__*/function (_Record11) {
|
|
441
436
|
function HistoryStructure() {
|
|
442
437
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
443
|
-
(
|
|
438
|
+
_classCallCheck(this, HistoryStructure);
|
|
444
439
|
return _callSuper(this, HistoryStructure, [{
|
|
445
|
-
list:
|
|
440
|
+
list: fromJS(json.list || []),
|
|
446
441
|
first: new Scene(json.scene),
|
|
447
442
|
last: new Scene(json.last || json.scene)
|
|
448
443
|
}]);
|
|
449
444
|
}
|
|
450
|
-
(
|
|
451
|
-
return (
|
|
452
|
-
}(
|
|
453
|
-
list: new
|
|
445
|
+
_inherits(HistoryStructure, _Record11);
|
|
446
|
+
return _createClass(HistoryStructure);
|
|
447
|
+
}(Record({
|
|
448
|
+
list: new List(),
|
|
454
449
|
first: null,
|
|
455
450
|
last: null
|
|
456
451
|
}, 'HistoryStructure'));
|
|
457
|
-
var State =
|
|
452
|
+
export var State = /*#__PURE__*/function (_Record12) {
|
|
458
453
|
function State() {
|
|
459
454
|
var json = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
460
|
-
(
|
|
455
|
+
_classCallCheck(this, State);
|
|
461
456
|
return _callSuper(this, State, [_objectSpread(_objectSpread({}, json), {}, {
|
|
462
457
|
scene: new Scene(json.scene),
|
|
463
458
|
sceneHistory: new HistoryStructure(json),
|
|
464
459
|
catalog: new Catalog(json.catalog || {}),
|
|
465
|
-
viewer2D: new
|
|
466
|
-
replacingSupport: new
|
|
467
|
-
drawingSupport: new
|
|
468
|
-
draggingSupport: new
|
|
469
|
-
rotatingSupport: new
|
|
470
|
-
misc: json.misc ?
|
|
460
|
+
viewer2D: new Map(json.viewer2D || {}),
|
|
461
|
+
replacingSupport: new Map(json.drawingSupport || {}),
|
|
462
|
+
drawingSupport: new Map(json.drawingSupport || {}),
|
|
463
|
+
draggingSupport: new Map(json.draggingSupport || {}),
|
|
464
|
+
rotatingSupport: new Map(json.rotatingSupport || {}),
|
|
465
|
+
misc: json.misc ? fromJS(json.misc) : new Map()
|
|
471
466
|
})]);
|
|
472
467
|
}
|
|
473
|
-
(
|
|
474
|
-
return (
|
|
475
|
-
}(
|
|
476
|
-
mode:
|
|
468
|
+
_inherits(State, _Record12);
|
|
469
|
+
return _createClass(State);
|
|
470
|
+
}(Record({
|
|
471
|
+
mode: MODE_IDLE,
|
|
477
472
|
scene: new Scene(),
|
|
478
473
|
sceneHistory: new HistoryStructure(),
|
|
479
474
|
catalog: new Catalog(),
|
|
480
|
-
viewer2D: new
|
|
481
|
-
mouse: new
|
|
475
|
+
viewer2D: new Map(),
|
|
476
|
+
mouse: new Map({
|
|
482
477
|
x: 0,
|
|
483
478
|
y: 0
|
|
484
479
|
}),
|
|
485
480
|
zoom: 0,
|
|
486
|
-
snapMask:
|
|
487
|
-
snapElements: new
|
|
481
|
+
snapMask: SNAP_MASK,
|
|
482
|
+
snapElements: new List(),
|
|
488
483
|
activeSnapElement: null,
|
|
489
|
-
replacingSupport: new
|
|
490
|
-
drawingSupport: new
|
|
491
|
-
draggingSupport: new
|
|
492
|
-
rotatingSupport: new
|
|
484
|
+
replacingSupport: new Map(),
|
|
485
|
+
drawingSupport: new Map(),
|
|
486
|
+
draggingSupport: new Map(),
|
|
487
|
+
rotatingSupport: new Map(),
|
|
493
488
|
doorStyle: null,
|
|
494
489
|
oStyle: null,
|
|
495
|
-
errors: new
|
|
496
|
-
warnings: new
|
|
497
|
-
clipboardProperties: new
|
|
498
|
-
selectedElementsHistory: new
|
|
499
|
-
misc: new
|
|
490
|
+
errors: new List(),
|
|
491
|
+
warnings: new List(),
|
|
492
|
+
clipboardProperties: new Map(),
|
|
493
|
+
selectedElementsHistory: new List(),
|
|
494
|
+
misc: new Map(),
|
|
500
495
|
//additional info
|
|
501
496
|
alterate: false,
|
|
502
497
|
isOpen: false,
|
|
@@ -507,4 +502,4 @@ var State = exports.State = /*#__PURE__*/function (_Record12) {
|
|
|
507
502
|
isHelp: false,
|
|
508
503
|
isCabinetDrawing: false
|
|
509
504
|
}, 'State'));
|
|
510
|
-
|
|
505
|
+
export default State;
|