kitchen-simulator 1.1.1-test.6 → 1.1.1-test.61
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 +10 -2
- package/es/AppContext.js +10 -3
- package/es/KitchenConfigurator.js +95 -106
- package/es/KitchenConfiguratorApp.js +145 -154
- package/es/actions/area-actions.js +12 -5
- package/es/actions/export.js +29 -12
- package/es/actions/groups-actions.js +45 -27
- package/es/actions/holes-actions.js +55 -34
- package/es/actions/items-actions.js +145 -94
- package/es/actions/lines-actions.js +36 -21
- package/es/actions/project-actions.js +145 -94
- package/es/actions/scene-actions.js +21 -11
- package/es/actions/vertices-actions.js +15 -7
- package/es/actions/viewer2d-actions.js +36 -21
- package/es/actions/viewer3d-actions.js +18 -9
- package/es/catalog/areas/area/planner-element.js +18 -8
- package/es/catalog/catalog.js +21 -24
- package/es/catalog/factories/area-factory-3d.js +31 -22
- package/es/catalog/factories/area-factory.js +20 -14
- package/es/catalog/factories/export.js +24 -6
- package/es/catalog/factories/wall-factory-3d.js +41 -31
- package/es/catalog/factories/wall-factory.js +31 -21
- package/es/catalog/holes/door-closet/planner-element.js +24 -15
- package/es/catalog/holes/door-double/planner-element.js +24 -15
- package/es/catalog/holes/door-exterior/planner-element.js +25 -16
- package/es/catalog/holes/door-interior/planner-element.js +25 -16
- package/es/catalog/holes/door-panic/planner-element.js +16 -7
- package/es/catalog/holes/door-panic-double/planner-element.js +24 -15
- package/es/catalog/holes/door-sliding/planner-element.js +25 -16
- package/es/catalog/holes/doorway-framed/planner-element.js +20 -11
- package/es/catalog/holes/doorway-frameless/planner-element.js +16 -7
- package/es/catalog/holes/export.js +97 -13
- package/es/catalog/holes/window-clear/planner-element.js +19 -10
- package/es/catalog/holes/window-cross/planner-element.js +19 -10
- package/es/catalog/holes/window-double-hung/planner-element.js +19 -10
- package/es/catalog/holes/window-vertical/planner-element.js +19 -10
- package/es/catalog/lines/wall/planner-element.js +21 -11
- package/es/catalog/molding/molding-dcm/planner-element.js +14 -5
- package/es/catalog/molding/molding-fbm/planner-element.js +14 -5
- package/es/catalog/molding/molding-lrm/planner-element.js +14 -5
- package/es/catalog/properties/export.js +80 -20
- package/es/catalog/properties/property-checkbox.js +84 -35
- package/es/catalog/properties/property-color.js +23 -16
- package/es/catalog/properties/property-enum.js +72 -28
- package/es/catalog/properties/property-hidden.js +16 -9
- package/es/catalog/properties/property-lenght-measure.js +45 -39
- package/es/catalog/properties/property-length-measure.js +84 -34
- package/es/catalog/properties/property-length-measure_hole.js +45 -39
- package/es/catalog/properties/property-number.js +24 -17
- package/es/catalog/properties/property-read-only.js +23 -16
- package/es/catalog/properties/property-string.js +23 -16
- package/es/catalog/properties/property-toggle.js +23 -16
- package/es/catalog/properties/shared-property-style.js +7 -1
- package/es/catalog/utils/FuseUtils.js +15 -11
- package/es/catalog/utils/exporter.js +15 -11
- package/es/catalog/utils/geom-utils.js +29 -13
- package/es/catalog/utils/item-loader.js +97 -91
- package/es/catalog/utils/load-obj.js +28 -20
- package/es/catalog/utils/mtl-loader.js +9 -3
- package/es/catalog/utils/obj-loader.js +9 -3
- package/es/class/FuseUtils.js +15 -11
- package/es/class/area.js +28 -26
- package/es/class/export.js +95 -23
- package/es/class/group.js +59 -62
- package/es/class/guide.js +21 -19
- package/es/class/hole.js +89 -88
- package/es/class/item.js +150 -155
- package/es/class/layer.js +65 -63
- package/es/class/line.js +143 -144
- package/es/class/project.js +98 -94
- package/es/class/vertex.js +35 -33
- package/es/components/content.js +29 -19
- package/es/components/disclaimer/disclaimer.js +80 -92
- package/es/components/export.js +32 -8
- package/es/components/style/button.js +31 -30
- package/es/components/style/cancel-button.js +14 -8
- package/es/components/style/content-container.js +16 -12
- package/es/components/style/content-title.js +20 -15
- package/es/components/style/delete-button.js +17 -9
- package/es/components/style/export.js +120 -30
- package/es/components/style/form-block.js +15 -12
- package/es/components/style/form-color-input.js +14 -8
- package/es/components/style/form-label.js +15 -12
- package/es/components/style/form-number-input.js +73 -47
- package/es/components/style/form-number-input_2.js +44 -42
- package/es/components/style/form-select.js +60 -14
- package/es/components/style/form-slider.js +38 -16
- package/es/components/style/form-submit-button.js +17 -9
- package/es/components/style/form-text-input.js +57 -37
- package/es/components/viewer2d/area.js +24 -17
- package/es/components/viewer2d/export.js +120 -30
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +17 -11
- package/es/components/viewer2d/grids/grid-streak.js +17 -11
- package/es/components/viewer2d/grids/grid-vertical-streak.js +17 -11
- package/es/components/viewer2d/grids/grids.js +19 -15
- package/es/components/viewer2d/group.js +24 -15
- package/es/components/viewer2d/item.js +70 -68
- package/es/components/viewer2d/layer.js +30 -23
- package/es/components/viewer2d/line.js +111 -104
- package/es/components/viewer2d/ruler.js +29 -23
- package/es/components/viewer2d/rulerDist.js +28 -21
- package/es/components/viewer2d/rulerX.js +47 -45
- package/es/components/viewer2d/rulerY.js +45 -43
- package/es/components/viewer2d/scene.js +42 -46
- package/es/components/viewer2d/snap.js +22 -13
- package/es/components/viewer2d/state.js +27 -23
- package/es/components/viewer2d/utils.js +65 -21
- package/es/components/viewer2d/vertex.js +17 -8
- package/es/components/viewer2d/viewer2d.js +171 -166
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +23 -24
- package/es/components/viewer3d/dcm.js +7 -1
- package/es/components/viewer3d/fbm.js +7 -1
- package/es/components/viewer3d/front3D.js +21 -17
- package/es/components/viewer3d/grid-creator.js +17 -8
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +14 -6
- package/es/components/viewer3d/grids/grid-streak.js +13 -5
- package/es/components/viewer3d/grids/grid-vertical-streak.js +14 -6
- package/es/components/viewer3d/libs/first-person-controls.js +9 -2
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +7 -1
- package/es/components/viewer3d/libs/mtl-loader.js +8 -2
- package/es/components/viewer3d/libs/obj-loader.js +8 -2
- package/es/components/viewer3d/libs/orbit-controls.js +12 -5
- package/es/components/viewer3d/libs/pointer-lock-controls.js +11 -4
- package/es/components/viewer3d/lrm.js +7 -1
- package/es/components/viewer3d/model.js +7 -1
- package/es/components/viewer3d/pointer-lock-navigation.js +10 -3
- package/es/components/viewer3d/ruler-utils/itemRect.js +25 -18
- package/es/components/viewer3d/ruler-utils/layer3D.js +66 -59
- package/es/components/viewer3d/ruler-utils/ruler3D.js +46 -42
- package/es/components/viewer3d/ruler-utils/scene3D.js +18 -11
- package/es/components/viewer3d/ruler-utils/state3D.js +11 -4
- package/es/components/viewer3d/scene-creator.js +227 -198
- package/es/components/viewer3d/three-memory-cleaner.js +12 -3
- package/es/components/viewer3d/viewer3d-first-person.js +46 -46
- package/es/components/viewer3d/viewer3d.js +208 -209
- package/es/constants.js +358 -349
- package/es/index.js +28 -15
- package/es/models.js +185 -183
- package/es/plugins/SVGLoader.js +53 -48
- package/es/plugins/autosave.js +9 -3
- package/es/plugins/console-debugger.js +12 -8
- package/es/plugins/export.js +32 -8
- package/es/plugins/keyboard.js +35 -29
- package/es/reducers/areas-reducer.js +13 -7
- package/es/reducers/export.js +96 -24
- package/es/reducers/groups-reducer.js +37 -31
- package/es/reducers/holes-reducer.js +49 -43
- package/es/reducers/items-reducer.js +112 -109
- package/es/reducers/lines-reducer.js +34 -28
- package/es/reducers/project-reducer.js +111 -105
- package/es/reducers/reducer.js +23 -16
- package/es/reducers/scene-reducer.js +21 -15
- package/es/reducers/user-reducer.js +11 -6
- package/es/reducers/vertices-reducer.js +17 -11
- package/es/reducers/viewer2d-reducer.js +24 -18
- package/es/reducers/viewer3d-reducer.js +22 -16
- package/es/shared-style.js +16 -10
- package/es/styles/export.js +11 -3
- package/es/translator/en.js +7 -1
- package/es/translator/it.js +7 -1
- package/es/translator/ru.js +7 -1
- package/es/translator/translator.js +19 -17
- package/es/utils/browser.js +9 -2
- package/es/utils/convert-units-lite.js +35 -0
- package/es/utils/email-validator.js +7 -1
- package/es/utils/export.js +46 -15
- package/es/utils/geometry.js +279 -191
- package/es/utils/get-edges-of-subgraphs.js +9 -1
- package/es/utils/graph-cycles.js +11 -9
- package/es/utils/graph-inner-cycles.js +18 -10
- package/es/utils/graph.js +17 -12
- package/es/utils/helper.js +63 -109
- package/es/utils/history.js +15 -8
- package/es/utils/id-broker.js +15 -12
- package/es/utils/logger.js +7 -1
- package/es/utils/math.js +12 -5
- package/es/utils/molding.js +177 -158
- package/es/utils/name-generator.js +13 -11
- package/es/utils/objects-utils.js +19 -7
- package/es/utils/phone-validator.js +7 -1
- package/es/utils/process-black-list.js +10 -6
- package/es/utils/react-if.js +12 -6
- package/es/utils/snap-scene.js +34 -32
- package/es/utils/snap.js +59 -51
- package/es/utils/summarizeCart.js +7 -1
- package/es/utils/threeCSG.es6.js +22 -17
- package/es/version.js +7 -1
- package/lib/@history.js +1 -1
- package/lib/AppContext.js +1 -1
- package/lib/KitchenConfigurator.js +68 -87
- package/lib/KitchenConfiguratorApp.js +94 -110
- package/lib/actions/export.js +1 -1
- package/lib/catalog/areas/area/planner-element.js +12 -8
- package/lib/catalog/catalog.js +7 -15
- package/lib/catalog/factories/area-factory-3d.js +1 -1
- package/lib/catalog/factories/area-factory.js +4 -6
- package/lib/catalog/factories/export.js +1 -1
- package/lib/catalog/factories/wall-factory-3d.js +4 -4
- package/lib/catalog/factories/wall-factory.js +2 -2
- package/lib/catalog/holes/door-closet/planner-element.js +2 -2
- package/lib/catalog/holes/door-double/planner-element.js +2 -2
- package/lib/catalog/holes/door-exterior/planner-element.js +2 -2
- package/lib/catalog/holes/door-interior/planner-element.js +2 -2
- package/lib/catalog/holes/door-panic/planner-element.js +2 -2
- package/lib/catalog/holes/door-panic-double/planner-element.js +2 -2
- package/lib/catalog/holes/door-sliding/planner-element.js +2 -2
- package/lib/catalog/holes/doorway-framed/planner-element.js +2 -2
- package/lib/catalog/holes/doorway-frameless/planner-element.js +2 -2
- package/lib/catalog/holes/export.js +14 -14
- package/lib/catalog/holes/window-clear/planner-element.js +2 -2
- package/lib/catalog/holes/window-cross/planner-element.js +2 -2
- package/lib/catalog/holes/window-double-hung/planner-element.js +2 -2
- package/lib/catalog/holes/window-vertical/planner-element.js +2 -2
- package/lib/catalog/lines/wall/planner-element.js +15 -11
- package/lib/catalog/molding/molding-dcm/planner-element.js +2 -2
- package/lib/catalog/molding/molding-fbm/planner-element.js +2 -2
- package/lib/catalog/molding/molding-lrm/planner-element.js +2 -2
- package/lib/catalog/properties/export.js +1 -1
- package/lib/catalog/properties/property-checkbox.js +66 -24
- package/lib/catalog/properties/property-color.js +1 -1
- package/lib/catalog/properties/property-enum.js +52 -15
- package/lib/catalog/properties/property-hidden.js +1 -1
- package/lib/catalog/properties/property-lenght-measure.js +8 -9
- package/lib/catalog/properties/property-length-measure.js +59 -16
- package/lib/catalog/properties/property-length-measure_hole.js +8 -9
- package/lib/catalog/properties/property-number.js +1 -1
- package/lib/catalog/properties/property-read-only.js +1 -1
- package/lib/catalog/properties/property-string.js +1 -1
- package/lib/catalog/properties/property-toggle.js +1 -1
- package/lib/catalog/utils/FuseUtils.js +8 -10
- package/lib/catalog/utils/exporter.js +8 -11
- package/lib/catalog/utils/geom-utils.js +1 -1
- package/lib/catalog/utils/item-loader.js +29 -35
- package/lib/catalog/utils/mtl-loader.js +7 -3
- package/lib/catalog/utils/obj-loader.js +7 -3
- package/lib/class/FuseUtils.js +8 -10
- package/lib/class/area.js +7 -10
- package/lib/class/export.js +1 -1
- package/lib/class/group.js +11 -19
- package/lib/class/guide.js +9 -12
- package/lib/class/hole.js +5 -8
- package/lib/class/item.js +23 -34
- package/lib/class/layer.js +5 -8
- package/lib/class/line.js +12 -19
- package/lib/class/project.js +8 -10
- package/lib/class/vertex.js +7 -10
- package/lib/components/content.js +3 -2
- package/lib/components/disclaimer/disclaimer.js +67 -87
- package/lib/components/export.js +1 -1
- package/lib/components/style/button.js +15 -21
- package/lib/components/style/cancel-button.js +5 -6
- package/lib/components/style/content-container.js +3 -6
- package/lib/components/style/content-title.js +8 -11
- package/lib/components/style/delete-button.js +6 -7
- package/lib/components/style/export.js +1 -1
- package/lib/components/style/form-block.js +7 -11
- package/lib/components/style/form-color-input.js +5 -6
- package/lib/components/style/form-label.js +7 -11
- package/lib/components/style/form-number-input.js +41 -22
- package/lib/components/style/form-number-input_2.js +13 -18
- package/lib/components/style/form-select.js +51 -14
- package/lib/components/style/form-slider.js +26 -11
- package/lib/components/style/form-submit-button.js +6 -7
- package/lib/components/style/form-text-input.js +44 -31
- package/lib/components/viewer2d/area.js +6 -6
- package/lib/components/viewer2d/export.js +1 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +1 -2
- package/lib/components/viewer2d/grids/grid-streak.js +1 -2
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +1 -2
- package/lib/components/viewer2d/grids/grids.js +4 -9
- package/lib/components/viewer2d/group.js +2 -2
- package/lib/components/viewer2d/item.js +12 -18
- package/lib/components/viewer2d/layer.js +1 -1
- package/lib/components/viewer2d/line.js +4 -7
- package/lib/components/viewer2d/ruler.js +7 -8
- package/lib/components/viewer2d/rulerDist.js +5 -5
- package/lib/components/viewer2d/rulerX.js +13 -18
- package/lib/components/viewer2d/rulerY.js +13 -18
- package/lib/components/viewer2d/scene.js +22 -33
- package/lib/components/viewer2d/snap.js +2 -2
- package/lib/components/viewer2d/state.js +5 -10
- package/lib/components/viewer2d/utils.js +35 -2
- package/lib/components/viewer2d/vertex.js +2 -2
- package/lib/components/viewer2d/viewer2d.js +38 -40
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +14 -20
- package/lib/components/viewer3d/front3D.js +4 -9
- package/lib/components/viewer3d/grid-creator.js +2 -2
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +1 -1
- package/lib/components/viewer3d/grids/grid-streak.js +1 -1
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +1 -1
- package/lib/components/viewer3d/libs/mtl-loader.js +6 -2
- package/lib/components/viewer3d/libs/obj-loader.js +6 -2
- package/lib/components/viewer3d/libs/orbit-controls.js +10 -5
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +9 -4
- package/lib/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +8 -8
- package/lib/components/viewer3d/ruler-utils/layer3D.js +33 -33
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +3 -6
- package/lib/components/viewer3d/ruler-utils/scene3D.js +4 -5
- package/lib/components/viewer3d/ruler-utils/state3D.js +1 -1
- package/lib/components/viewer3d/scene-creator.js +40 -45
- package/lib/components/viewer3d/three-memory-cleaner.js +1 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +11 -16
- package/lib/components/viewer3d/viewer3d.js +32 -37
- package/lib/index.js +22 -88
- package/lib/models.js +58 -63
- package/lib/plugins/console-debugger.js +3 -6
- package/lib/plugins/export.js +1 -1
- package/lib/reducers/export.js +1 -1
- package/lib/reducers/user-reducer.js +0 -1
- package/lib/reducers/viewer2d-reducer.js +3 -4
- package/lib/reducers/viewer3d-reducer.js +3 -4
- package/lib/styles/export.js +1 -1
- package/lib/translator/translator.js +5 -9
- package/lib/utils/convert-units-lite.js +35 -0
- package/lib/utils/export.js +2 -2
- package/lib/utils/geometry.js +20 -28
- package/lib/utils/get-edges-of-subgraphs.js +7 -1
- package/lib/utils/graph-cycles.js +9 -9
- package/lib/utils/graph-inner-cycles.js +1 -1
- package/lib/utils/graph.js +15 -12
- package/lib/utils/helper.js +14 -83
- package/lib/utils/history.js +1 -1
- package/lib/utils/id-broker.js +7 -10
- package/lib/utils/molding.js +66 -71
- package/lib/utils/name-generator.js +5 -8
- package/lib/utils/objects-utils.js +5 -3
- package/lib/utils/process-black-list.js +3 -5
- package/lib/utils/react-if.js +1 -1
- package/lib/utils/snap-scene.js +3 -7
- package/lib/utils/snap.js +22 -26
- package/lib/utils/threeCSG.es6.js +14 -14
- package/package.json +24 -54
- package/es/analytics/ga4.js +0 -191
- package/es/analytics/posthog.js +0 -60
- package/lib/analytics/ga4.js +0 -197
- package/lib/analytics/posthog.js +0 -68
package/lib/class/item.js
CHANGED
|
@@ -1,35 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
7
|
-
var
|
|
8
|
+
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
12
|
+
var _convertUnitsLite = require("../utils/convert-units-lite");
|
|
8
13
|
var _export = require("./export");
|
|
9
14
|
var _export2 = require("../utils/export");
|
|
10
15
|
var _immutable = require("immutable");
|
|
11
|
-
var _path = _interopRequireDefault(require("path"));
|
|
12
16
|
var _constants = require("../constants");
|
|
13
17
|
var _helper = require("../utils/helper");
|
|
14
|
-
var _util = require("util");
|
|
15
18
|
var _molding = require("../utils/molding");
|
|
16
19
|
var _utils = require("../components/viewer2d/utils");
|
|
17
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
19
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
20
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
21
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
22
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
23
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
24
|
-
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; }
|
|
25
20
|
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; }
|
|
26
|
-
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) {
|
|
27
|
-
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; }
|
|
28
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
29
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
30
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
31
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
32
|
-
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); }
|
|
21
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
33
22
|
var allItemRect;
|
|
34
23
|
var allItemSnap;
|
|
35
24
|
var allLines;
|
|
@@ -40,9 +29,9 @@ var time1;
|
|
|
40
29
|
var time2;
|
|
41
30
|
var Item = exports["default"] = /*#__PURE__*/function () {
|
|
42
31
|
function Item() {
|
|
43
|
-
|
|
32
|
+
(0, _classCallCheck2["default"])(this, Item);
|
|
44
33
|
}
|
|
45
|
-
return
|
|
34
|
+
return (0, _createClass2["default"])(Item, null, [{
|
|
46
35
|
key: "create",
|
|
47
36
|
value: function create(state, layerID, type, x, y, width, height, rotation, isDuplication) {
|
|
48
37
|
var molding = arguments.length > 9 && arguments[9] !== undefined ? arguments[9] : [];
|
|
@@ -152,7 +141,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
152
141
|
});
|
|
153
142
|
}
|
|
154
143
|
newProperties['depth'] = new _immutable.Map({
|
|
155
|
-
length: (0,
|
|
144
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_length).from('in').to('cm'),
|
|
156
145
|
_length: euro_cds[0].euro_length,
|
|
157
146
|
_unit: 'in'
|
|
158
147
|
});
|
|
@@ -166,7 +155,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
166
155
|
});
|
|
167
156
|
}
|
|
168
157
|
newProperties['height'] = new _immutable.Map({
|
|
169
|
-
length: (0,
|
|
158
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_height).from('in').to('cm'),
|
|
170
159
|
_length: euro_cds[0].euro_height,
|
|
171
160
|
_unit: 'in'
|
|
172
161
|
});
|
|
@@ -180,7 +169,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
180
169
|
});
|
|
181
170
|
}
|
|
182
171
|
newProperties['width'] = new _immutable.Map({
|
|
183
|
-
length: (0,
|
|
172
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_width).from('in').to('cm') - 10,
|
|
184
173
|
_length: euro_cds[0].euro_width,
|
|
185
174
|
_unit: 'in'
|
|
186
175
|
});
|
|
@@ -222,9 +211,9 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
222
211
|
if (item.type.includes('Light')) {
|
|
223
212
|
var ceilHeight = state.getIn(['scene', 'layers', layerID, 'ceilHeight']);
|
|
224
213
|
var ceilUnit = state.getIn(['scene', 'layers', layerID, 'unit']);
|
|
225
|
-
ceilHeight = (0,
|
|
214
|
+
ceilHeight = (0, _convertUnitsLite.convert)(ceilHeight).from(ceilUnit).to('cm');
|
|
226
215
|
var newAltitude = ceilHeight - item.properties.getIn(['height', 'length']);
|
|
227
|
-
newAltitude = (0,
|
|
216
|
+
newAltitude = (0, _convertUnitsLite.convert)(newAltitude).from('cm').to(ceilUnit);
|
|
228
217
|
item = item.setIn(['properties', 'altitude', '_length'], newAltitude);
|
|
229
218
|
state = state.setIn(['scene', 'layers', layerID, 'items', item.id], item);
|
|
230
219
|
}
|
|
@@ -303,7 +292,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
303
292
|
var width = new _immutable.Map({
|
|
304
293
|
_length: newWidth,
|
|
305
294
|
_unit: 'in',
|
|
306
|
-
length: (0,
|
|
295
|
+
length: (0, _convertUnitsLite.convert)(newWidth).from('in').to('cm')
|
|
307
296
|
});
|
|
308
297
|
properties = properties.set('width', width);
|
|
309
298
|
state = state.mergeIn(['scene', 'layers', layerID, 'items', itemID, 'properties'], properties);
|
|
@@ -733,7 +722,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
733
722
|
value: function beginDraggingItem(state, layerID, itemID, x, y) {
|
|
734
723
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
735
724
|
time1 = (0, _helper.debugUtil)();
|
|
736
|
-
if (
|
|
725
|
+
if (!item) return;
|
|
737
726
|
state = state.merge({
|
|
738
727
|
mode: _constants.MODE_DRAGGING_ITEM,
|
|
739
728
|
draggingSupport: (0, _immutable.Map)({
|
|
@@ -754,7 +743,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
754
743
|
value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
|
|
755
744
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
756
745
|
state = state.setIn(['scene', 'isEndDragging'], false);
|
|
757
|
-
if (
|
|
746
|
+
if (!item) return {
|
|
758
747
|
updatedState: state
|
|
759
748
|
};
|
|
760
749
|
state = state.merge({
|
|
@@ -787,7 +776,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
787
776
|
var diffX = startPointX - x;
|
|
788
777
|
var diffY = startPointY - y;
|
|
789
778
|
var item = scene.getIn(['layers', layerID, 'items', itemID]);
|
|
790
|
-
if (
|
|
779
|
+
if (!item) return {
|
|
791
780
|
updatedState: state
|
|
792
781
|
};
|
|
793
782
|
var tX = originalX - diffX;
|
|
@@ -1206,8 +1195,8 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1206
1195
|
var itemID = data.id;
|
|
1207
1196
|
var curItem = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
1208
1197
|
var layer = state.getIn(['scene', 'layers', layerID]);
|
|
1209
|
-
var tmpMolding =
|
|
1210
|
-
var temp_item_molding =
|
|
1198
|
+
var tmpMolding = (0, _toConsumableArray2["default"])(curItem.molding);
|
|
1199
|
+
var temp_item_molding = (0, _toConsumableArray2["default"])(curItem.molding);
|
|
1211
1200
|
temp_item_molding = temp_item_molding.filter(function (md) {
|
|
1212
1201
|
return doorStyle.doorStyles.cds.some(function (ds) {
|
|
1213
1202
|
return ds.itemID === md.itemID;
|
|
@@ -1240,7 +1229,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1240
1229
|
});
|
|
1241
1230
|
}
|
|
1242
1231
|
newProperties['depth'] = new _immutable.Map({
|
|
1243
|
-
length: (0,
|
|
1232
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_length).from('in').to('cm'),
|
|
1244
1233
|
_length: euro_cds[0].euro_length,
|
|
1245
1234
|
_unit: 'in'
|
|
1246
1235
|
});
|
|
@@ -1254,7 +1243,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1254
1243
|
});
|
|
1255
1244
|
}
|
|
1256
1245
|
newProperties['height'] = new _immutable.Map({
|
|
1257
|
-
length: (0,
|
|
1246
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_height).from('in').to('cm'),
|
|
1258
1247
|
_length: euro_cds[0].euro_height,
|
|
1259
1248
|
_unit: 'in'
|
|
1260
1249
|
});
|
|
@@ -1268,7 +1257,7 @@ var Item = exports["default"] = /*#__PURE__*/function () {
|
|
|
1268
1257
|
});
|
|
1269
1258
|
}
|
|
1270
1259
|
newProperties['width'] = new _immutable.Map({
|
|
1271
|
-
length: (0,
|
|
1260
|
+
length: (0, _convertUnitsLite.convert)(euro_cds[0].euro_width).from('in').to('cm') - 10,
|
|
1272
1261
|
_length: euro_cds[0].euro_width,
|
|
1273
1262
|
_unit: 'in'
|
|
1274
1263
|
});
|
package/lib/class/layer.js
CHANGED
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
8
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
7
10
|
var _immutable = require("immutable");
|
|
8
11
|
var _export = require("./export");
|
|
9
12
|
var _export2 = require("../utils/export");
|
|
10
13
|
var _models = require("../models");
|
|
11
14
|
var _helper = require("../utils/helper");
|
|
12
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
13
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
14
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
15
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
16
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
17
|
-
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); }
|
|
18
15
|
var sameSet = function sameSet(set1, set2) {
|
|
19
16
|
return set1.size === set2.size && set1.isSuperset(set2) && set1.isSubset(set2);
|
|
20
17
|
};
|
|
@@ -29,9 +26,9 @@ var sameDirection = function sameDirection(list1, list2) {
|
|
|
29
26
|
};
|
|
30
27
|
var Layer = exports["default"] = /*#__PURE__*/function () {
|
|
31
28
|
function Layer() {
|
|
32
|
-
|
|
29
|
+
(0, _classCallCheck2["default"])(this, Layer);
|
|
33
30
|
}
|
|
34
|
-
return
|
|
31
|
+
return (0, _createClass2["default"])(Layer, null, [{
|
|
35
32
|
key: "create",
|
|
36
33
|
value: function create(state, name, altitude) {
|
|
37
34
|
var layerID = _export2.IDBroker.acquireID();
|
package/lib/class/line.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
9
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
7
12
|
var _immutable = require("immutable");
|
|
8
13
|
var _export = require("./export");
|
|
9
14
|
var _export2 = require("../utils/export");
|
|
@@ -11,28 +16,16 @@ var Three = _interopRequireWildcard(require("three"));
|
|
|
11
16
|
var _constants = require("../constants");
|
|
12
17
|
var _helper = require("../utils/helper");
|
|
13
18
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
15
|
-
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
16
|
-
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
17
|
-
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; }
|
|
18
|
-
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; } }
|
|
19
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
20
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
21
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
22
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
23
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
24
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
25
|
-
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); }
|
|
26
19
|
var timeGlobal = 0;
|
|
27
20
|
var TimeRecorder = /*#__PURE__*/function () {
|
|
28
21
|
function TimeRecorder(name) {
|
|
29
|
-
|
|
22
|
+
(0, _classCallCheck2["default"])(this, TimeRecorder);
|
|
30
23
|
this.name = name;
|
|
31
24
|
if (name === 'beginDrawingLine') {
|
|
32
25
|
console.log('time__ Start Drawing');
|
|
33
26
|
}
|
|
34
27
|
}
|
|
35
|
-
return
|
|
28
|
+
return (0, _createClass2["default"])(TimeRecorder, [{
|
|
36
29
|
key: "start",
|
|
37
30
|
value: function start() {
|
|
38
31
|
this.first = Date.now();
|
|
@@ -53,9 +46,9 @@ var TimeRecorder = /*#__PURE__*/function () {
|
|
|
53
46
|
}();
|
|
54
47
|
var Line = exports["default"] = /*#__PURE__*/function () {
|
|
55
48
|
function Line() {
|
|
56
|
-
|
|
49
|
+
(0, _classCallCheck2["default"])(this, Line);
|
|
57
50
|
}
|
|
58
|
-
return
|
|
51
|
+
return (0, _createClass2["default"])(Line, null, [{
|
|
59
52
|
key: "create",
|
|
60
53
|
value: function create(state, layerID, type, x0, y0, x1, y1, properties) {
|
|
61
54
|
var lineCreatedDateTime = arguments.length > 8 && arguments[8] !== undefined ? arguments[8] : new Date().getTime();
|
|
@@ -265,7 +258,7 @@ var Line = exports["default"] = /*#__PURE__*/function () {
|
|
|
265
258
|
return x1 === x2 ? y1 - y2 : x1 - x2;
|
|
266
259
|
});
|
|
267
260
|
var pointsPair = points.zip(points.skip(1)).filterNot(function (_ref3) {
|
|
268
|
-
var _ref4 =
|
|
261
|
+
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2),
|
|
269
262
|
_ref4$ = _ref4[0],
|
|
270
263
|
x1 = _ref4$.x,
|
|
271
264
|
y1 = _ref4$.y,
|
|
@@ -276,7 +269,7 @@ var Line = exports["default"] = /*#__PURE__*/function () {
|
|
|
276
269
|
});
|
|
277
270
|
var lines = [];
|
|
278
271
|
pointsPair.forEach(function (_ref5) {
|
|
279
|
-
var _ref6 =
|
|
272
|
+
var _ref6 = (0, _slicedToArray2["default"])(_ref5, 2),
|
|
280
273
|
_ref6$ = _ref6[0],
|
|
281
274
|
x1 = _ref6$.x,
|
|
282
275
|
y1 = _ref6$.y,
|
|
@@ -370,7 +363,7 @@ var Line = exports["default"] = /*#__PURE__*/function () {
|
|
|
370
363
|
var _line$vertices$map$to = line.vertices.map(function (vertexID) {
|
|
371
364
|
return reducedState.getIn(['scene', 'layers', layerID, 'vertices']).get(vertexID);
|
|
372
365
|
}).toArray(),
|
|
373
|
-
_line$vertices$map$to2 =
|
|
366
|
+
_line$vertices$map$to2 = (0, _slicedToArray2["default"])(_line$vertices$map$to, 2),
|
|
374
367
|
v0 = _line$vertices$map$to2[0],
|
|
375
368
|
v1 = _line$vertices$map$to2[1];
|
|
376
369
|
var hasCommonEndpoint = _export2.GeometryUtils.samePoints(v0, points[0]) || _export2.GeometryUtils.samePoints(v0, points[1]) || _export2.GeometryUtils.samePoints(v1, points[0]) || _export2.GeometryUtils.samePoints(v1, points[1]);
|
package/lib/class/project.js
CHANGED
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
6
8
|
exports["default"] = void 0;
|
|
9
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
10
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
7
12
|
var _immutable = require("immutable");
|
|
8
13
|
var _constants = _interopRequireWildcard(require("../constants"));
|
|
9
14
|
var constants = _constants;
|
|
@@ -13,20 +18,13 @@ var _export2 = require("../class/export");
|
|
|
13
18
|
var viewer2DActions = _interopRequireWildcard(require("../actions/viewer2d-actions"));
|
|
14
19
|
var _helper = require("../utils/helper");
|
|
15
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
17
21
|
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 _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; }
|
|
20
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
21
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
22
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
23
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
|
-
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); }
|
|
22
|
+
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) { (0, _defineProperty2["default"])(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; }
|
|
25
23
|
var Project = exports["default"] = /*#__PURE__*/function () {
|
|
26
24
|
function Project() {
|
|
27
|
-
|
|
25
|
+
(0, _classCallCheck2["default"])(this, Project);
|
|
28
26
|
}
|
|
29
|
-
return
|
|
27
|
+
return (0, _createClass2["default"])(Project, null, [{
|
|
30
28
|
key: "setAlterate",
|
|
31
29
|
value: function setAlterate(state) {
|
|
32
30
|
return {
|
package/lib/class/vertex.js
CHANGED
|
@@ -1,27 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
6
7
|
exports["default"] = void 0;
|
|
8
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
|
+
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
+
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
7
11
|
var _immutable = require("immutable");
|
|
8
12
|
var _models = require("../models");
|
|
9
13
|
var _export = require("../utils/export");
|
|
10
14
|
var _constants = require("../constants");
|
|
11
15
|
var _export2 = require("../class/export");
|
|
12
16
|
var _helper = require("../utils/helper");
|
|
13
|
-
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
14
|
-
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; }
|
|
15
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
-
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
-
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); }
|
|
20
17
|
var Vertex = exports["default"] = /*#__PURE__*/function () {
|
|
21
18
|
function Vertex() {
|
|
22
|
-
|
|
19
|
+
(0, _classCallCheck2["default"])(this, Vertex);
|
|
23
20
|
}
|
|
24
|
-
return
|
|
21
|
+
return (0, _createClass2["default"])(Vertex, null, [{
|
|
25
22
|
key: "add",
|
|
26
23
|
value: function add(state, layerID, x, y, relatedPrototype, relatedID) {
|
|
27
24
|
var vertex = state.getIn(['scene', 'layers', layerID, 'vertices']).find(function (vertex) {
|
|
@@ -35,7 +32,7 @@ var Vertex = exports["default"] = /*#__PURE__*/function () {
|
|
|
35
32
|
return related.push(relatedID);
|
|
36
33
|
});
|
|
37
34
|
} else {
|
|
38
|
-
vertex = new _models.Vertex(
|
|
35
|
+
vertex = new _models.Vertex((0, _defineProperty2["default"])({
|
|
39
36
|
id: _export.IDBroker.acquireID(),
|
|
40
37
|
name: 'Vertex',
|
|
41
38
|
x: x,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
5
|
Object.defineProperty(exports, "__esModule", {
|
|
5
6
|
value: true
|
|
6
7
|
});
|
|
@@ -13,7 +14,6 @@ var _viewer3dFirstPerson = _interopRequireDefault(require("./viewer3d/viewer3d-f
|
|
|
13
14
|
var constants = _interopRequireWildcard(require("../constants"));
|
|
14
15
|
var _front3D = _interopRequireDefault(require("./viewer3d/front3D"));
|
|
15
16
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
17
17
|
function Content(_ref, _ref2) {
|
|
18
18
|
var width = _ref.width,
|
|
19
19
|
height = _ref.height,
|
|
@@ -26,6 +26,7 @@ function Content(_ref, _ref2) {
|
|
|
26
26
|
catalog = _ref.catalog;
|
|
27
27
|
var projectActions = _ref2.projectActions;
|
|
28
28
|
var mode = state.get('mode');
|
|
29
|
+
console.log('mode =>', mode);
|
|
29
30
|
switch (mode) {
|
|
30
31
|
// this mode is when view elevation
|
|
31
32
|
case constants.MODE_ELEVATION_VIEW:
|
|
@@ -1,88 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = DisclaimerScreen;
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _core = require("@material-ui/core");
|
|
10
9
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
padding: '16px 72px',
|
|
70
|
-
textTransform: 'none',
|
|
71
|
-
fontWeight: 500,
|
|
72
|
-
fontSize: '1rem',
|
|
73
|
-
'&:hover': {
|
|
74
|
-
backgroundColor: '#7c3aed'
|
|
75
|
-
},
|
|
76
|
-
'&:active': {
|
|
77
|
-
backgroundColor: '#5a25c2'
|
|
78
|
-
},
|
|
79
|
-
'&:disabled': {
|
|
80
|
-
backgroundColor: '#F3E5F5',
|
|
81
|
-
color: '#1D1B20'
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
});
|
|
10
|
+
var styles = {
|
|
11
|
+
root: {
|
|
12
|
+
display: 'flex',
|
|
13
|
+
justifyContent: 'center',
|
|
14
|
+
alignItems: 'center',
|
|
15
|
+
backgroundColor: '#D1C4E9',
|
|
16
|
+
background: 'url("/assets/img/svg/disclaimer/background.svg") no-repeat center',
|
|
17
|
+
backgroundSize: 'cover',
|
|
18
|
+
padding: '16px',
|
|
19
|
+
height: '100dvh',
|
|
20
|
+
width: '100dvw'
|
|
21
|
+
},
|
|
22
|
+
card: {
|
|
23
|
+
display: 'flex',
|
|
24
|
+
flexDirection: 'column',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
backgroundColor: '#fff',
|
|
27
|
+
borderRadius: 24,
|
|
28
|
+
width: '85vw',
|
|
29
|
+
textAlign: 'center',
|
|
30
|
+
boxShadow: '0 8px 20px rgba(0,0,0,0.08)',
|
|
31
|
+
height: 'fit-content',
|
|
32
|
+
opacity: '90%',
|
|
33
|
+
gap: '1rem',
|
|
34
|
+
padding: '1.5rem',
|
|
35
|
+
maxWidth: '364px'
|
|
36
|
+
},
|
|
37
|
+
title: {
|
|
38
|
+
fontWeight: 'bold',
|
|
39
|
+
fontSize: '1.5rem',
|
|
40
|
+
lineHeight: '133%',
|
|
41
|
+
letterSpacing: '0px',
|
|
42
|
+
textAlign: 'center',
|
|
43
|
+
verticalAlign: 'middle',
|
|
44
|
+
maxWidth: '200px'
|
|
45
|
+
},
|
|
46
|
+
body: {
|
|
47
|
+
fontWeight: 400,
|
|
48
|
+
fontStyle: 'normal',
|
|
49
|
+
fontSize: '0.875rem',
|
|
50
|
+
lineHeight: '143%',
|
|
51
|
+
letterSpacing: '0.17px',
|
|
52
|
+
color: '#49454F',
|
|
53
|
+
maxWidth: '90%'
|
|
54
|
+
},
|
|
55
|
+
button: {
|
|
56
|
+
marginTop: '0.5rem',
|
|
57
|
+
backgroundColor: '#6750A4',
|
|
58
|
+
color: '#fff',
|
|
59
|
+
borderRadius: 100,
|
|
60
|
+
padding: '16px 72px',
|
|
61
|
+
textTransform: 'none',
|
|
62
|
+
fontWeight: 500,
|
|
63
|
+
fontSize: '1rem',
|
|
64
|
+
border: 'none',
|
|
65
|
+
cursor: 'pointer'
|
|
66
|
+
}
|
|
67
|
+
};
|
|
86
68
|
function DisclaimerScreen(_ref) {
|
|
87
69
|
var _ref$open = _ref.open,
|
|
88
70
|
open = _ref$open === void 0 ? true : _ref$open,
|
|
@@ -93,7 +75,6 @@ function DisclaimerScreen(_ref) {
|
|
|
93
75
|
message = _ref$message === void 0 ? /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, "We\u2019re adding the finishing touches to the mobile version.", /*#__PURE__*/_react["default"].createElement("br", null), "In the meantime, try our desktop version to start designing your dream room.") : _ref$message,
|
|
94
76
|
_ref$buttonText = _ref.buttonText,
|
|
95
77
|
buttonText = _ref$buttonText === void 0 ? 'Close' : _ref$buttonText;
|
|
96
|
-
var classes = useStyles();
|
|
97
78
|
(0, _react.useEffect)(function () {
|
|
98
79
|
var viewportMeta = document.querySelector('meta[name="viewport"]');
|
|
99
80
|
if (!viewportMeta) {
|
|
@@ -105,21 +86,20 @@ function DisclaimerScreen(_ref) {
|
|
|
105
86
|
}, []);
|
|
106
87
|
if (!open) return null;
|
|
107
88
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
108
|
-
|
|
89
|
+
style: styles.root
|
|
109
90
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
110
|
-
|
|
91
|
+
style: styles.card
|
|
111
92
|
}, /*#__PURE__*/_react["default"].createElement("img", {
|
|
112
93
|
width: 40,
|
|
113
94
|
height: 40,
|
|
114
95
|
alt: "loog",
|
|
115
96
|
src: '/assets/img/svg/disclaimer/logo-dots.svg'
|
|
116
|
-
}), /*#__PURE__*/_react["default"].createElement(
|
|
117
|
-
|
|
118
|
-
}, titleTop), /*#__PURE__*/_react["default"].createElement(
|
|
119
|
-
|
|
120
|
-
}, message), /*#__PURE__*/_react["default"].createElement(
|
|
121
|
-
|
|
122
|
-
className: classes.button,
|
|
97
|
+
}), /*#__PURE__*/_react["default"].createElement("div", {
|
|
98
|
+
style: styles.title
|
|
99
|
+
}, titleTop), /*#__PURE__*/_react["default"].createElement("div", {
|
|
100
|
+
style: styles.body
|
|
101
|
+
}, message), /*#__PURE__*/_react["default"].createElement("button", {
|
|
102
|
+
style: styles.button,
|
|
123
103
|
onClick: onClose
|
|
124
104
|
}, buttonText)));
|
|
125
105
|
}
|
package/lib/components/export.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
3
4
|
Object.defineProperty(exports, "__esModule", {
|
|
4
5
|
value: true
|
|
5
6
|
});
|
|
@@ -25,7 +26,6 @@ exports["default"] = void 0;
|
|
|
25
26
|
var _content = _interopRequireDefault(require("./content"));
|
|
26
27
|
var _export = _interopRequireDefault(require("./viewer2d/export"));
|
|
27
28
|
var _export2 = _interopRequireDefault(require("./style/export"));
|
|
28
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
29
29
|
var _default = exports["default"] = {
|
|
30
30
|
Content: _content["default"],
|
|
31
31
|
Viewer2DComponents: _export["default"],
|