kitchen-simulator 1.1.1-test.7 → 1.1.1-test.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/KitchenConfigurator.js +34 -54
- package/es/KitchenConfiguratorApp.js +63 -81
- package/es/actions/holes-actions.js +1 -1
- package/es/actions/items-actions.js +1 -1
- package/es/actions/lines-actions.js +1 -1
- package/es/actions/project-actions.js +1 -1
- package/es/actions/scene-actions.js +1 -1
- package/es/actions/vertices-actions.js +1 -1
- package/es/actions/viewer2d-actions.js +1 -1
- package/es/actions/viewer3d-actions.js +1 -1
- package/es/catalog/areas/area/planner-element.js +10 -7
- package/es/catalog/catalog.js +3 -12
- package/es/catalog/factories/area-factory.js +1 -4
- package/es/catalog/factories/wall-factory-3d.js +1 -1
- package/es/catalog/holes/export.js +13 -13
- package/es/catalog/lines/wall/planner-element.js +13 -10
- package/es/catalog/properties/property-checkbox.js +64 -22
- package/es/catalog/properties/property-enum.js +52 -15
- package/es/catalog/properties/property-lenght-measure.js +4 -5
- package/es/catalog/properties/property-length-measure.js +55 -12
- package/es/catalog/properties/property-length-measure_hole.js +4 -5
- package/es/catalog/utils/FuseUtils.js +3 -6
- package/es/catalog/utils/exporter.js +2 -5
- package/es/catalog/utils/item-loader.js +4 -11
- package/es/catalog/utils/mtl-loader.js +3 -2
- package/es/catalog/utils/obj-loader.js +3 -2
- package/es/class/FuseUtils.js +3 -6
- package/es/class/area.js +4 -8
- package/es/class/group.js +6 -15
- package/es/class/guide.js +2 -6
- package/es/class/hole.js +7 -12
- package/es/class/item.js +12 -23
- package/es/class/layer.js +4 -8
- package/es/class/line.js +3 -12
- package/es/class/project.js +7 -11
- package/es/class/vertex.js +3 -7
- package/es/components/content.js +1 -0
- package/es/components/disclaimer/disclaimer.js +66 -86
- package/es/components/style/button.js +7 -14
- package/es/components/style/cancel-button.js +2 -3
- package/es/components/style/content-container.js +1 -4
- package/es/components/style/content-title.js +3 -7
- package/es/components/style/delete-button.js +2 -3
- package/es/components/style/form-block.js +3 -7
- package/es/components/style/form-color-input.js +2 -3
- package/es/components/style/form-label.js +3 -7
- package/es/components/style/form-number-input.js +36 -18
- package/es/components/style/form-number-input_2.js +6 -12
- package/es/components/style/form-select.js +50 -11
- package/es/components/style/form-slider.js +24 -9
- package/es/components/style/form-submit-button.js +2 -3
- package/es/components/style/form-text-input.js +38 -26
- package/es/components/viewer2d/area.js +4 -4
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-streak.js +0 -1
- package/es/components/viewer2d/grids/grid-vertical-streak.js +0 -1
- package/es/components/viewer2d/grids/grids.js +1 -6
- package/es/components/viewer2d/item.js +4 -11
- package/es/components/viewer2d/line.js +2 -5
- package/es/components/viewer2d/ruler.js +2 -3
- package/es/components/viewer2d/rulerDist.js +1 -1
- package/es/components/viewer2d/rulerX.js +6 -12
- package/es/components/viewer2d/rulerY.js +6 -12
- package/es/components/viewer2d/scene.js +15 -27
- package/es/components/viewer2d/state.js +1 -6
- package/es/components/viewer2d/utils.js +33 -2
- package/es/components/viewer2d/viewer2d.js +13 -18
- package/es/components/viewer3d/camera-controls-module/camera-controls.module.js +6 -13
- package/es/components/viewer3d/front3D.js +1 -6
- package/es/components/viewer3d/libs/mtl-loader.js +2 -2
- package/es/components/viewer3d/libs/obj-loader.js +2 -2
- package/es/components/viewer3d/libs/orbit-controls.js +6 -5
- package/es/components/viewer3d/libs/pointer-lock-controls.js +5 -4
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +2 -2
- package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -4
- package/es/components/viewer3d/ruler-utils/scene3D.js +2 -3
- package/es/components/viewer3d/scene-creator.js +5 -11
- package/es/components/viewer3d/viewer3d-first-person.js +5 -11
- package/es/components/viewer3d/viewer3d.js +19 -26
- package/es/index.js +13 -14
- package/es/models.js +10 -15
- package/es/plugins/console-debugger.js +1 -4
- package/es/plugins/keyboard.js +2 -2
- package/es/reducers/holes-reducer.js +1 -1
- package/es/reducers/items-reducer.js +2 -5
- package/es/reducers/lines-reducer.js +1 -1
- package/es/reducers/project-reducer.js +1 -1
- package/es/reducers/reducer.js +2 -2
- package/es/reducers/scene-reducer.js +1 -1
- package/es/reducers/user-reducer.js +1 -2
- package/es/reducers/vertices-reducer.js +1 -1
- package/es/reducers/viewer2d-reducer.js +2 -2
- package/es/reducers/viewer3d-reducer.js +2 -2
- package/es/translator/translator.js +2 -6
- package/es/utils/convert-units-lite.js +29 -0
- package/es/utils/geometry.js +7 -16
- package/es/utils/get-edges-of-subgraphs.js +2 -1
- package/es/utils/graph-cycles.js +2 -3
- package/es/utils/graph.js +4 -7
- package/es/utils/helper.js +3 -73
- package/es/utils/id-broker.js +4 -8
- package/es/utils/molding.js +36 -42
- package/es/utils/name-generator.js +2 -6
- package/es/utils/objects-utils.js +1 -1
- package/es/utils/process-black-list.js +1 -4
- package/es/utils/snap-scene.js +1 -6
- package/es/utils/snap.js +6 -12
- package/es/utils/threeCSG.es6.js +2 -6
- package/lib/@history.js +3 -2
- package/lib/AppContext.js +3 -2
- package/lib/KitchenConfigurator.js +70 -88
- package/lib/KitchenConfiguratorApp.js +98 -113
- package/lib/actions/export.js +1 -1
- package/lib/catalog/areas/area/planner-element.js +13 -8
- package/lib/catalog/catalog.js +9 -16
- package/lib/catalog/factories/area-factory-3d.js +1 -1
- package/lib/catalog/factories/area-factory.js +6 -7
- 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 +4 -3
- package/lib/catalog/holes/door-closet/planner-element.js +4 -3
- package/lib/catalog/holes/door-double/planner-element.js +4 -3
- package/lib/catalog/holes/door-exterior/planner-element.js +4 -3
- package/lib/catalog/holes/door-interior/planner-element.js +4 -3
- package/lib/catalog/holes/door-panic/planner-element.js +4 -3
- package/lib/catalog/holes/door-panic-double/planner-element.js +4 -3
- package/lib/catalog/holes/door-sliding/planner-element.js +4 -3
- package/lib/catalog/holes/doorway-framed/planner-element.js +4 -3
- package/lib/catalog/holes/doorway-frameless/planner-element.js +4 -3
- package/lib/catalog/holes/export.js +14 -14
- package/lib/catalog/holes/window-clear/planner-element.js +4 -3
- package/lib/catalog/holes/window-cross/planner-element.js +4 -3
- package/lib/catalog/holes/window-double-hung/planner-element.js +4 -3
- package/lib/catalog/holes/window-vertical/planner-element.js +4 -3
- package/lib/catalog/lines/wall/planner-element.js +16 -11
- package/lib/catalog/molding/molding-dcm/planner-element.js +4 -3
- package/lib/catalog/molding/molding-fbm/planner-element.js +4 -3
- package/lib/catalog/molding/molding-lrm/planner-element.js +4 -3
- package/lib/catalog/properties/export.js +1 -1
- package/lib/catalog/properties/property-checkbox.js +68 -25
- package/lib/catalog/properties/property-color.js +3 -2
- package/lib/catalog/properties/property-enum.js +54 -16
- package/lib/catalog/properties/property-hidden.js +3 -2
- package/lib/catalog/properties/property-lenght-measure.js +10 -10
- package/lib/catalog/properties/property-length-measure.js +61 -17
- package/lib/catalog/properties/property-length-measure_hole.js +10 -10
- package/lib/catalog/properties/property-number.js +3 -2
- package/lib/catalog/properties/property-read-only.js +3 -2
- package/lib/catalog/properties/property-string.js +3 -2
- package/lib/catalog/properties/property-toggle.js +3 -2
- package/lib/catalog/properties/shared-property-style.js +2 -1
- package/lib/catalog/utils/FuseUtils.js +10 -11
- package/lib/catalog/utils/exporter.js +10 -12
- 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 +10 -11
- package/lib/class/area.js +9 -11
- package/lib/class/export.js +1 -1
- package/lib/class/group.js +13 -20
- package/lib/class/guide.js +9 -12
- package/lib/class/hole.js +7 -9
- package/lib/class/item.js +25 -35
- package/lib/class/layer.js +7 -9
- package/lib/class/line.js +14 -20
- package/lib/class/project.js +10 -11
- package/lib/class/vertex.js +9 -11
- package/lib/components/content.js +5 -3
- package/lib/components/disclaimer/disclaimer.js +69 -88
- package/lib/components/export.js +1 -1
- package/lib/components/style/button.js +17 -22
- package/lib/components/style/cancel-button.js +7 -7
- package/lib/components/style/content-container.js +5 -7
- package/lib/components/style/content-title.js +10 -12
- package/lib/components/style/delete-button.js +8 -8
- package/lib/components/style/export.js +1 -1
- package/lib/components/style/form-block.js +9 -12
- package/lib/components/style/form-color-input.js +7 -7
- package/lib/components/style/form-label.js +9 -12
- package/lib/components/style/form-number-input.js +43 -23
- package/lib/components/style/form-number-input_2.js +15 -19
- package/lib/components/style/form-select.js +53 -15
- package/lib/components/style/form-slider.js +28 -12
- package/lib/components/style/form-submit-button.js +8 -8
- package/lib/components/style/form-text-input.js +46 -32
- package/lib/components/viewer2d/area.js +8 -7
- package/lib/components/viewer2d/export.js +1 -1
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +3 -3
- package/lib/components/viewer2d/grids/grid-streak.js +3 -3
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +3 -3
- package/lib/components/viewer2d/grids/grids.js +6 -10
- package/lib/components/viewer2d/group.js +4 -3
- package/lib/components/viewer2d/item.js +14 -19
- package/lib/components/viewer2d/layer.js +3 -2
- package/lib/components/viewer2d/line.js +4 -7
- package/lib/components/viewer2d/ruler.js +9 -9
- package/lib/components/viewer2d/rulerDist.js +7 -6
- package/lib/components/viewer2d/rulerX.js +15 -19
- package/lib/components/viewer2d/rulerY.js +15 -19
- package/lib/components/viewer2d/scene.js +24 -34
- package/lib/components/viewer2d/snap.js +4 -3
- package/lib/components/viewer2d/state.js +7 -11
- package/lib/components/viewer2d/utils.js +35 -2
- package/lib/components/viewer2d/vertex.js +4 -3
- package/lib/components/viewer2d/viewer2d.js +40 -41
- package/lib/components/viewer3d/camera-controls-module/camera-controls.module.js +14 -20
- package/lib/components/viewer3d/dcm.js +2 -1
- package/lib/components/viewer3d/fbm.js +2 -1
- package/lib/components/viewer3d/front3D.js +6 -10
- package/lib/components/viewer3d/grid-creator.js +4 -3
- package/lib/components/viewer3d/grids/grid-horizontal-streak.js +3 -2
- package/lib/components/viewer3d/grids/grid-streak.js +3 -2
- package/lib/components/viewer3d/grids/grid-vertical-streak.js +3 -2
- package/lib/components/viewer3d/libs/mtl-loader.js +7 -2
- package/lib/components/viewer3d/libs/obj-loader.js +7 -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/lrm.js +2 -1
- package/lib/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/lib/components/viewer3d/ruler-utils/itemRect.js +10 -9
- package/lib/components/viewer3d/ruler-utils/layer3D.js +35 -34
- package/lib/components/viewer3d/ruler-utils/ruler3D.js +5 -7
- package/lib/components/viewer3d/ruler-utils/scene3D.js +4 -5
- package/lib/components/viewer3d/ruler-utils/state3D.js +3 -2
- 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 +13 -17
- package/lib/components/viewer3d/viewer3d.js +34 -38
- package/lib/index.js +16 -88
- package/lib/models.js +58 -63
- package/lib/plugins/autosave.js +2 -1
- package/lib/plugins/console-debugger.js +5 -7
- package/lib/plugins/export.js +1 -1
- package/lib/plugins/keyboard.js +2 -1
- package/lib/reducers/areas-reducer.js +2 -1
- package/lib/reducers/export.js +1 -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 -2
- package/lib/reducers/vertices-reducer.js +2 -1
- package/lib/reducers/viewer2d-reducer.js +5 -5
- package/lib/reducers/viewer3d-reducer.js +5 -5
- package/lib/styles/export.js +1 -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 +7 -10
- 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 +7 -9
- package/lib/utils/objects-utils.js +5 -3
- package/lib/utils/process-black-list.js +3 -5
- package/lib/utils/react-if.js +3 -2
- package/lib/utils/snap-scene.js +3 -7
- package/lib/utils/snap.js +22 -26
- package/lib/utils/threeCSG.es6.js +16 -15
- package/package.json +26 -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
|
@@ -1,44 +1,28 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
|
|
5
|
+
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
6
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
7
|
+
import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
|
|
8
|
+
import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
9
|
+
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
10
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
1
11
|
var _excluded = ["width", "height", "state", "stateExtractor"];
|
|
2
|
-
|
|
3
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
4
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
5
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
6
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
7
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
8
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
9
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
10
|
-
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
11
|
-
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."); }
|
|
12
|
-
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; } }
|
|
13
|
-
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
14
|
-
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
15
|
-
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; }
|
|
12
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
16
13
|
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; }
|
|
17
14
|
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; }
|
|
18
|
-
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
|
-
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); } }
|
|
20
|
-
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
21
15
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
22
|
-
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
23
|
-
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
24
16
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
25
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
26
|
-
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
27
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
28
|
-
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; }
|
|
29
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
30
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
31
17
|
import axios from 'axios';
|
|
32
|
-
import
|
|
33
|
-
import {
|
|
34
|
-
import
|
|
18
|
+
import { convert } from "./utils/convert-units-lite";
|
|
19
|
+
import { Autosave } from "./plugins/export";
|
|
20
|
+
import PropTypes from 'prop-types';
|
|
35
21
|
import React, { Component } from 'react';
|
|
36
|
-
import ReactGA from 'react-ga4';
|
|
37
|
-
import { hotjar } from 'react-hotjar';
|
|
38
22
|
import { connect } from 'react-redux';
|
|
39
23
|
import { bindActionCreators } from 'redux';
|
|
40
24
|
import * as constants from "./constants";
|
|
41
|
-
import { base64Decode
|
|
25
|
+
import { base64Decode } from "./utils/helper";
|
|
42
26
|
import actions from "./actions/export";
|
|
43
27
|
import Catalog from "./catalog/catalog";
|
|
44
28
|
import { Content } from "./components/export";
|
|
@@ -361,11 +345,6 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
361
345
|
key: "componentDidMount",
|
|
362
346
|
value: function componentDidMount() {
|
|
363
347
|
var _this3 = this;
|
|
364
|
-
ReactGA.send({
|
|
365
|
-
hitType: 'pageview',
|
|
366
|
-
page: getPath()
|
|
367
|
-
});
|
|
368
|
-
hotjar.event && hotjar.event("pageview:".concat(getPath()));
|
|
369
348
|
window.addEventListener('beforeunload', this.handleBeforeUnload);
|
|
370
349
|
console.log('context =>', this.context);
|
|
371
350
|
window.forRedo = [];
|
|
@@ -385,7 +364,7 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
385
364
|
return;
|
|
386
365
|
}
|
|
387
366
|
if (match && match.params.pid === undefined) {
|
|
388
|
-
var newplugins = [].concat(_toConsumableArray(plugins), [
|
|
367
|
+
var newplugins = [].concat(_toConsumableArray(plugins), [Autosave('KitchenConfigurator_v0', false)]);
|
|
389
368
|
newplugins.forEach(function (newplugin) {
|
|
390
369
|
return newplugin(store, stateExtractor);
|
|
391
370
|
});
|
|
@@ -414,17 +393,17 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
414
393
|
pid: match.params.pid,
|
|
415
394
|
visualizerName: sessionStorage.getItem('visualizerName')
|
|
416
395
|
}).then(/*#__PURE__*/function () {
|
|
417
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/
|
|
396
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee(response) {
|
|
418
397
|
var projectElement, jsonData, _t;
|
|
419
|
-
return
|
|
420
|
-
while (1) switch (_context.
|
|
398
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
399
|
+
while (1) switch (_context.prev = _context.next) {
|
|
421
400
|
case 0:
|
|
422
401
|
projectElement = response.data.projectElement;
|
|
423
402
|
if (!(projectElement.length === 0)) {
|
|
424
|
-
_context.
|
|
403
|
+
_context.next = 1;
|
|
425
404
|
break;
|
|
426
405
|
}
|
|
427
|
-
return _context.
|
|
406
|
+
return _context.abrupt("return");
|
|
428
407
|
case 1:
|
|
429
408
|
sessionStorage.setItem('projectTitle', projectElement[0].title);
|
|
430
409
|
projectActions.rename(projectElement[0].title);
|
|
@@ -434,25 +413,25 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
434
413
|
sessionStorage.setItem('lastName', projectElement[0].lastName);
|
|
435
414
|
sessionStorage.setItem('phone', projectElement[0].phone);
|
|
436
415
|
if (!projectElement[0].project_data) {
|
|
437
|
-
_context.
|
|
416
|
+
_context.next = 2;
|
|
438
417
|
break;
|
|
439
418
|
}
|
|
440
419
|
jsonData = JSON.parse(projectElement[0].project_data);
|
|
441
|
-
_context.
|
|
420
|
+
_context.next = 5;
|
|
442
421
|
break;
|
|
443
422
|
case 2:
|
|
444
|
-
_context.
|
|
445
|
-
_context.
|
|
423
|
+
_context.prev = 2;
|
|
424
|
+
_context.next = 3;
|
|
446
425
|
return axios.post("".concat(constants.API_SERVER_URL, "/api/project/loadPidData"), {
|
|
447
426
|
pid: match.params.pid
|
|
448
427
|
}).data.data;
|
|
449
428
|
case 3:
|
|
450
|
-
jsonData = _context.
|
|
451
|
-
_context.
|
|
429
|
+
jsonData = _context.sent;
|
|
430
|
+
_context.next = 5;
|
|
452
431
|
break;
|
|
453
432
|
case 4:
|
|
454
|
-
_context.
|
|
455
|
-
_t = _context
|
|
433
|
+
_context.prev = 4;
|
|
434
|
+
_t = _context["catch"](2);
|
|
456
435
|
_this3.setState({
|
|
457
436
|
isSnackBarOpen: true,
|
|
458
437
|
snackBarMessage: _t
|
|
@@ -461,7 +440,8 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
461
440
|
jsonData.isLoadingCabinet = false;
|
|
462
441
|
projectActions.loadProject(jsonData, _this3.props.categoryData);
|
|
463
442
|
case 6:
|
|
464
|
-
|
|
443
|
+
case "end":
|
|
444
|
+
return _context.stop();
|
|
465
445
|
}
|
|
466
446
|
}, _callee, null, [[2, 4]]);
|
|
467
447
|
}));
|
|
@@ -580,7 +560,9 @@ var KitchenConfigurator = /*#__PURE__*/function (_Component) {
|
|
|
580
560
|
});
|
|
581
561
|
return /*#__PURE__*/React.createElement("section", null, /*#__PURE__*/React.createElement("div", {
|
|
582
562
|
style: _objectSpread(_objectSpread({}, wrapperStyle), {}, {
|
|
583
|
-
height: height
|
|
563
|
+
height: height,
|
|
564
|
+
display: 'flex',
|
|
565
|
+
justifyContent: 'center'
|
|
584
566
|
})
|
|
585
567
|
}, /*#__PURE__*/React.createElement(Content, _extends({
|
|
586
568
|
width: contentW,
|
|
@@ -609,7 +591,6 @@ KitchenConfigurator.propTypes = {
|
|
|
609
591
|
width: PropTypes.number.isRequired,
|
|
610
592
|
height: PropTypes.number.isRequired,
|
|
611
593
|
stateExtractor: PropTypes.func.isRequired,
|
|
612
|
-
toolbarButtons: PropTypes.array,
|
|
613
594
|
sidebarComponents: PropTypes.array,
|
|
614
595
|
footerbarComponents: PropTypes.array,
|
|
615
596
|
customContents: PropTypes.object,
|
|
@@ -631,7 +612,6 @@ KitchenConfigurator.defaultProps = {
|
|
|
631
612
|
plugins: [],
|
|
632
613
|
allowProjectFileSupport: true,
|
|
633
614
|
softwareSignature: "KitchenConfigurator ".concat(VERSION),
|
|
634
|
-
toolbarButtons: [],
|
|
635
615
|
sidebarComponents: [],
|
|
636
616
|
footerbarComponents: [],
|
|
637
617
|
customContents: {},
|
|
@@ -1,60 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
6
|
+
var _excluded = ["width", "height", "projectElement", "categoryData", "dataBundle", "configData", "options", "user", "auth", "featureFlags", "sentry", "analytics", "onEvent", "onSave", "onError"];
|
|
4
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; }
|
|
5
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; }
|
|
6
|
-
|
|
7
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
8
|
-
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); }
|
|
9
|
-
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
10
|
-
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
11
|
-
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
12
|
-
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
13
|
-
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
14
|
-
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."); }
|
|
15
|
-
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; } }
|
|
16
|
-
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; }
|
|
17
|
-
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; } }
|
|
18
|
-
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
19
|
-
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
20
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
9
|
+
import _regeneratorRuntime from "@babel/runtime/regenerator";
|
|
21
10
|
import React, { useEffect } from 'react';
|
|
22
|
-
import
|
|
11
|
+
import PropTypes from 'prop-types';
|
|
23
12
|
import { Provider } from 'react-redux';
|
|
24
13
|
import { createStore } from 'redux';
|
|
25
14
|
import * as Models from "./models";
|
|
15
|
+
import { State } from "./models";
|
|
16
|
+
import PlannerReducer from "./reducers/reducer";
|
|
26
17
|
import KitchenConfigurator from "./KitchenConfigurator";
|
|
27
18
|
import AppContext from "./AppContext";
|
|
28
19
|
import Catalog from "./catalog/catalog";
|
|
29
20
|
import { SVGLoader } from 'three/addons/loaders/SVGLoader';
|
|
30
21
|
import { isEmpty } from "./utils/helper";
|
|
31
22
|
import { TOE_KICK_MOLDING } from "./constants";
|
|
32
|
-
import Areas from "./catalog/areas/area/planner-element
|
|
33
|
-
import Lines from "./catalog/lines/wall/planner-element
|
|
23
|
+
import * as Areas from "./catalog/areas/area/planner-element";
|
|
24
|
+
import * as Lines from "./catalog/lines/wall/planner-element";
|
|
34
25
|
import * as Holes from "./catalog/holes/export";
|
|
35
26
|
import { render2DItem, render3DApplianceItem, render3DItem, render3DLightingItem } from "./catalog/utils/item-loader";
|
|
36
|
-
import {
|
|
27
|
+
import { ConsoleDebugger, Keyboard } from "./plugins/export";
|
|
37
28
|
import { Map } from 'immutable';
|
|
38
|
-
import ReactGA from 'react-ga4';
|
|
39
|
-
import { hotjar } from 'react-hotjar';
|
|
40
29
|
import * as Sentry from '@sentry/react';
|
|
41
30
|
import { loadProject, rename } from "./actions/project-actions";
|
|
42
31
|
import exporter from "./catalog/utils/exporter";
|
|
32
|
+
import * as THREE from 'three';
|
|
33
|
+
if (typeof window !== 'undefined') window.THREE = THREE;
|
|
43
34
|
|
|
44
35
|
/* ============================== component ============================= */
|
|
45
36
|
var MyCatalog = new Catalog();
|
|
46
37
|
var AppState = Map({
|
|
47
|
-
KitchenConfigurator: new
|
|
38
|
+
KitchenConfigurator: new State()
|
|
48
39
|
});
|
|
49
40
|
console.log('Version: 378.45-202509_DIY-364-mbox-crash');
|
|
50
|
-
ReactGA.initialize([{
|
|
51
|
-
trackingId: 'G-YK2JCC9F9G' // https://dev.addovisuals.com
|
|
52
|
-
}, {
|
|
53
|
-
trackingId: 'G-3Y44W0RY2E' // https://demo.kc.addovisuals.com/
|
|
54
|
-
}, {
|
|
55
|
-
trackingId: 'G-M2VD74KP44' // https://rtastore.diydesignspace.com/
|
|
56
|
-
}]);
|
|
57
|
-
hotjar.initialize('3010506', '6');
|
|
58
41
|
isProduction && Sentry.init({
|
|
59
42
|
dsn: process.env.SENTRY_DSN,
|
|
60
43
|
environment: process.env.SENTRY_ENVIRONMENT
|
|
@@ -94,7 +77,7 @@ var store = createStore(reducer, null, !isProduction && window.devToolsExtension
|
|
|
94
77
|
}) : function (f) {
|
|
95
78
|
return f;
|
|
96
79
|
});
|
|
97
|
-
var plugins = [
|
|
80
|
+
var plugins = [Keyboard(), ConsoleDebugger()];
|
|
98
81
|
export default function KitchenConfiguratorApp(props) {
|
|
99
82
|
var width = props.width,
|
|
100
83
|
height = props.height,
|
|
@@ -102,7 +85,6 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
102
85
|
categoryData = props.categoryData,
|
|
103
86
|
dataBundle = props.dataBundle,
|
|
104
87
|
configData = props.configData,
|
|
105
|
-
toolbarButtons = props.toolbarButtons,
|
|
106
88
|
options = props.options,
|
|
107
89
|
user = props.user,
|
|
108
90
|
auth = props.auth,
|
|
@@ -141,10 +123,10 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
141
123
|
setCatalogInitiated = _React$useState4[1];
|
|
142
124
|
useEffect(function () {
|
|
143
125
|
var initMyCatalog = /*#__PURE__*/function () {
|
|
144
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/
|
|
126
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
|
|
145
127
|
var x, _x, _x2;
|
|
146
|
-
return
|
|
147
|
-
while (1) switch (_context.
|
|
128
|
+
return _regeneratorRuntime.wrap(function (_context) {
|
|
129
|
+
while (1) switch (_context.prev = _context.next) {
|
|
148
130
|
case 0:
|
|
149
131
|
for (x in Areas) MyCatalog.registerElement(Areas[x]);
|
|
150
132
|
for (_x in Lines) MyCatalog.registerElement(Lines[_x]);
|
|
@@ -152,7 +134,8 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
152
134
|
MyCatalog.registerCategory('Windows', 'Windows', [Holes.windowClear, Holes.windowCross, Holes.windowDoubleHung, Holes.windowVertical]);
|
|
153
135
|
MyCatalog.registerCategory('Doors', 'Doors', [Holes.doorInterior, Holes.doorExterior, Holes.doorCloset, Holes.doorSliding, Holes.doorwayFramed, Holes.doorwayFrameless]);
|
|
154
136
|
case 1:
|
|
155
|
-
|
|
137
|
+
case "end":
|
|
138
|
+
return _context.stop();
|
|
156
139
|
}
|
|
157
140
|
}, _callee);
|
|
158
141
|
}));
|
|
@@ -161,10 +144,10 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
161
144
|
};
|
|
162
145
|
}();
|
|
163
146
|
var loadMoldings = /*#__PURE__*/function () {
|
|
164
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/
|
|
147
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
|
|
165
148
|
var door_color_alias, subgroup_ids, door_color_alias_ids, doorStyleData, molding, toeMoldingData, cabinets, promises;
|
|
166
|
-
return
|
|
167
|
-
while (1) switch (_context2.
|
|
149
|
+
return _regeneratorRuntime.wrap(function (_context2) {
|
|
150
|
+
while (1) switch (_context2.prev = _context2.next) {
|
|
168
151
|
case 0:
|
|
169
152
|
door_color_alias = [];
|
|
170
153
|
subgroup_ids = catalogs.filter(function (item) {
|
|
@@ -245,7 +228,10 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
245
228
|
});
|
|
246
229
|
});
|
|
247
230
|
});
|
|
248
|
-
return _context2.
|
|
231
|
+
return _context2.abrupt("return", Promise.all(promises));
|
|
232
|
+
case 1:
|
|
233
|
+
case "end":
|
|
234
|
+
return _context2.stop();
|
|
249
235
|
}
|
|
250
236
|
}, _callee2);
|
|
251
237
|
}));
|
|
@@ -254,53 +240,56 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
254
240
|
};
|
|
255
241
|
}();
|
|
256
242
|
var loadSVGs = /*#__PURE__*/function () {
|
|
257
|
-
var _ref5 = _asyncToGenerator(/*#__PURE__*/
|
|
243
|
+
var _ref5 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {
|
|
258
244
|
var svgLoadPromises, outlineData;
|
|
259
|
-
return
|
|
260
|
-
while (1) switch (_context4.
|
|
245
|
+
return _regeneratorRuntime.wrap(function (_context4) {
|
|
246
|
+
while (1) switch (_context4.prev = _context4.next) {
|
|
261
247
|
case 0:
|
|
262
248
|
svgLoadPromises = data.map(/*#__PURE__*/function () {
|
|
263
|
-
var _ref6 = _asyncToGenerator(/*#__PURE__*/
|
|
249
|
+
var _ref6 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3(item) {
|
|
264
250
|
var _parsed$xml$viewBox, _parsed$xml$viewBox2, response, svgText, loader, parsed, _t;
|
|
265
|
-
return
|
|
266
|
-
while (1) switch (_context3.
|
|
251
|
+
return _regeneratorRuntime.wrap(function (_context3) {
|
|
252
|
+
while (1) switch (_context3.prev = _context3.next) {
|
|
267
253
|
case 0:
|
|
268
254
|
if (item.outline) {
|
|
269
|
-
_context3.
|
|
255
|
+
_context3.next = 1;
|
|
270
256
|
break;
|
|
271
257
|
}
|
|
272
|
-
return _context3.
|
|
258
|
+
return _context3.abrupt("return", null);
|
|
273
259
|
case 1:
|
|
274
|
-
_context3.
|
|
275
|
-
_context3.
|
|
260
|
+
_context3.prev = 1;
|
|
261
|
+
_context3.next = 2;
|
|
276
262
|
return fetch(item.outline, {
|
|
277
263
|
cache: 'no-store'
|
|
278
264
|
});
|
|
279
265
|
case 2:
|
|
280
|
-
response = _context3.
|
|
281
|
-
_context3.
|
|
266
|
+
response = _context3.sent;
|
|
267
|
+
_context3.next = 3;
|
|
282
268
|
return response.text();
|
|
283
269
|
case 3:
|
|
284
|
-
svgText = _context3.
|
|
270
|
+
svgText = _context3.sent;
|
|
285
271
|
loader = new SVGLoader();
|
|
286
272
|
parsed = loader.parse(svgText);
|
|
287
273
|
if (!isEmpty(parsed.paths)) {
|
|
288
|
-
_context3.
|
|
274
|
+
_context3.next = 4;
|
|
289
275
|
break;
|
|
290
276
|
}
|
|
291
|
-
return _context3.
|
|
277
|
+
return _context3.abrupt("return", null);
|
|
292
278
|
case 4:
|
|
293
|
-
return _context3.
|
|
279
|
+
return _context3.abrupt("return", {
|
|
294
280
|
paths: parsed.paths,
|
|
295
281
|
svgWidth: parseFloat(parsed.xml.getAttribute('width')) || ((_parsed$xml$viewBox = parsed.xml.viewBox) === null || _parsed$xml$viewBox === void 0 || (_parsed$xml$viewBox = _parsed$xml$viewBox.animVal) === null || _parsed$xml$viewBox === void 0 ? void 0 : _parsed$xml$viewBox.width) || 0,
|
|
296
282
|
svgHeight: parseFloat(parsed.xml.getAttribute('height')) || ((_parsed$xml$viewBox2 = parsed.xml.viewBox) === null || _parsed$xml$viewBox2 === void 0 || (_parsed$xml$viewBox2 = _parsed$xml$viewBox2.animVal) === null || _parsed$xml$viewBox2 === void 0 ? void 0 : _parsed$xml$viewBox2.height) || 0,
|
|
297
283
|
reverse: !parseFloat(parsed.xml.getAttribute('height'))
|
|
298
284
|
});
|
|
299
285
|
case 5:
|
|
300
|
-
_context3.
|
|
301
|
-
_t = _context3
|
|
286
|
+
_context3.prev = 5;
|
|
287
|
+
_t = _context3["catch"](1);
|
|
302
288
|
console.error('Failed to load SVG:', item.outline, _t);
|
|
303
|
-
return _context3.
|
|
289
|
+
return _context3.abrupt("return", null);
|
|
290
|
+
case 6:
|
|
291
|
+
case "end":
|
|
292
|
+
return _context3.stop();
|
|
304
293
|
}
|
|
305
294
|
}, _callee3, null, [[1, 5]]);
|
|
306
295
|
}));
|
|
@@ -308,13 +297,14 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
308
297
|
return _ref6.apply(this, arguments);
|
|
309
298
|
};
|
|
310
299
|
}());
|
|
311
|
-
_context4.
|
|
300
|
+
_context4.next = 1;
|
|
312
301
|
return Promise.all(svgLoadPromises);
|
|
313
302
|
case 1:
|
|
314
|
-
outlineData = _context4.
|
|
303
|
+
outlineData = _context4.sent;
|
|
315
304
|
setOutlineSVGData(outlineData);
|
|
316
305
|
case 2:
|
|
317
|
-
|
|
306
|
+
case "end":
|
|
307
|
+
return _context4.stop();
|
|
318
308
|
}
|
|
319
309
|
}, _callee4);
|
|
320
310
|
}));
|
|
@@ -323,23 +313,24 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
323
313
|
};
|
|
324
314
|
}();
|
|
325
315
|
var initCatalog = /*#__PURE__*/function () {
|
|
326
|
-
var _ref7 = _asyncToGenerator(/*#__PURE__*/
|
|
327
|
-
return
|
|
328
|
-
while (1) switch (_context5.
|
|
316
|
+
var _ref7 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee5() {
|
|
317
|
+
return _regeneratorRuntime.wrap(function (_context5) {
|
|
318
|
+
while (1) switch (_context5.prev = _context5.next) {
|
|
329
319
|
case 0:
|
|
330
320
|
setCatalogInitiated(false);
|
|
331
|
-
_context5.
|
|
321
|
+
_context5.next = 1;
|
|
332
322
|
return initMyCatalog();
|
|
333
323
|
case 1:
|
|
334
|
-
_context5.
|
|
324
|
+
_context5.next = 2;
|
|
335
325
|
return loadMoldings();
|
|
336
326
|
case 2:
|
|
337
|
-
_context5.
|
|
327
|
+
_context5.next = 3;
|
|
338
328
|
return loadSVGs();
|
|
339
329
|
case 3:
|
|
340
330
|
setCatalogInitiated(true);
|
|
341
331
|
case 4:
|
|
342
|
-
|
|
332
|
+
case "end":
|
|
333
|
+
return _context5.stop();
|
|
343
334
|
}
|
|
344
335
|
}, _callee5);
|
|
345
336
|
}));
|
|
@@ -447,7 +438,6 @@ export default function KitchenConfiguratorApp(props) {
|
|
|
447
438
|
logoImage: logoImg,
|
|
448
439
|
companyURL: companyUrl,
|
|
449
440
|
plugins: plugins,
|
|
450
|
-
toolbarButtons: toolbarButtons,
|
|
451
441
|
stateExtractor: function stateExtractor(state) {
|
|
452
442
|
return state.get('KitchenConfigurator');
|
|
453
443
|
},
|
|
@@ -472,7 +462,6 @@ KitchenConfiguratorApp.propTypes = {
|
|
|
472
462
|
catalog: PropTypes.oneOfType([PropTypes.object, PropTypes.instanceOf(Models.Catalog)]),
|
|
473
463
|
logoImg: PropTypes.any,
|
|
474
464
|
companyUrl: PropTypes.string,
|
|
475
|
-
toolbarButtons: PropTypes.any,
|
|
476
465
|
options: PropTypes.object,
|
|
477
466
|
user: PropTypes.object,
|
|
478
467
|
auth: PropTypes.object,
|
|
@@ -481,13 +470,6 @@ KitchenConfiguratorApp.propTypes = {
|
|
|
481
470
|
dsn: PropTypes.string,
|
|
482
471
|
environment: PropTypes.string
|
|
483
472
|
}),
|
|
484
|
-
analytics: PropTypes.shape({
|
|
485
|
-
ga4Id: PropTypes.string,
|
|
486
|
-
hotjar: PropTypes.shape({
|
|
487
|
-
id: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
488
|
-
sv: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
|
489
|
-
})
|
|
490
|
-
}),
|
|
491
473
|
onEvent: PropTypes.func,
|
|
492
474
|
onSave: PropTypes.func,
|
|
493
475
|
onError: PropTypes.func,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BEGIN_DRAGGING_HOLE, BEGIN_DRAGGING_HOLE_3D, END_CREATING_HOLE, END_DRAGGING_HOLE, END_DRAGGING_HOLE_3D, END_DRAWING_HOLE, END_DRAWING_HOLE_3D, SELECT_HOLE, SELECT_TOOL_DRAWING_HOLE, SELECT_TOOL_DRAWING_HOLE_3D, UPDATE_DRAGGING_HOLE, UPDATE_DRAGGING_HOLE_CHANGED, UPDATE_DRAGGING_HOLE_RULER_CHANGED, UPDATE_DRAWING_HOLE, UPDATE_DRAWING_HOLE_3D, UPDATE_POPUP_OPEN } from "../constants";
|
|
2
2
|
export function endCreatingHole() {
|
|
3
3
|
return {
|
|
4
4
|
type: END_CREATING_HOLE
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ANIMATE_OBJECT, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, DUPLICATE_SELECTED, EDIT_WIDTH, END_CREATING_CABINET, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, END_DRAWING_ITEM, END_LOADING, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, ITEM_MOVE_UP, REMOVE_REPLACE_SUBMODULE, REPLACE_ITEM, REPLACE_SUBMODULE, SELECT_ITEM, SELECT_TOOL_DRAWING_ITEM, SELECT_TOOL_DRAWING_ITEM_3D, SET_APPLIANCE_MATERIAL, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_COUNTER_TOP, SET_DOOR_HANDLE, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, SET_MODELLING, SET_MOLDING, SET_MOVE_STATUS, SET_ROTATE_STATUS, SET_WALL_COLOR, STORE_DIST_ARRAY, TOGGLE_LOADING_CABINET, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAWING_ITEM, UPDATE_MOLDING, UPDATE_POPUP_OPEN, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, VALIDATE_ITEM_POSTIONS } from "../constants";
|
|
2
2
|
export function storeDistArray(layerID, itemID, distArray) {
|
|
3
3
|
return {
|
|
4
4
|
type: STORE_DIST_ARRAY,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { BEGIN_DRAGGING_LINE, BEGIN_DRAWING_LINE, END_DRAGGING_LINE, END_DRAWING_LINE, SELECT_LINE, SELECT_TOOL_DRAWING_LINE, SET_RELATED_LINE, STOP_DRAWING_LINE, UPDATE_DRAGGING_LINE, UPDATE_DRAWING_LINE } from "../constants";
|
|
2
2
|
export function selectLine(layerID, lineID) {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_LINE,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ADD_CIRCULAR_GUIDE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ALTERATE_STATE, CHANGE_CATALOG_PAGE, COPY_PROPERTIES, GO_BACK_TO_CATALOG_PAGE, INIT_CATALOG, LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, OPEN_PROJECT_CONFIGURATOR, PASTE_PROPERTIES, PROJECT_RE_NAME, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, RECREATE, REDO, REMOVE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, ROLLBACK, SAVE_PROJECT, SELECT_ALL, SELECT_TOOL_EDIT, SET_HOLES_ATTRIBUTES, SET_IS_CABINET_DRAWING, SET_IS_HELP, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_MODE, SET_PROJECT_ID, SET_PROJECT_PROPERTIES, SET_PROPERTIES, SET_STATE_PROPERTIES, SHIFT2DOFF, SHIFT2DON, THROW_ERROR, THROW_WARNING, TOGGLE_SNAP, UNCREATE, UNDO, UNSELECT_ALL, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE } from "../constants";
|
|
2
2
|
export function setIsHelp(isHelp) {
|
|
3
3
|
return {
|
|
4
4
|
type: SET_IS_HELP,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ADD_LAYER, REMOVE_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, UPDATE_MOVING_STATE } from "../constants";
|
|
2
2
|
export function selectLayer(layerID) {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_LAYER,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BEGIN_DRAGGING_VERTEX,
|
|
1
|
+
import { BEGIN_DRAGGING_VERTEX, END_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX } from "../constants";
|
|
2
2
|
export function beginDraggingVertex(layerID, vertexID, x, y, snapMask) {
|
|
3
3
|
return {
|
|
4
4
|
type: BEGIN_DRAGGING_VERTEX,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WALL_LENGTH_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, UPDATE_2D_CAMERA, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
2
|
export function updateCeilHeight(value) {
|
|
3
3
|
return {
|
|
4
4
|
type: UPDATE_CEIL_HEIGHT,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { SELECT_TOOL_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
|
|
2
2
|
export function selectTool3DView() {
|
|
3
3
|
return {
|
|
4
4
|
type: SELECT_TOOL_3D_VIEW
|
|
@@ -1,38 +1,41 @@
|
|
|
1
|
-
import
|
|
1
|
+
import ElementsFactories from "../../factories/export";
|
|
2
|
+
var textureUrl = function textureUrl(file) {
|
|
3
|
+
return new URL("./textures/".concat(file), import.meta.url).href;
|
|
4
|
+
};
|
|
2
5
|
var info = {
|
|
3
6
|
title: 'area',
|
|
4
7
|
tag: ['area'],
|
|
5
8
|
description: 'Generic Room',
|
|
6
|
-
image: ''
|
|
9
|
+
image: '' // no image provided yet
|
|
7
10
|
};
|
|
8
11
|
var textures = {
|
|
9
12
|
parquet: {
|
|
10
13
|
name: 'Parquet',
|
|
11
|
-
uri:
|
|
14
|
+
uri: textureUrl('parquet.jpg'),
|
|
12
15
|
lengthRepeatScale: 0.004,
|
|
13
16
|
heightRepeatScale: 0.004
|
|
14
17
|
},
|
|
15
18
|
tile1: {
|
|
16
19
|
name: 'Tile1',
|
|
17
|
-
uri:
|
|
20
|
+
uri: textureUrl('tile1.jpg'),
|
|
18
21
|
lengthRepeatScale: 0.01,
|
|
19
22
|
heightRepeatScale: 0.01
|
|
20
23
|
},
|
|
21
24
|
ceramic: {
|
|
22
25
|
name: 'Ceramic Tile',
|
|
23
|
-
uri:
|
|
26
|
+
uri: textureUrl('ceramic-tile.jpg'),
|
|
24
27
|
lengthRepeatScale: 0.02,
|
|
25
28
|
heightRepeatScale: 0.02
|
|
26
29
|
},
|
|
27
30
|
strand_porcelain: {
|
|
28
31
|
name: 'Strand Porcelain Tile',
|
|
29
|
-
uri:
|
|
32
|
+
uri: textureUrl('strand-porcelain.jpg'),
|
|
30
33
|
lengthRepeatScale: 0.02,
|
|
31
34
|
heightRepeatScale: 0.02
|
|
32
35
|
},
|
|
33
36
|
grass: {
|
|
34
37
|
name: 'Grass',
|
|
35
|
-
uri:
|
|
38
|
+
uri: textureUrl('grass.jpg'),
|
|
36
39
|
lengthRepeatScale: 0.01,
|
|
37
40
|
heightRepeatScale: 0.01
|
|
38
41
|
}
|