kitchen-simulator 1.1.1-test.62 → 1.1.1-test.64
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 -10
- package/es/AppContext.js +3 -10
- package/es/KitchenConfigurator.js +70 -79
- package/es/KitchenConfiguratorApp.js +98 -107
- package/es/actions/area-actions.js +5 -12
- package/es/actions/export.js +12 -29
- package/es/actions/groups-actions.js +27 -45
- package/es/actions/holes-actions.js +34 -55
- package/es/actions/items-actions.js +94 -145
- package/es/actions/lines-actions.js +21 -36
- package/es/actions/project-actions.js +94 -145
- package/es/actions/scene-actions.js +11 -21
- package/es/actions/vertices-actions.js +7 -15
- package/es/actions/viewer2d-actions.js +21 -36
- package/es/actions/viewer3d-actions.js +9 -18
- package/es/catalog/areas/area/planner-element.js +2 -9
- package/es/catalog/catalog.js +15 -21
- package/es/catalog/factories/area-factory-3d.js +22 -31
- package/es/catalog/factories/area-factory.js +11 -20
- package/es/catalog/factories/export.js +6 -24
- package/es/catalog/factories/wall-factory-3d.js +31 -41
- package/es/catalog/factories/wall-factory.js +21 -31
- package/es/catalog/holes/door-closet/planner-element.js +15 -24
- package/es/catalog/holes/door-double/planner-element.js +15 -24
- package/es/catalog/holes/door-exterior/planner-element.js +16 -25
- package/es/catalog/holes/door-interior/planner-element.js +16 -25
- package/es/catalog/holes/door-panic/planner-element.js +7 -16
- package/es/catalog/holes/door-panic-double/planner-element.js +15 -24
- package/es/catalog/holes/door-sliding/planner-element.js +16 -25
- package/es/catalog/holes/doorway-framed/planner-element.js +11 -20
- package/es/catalog/holes/doorway-frameless/planner-element.js +7 -16
- package/es/catalog/holes/export.js +13 -97
- package/es/catalog/holes/window-clear/planner-element.js +10 -19
- package/es/catalog/holes/window-cross/planner-element.js +10 -19
- package/es/catalog/holes/window-double-hung/planner-element.js +10 -19
- package/es/catalog/holes/window-vertical/planner-element.js +10 -19
- package/es/catalog/lines/wall/planner-element.js +2 -9
- package/es/catalog/molding/molding-dcm/planner-element.js +5 -14
- package/es/catalog/molding/molding-fbm/planner-element.js +5 -14
- package/es/catalog/molding/molding-lrm/planner-element.js +5 -14
- package/es/catalog/properties/export.js +20 -80
- package/es/catalog/properties/property-checkbox.js +24 -31
- package/es/catalog/properties/property-color.js +16 -23
- package/es/catalog/properties/property-enum.js +24 -31
- package/es/catalog/properties/property-hidden.js +9 -16
- package/es/catalog/properties/property-lenght-measure.js +38 -45
- package/es/catalog/properties/property-length-measure.js +36 -43
- package/es/catalog/properties/property-length-measure_hole.js +38 -45
- package/es/catalog/properties/property-number.js +17 -24
- package/es/catalog/properties/property-read-only.js +16 -23
- package/es/catalog/properties/property-string.js +16 -23
- package/es/catalog/properties/property-toggle.js +16 -23
- package/es/catalog/properties/shared-property-style.js +1 -7
- package/es/catalog/utils/FuseUtils.js +8 -15
- package/es/catalog/utils/exporter.js +8 -15
- package/es/catalog/utils/geom-utils.js +13 -29
- package/es/catalog/utils/item-loader.js +84 -97
- package/es/catalog/utils/load-obj.js +20 -28
- package/es/catalog/utils/mtl-loader.js +3 -8
- package/es/catalog/utils/obj-loader.js +3 -8
- package/es/class/FuseUtils.js +8 -15
- package/es/class/area.js +22 -28
- package/es/class/export.js +23 -95
- package/es/class/group.js +53 -59
- package/es/class/guide.js +15 -21
- package/es/class/hole.js +83 -89
- package/es/class/item.js +141 -147
- package/es/class/layer.js +59 -65
- package/es/class/line.js +135 -143
- package/es/class/project.js +90 -98
- package/es/class/vertex.js +29 -35
- package/es/components/content.js +19 -28
- package/es/components/disclaimer/disclaimer.js +10 -18
- package/es/components/export.js +8 -32
- package/es/components/style/button.js +23 -31
- package/es/components/style/cancel-button.js +7 -14
- package/es/components/style/content-container.js +9 -16
- package/es/components/style/content-title.js +11 -20
- package/es/components/style/delete-button.js +8 -17
- package/es/components/style/export.js +30 -120
- package/es/components/style/form-block.js +8 -15
- package/es/components/style/form-color-input.js +7 -14
- package/es/components/style/form-label.js +8 -15
- package/es/components/style/form-number-input.js +41 -49
- package/es/components/style/form-number-input_2.js +36 -44
- package/es/components/style/form-select.js +17 -24
- package/es/components/style/form-slider.js +10 -17
- package/es/components/style/form-submit-button.js +8 -17
- package/es/components/style/form-text-input.js +26 -34
- package/es/components/viewer2d/area.js +17 -24
- package/es/components/viewer2d/export.js +30 -120
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +10 -17
- package/es/components/viewer2d/grids/grid-streak.js +10 -17
- package/es/components/viewer2d/grids/grid-vertical-streak.js +10 -17
- package/es/components/viewer2d/grids/grids.js +10 -19
- package/es/components/viewer2d/group.js +15 -24
- package/es/components/viewer2d/item.js +61 -70
- package/es/components/viewer2d/layer.js +23 -30
- package/es/components/viewer2d/line.js +101 -111
- package/es/components/viewer2d/ruler.js +22 -29
- package/es/components/viewer2d/rulerDist.js +21 -28
- package/es/components/viewer2d/rulerX.js +39 -47
- package/es/components/viewer2d/rulerY.js +37 -45
- package/es/components/viewer2d/scene.js +30 -38
- package/es/components/viewer2d/snap.js +13 -22
- package/es/components/viewer2d/state.js +18 -27
- package/es/components/viewer2d/utils.js +24 -37
- package/es/components/viewer2d/vertex.js +8 -17
- package/es/components/viewer2d/viewer2d.js +153 -163
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +17 -23
- package/es/components/viewer3d/dcm.js +1 -7
- package/es/components/viewer3d/fbm.js +1 -7
- package/es/components/viewer3d/front3D.js +12 -21
- package/es/components/viewer3d/grid-creator.js +8 -17
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +6 -14
- package/es/components/viewer3d/grids/grid-streak.js +5 -13
- package/es/components/viewer3d/grids/grid-vertical-streak.js +6 -14
- package/es/components/viewer3d/libs/first-person-controls.js +2 -9
- package/es/components/viewer3d/libs/helvetiker_regular.typeface.js +1 -7
- package/es/components/viewer3d/libs/mtl-loader.js +1 -7
- package/es/components/viewer3d/libs/obj-loader.js +1 -7
- package/es/components/viewer3d/libs/orbit-controls.js +2 -8
- package/es/components/viewer3d/libs/pointer-lock-controls.js +2 -8
- package/es/components/viewer3d/lrm.js +1 -7
- package/es/components/viewer3d/model.js +1 -7
- package/es/components/viewer3d/pointer-lock-navigation.js +3 -10
- package/es/components/viewer3d/ruler-utils/itemRect.js +18 -25
- package/es/components/viewer3d/ruler-utils/layer3D.js +59 -66
- package/es/components/viewer3d/ruler-utils/ruler3D.js +39 -46
- package/es/components/viewer3d/ruler-utils/scene3D.js +9 -17
- package/es/components/viewer3d/ruler-utils/state3D.js +4 -11
- package/es/components/viewer3d/scene-creator.js +191 -226
- package/es/components/viewer3d/three-memory-cleaner.js +3 -12
- package/es/components/viewer3d/viewer3d-first-person.js +40 -46
- package/es/components/viewer3d/viewer3d.js +196 -202
- package/es/constants.js +349 -358
- package/es/index.js +7 -15
- package/es/models.js +177 -184
- package/es/plugins/SVGLoader.js +48 -53
- package/es/plugins/autosave.js +3 -9
- package/es/plugins/console-debugger.js +5 -12
- package/es/plugins/export.js +8 -32
- package/es/plugins/keyboard.js +29 -35
- package/es/reducers/areas-reducer.js +7 -13
- package/es/reducers/export.js +24 -96
- package/es/reducers/groups-reducer.js +31 -37
- package/es/reducers/holes-reducer.js +43 -49
- package/es/reducers/items-reducer.js +106 -112
- package/es/reducers/lines-reducer.js +28 -34
- package/es/reducers/project-reducer.js +105 -111
- package/es/reducers/reducer.js +16 -23
- package/es/reducers/scene-reducer.js +15 -21
- package/es/reducers/user-reducer.js +5 -11
- package/es/reducers/vertices-reducer.js +11 -17
- package/es/reducers/viewer2d-reducer.js +18 -24
- package/es/reducers/viewer3d-reducer.js +16 -22
- package/es/shared-style.js +10 -16
- package/es/styles/export.js +3 -11
- package/es/translator/en.js +1 -7
- package/es/translator/it.js +1 -7
- package/es/translator/ru.js +1 -7
- package/es/translator/translator.js +13 -19
- package/es/utils/browser.js +2 -9
- package/es/utils/convert-units-lite.js +1 -7
- package/es/utils/email-validator.js +1 -7
- package/es/utils/export.js +15 -46
- package/es/utils/geometry.js +181 -278
- package/es/utils/get-edges-of-subgraphs.js +2 -9
- package/es/utils/graph-cycles.js +8 -11
- package/es/utils/graph-inner-cycles.js +10 -18
- package/es/utils/graph.js +9 -17
- package/es/utils/helper.js +39 -63
- package/es/utils/history.js +8 -15
- package/es/utils/id-broker.js +8 -15
- package/es/utils/logger.js +1 -7
- package/es/utils/math.js +5 -12
- package/es/utils/molding.js +119 -144
- package/es/utils/name-generator.js +7 -13
- package/es/utils/objects-utils.js +7 -19
- package/es/utils/phone-validator.js +1 -7
- package/es/utils/process-black-list.js +3 -10
- package/es/utils/react-if.js +6 -12
- package/es/utils/snap-scene.js +27 -34
- package/es/utils/snap.js +45 -59
- package/es/utils/summarizeCart.js +1 -7
- package/es/utils/threeCSG.es6.js +13 -22
- package/es/version.js +1 -7
- package/lib/@history.js +2 -1
- package/lib/AppContext.js +2 -1
- package/lib/KitchenConfigurator.js +2 -1
- package/lib/KitchenConfiguratorApp.js +2 -1
- package/lib/catalog/areas/area/planner-element.js +2 -1
- package/lib/catalog/catalog.js +2 -1
- package/lib/catalog/factories/area-factory.js +2 -1
- package/lib/catalog/factories/wall-factory.js +2 -1
- package/lib/catalog/holes/door-closet/planner-element.js +2 -1
- package/lib/catalog/holes/door-double/planner-element.js +2 -1
- package/lib/catalog/holes/door-exterior/planner-element.js +2 -1
- package/lib/catalog/holes/door-interior/planner-element.js +2 -1
- package/lib/catalog/holes/door-panic/planner-element.js +2 -1
- package/lib/catalog/holes/door-panic-double/planner-element.js +2 -1
- package/lib/catalog/holes/door-sliding/planner-element.js +2 -1
- package/lib/catalog/holes/doorway-framed/planner-element.js +2 -1
- package/lib/catalog/holes/doorway-frameless/planner-element.js +2 -1
- package/lib/catalog/holes/window-clear/planner-element.js +2 -1
- package/lib/catalog/holes/window-cross/planner-element.js +2 -1
- package/lib/catalog/holes/window-double-hung/planner-element.js +2 -1
- package/lib/catalog/holes/window-vertical/planner-element.js +2 -1
- package/lib/catalog/lines/wall/planner-element.js +2 -1
- package/lib/catalog/molding/molding-dcm/planner-element.js +2 -1
- package/lib/catalog/molding/molding-fbm/planner-element.js +2 -1
- package/lib/catalog/molding/molding-lrm/planner-element.js +2 -1
- package/lib/catalog/properties/property-checkbox.js +2 -1
- package/lib/catalog/properties/property-color.js +2 -1
- package/lib/catalog/properties/property-enum.js +2 -1
- package/lib/catalog/properties/property-hidden.js +2 -1
- package/lib/catalog/properties/property-lenght-measure.js +2 -1
- package/lib/catalog/properties/property-length-measure.js +2 -1
- package/lib/catalog/properties/property-length-measure_hole.js +2 -1
- package/lib/catalog/properties/property-number.js +2 -1
- package/lib/catalog/properties/property-read-only.js +2 -1
- package/lib/catalog/properties/property-string.js +2 -1
- package/lib/catalog/properties/property-toggle.js +2 -1
- package/lib/catalog/properties/shared-property-style.js +2 -1
- package/lib/catalog/utils/FuseUtils.js +2 -1
- package/lib/catalog/utils/exporter.js +2 -1
- package/lib/class/FuseUtils.js +2 -1
- package/lib/class/area.js +2 -1
- package/lib/class/group.js +2 -1
- package/lib/class/hole.js +2 -1
- package/lib/class/item.js +2 -1
- package/lib/class/layer.js +2 -1
- package/lib/class/line.js +2 -1
- package/lib/class/project.js +2 -1
- package/lib/class/vertex.js +2 -1
- package/lib/components/content.js +2 -1
- package/lib/components/disclaimer/disclaimer.js +2 -1
- package/lib/components/style/button.js +2 -1
- package/lib/components/style/cancel-button.js +2 -1
- package/lib/components/style/content-container.js +2 -1
- package/lib/components/style/content-title.js +2 -1
- package/lib/components/style/delete-button.js +2 -1
- package/lib/components/style/form-block.js +2 -1
- package/lib/components/style/form-color-input.js +2 -1
- package/lib/components/style/form-label.js +2 -1
- package/lib/components/style/form-number-input.js +2 -1
- package/lib/components/style/form-number-input_2.js +2 -1
- package/lib/components/style/form-select.js +2 -1
- package/lib/components/style/form-slider.js +2 -1
- package/lib/components/style/form-submit-button.js +2 -1
- package/lib/components/style/form-text-input.js +2 -1
- package/lib/components/viewer2d/area.js +2 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +2 -1
- package/lib/components/viewer2d/grids/grid-streak.js +2 -1
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +2 -1
- package/lib/components/viewer2d/grids/grids.js +2 -1
- package/lib/components/viewer2d/group.js +2 -1
- package/lib/components/viewer2d/item.js +2 -1
- package/lib/components/viewer2d/layer.js +2 -1
- package/lib/components/viewer2d/ruler.js +2 -1
- package/lib/components/viewer2d/rulerDist.js +2 -1
- package/lib/components/viewer2d/rulerX.js +2 -1
- package/lib/components/viewer2d/rulerY.js +2 -1
- package/lib/components/viewer2d/scene.js +2 -1
- package/lib/components/viewer2d/snap.js +2 -1
- package/lib/components/viewer2d/state.js +2 -1
- package/lib/components/viewer2d/vertex.js +2 -1
- package/lib/components/viewer2d/viewer2d.js +2 -1
- package/lib/components/viewer3d/dcm.js +2 -1
- package/lib/components/viewer3d/fbm.js +2 -1
- package/lib/components/viewer3d/front3D.js +2 -1
- package/lib/components/viewer3d/grid-creator.js +2 -1
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +2 -1
- package/lib/components/viewer3d/grids/grid-streak.js +2 -1
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +2 -1
- package/lib/components/viewer3d/libs/mtl-loader.js +2 -1
- package/lib/components/viewer3d/libs/obj-loader.js +2 -1
- package/lib/components/viewer3d/lrm.js +2 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +2 -1
- package/lib/components/viewer3d/ruler-utils/layer3D.js +2 -1
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +2 -1
- package/lib/components/viewer3d/ruler-utils/state3D.js +2 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +2 -1
- package/lib/components/viewer3d/viewer3d.js +2 -1
- package/lib/plugins/autosave.js +2 -1
- package/lib/plugins/console-debugger.js +2 -1
- package/lib/plugins/keyboard.js +2 -1
- package/lib/reducers/areas-reducer.js +2 -1
- package/lib/reducers/groups-reducer.js +2 -1
- package/lib/reducers/holes-reducer.js +2 -1
- package/lib/reducers/items-reducer.js +2 -1
- package/lib/reducers/lines-reducer.js +2 -1
- package/lib/reducers/project-reducer.js +2 -1
- package/lib/reducers/scene-reducer.js +2 -1
- package/lib/reducers/user-reducer.js +2 -1
- package/lib/reducers/vertices-reducer.js +2 -1
- package/lib/reducers/viewer2d-reducer.js +2 -1
- package/lib/reducers/viewer3d-reducer.js +2 -1
- package/lib/translator/en.js +2 -1
- package/lib/translator/it.js +2 -1
- package/lib/translator/ru.js +2 -1
- package/lib/translator/translator.js +2 -1
- package/lib/utils/name-generator.js +2 -1
- package/lib/utils/react-if.js +2 -1
- package/lib/utils/threeCSG.es6.js +2 -1
- package/package.json +2 -1
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
9
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
10
|
-
var NameGenerator = exports["default"] = /*#__PURE__*/function () {
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
3
|
+
var NameGenerator = /*#__PURE__*/function () {
|
|
11
4
|
function NameGenerator() {
|
|
12
|
-
(
|
|
5
|
+
_classCallCheck(this, NameGenerator);
|
|
13
6
|
}
|
|
14
|
-
return (
|
|
7
|
+
return _createClass(NameGenerator, null, [{
|
|
15
8
|
key: "generateName",
|
|
16
9
|
value: function generateName(prototype, type) {
|
|
17
10
|
return type.substr(0, 1).toUpperCase() + type.substr(1);
|
|
18
11
|
}
|
|
19
12
|
}]);
|
|
20
|
-
}();
|
|
13
|
+
}();
|
|
14
|
+
export { NameGenerator as default };
|
|
@@ -1,31 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof3 = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.getAllMeshes = getAllMeshes;
|
|
9
|
-
exports.objectsCompare = objectsCompare;
|
|
10
|
-
exports.objectsMap = objectsMap;
|
|
11
|
-
exports.vectorIntersectWithMesh = vectorIntersectWithMesh;
|
|
12
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
13
|
-
var Three = _interopRequireWildcard(require("three"));
|
|
14
|
-
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" != _typeof3(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); }
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
2
|
+
import * as Three from 'three';
|
|
15
3
|
String.prototype.isLeftPlaceholder = function () {
|
|
16
4
|
return this.match(/_L$|_L_\d$/) != null;
|
|
17
5
|
};
|
|
18
6
|
String.prototype.isRightPlaceholder = function () {
|
|
19
7
|
return this.match(/_R$|_R_\d$/) != null;
|
|
20
8
|
};
|
|
21
|
-
function objectsMap(object, func) {
|
|
9
|
+
export function objectsMap(object, func) {
|
|
22
10
|
var mappedObject = {};
|
|
23
11
|
for (var key in object) {
|
|
24
12
|
mappedObject[key] = func(key, mappedObject[key]);
|
|
25
13
|
}
|
|
26
14
|
return mappedObject;
|
|
27
15
|
}
|
|
28
|
-
function objectsCompare(x, y) {
|
|
16
|
+
export function objectsCompare(x, y) {
|
|
29
17
|
if (x === y) return true;
|
|
30
18
|
if (!(x instanceof Object) || !(y instanceof Object)) return false;
|
|
31
19
|
if (x.constructor !== y.constructor) return false;
|
|
@@ -33,7 +21,7 @@ function objectsCompare(x, y) {
|
|
|
33
21
|
if (!x.hasOwnProperty(p)) continue;
|
|
34
22
|
if (!y.hasOwnProperty(p)) return false;
|
|
35
23
|
if (x[p] === y[p]) continue;
|
|
36
|
-
if ((
|
|
24
|
+
if (_typeof(x[p]) !== 'object') return false;
|
|
37
25
|
if (!objectsCompare(x[p], y[p])) return false;
|
|
38
26
|
}
|
|
39
27
|
for (var _p in y) {
|
|
@@ -41,7 +29,7 @@ function objectsCompare(x, y) {
|
|
|
41
29
|
}
|
|
42
30
|
return true;
|
|
43
31
|
}
|
|
44
|
-
function getAllMeshes(objects) {
|
|
32
|
+
export function getAllMeshes(objects) {
|
|
45
33
|
var meshes = [];
|
|
46
34
|
objects.forEach(function (object) {
|
|
47
35
|
if (!object) return;
|
|
@@ -53,7 +41,7 @@ function getAllMeshes(objects) {
|
|
|
53
41
|
});
|
|
54
42
|
return meshes;
|
|
55
43
|
}
|
|
56
|
-
function vectorIntersectWithMesh(origin, target) {
|
|
44
|
+
export function vectorIntersectWithMesh(origin, target) {
|
|
57
45
|
var vectorDir = new Three.Vector3(origin.x, origin.y - 1000, origin.z);
|
|
58
46
|
var ray = new Three.Raycaster();
|
|
59
47
|
ray.set(origin, vectorDir);
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.phoneValidation = void 0;
|
|
7
|
-
var phoneValidation = exports.phoneValidation = function phoneValidation(phone) {
|
|
1
|
+
export var phoneValidation = function phoneValidation(phone) {
|
|
8
2
|
var result = /^(\+1\s?)?(\(?\d{3}\)?[\s.-]?)?\d{3}[\s.-]?\d{4}$/;
|
|
9
3
|
return result.test(String(phone).toLowerCase());
|
|
10
4
|
};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports.buildCurrentCabinetObject = void 0;
|
|
8
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
9
2
|
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; }
|
|
10
|
-
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) { (
|
|
11
|
-
var buildCurrentCabinetObject =
|
|
3
|
+
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; }
|
|
4
|
+
export var buildCurrentCabinetObject = function buildCurrentCabinetObject(cabinet, texture) {
|
|
12
5
|
return {
|
|
13
6
|
type: cabinet.name,
|
|
14
7
|
// e.g. "B09"
|
package/es/utils/react-if.js
CHANGED
|
@@ -1,24 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
2
3
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
Object.defineProperty(exports, "__esModule", {
|
|
5
|
-
value: true
|
|
6
|
-
});
|
|
7
|
-
exports["default"] = If;
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
4
|
/**
|
|
11
5
|
* @return {null}
|
|
12
6
|
*/
|
|
13
|
-
function If(_ref) {
|
|
7
|
+
export default function If(_ref) {
|
|
14
8
|
var condition = _ref.condition,
|
|
15
9
|
style = _ref.style,
|
|
16
10
|
children = _ref.children;
|
|
17
|
-
return condition ? Array.isArray(children) ? /*#__PURE__*/
|
|
11
|
+
return condition ? Array.isArray(children) ? /*#__PURE__*/React.createElement("div", {
|
|
18
12
|
style: style
|
|
19
13
|
}, children) : children : null;
|
|
20
14
|
}
|
|
21
15
|
If.propTypes = {
|
|
22
|
-
condition:
|
|
23
|
-
style:
|
|
16
|
+
condition: PropTypes.bool.isRequired,
|
|
17
|
+
style: PropTypes.object
|
|
24
18
|
};
|
package/es/utils/snap-scene.js
CHANGED
|
@@ -1,17 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
9
|
-
var _snap = require("./snap");
|
|
10
|
-
var _export = require("./export");
|
|
11
|
-
var _immutable = require("immutable");
|
|
12
|
-
function sceneSnapElements(scene) {
|
|
13
|
-
var snapElements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new _immutable.List();
|
|
14
|
-
var snapMask = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new _immutable.Map();
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
|
+
import { SNAP_POINT, SNAP_LINE, SNAP_SEGMENT, SNAP_GRID, SNAP_GUIDE, addPointSnap, addLineSnap, addLineSegmentSnap, addGridSnap } from "./snap";
|
|
3
|
+
import { GeometryUtils } from "./export";
|
|
4
|
+
import { Map, List } from 'immutable';
|
|
5
|
+
export function sceneSnapElements(scene) {
|
|
6
|
+
var snapElements = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : new List();
|
|
7
|
+
var snapMask = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : new Map();
|
|
15
8
|
var width = scene.width,
|
|
16
9
|
height = scene.height;
|
|
17
10
|
var a, b, c;
|
|
@@ -23,36 +16,36 @@ function sceneSnapElements(scene) {
|
|
|
23
16
|
var vertexID = _ref.id,
|
|
24
17
|
x = _ref.x,
|
|
25
18
|
y = _ref.y;
|
|
26
|
-
if (snapMask.get(
|
|
27
|
-
|
|
19
|
+
if (snapMask.get(SNAP_POINT)) {
|
|
20
|
+
addPointSnap(snapElements, x, y, 10, 10, vertexID);
|
|
28
21
|
}
|
|
29
|
-
if (snapMask.get(
|
|
30
|
-
var _GeometryUtils$horizo =
|
|
22
|
+
if (snapMask.get(SNAP_LINE)) {
|
|
23
|
+
var _GeometryUtils$horizo = GeometryUtils.horizontalLine(y);
|
|
31
24
|
a = _GeometryUtils$horizo.a;
|
|
32
25
|
b = _GeometryUtils$horizo.b;
|
|
33
26
|
c = _GeometryUtils$horizo.c;
|
|
34
|
-
|
|
35
|
-
var _GeometryUtils$vertic =
|
|
27
|
+
addLineSnap(snapElements, a, b, c, 10, 1, vertexID);
|
|
28
|
+
var _GeometryUtils$vertic = GeometryUtils.verticalLine(x);
|
|
36
29
|
a = _GeometryUtils$vertic.a;
|
|
37
30
|
b = _GeometryUtils$vertic.b;
|
|
38
31
|
c = _GeometryUtils$vertic.c;
|
|
39
|
-
|
|
40
|
-
var _GeometryUtils$upcros =
|
|
32
|
+
addLineSnap(snapElements, a, b, c, 10, 1, vertexID);
|
|
33
|
+
var _GeometryUtils$upcros = GeometryUtils.upcrossLine(x, y);
|
|
41
34
|
a = _GeometryUtils$upcros.a;
|
|
42
35
|
b = _GeometryUtils$upcros.b;
|
|
43
36
|
c = _GeometryUtils$upcros.c;
|
|
44
|
-
|
|
45
|
-
var _GeometryUtils$downcr =
|
|
37
|
+
addLineSnap(snapElements, a, b, c, 10, 3, null);
|
|
38
|
+
var _GeometryUtils$downcr = GeometryUtils.downcrossLine(x, y);
|
|
46
39
|
a = _GeometryUtils$downcr.a;
|
|
47
40
|
b = _GeometryUtils$downcr.b;
|
|
48
41
|
c = _GeometryUtils$downcr.c;
|
|
49
|
-
|
|
42
|
+
addLineSnap(snapElements, a, b, c, 10, 3, null);
|
|
50
43
|
}
|
|
51
44
|
});
|
|
52
|
-
if (snapMask.get(
|
|
45
|
+
if (snapMask.get(SNAP_SEGMENT)) {
|
|
53
46
|
lines.forEach(function (_ref2) {
|
|
54
47
|
var lineID = _ref2.id,
|
|
55
|
-
_ref2$vertices = (
|
|
48
|
+
_ref2$vertices = _slicedToArray(_ref2.vertices, 2),
|
|
56
49
|
v0 = _ref2$vertices[0],
|
|
57
50
|
v1 = _ref2$vertices[1];
|
|
58
51
|
var _vertices$get = vertices.get(v0),
|
|
@@ -61,11 +54,11 @@ function sceneSnapElements(scene) {
|
|
|
61
54
|
var _vertices$get2 = vertices.get(v1),
|
|
62
55
|
x2 = _vertices$get2.x,
|
|
63
56
|
y2 = _vertices$get2.y;
|
|
64
|
-
|
|
57
|
+
addLineSegmentSnap(snapElements, x1, y1, x2, y2, 20, 1, lineID);
|
|
65
58
|
});
|
|
66
59
|
}
|
|
67
60
|
});
|
|
68
|
-
if (snapMask.get(
|
|
61
|
+
if (snapMask.get(SNAP_GRID)) {
|
|
69
62
|
var divider = 5;
|
|
70
63
|
var gridCellSize = 100 / divider;
|
|
71
64
|
var xCycle = width / gridCellSize;
|
|
@@ -76,25 +69,25 @@ function sceneSnapElements(scene) {
|
|
|
76
69
|
var yMul = y * gridCellSize;
|
|
77
70
|
var onXCross = !(x % divider) ? true : false;
|
|
78
71
|
var onYCross = !(y % divider) ? true : false;
|
|
79
|
-
|
|
72
|
+
addGridSnap(snapElements, xMul, yMul, 10, onXCross && onYCross ? 15 : 10, null);
|
|
80
73
|
}
|
|
81
74
|
}
|
|
82
75
|
}
|
|
83
|
-
if (snapMask.get(
|
|
76
|
+
if (snapMask.get(SNAP_GUIDE)) {
|
|
84
77
|
var horizontal = scene.getIn(['guides', 'horizontal']);
|
|
85
78
|
var vertical = scene.getIn(['guides', 'vertical']);
|
|
86
79
|
var hValues = horizontal.valueSeq();
|
|
87
80
|
var vValues = vertical.valueSeq();
|
|
88
81
|
hValues.forEach(function (hVal) {
|
|
89
82
|
vValues.forEach(function (vVal) {
|
|
90
|
-
|
|
83
|
+
addPointSnap(snapElements, vVal, hVal, 10, 10);
|
|
91
84
|
});
|
|
92
85
|
});
|
|
93
86
|
hValues.forEach(function (hVal) {
|
|
94
|
-
return
|
|
87
|
+
return addLineSegmentSnap(snapElements, 0, hVal, width, hVal, 20, 1);
|
|
95
88
|
});
|
|
96
89
|
vValues.forEach(function (vVal) {
|
|
97
|
-
return
|
|
90
|
+
return addLineSegmentSnap(snapElements, vVal, 0, vVal, height, 20, 1);
|
|
98
91
|
});
|
|
99
92
|
}
|
|
100
93
|
});
|
package/es/utils/snap.js
CHANGED
|
@@ -1,35 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
});
|
|
8
|
-
exports.SNAP_SEGMENT = exports.SNAP_POINT = exports.SNAP_MASK = exports.SNAP_LINE = exports.SNAP_GUIDE = exports.SNAP_GRID = void 0;
|
|
9
|
-
exports.addGridSnap = addGridSnap;
|
|
10
|
-
exports.addLineSegmentSnap = addLineSegmentSnap;
|
|
11
|
-
exports.addLineSnap = addLineSnap;
|
|
12
|
-
exports.addPointSnap = addPointSnap;
|
|
13
|
-
exports.nearestSnap = nearestSnap;
|
|
14
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
15
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
16
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
17
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
18
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
19
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
20
|
-
var _immutable = require("immutable");
|
|
21
|
-
var Geometry = _interopRequireWildcard(require("./geometry"));
|
|
22
|
-
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); }
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
3
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
4
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
|
5
|
+
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
|
6
|
+
import _inherits from "@babel/runtime/helpers/inherits";
|
|
23
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; }
|
|
24
|
-
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) { (
|
|
25
|
-
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)); }
|
|
26
10
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
var
|
|
30
|
-
var
|
|
31
|
-
var
|
|
32
|
-
var
|
|
11
|
+
import { Map, List, Record } from 'immutable';
|
|
12
|
+
import * as Geometry from "./geometry";
|
|
13
|
+
export var SNAP_POINT = 'SNAP_POINT';
|
|
14
|
+
export var SNAP_LINE = 'SNAP_LINE';
|
|
15
|
+
export var SNAP_SEGMENT = 'SNAP_SEGMENT';
|
|
16
|
+
export var SNAP_GRID = 'SNAP_GRID';
|
|
17
|
+
export var SNAP_GUIDE = 'SNAP_GUIDE';
|
|
18
|
+
export var SNAP_MASK = new Map({
|
|
33
19
|
SNAP_POINT: true,
|
|
34
20
|
SNAP_LINE: true,
|
|
35
21
|
SNAP_SEGMENT: true,
|
|
@@ -38,11 +24,11 @@ var SNAP_MASK = exports.SNAP_MASK = new _immutable.Map({
|
|
|
38
24
|
});
|
|
39
25
|
var PointSnap = /*#__PURE__*/function (_Record) {
|
|
40
26
|
function PointSnap() {
|
|
41
|
-
(
|
|
27
|
+
_classCallCheck(this, PointSnap);
|
|
42
28
|
return _callSuper(this, PointSnap, arguments);
|
|
43
29
|
}
|
|
44
|
-
(
|
|
45
|
-
return (
|
|
30
|
+
_inherits(PointSnap, _Record);
|
|
31
|
+
return _createClass(PointSnap, [{
|
|
46
32
|
key: "nearestPoint",
|
|
47
33
|
value: function nearestPoint(x, y) {
|
|
48
34
|
return {
|
|
@@ -57,21 +43,21 @@ var PointSnap = /*#__PURE__*/function (_Record) {
|
|
|
57
43
|
return ~(this.x - x) + 1 < distance && ~(this.y - y) + 1 < distance;
|
|
58
44
|
}
|
|
59
45
|
}]);
|
|
60
|
-
}(
|
|
46
|
+
}(Record({
|
|
61
47
|
type: 'point',
|
|
62
48
|
x: -1,
|
|
63
49
|
y: -1,
|
|
64
50
|
radius: 1,
|
|
65
51
|
priority: 1,
|
|
66
|
-
related: new
|
|
52
|
+
related: new List()
|
|
67
53
|
}));
|
|
68
54
|
var LineSnap = /*#__PURE__*/function (_Record2) {
|
|
69
55
|
function LineSnap() {
|
|
70
|
-
(
|
|
56
|
+
_classCallCheck(this, LineSnap);
|
|
71
57
|
return _callSuper(this, LineSnap, arguments);
|
|
72
58
|
}
|
|
73
|
-
(
|
|
74
|
-
return (
|
|
59
|
+
_inherits(LineSnap, _Record2);
|
|
60
|
+
return _createClass(LineSnap, [{
|
|
75
61
|
key: "nearestPoint",
|
|
76
62
|
value: function nearestPoint(x, y) {
|
|
77
63
|
return _objectSpread(_objectSpread({}, Geometry.closestPointFromLine(this.a, this.b, this.c, x, y)), {}, {
|
|
@@ -84,22 +70,22 @@ var LineSnap = /*#__PURE__*/function (_Record2) {
|
|
|
84
70
|
return true;
|
|
85
71
|
}
|
|
86
72
|
}]);
|
|
87
|
-
}(
|
|
73
|
+
}(Record({
|
|
88
74
|
type: 'line',
|
|
89
75
|
a: -1,
|
|
90
76
|
b: -1,
|
|
91
77
|
c: -1,
|
|
92
78
|
radius: 1,
|
|
93
79
|
priority: 1,
|
|
94
|
-
related: new
|
|
80
|
+
related: new List()
|
|
95
81
|
}));
|
|
96
82
|
var LineSegmentSnap = /*#__PURE__*/function (_Record3) {
|
|
97
83
|
function LineSegmentSnap() {
|
|
98
|
-
(
|
|
84
|
+
_classCallCheck(this, LineSegmentSnap);
|
|
99
85
|
return _callSuper(this, LineSegmentSnap, arguments);
|
|
100
86
|
}
|
|
101
|
-
(
|
|
102
|
-
return (
|
|
87
|
+
_inherits(LineSegmentSnap, _Record3);
|
|
88
|
+
return _createClass(LineSegmentSnap, [{
|
|
103
89
|
key: "nearestPoint",
|
|
104
90
|
value: function nearestPoint(x, y) {
|
|
105
91
|
return _objectSpread(_objectSpread({}, Geometry.closestPointFromLineSegment(this.x1, this.y1, this.x2, this.y2, x, y)), {}, {
|
|
@@ -118,7 +104,7 @@ var LineSegmentSnap = /*#__PURE__*/function (_Record3) {
|
|
|
118
104
|
return true;
|
|
119
105
|
}
|
|
120
106
|
}]);
|
|
121
|
-
}(
|
|
107
|
+
}(Record({
|
|
122
108
|
type: 'line-segment',
|
|
123
109
|
x1: -1,
|
|
124
110
|
y1: -1,
|
|
@@ -126,15 +112,15 @@ var LineSegmentSnap = /*#__PURE__*/function (_Record3) {
|
|
|
126
112
|
y2: -1,
|
|
127
113
|
radius: 1,
|
|
128
114
|
priority: 1,
|
|
129
|
-
related: new
|
|
115
|
+
related: new List()
|
|
130
116
|
}));
|
|
131
117
|
var GridSnap = /*#__PURE__*/function (_Record4) {
|
|
132
118
|
function GridSnap() {
|
|
133
|
-
(
|
|
119
|
+
_classCallCheck(this, GridSnap);
|
|
134
120
|
return _callSuper(this, GridSnap, arguments);
|
|
135
121
|
}
|
|
136
|
-
(
|
|
137
|
-
return (
|
|
122
|
+
_inherits(GridSnap, _Record4);
|
|
123
|
+
return _createClass(GridSnap, [{
|
|
138
124
|
key: "nearestPoint",
|
|
139
125
|
value: function nearestPoint(x, y) {
|
|
140
126
|
return {
|
|
@@ -149,15 +135,15 @@ var GridSnap = /*#__PURE__*/function (_Record4) {
|
|
|
149
135
|
return ~(this.x - x) + 1 < distance && ~(this.y - y) + 1 < distance;
|
|
150
136
|
}
|
|
151
137
|
}]);
|
|
152
|
-
}(
|
|
138
|
+
}(Record({
|
|
153
139
|
type: 'grid',
|
|
154
140
|
x: -1,
|
|
155
141
|
y: -1,
|
|
156
142
|
radius: 1,
|
|
157
143
|
priority: 1,
|
|
158
|
-
related: new
|
|
144
|
+
related: new List()
|
|
159
145
|
}));
|
|
160
|
-
function nearestSnap(snapElements, x, y, snapMask) {
|
|
146
|
+
export function nearestSnap(snapElements, x, y, snapMask) {
|
|
161
147
|
var filter = {
|
|
162
148
|
point: snapMask.get(SNAP_POINT),
|
|
163
149
|
line: snapMask.get(SNAP_LINE),
|
|
@@ -183,8 +169,8 @@ function nearestSnap(snapElements, x, y, snapMask) {
|
|
|
183
169
|
return p1 === p2 ? d1 < d2 ? -1 : 1 : p1 > p2 ? -1 : 1;
|
|
184
170
|
});
|
|
185
171
|
}
|
|
186
|
-
function addPointSnap(snapElements, x, y, radius, priority, related) {
|
|
187
|
-
related = new
|
|
172
|
+
export function addPointSnap(snapElements, x, y, radius, priority, related) {
|
|
173
|
+
related = new List([related]);
|
|
188
174
|
return snapElements.push(new PointSnap({
|
|
189
175
|
x: x,
|
|
190
176
|
y: y,
|
|
@@ -193,8 +179,8 @@ function addPointSnap(snapElements, x, y, radius, priority, related) {
|
|
|
193
179
|
related: related
|
|
194
180
|
}));
|
|
195
181
|
}
|
|
196
|
-
function addLineSnap(snapElements, a, b, c, radius, priority, related) {
|
|
197
|
-
related = new
|
|
182
|
+
export function addLineSnap(snapElements, a, b, c, radius, priority, related) {
|
|
183
|
+
related = new List([related]);
|
|
198
184
|
return snapElements.withMutations(function (snapElements) {
|
|
199
185
|
var alreadyPresent = snapElements.some(function (lineSnap) {
|
|
200
186
|
return lineSnap.type === 'line' && a === lineSnap.a && b === lineSnap.b && c === lineSnap.c;
|
|
@@ -221,8 +207,8 @@ function addLineSnap(snapElements, a, b, c, radius, priority, related) {
|
|
|
221
207
|
}));
|
|
222
208
|
});
|
|
223
209
|
}
|
|
224
|
-
function addLineSegmentSnap(snapElements, x1, y1, x2, y2, radius, priority, related) {
|
|
225
|
-
related = new
|
|
210
|
+
export function addLineSegmentSnap(snapElements, x1, y1, x2, y2, radius, priority, related) {
|
|
211
|
+
related = new List([related]);
|
|
226
212
|
return snapElements.push(new LineSegmentSnap({
|
|
227
213
|
x1: x1,
|
|
228
214
|
y1: y1,
|
|
@@ -233,8 +219,8 @@ function addLineSegmentSnap(snapElements, x1, y1, x2, y2, radius, priority, rela
|
|
|
233
219
|
related: related
|
|
234
220
|
}));
|
|
235
221
|
}
|
|
236
|
-
function addGridSnap(snapElements, x, y, radius, priority, related) {
|
|
237
|
-
related = new
|
|
222
|
+
export function addGridSnap(snapElements, x, y, radius, priority, related) {
|
|
223
|
+
related = new List([related]);
|
|
238
224
|
return snapElements.push(new GridSnap({
|
|
239
225
|
x: x,
|
|
240
226
|
y: y,
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.summarizeItems = summarizeItems;
|
|
7
|
-
function summarizeItems(items) {
|
|
1
|
+
export function summarizeItems(items) {
|
|
8
2
|
var totalCount = 0;
|
|
9
3
|
var totalPrice = 0;
|
|
10
4
|
var totalRegularPrice = 0;
|
package/es/utils/threeCSG.es6.js
CHANGED
|
@@ -1,25 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports["default"] = void 0;
|
|
9
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
10
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
11
|
-
var THREE = _interopRequireWildcard(require("three"));
|
|
12
|
-
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); }
|
|
1
|
+
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/createClass";
|
|
13
3
|
/*jshint esversion: 6 */
|
|
14
|
-
|
|
4
|
+
import * as THREE from 'three';
|
|
15
5
|
var EPSILON = 1e-5,
|
|
16
6
|
COPLANAR = 0,
|
|
17
7
|
FRONT = 1,
|
|
18
8
|
BACK = 2,
|
|
19
9
|
SPANNING = 3;
|
|
20
|
-
var ThreeBSP =
|
|
10
|
+
var ThreeBSP = /*#__PURE__*/function () {
|
|
21
11
|
function ThreeBSP(geometry) {
|
|
22
|
-
(
|
|
12
|
+
_classCallCheck(this, ThreeBSP);
|
|
23
13
|
// Convert THREE.Geometry to ThreeBSP
|
|
24
14
|
var i,
|
|
25
15
|
_length_i,
|
|
@@ -68,7 +58,7 @@ var ThreeBSP = exports["default"] = /*#__PURE__*/function () {
|
|
|
68
58
|
}
|
|
69
59
|
this.tree = new Node(polygons);
|
|
70
60
|
}
|
|
71
|
-
return (
|
|
61
|
+
return _createClass(ThreeBSP, [{
|
|
72
62
|
key: "subtract",
|
|
73
63
|
value: function subtract(other_tree) {
|
|
74
64
|
var a = this.tree.clone(),
|
|
@@ -163,9 +153,10 @@ var ThreeBSP = exports["default"] = /*#__PURE__*/function () {
|
|
|
163
153
|
}
|
|
164
154
|
}]);
|
|
165
155
|
}();
|
|
156
|
+
export { ThreeBSP as default };
|
|
166
157
|
var Polygon = /*#__PURE__*/function () {
|
|
167
158
|
function Polygon(vertices, normal, w) {
|
|
168
|
-
(
|
|
159
|
+
_classCallCheck(this, Polygon);
|
|
169
160
|
if (!(vertices instanceof Array)) {
|
|
170
161
|
vertices = [];
|
|
171
162
|
}
|
|
@@ -176,7 +167,7 @@ var Polygon = /*#__PURE__*/function () {
|
|
|
176
167
|
this.normal = this.w = undefined;
|
|
177
168
|
}
|
|
178
169
|
}
|
|
179
|
-
return (
|
|
170
|
+
return _createClass(Polygon, [{
|
|
180
171
|
key: "calculateProperties",
|
|
181
172
|
value: function calculateProperties() {
|
|
182
173
|
var a = this.vertices[0],
|
|
@@ -296,14 +287,14 @@ var Polygon = /*#__PURE__*/function () {
|
|
|
296
287
|
}();
|
|
297
288
|
var Vertex = /*#__PURE__*/function () {
|
|
298
289
|
function Vertex(x, y, z, normal, uv) {
|
|
299
|
-
(
|
|
290
|
+
_classCallCheck(this, Vertex);
|
|
300
291
|
this.x = x;
|
|
301
292
|
this.y = y;
|
|
302
293
|
this.z = z;
|
|
303
294
|
this.normal = normal || new THREE.Vector3();
|
|
304
295
|
this.uv = uv || new THREE.Vector2();
|
|
305
296
|
}
|
|
306
|
-
return (
|
|
297
|
+
return _createClass(Vertex, [{
|
|
307
298
|
key: "clone",
|
|
308
299
|
value: function clone() {
|
|
309
300
|
return new Vertex(this.x, this.y, this.z, this.normal.clone(), this.uv.clone());
|
|
@@ -388,7 +379,7 @@ var Vertex = /*#__PURE__*/function () {
|
|
|
388
379
|
}();
|
|
389
380
|
var Node = /*#__PURE__*/function () {
|
|
390
381
|
function Node(polygons) {
|
|
391
|
-
(
|
|
382
|
+
_classCallCheck(this, Node);
|
|
392
383
|
var i,
|
|
393
384
|
polygon_count,
|
|
394
385
|
front = [],
|
|
@@ -407,7 +398,7 @@ var Node = /*#__PURE__*/function () {
|
|
|
407
398
|
this.back = new Node(back);
|
|
408
399
|
}
|
|
409
400
|
}
|
|
410
|
-
return (
|
|
401
|
+
return _createClass(Node, [{
|
|
411
402
|
key: "isConvex",
|
|
412
403
|
value: function isConvex(polygons) {
|
|
413
404
|
var i, j;
|
package/es/version.js
CHANGED
package/lib/@history.js
CHANGED
|
@@ -7,4 +7,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var history = _interopRequireWildcard(require("history"));
|
|
9
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); }
|
|
10
|
-
var _default = exports["default"] = history.createBrowserHistory();
|
|
10
|
+
var _default = exports["default"] = history.createBrowserHistory();
|
|
11
|
+
module.exports = exports.default;
|
package/lib/AppContext.js
CHANGED
|
@@ -7,4 +7,5 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var AppContext = /*#__PURE__*/_react["default"].createContext({});
|
|
10
|
-
var _default = exports["default"] = AppContext;
|
|
10
|
+
var _default = exports["default"] = AppContext;
|
|
11
|
+
module.exports = exports.default;
|
|
@@ -638,4 +638,5 @@ function mapDispatchToProps(dispatch) {
|
|
|
638
638
|
return (0, _redux.bindActionCreators)(_export2["default"][actionNamespace], dispatch);
|
|
639
639
|
});
|
|
640
640
|
}
|
|
641
|
-
var _default = exports["default"] = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(KitchenConfigurator);
|
|
641
|
+
var _default = exports["default"] = (0, _reactRedux.connect)(mapStateToProps, mapDispatchToProps)(KitchenConfigurator);
|
|
642
|
+
module.exports = exports.default;
|
|
@@ -47,4 +47,5 @@ var textures = {
|
|
|
47
47
|
heightRepeatScale: 0.01
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
|
-
var _default = exports["default"] = _export["default"].AreaFactory('area', info, textures);
|
|
50
|
+
var _default = exports["default"] = _export["default"].AreaFactory('area', info, textures);
|
|
51
|
+
module.exports = exports.default;
|