kitchen-simulator 1.1.1-test.5 → 1.1.1-test.51

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.
Files changed (198) hide show
  1. package/es/KitchenConfigurator.js +10 -17
  2. package/es/KitchenConfiguratorApp.js +16 -31
  3. package/es/actions/area-actions.js +1 -1
  4. package/es/actions/export.js +10 -10
  5. package/es/actions/groups-actions.js +1 -1
  6. package/es/actions/holes-actions.js +1 -1
  7. package/es/actions/items-actions.js +1 -1
  8. package/es/actions/lines-actions.js +1 -1
  9. package/es/actions/project-actions.js +1 -1
  10. package/es/actions/scene-actions.js +1 -1
  11. package/es/actions/vertices-actions.js +1 -1
  12. package/es/actions/viewer2d-actions.js +1 -1
  13. package/es/actions/viewer3d-actions.js +1 -1
  14. package/es/catalog/areas/area/planner-element.js +10 -7
  15. package/es/catalog/catalog.js +3 -3
  16. package/es/catalog/factories/area-factory-3d.js +1 -1
  17. package/es/catalog/factories/area-factory.js +3 -3
  18. package/es/catalog/factories/export.js +2 -2
  19. package/es/catalog/factories/wall-factory-3d.js +5 -5
  20. package/es/catalog/factories/wall-factory.js +6 -6
  21. package/es/catalog/holes/door-closet/planner-element.js +2 -2
  22. package/es/catalog/holes/door-exterior/planner-element.js +2 -2
  23. package/es/catalog/holes/door-interior/planner-element.js +2 -2
  24. package/es/catalog/holes/door-sliding/planner-element.js +2 -2
  25. package/es/catalog/holes/doorway-framed/planner-element.js +2 -2
  26. package/es/catalog/holes/export.js +13 -13
  27. package/es/catalog/holes/window-clear/planner-element.js +2 -2
  28. package/es/catalog/holes/window-cross/planner-element.js +2 -2
  29. package/es/catalog/holes/window-double-hung/planner-element.js +2 -2
  30. package/es/catalog/holes/window-vertical/planner-element.js +2 -2
  31. package/es/catalog/lines/wall/planner-element.js +13 -10
  32. package/es/catalog/molding/molding-dcm/planner-element.js +1 -1
  33. package/es/catalog/molding/molding-fbm/planner-element.js +1 -1
  34. package/es/catalog/molding/molding-lrm/planner-element.js +1 -1
  35. package/es/catalog/properties/export.js +9 -9
  36. package/es/catalog/properties/property-checkbox.js +64 -19
  37. package/es/catalog/properties/property-color.js +2 -2
  38. package/es/catalog/properties/property-enum.js +51 -9
  39. package/es/catalog/properties/property-lenght-measure.js +4 -4
  40. package/es/catalog/properties/property-length-measure.js +58 -9
  41. package/es/catalog/properties/property-length-measure_hole.js +4 -4
  42. package/es/catalog/properties/property-number.js +2 -2
  43. package/es/catalog/properties/property-read-only.js +2 -2
  44. package/es/catalog/properties/property-string.js +2 -2
  45. package/es/catalog/properties/property-toggle.js +2 -2
  46. package/es/catalog/utils/geom-utils.js +1 -1
  47. package/es/catalog/utils/item-loader.js +6 -6
  48. package/es/catalog/utils/load-obj.js +1 -1
  49. package/es/catalog/utils/mtl-loader.js +3 -2
  50. package/es/catalog/utils/obj-loader.js +3 -2
  51. package/es/class/area.js +2 -2
  52. package/es/class/export.js +10 -10
  53. package/es/class/group.js +4 -4
  54. package/es/class/guide.js +1 -1
  55. package/es/class/hole.js +5 -6
  56. package/es/class/item.js +10 -12
  57. package/es/class/layer.js +4 -4
  58. package/es/class/line.js +4 -4
  59. package/es/class/project.js +8 -8
  60. package/es/class/vertex.js +5 -5
  61. package/es/components/content.js +6 -5
  62. package/es/components/disclaimer/disclaimer.js +66 -86
  63. package/es/components/export.js +3 -3
  64. package/es/components/style/button.js +1 -1
  65. package/es/components/style/cancel-button.js +1 -1
  66. package/es/components/style/content-title.js +1 -1
  67. package/es/components/style/delete-button.js +2 -2
  68. package/es/components/style/export.js +14 -14
  69. package/es/components/style/form-color-input.js +1 -1
  70. package/es/components/style/form-number-input.js +32 -8
  71. package/es/components/style/form-number-input_2.js +2 -2
  72. package/es/components/style/form-select.js +56 -8
  73. package/es/components/style/form-slider.js +23 -7
  74. package/es/components/style/form-submit-button.js +2 -2
  75. package/es/components/style/form-text-input.js +31 -12
  76. package/es/components/viewer2d/area.js +5 -5
  77. package/es/components/viewer2d/export.js +14 -14
  78. package/es/components/viewer2d/grids/grids.js +1 -1
  79. package/es/components/viewer2d/group.js +2 -2
  80. package/es/components/viewer2d/item.js +5 -5
  81. package/es/components/viewer2d/layer.js +4 -4
  82. package/es/components/viewer2d/line.js +6 -9
  83. package/es/components/viewer2d/ruler.js +3 -3
  84. package/es/components/viewer2d/rulerX.js +1 -1
  85. package/es/components/viewer2d/rulerY.js +1 -1
  86. package/es/components/viewer2d/scene.js +2 -2
  87. package/es/components/viewer2d/snap.js +1 -1
  88. package/es/components/viewer2d/state.js +3 -3
  89. package/es/components/viewer2d/utils.js +38 -2
  90. package/es/components/viewer2d/vertex.js +1 -1
  91. package/es/components/viewer2d/viewer2d.js +9 -9
  92. package/es/components/viewer3d/front3D.js +2 -2
  93. package/es/components/viewer3d/grid-creator.js +2 -2
  94. package/es/components/viewer3d/grids/grid-horizontal-streak.js +1 -1
  95. package/es/components/viewer3d/grids/grid-streak.js +1 -1
  96. package/es/components/viewer3d/grids/grid-vertical-streak.js +1 -1
  97. package/es/components/viewer3d/libs/mtl-loader.js +2 -2
  98. package/es/components/viewer3d/libs/obj-loader.js +2 -2
  99. package/es/components/viewer3d/libs/orbit-controls.js +6 -5
  100. package/es/components/viewer3d/libs/pointer-lock-controls.js +5 -4
  101. package/es/components/viewer3d/pointer-lock-navigation.js +1 -1
  102. package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
  103. package/es/components/viewer3d/ruler-utils/layer3D.js +5 -5
  104. package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -1
  105. package/es/components/viewer3d/ruler-utils/scene3D.js +3 -4
  106. package/es/components/viewer3d/ruler-utils/state3D.js +1 -1
  107. package/es/components/viewer3d/scene-creator.js +10 -10
  108. package/es/components/viewer3d/viewer3d-first-person.js +5 -5
  109. package/es/components/viewer3d/viewer3d.js +14 -16
  110. package/es/index.js +16 -15
  111. package/es/models.js +4 -4
  112. package/es/plugins/autosave.js +1 -1
  113. package/es/plugins/console-debugger.js +1 -1
  114. package/es/plugins/export.js +3 -3
  115. package/es/plugins/keyboard.js +2 -2
  116. package/es/reducers/areas-reducer.js +2 -2
  117. package/es/reducers/export.js +11 -11
  118. package/es/reducers/groups-reducer.js +3 -3
  119. package/es/reducers/holes-reducer.js +3 -3
  120. package/es/reducers/items-reducer.js +3 -6
  121. package/es/reducers/lines-reducer.js +3 -3
  122. package/es/reducers/project-reducer.js +3 -3
  123. package/es/reducers/reducer.js +3 -3
  124. package/es/reducers/scene-reducer.js +3 -3
  125. package/es/reducers/user-reducer.js +1 -2
  126. package/es/reducers/vertices-reducer.js +3 -3
  127. package/es/reducers/viewer2d-reducer.js +1 -1
  128. package/es/reducers/viewer3d-reducer.js +3 -3
  129. package/es/styles/export.js +1 -1
  130. package/es/translator/translator.js +3 -3
  131. package/es/utils/export.js +11 -11
  132. package/es/utils/geometry.js +5 -5
  133. package/es/utils/get-edges-of-subgraphs.js +2 -1
  134. package/es/utils/graph-cycles.js +2 -3
  135. package/es/utils/graph-inner-cycles.js +3 -3
  136. package/es/utils/graph.js +2 -1
  137. package/es/utils/helper.js +3 -71
  138. package/es/utils/id-broker.js +2 -2
  139. package/es/utils/molding.js +5 -5
  140. package/es/utils/snap-scene.js +2 -2
  141. package/es/utils/snap.js +1 -1
  142. package/lib/KitchenConfigurator.js +20 -27
  143. package/lib/KitchenConfiguratorApp.js +32 -46
  144. package/lib/catalog/areas/area/planner-element.js +11 -8
  145. package/lib/catalog/factories/wall-factory-3d.js +2 -2
  146. package/lib/catalog/factories/wall-factory.js +1 -1
  147. package/lib/catalog/holes/door-closet/planner-element.js +1 -1
  148. package/lib/catalog/holes/door-exterior/planner-element.js +1 -1
  149. package/lib/catalog/holes/door-interior/planner-element.js +1 -1
  150. package/lib/catalog/holes/door-sliding/planner-element.js +1 -1
  151. package/lib/catalog/holes/doorway-framed/planner-element.js +1 -1
  152. package/lib/catalog/holes/export.js +13 -13
  153. package/lib/catalog/holes/window-clear/planner-element.js +1 -1
  154. package/lib/catalog/holes/window-cross/planner-element.js +1 -1
  155. package/lib/catalog/holes/window-double-hung/planner-element.js +1 -1
  156. package/lib/catalog/holes/window-vertical/planner-element.js +1 -1
  157. package/lib/catalog/lines/wall/planner-element.js +14 -11
  158. package/lib/catalog/properties/property-checkbox.js +64 -19
  159. package/lib/catalog/properties/property-enum.js +49 -7
  160. package/lib/catalog/properties/property-length-measure.js +55 -6
  161. package/lib/catalog/utils/geom-utils.js +1 -1
  162. package/lib/catalog/utils/item-loader.js +4 -4
  163. package/lib/catalog/utils/load-obj.js +1 -1
  164. package/lib/catalog/utils/mtl-loader.js +7 -3
  165. package/lib/catalog/utils/obj-loader.js +7 -3
  166. package/lib/class/item.js +3 -5
  167. package/lib/class/line.js +1 -1
  168. package/lib/class/vertex.js +1 -1
  169. package/lib/components/content.js +1 -0
  170. package/lib/components/disclaimer/disclaimer.js +66 -86
  171. package/lib/components/style/form-number-input.js +30 -6
  172. package/lib/components/style/form-select.js +54 -8
  173. package/lib/components/style/form-slider.js +22 -6
  174. package/lib/components/style/form-text-input.js +30 -12
  175. package/lib/components/viewer2d/area.js +3 -3
  176. package/lib/components/viewer2d/line.js +3 -6
  177. package/lib/components/viewer2d/scene.js +1 -1
  178. package/lib/components/viewer2d/utils.js +37 -0
  179. package/lib/components/viewer2d/viewer2d.js +15 -15
  180. package/lib/components/viewer3d/libs/mtl-loader.js +6 -2
  181. package/lib/components/viewer3d/libs/obj-loader.js +6 -2
  182. package/lib/components/viewer3d/libs/orbit-controls.js +10 -5
  183. package/lib/components/viewer3d/libs/pointer-lock-controls.js +9 -4
  184. package/lib/components/viewer3d/ruler-utils/scene3D.js +1 -2
  185. package/lib/components/viewer3d/scene-creator.js +2 -2
  186. package/lib/components/viewer3d/viewer3d.js +5 -6
  187. package/lib/index.js +3 -1
  188. package/lib/reducers/user-reducer.js +0 -1
  189. package/lib/utils/get-edges-of-subgraphs.js +7 -1
  190. package/lib/utils/graph-cycles.js +9 -9
  191. package/lib/utils/graph.js +9 -3
  192. package/lib/utils/helper.js +2 -70
  193. package/lib/utils/id-broker.js +2 -2
  194. package/package.json +30 -61
  195. package/es/analytics/ga4.js +0 -191
  196. package/es/analytics/posthog.js +0 -60
  197. package/lib/analytics/ga4.js +0 -197
  198. package/lib/analytics/posthog.js +0 -68
@@ -13,17 +13,17 @@ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(
13
13
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
14
14
  import * as Three from 'three';
15
15
  import { Color, Group } from 'three';
16
- import createGrid from './grid-creator';
17
- import { disposeObject } from './three-memory-cleaner';
18
- import { ANIMATE_STEP_MAX, ANIMATE_STEP_MIN, ARRAY_3D_MODES, ARROW_TEXT_BACKCOLOR, ARROW_TEXT_FONTFACE, ARROW_TEXT_FORECOLOR, BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, DECIMAL_PLACES_2, DIFFERENT_VALUES_PATH_LENGTH, DISTANCE_EPSILON, EPSILON, MIDDLE_MOLDING_LOCATION, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, TOP_MOLDING_LOCATION, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from '../../constants';
19
- import { GeometryUtils, IDBroker, MoldingUtils } from '../../utils/export';
16
+ import createGrid from "./grid-creator";
17
+ import { disposeObject } from "./three-memory-cleaner";
18
+ import { ANIMATE_STEP_MAX, ANIMATE_STEP_MIN, ARRAY_3D_MODES, ARROW_TEXT_BACKCOLOR, ARROW_TEXT_FONTFACE, ARROW_TEXT_FORECOLOR, BASE_CABINET_LAYOUTPOS, BOTTOM_MOLDING_LOCATION, DECIMAL_PLACES_2, DIFFERENT_VALUES_PATH_LENGTH, DISTANCE_EPSILON, EPSILON, MIDDLE_MOLDING_LOCATION, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, OBJTYPE_MESH, SHADE_DARK_PURPLE_COLOR, TOP_MOLDING_LOCATION, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
19
+ import { GeometryUtils, IDBroker, MoldingUtils } from "../../utils/export";
20
20
  import convert from 'convert-units';
21
- import { verticesDistance } from '../../utils/geometry';
22
- import * as GeomUtils from '../../catalog/utils/geom-utils';
23
- import { loadTexture } from '../../catalog/utils/item-loader';
24
- import { returnReplaceableDeepSearchType } from '../viewer2d/utils';
25
- import { animateDoor, isElevationView, isEmpty, replaceMeshesWithLineSegments, translateDrawer } from 'src/utils/helper';
26
- import { formatNumber } from 'src/utils/math';
21
+ import { verticesDistance } from "../../utils/geometry";
22
+ import * as GeomUtils from "../../catalog/utils/geom-utils";
23
+ import { loadTexture } from "../../catalog/utils/item-loader";
24
+ import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
25
+ import { animateDoor, isElevationView, isEmpty, replaceMeshesWithLineSegments, translateDrawer } from "../../utils/helper";
26
+ import { formatNumber } from "../../utils/math";
27
27
  var transformBox;
28
28
  export var fVLine = [];
29
29
  var scene_mode = null;
@@ -17,12 +17,12 @@ import React from 'react';
17
17
  import PropTypes from 'prop-types';
18
18
  import ReactDOM from 'react-dom';
19
19
  import * as Three from 'three';
20
- import { parseData, updateScene } from './scene-creator';
21
- import { disposeScene } from './three-memory-cleaner';
20
+ import { parseData, updateScene } from "./scene-creator";
21
+ import { disposeScene } from "./three-memory-cleaner";
22
22
  import diff from 'immutablediff';
23
- import { initPointerLock } from './pointer-lock-navigation';
24
- import { firstPersonOnKeyDown, firstPersonOnKeyUp } from './libs/first-person-controls';
25
- import * as SharedStyle from '../../shared-style';
23
+ import { initPointerLock } from "./pointer-lock-navigation";
24
+ import { firstPersonOnKeyDown, firstPersonOnKeyUp } from "./libs/first-person-controls";
25
+ import * as SharedStyle from "../../shared-style";
26
26
  var Viewer3DFirstPerson = /*#__PURE__*/function (_React$Component) {
27
27
  function Viewer3DFirstPerson(props) {
28
28
  var _this;
@@ -21,24 +21,22 @@ import React from 'react';
21
21
  import PropTypes from 'prop-types';
22
22
  import ReactDOM from 'react-dom';
23
23
  import * as Three from 'three';
24
- import { parseData, updateScene, visibleTransformBox, getDistances, fVLine, deleteSpecifiedMeshObjects, createBacksplash, checkCabinetOverlap } from './scene-creator';
25
- import { disposeScene } from './three-memory-cleaner';
26
- import { disposeObject } from './three-memory-cleaner';
24
+ import { checkCabinetOverlap, createBacksplash, deleteSpecifiedMeshObjects, fVLine, getDistances, parseData, updateScene, visibleTransformBox } from "./scene-creator";
25
+ import { disposeObject, disposeScene } from "./three-memory-cleaner";
27
26
  import diff from 'immutablediff';
28
- import * as SharedStyle from '../../shared-style';
29
- import { MODE_DRAWING_ITEM_3D, MODE_IDLE_3D, MODE_3D_VIEW, UNIT_CENTIMETER, MODE_DRAWING_HOLE_3D, SECONDARY_PURPLE_COLOR, MODE_ELEVATION_VIEW, MODE_DRAGGING_ITEM_3D, MODE_ROTATING_ITEM_3D, WALL_CABINET_LAYOUTPOS, BASE_CABINET_LAYOUTPOS, TALL_CABINET_LAYOUTPOS } from '../../constants';
30
- import { isUndefined } from 'util';
31
- import { verticesDistance } from '../../utils/geometry';
27
+ import * as SharedStyle from "../../shared-style";
28
+ import { BASE_CABINET_LAYOUTPOS, MODE_3D_VIEW, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_HOLE_3D, MODE_DRAWING_ITEM_3D, MODE_ELEVATION_VIEW, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, SECONDARY_PURPLE_COLOR, TALL_CABINET_LAYOUTPOS, UNIT_CENTIMETER, WALL_CABINET_LAYOUTPOS } from "../../constants";
29
+ import { verticesDistance } from "../../utils/geometry";
32
30
  import convert from 'convert-units';
33
- import { GeometryUtils } from '../../utils/export';
34
- import { handleCamRect, isElevationView, isEmpty } from '../../utils/helper';
31
+ import { GeometryUtils } from "../../utils/export";
32
+ import { handleCamRect, isElevationView, isEmpty } from "../../utils/helper";
35
33
  import { RGBELoader } from 'three/examples/jsm/loaders/RGBELoader';
36
34
  import CameraControls from 'camera-controls';
35
+ import { returnReplaceableDeepSearchType } from "../viewer2d/utils";
36
+ import { getAllMeshes, vectorIntersectWithMesh } from "../../utils/objects-utils";
37
37
  CameraControls.install({
38
38
  THREE: Three
39
39
  });
40
- import { returnReplaceableDeepSearchType } from '../viewer2d/utils';
41
- import { getAllMeshes, vectorIntersectWithMesh } from '../../utils/objects-utils';
42
40
  var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
43
41
  function Scene3DViewer(props) {
44
42
  var _this;
@@ -1293,7 +1291,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
1293
1291
  offsetX: event.offsetX - 50,
1294
1292
  offsetY: event.offsetY
1295
1293
  }, alti);
1296
- if (isUndefined(selectedItem)) return;
1294
+ if (!selectedItem) return;
1297
1295
  var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
1298
1296
  lastAngle = 0;
1299
1297
  angleObj.position.set(planData.plan.position.x + Point.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : selItem.properties.get('altitude').get('length') + planData.plan.position.y, planData.plan.position.z - Point.y);
@@ -1464,7 +1462,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
1464
1462
  setTimeout(function () {
1465
1463
  getDistances(layer);
1466
1464
  var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
1467
- if (isUndefined(selectedItem)) return;
1465
+ if (!selectedItem) return;
1468
1466
  var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
1469
1467
  var itemPos = selectedItem.position.clone();
1470
1468
  if (intersects[_i10].object.parent && intersects[_i10].object.parent.parent.userData.itemId === selectedItem.userData.itemId) {
@@ -1546,7 +1544,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
1546
1544
  if (bRotate) {
1547
1545
  var _intersects$_i;
1548
1546
  var selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
1549
- if (isUndefined(selectedItem)) return;
1547
+ if (!selectedItem) return;
1550
1548
  var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
1551
1549
  var itemPos = selectedItem.position.clone();
1552
1550
  if (((_intersects$_i = intersects[_i10]) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.object) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.parent) === null || _intersects$_i === void 0 || (_intersects$_i = _intersects$_i.userData) === null || _intersects$_i === void 0 ? void 0 : _intersects$_i.itemId) === selectedItem.userData.itemId) {
@@ -1564,7 +1562,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
1564
1562
  if (bMove) {
1565
1563
  bMove = false;
1566
1564
  var _selectedItem = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
1567
- if (isUndefined(_selectedItem)) return;
1565
+ if (!_selectedItem) return;
1568
1566
  var _selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
1569
1567
  var _itemPos = _selectedItem.position.clone();
1570
1568
  if (intersects[_i10].object.parent.parent.userData.itemId === _selectedItem.userData.itemId) {
@@ -2044,7 +2042,7 @@ var Scene3DViewer = /*#__PURE__*/function (_React$Component) {
2044
2042
  setTimeout(function () {
2045
2043
  try {
2046
2044
  currentObject = planData.sceneGraph.layers[selectedObject.layerID].items[selectedObject.itemID];
2047
- if (isUndefined(currentObject)) return;
2045
+ if (!currentObject) return;
2048
2046
  var selItem = _this2.props.state.scene.layers.get(selectedObject.layerID).items.get(selectedObject.itemID);
2049
2047
  var itemPos = currentObject.position.clone();
2050
2048
  toolObj.position.set(planData.plan.position.x + itemPos.x, selItem.category === 'lighting' ? -planData.plan.position.y - selItem.properties.get('height').get('length') : planData.plan.position.y + currentObject.children[0].position.y, planData.plan.position.z + itemPos.z);
package/es/index.js CHANGED
@@ -1,15 +1,16 @@
1
- import Catalog from './catalog/catalog';
2
- import Translator from './translator/translator';
3
- import * as Models from './models';
4
- import reducer from './reducers/reducer';
5
- import KitchenConfiguratorApp from './KitchenConfiguratorApp';
6
- import Plugins from './plugins/export';
7
- import * as KitchenConfiguratorConstants from './constants';
8
- import * as KitchenConfiguratorSharedStyle from './shared-style';
9
- import KitchenConfiguratorComponents from './components/export';
10
- import KitchenConfiguratorActions from './actions/export';
11
- import KitchenConfiguratorReducers from './reducers/export';
12
- import KitchenConfiguratorClasses from './class/export';
13
- import ElementsFactories from './catalog/factories/export';
14
- import KitchenConfiguratorUtils from './utils/export';
15
- export { Catalog, Translator, Models, reducer, KitchenConfiguratorApp, Plugins, KitchenConfiguratorConstants, KitchenConfiguratorSharedStyle, KitchenConfiguratorComponents, KitchenConfiguratorActions, KitchenConfiguratorReducers, KitchenConfiguratorClasses, ElementsFactories, KitchenConfiguratorUtils };
1
+ import Catalog from "./catalog/catalog";
2
+ import Translator from "./translator/translator";
3
+ import * as Models from "./models";
4
+ import reducer from "./reducers/reducer";
5
+ import KitchenConfiguratorApp from "./KitchenConfiguratorApp";
6
+ import Plugins from "./plugins/export";
7
+ import * as KitchenConfiguratorConstants from "./constants";
8
+ import * as KitchenConfiguratorSharedStyle from "./shared-style";
9
+ import KitchenConfiguratorComponents from "./components/export";
10
+ import KitchenConfiguratorActions from "./actions/export";
11
+ import KitchenConfiguratorReducers from "./reducers/export";
12
+ import KitchenConfiguratorClasses from "./class/export";
13
+ import ElementsFactories from "./catalog/factories/export";
14
+ import KitchenConfiguratorUtils from "./utils/export";
15
+ export { Catalog, Translator, Models, reducer, KitchenConfiguratorApp, Plugins, KitchenConfiguratorConstants, KitchenConfiguratorSharedStyle, KitchenConfiguratorComponents, KitchenConfiguratorActions, KitchenConfiguratorReducers, KitchenConfiguratorClasses, ElementsFactories, KitchenConfiguratorUtils };
16
+ export default KitchenConfiguratorApp;
package/es/models.js CHANGED
@@ -14,10 +14,10 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
14
14
  function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
15
15
  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); }
16
16
  function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
17
- import { Record, List, Map, fromJS } from 'immutable';
18
- import { MODE_IDLE, UNIT_INCH } from './constants';
19
- import { SNAP_MASK } from './utils/snap';
20
- import { isEmpty } from './utils/helper';
17
+ import { fromJS, List, Map, Record } from 'immutable';
18
+ import { MODE_IDLE, UNIT_INCH } from "./constants";
19
+ import { SNAP_MASK } from "./utils/snap";
20
+ import { isEmpty } from "./utils/helper";
21
21
  import convert from 'convert-units';
22
22
  var safeLoadMapList = function safeLoadMapList(mapList, Model, defaultMap) {
23
23
  return mapList ? new Map(mapList).map(function (m) {
@@ -1,5 +1,5 @@
1
1
  var sessionStorage = window.hasOwnProperty('sessionStorage') ? window.sessionStorage : false;
2
- import { loadProject } from '../actions/project-actions';
2
+ import { loadProject } from "../actions/project-actions";
3
3
  var TIMEOUT_DELAY = 500;
4
4
  var timeout = null;
5
5
  export default function autosave(autosaveKey, revert, delay) {
@@ -4,7 +4,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
4
4
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import actions from '../actions/export';
7
+ import actions from "../actions/export";
8
8
  export default function consoleDebugger() {
9
9
  return function (store, stateExtractor) {
10
10
  window.KitchenConfigurator = _objectSpread(_objectSpread({}, actions), {}, {
@@ -1,6 +1,6 @@
1
- import Autosave from './autosave';
2
- import Keyboard from './keyboard';
3
- import ConsoleDebugger from './console-debugger';
1
+ import Autosave from "./autosave";
2
+ import Keyboard from "./keyboard";
3
+ import ConsoleDebugger from "./console-debugger";
4
4
  export { Autosave, Keyboard, ConsoleDebugger };
5
5
  export default {
6
6
  Autosave: Autosave,
@@ -1,5 +1,5 @@
1
- import { MODE_IDLE, MODE_3D_FIRST_PERSON, MODE_3D_VIEW, MODE_SNAPPING, KEYBOARD_BUTTON_CODE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM_3D, MODE_DRAWING_ITEM } from '../constants';
2
- import { rollback, undo, redo, recreate, uncreate, remove, toggleSnap, copyProperties, pasteProperties, shift2doff, shift2don } from '../actions/project-actions';
1
+ import { KEYBOARD_BUTTON_CODE, MODE_3D_FIRST_PERSON, MODE_3D_VIEW, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM_3D, MODE_SNAPPING } from "../constants";
2
+ import { copyProperties, pasteProperties, recreate, redo, remove, rollback, shift2doff, shift2don, toggleSnap, uncreate, undo } from "../actions/project-actions";
3
3
  export default function keyboard() {
4
4
  return function (store, stateExtractor) {
5
5
  window.addEventListener('keydown', function (event) {
@@ -1,5 +1,5 @@
1
- import { Area } from '../class/export';
2
- import { SELECT_AREA, SET_FLOOR_STYLES } from '../constants';
1
+ import { Area } from "../class/export";
2
+ import { SELECT_AREA, SET_FLOOR_STYLES } from "../constants";
3
3
  export default function (state, action) {
4
4
  switch (action.type) {
5
5
  case SELECT_AREA:
@@ -1,14 +1,14 @@
1
- import KitchenConfiguratorAreasReducer from './areas-reducer';
2
- import KitchenConfiguratorHolesReducer from './holes-reducer';
3
- import KitchenConfiguratorItemsReducer from './items-reducer';
4
- import KitchenConfiguratorLinesReducer from './lines-reducer';
5
- import KitchenConfiguratorGroupsReducer from './groups-reducer';
6
- import KitchenConfiguratorProjectReducer from './project-reducer';
7
- import KitchenConfiguratorSceneReducer from './scene-reducer';
8
- import KitchenConfiguratorVerticesReducer from './vertices-reducer';
9
- import KitchenConfiguratorViewer2dReducer from './viewer2d-reducer';
10
- import KitchenConfiguratorViewer3dReducer from './viewer3d-reducer';
11
- import KitchenConfiguratorUserReducer from './user-reducer';
1
+ import KitchenConfiguratorAreasReducer from "./areas-reducer";
2
+ import KitchenConfiguratorHolesReducer from "./holes-reducer";
3
+ import KitchenConfiguratorItemsReducer from "./items-reducer";
4
+ import KitchenConfiguratorLinesReducer from "./lines-reducer";
5
+ import KitchenConfiguratorGroupsReducer from "./groups-reducer";
6
+ import KitchenConfiguratorProjectReducer from "./project-reducer";
7
+ import KitchenConfiguratorSceneReducer from "./scene-reducer";
8
+ import KitchenConfiguratorVerticesReducer from "./vertices-reducer";
9
+ import KitchenConfiguratorViewer2dReducer from "./viewer2d-reducer";
10
+ import KitchenConfiguratorViewer3dReducer from "./viewer3d-reducer";
11
+ import KitchenConfiguratorUserReducer from "./user-reducer";
12
12
  export { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer, KitchenConfiguratorUserReducer };
13
13
  export default {
14
14
  KitchenConfiguratorAreasReducer: KitchenConfiguratorAreasReducer,
@@ -1,6 +1,6 @@
1
- import { GROUP_ACTIONS } from '../constants';
2
- import { Group } from '../class/export';
3
- import { history } from '../utils/export';
1
+ import { GROUP_ACTIONS } from "../constants";
2
+ import { Group } from "../class/export";
3
+ import { history } from "../utils/export";
4
4
  export default function (state, action) {
5
5
  state = state.merge({
6
6
  sceneHistory: history.historyPush(state.sceneHistory, state.scene)
@@ -1,6 +1,6 @@
1
- import { Hole } from '../class/export';
2
- import { history } from '../utils/export';
3
- import { SELECT_TOOL_DRAWING_HOLE, SELECT_TOOL_DRAWING_HOLE_3D, UPDATE_DRAWING_HOLE, UPDATE_DRAWING_HOLE_3D, END_DRAWING_HOLE, END_DRAWING_HOLE_3D, BEGIN_DRAGGING_HOLE, BEGIN_DRAGGING_HOLE_3D, UPDATE_DRAGGING_HOLE, END_DRAGGING_HOLE, END_DRAGGING_HOLE_3D, SELECT_HOLE, END_CREATING_HOLE, UPDATE_POPUP_OPEN, UPDATE_DRAGGING_HOLE_CHANGED, UPDATE_DRAGGING_HOLE_RULER_CHANGED } from '../constants';
1
+ import { Hole } from "../class/export";
2
+ import { history } from "../utils/export";
3
+ 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";
4
4
  export default function (state, action) {
5
5
  switch (action.type) {
6
6
  case UPDATE_DRAGGING_HOLE_RULER_CHANGED:
@@ -1,9 +1,6 @@
1
- import { Item, Area } from '../class/export';
2
- import { history } from '../utils/export';
3
- import { TOGGLE_LOADING_CABINET, SELECT_TOOL_DRAWING_ITEM, UPDATE_DRAWING_ITEM, END_DRAWING_ITEM, BEGIN_DRAGGING_ITEM, BEGIN_DRAGGING_ITEM_3D, UPDATE_DRAGGING_ITEM, UPDATE_DRAGGING_ITEM_CHANGED, UPDATE_DRAGGING_ITEM_3DX, UPDATE_DRAGGING_ITEM_3DY, END_DRAGGING_ITEM, END_DRAGGING_ITEM_3D, BEGIN_ROTATING_ITEM, BEGIN_ROTATING_ITEM_3D, UPDATE_ROTATING, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, END_ROTATING_ITEM, END_ROTATING_ITEM_3D, REPLACE_SUBMODULE, SELECT_ITEM, ANIMATE_OBJECT, REMOVE_REPLACE_SUBMODULE, ITEM_MOVE_UP, SELECT_TOOL_DRAWING_ITEM_3D, SET_DOOR_STYLE, SET_HANDLE_MATERIAL, SET_INITIAL_DOOR_STYLE, UPDATE_ITEM_POSITION, SET_DOOR_HANDLE, SET_WALL_COLOR, END_CREATING_CABINET, UPDATE_POPUP_OPEN, SET_MODELLING, SET_COUNTER_TOP, SET_BACKSPLASH, SET_BACKSPLASH_VISIBLE, SET_APPLIANCE_MATERIAL, DUPLICATE_SELECTED, EDIT_WIDTH, END_LOADING, SET_MOLDING, UPDATE_MOLDING, STORE_DIST_ARRAY, VALIDATE_ITEM_POSTIONS, REPLACE_ITEM
4
- // SET_MOVE_STATUS,
5
- // SET_ROTATE_STATUS
6
- } from '../constants';
1
+ import { Item } from "../class/export";
2
+ import { history } from "../utils/export";
3
+ 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_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_ITEM_POSITION, UPDATE_MOLDING, UPDATE_POPUP_OPEN, UPDATE_ROTATING_ITEM, UPDATE_ROTATING_ITEM_CHANGED, VALIDATE_ITEM_POSTIONS } from "../constants";
7
4
  export default function (state, action) {
8
5
  switch (action.type) {
9
6
  case STORE_DIST_ARRAY:
@@ -1,6 +1,6 @@
1
- import { Line } from '../class/export';
2
- import { history } from '../utils/export';
3
- import { SELECT_TOOL_DRAWING_LINE, BEGIN_DRAWING_LINE, UPDATE_DRAWING_LINE, END_DRAWING_LINE, BEGIN_DRAGGING_LINE, UPDATE_DRAGGING_LINE, END_DRAGGING_LINE, SELECT_LINE, STOP_DRAWING_LINE, SET_RELATED_LINE } from '../constants';
1
+ import { Line } from "../class/export";
2
+ import { history } from "../utils/export";
3
+ 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";
4
4
  export default function (state, action) {
5
5
  switch (action.type) {
6
6
  case SELECT_TOOL_DRAWING_LINE:
@@ -1,6 +1,6 @@
1
- import { history } from '../utils/export';
2
- import { LOAD_PROJECT, NEW_PROJECT, OPEN_CATALOG, SELECT_TOOL_EDIT, MODE_IDLE, UNSELECT_ALL, SELECT_ALL, SET_PROPERTIES, SET_ITEMS_ATTRIBUTES, SET_LINES_ATTRIBUTES, SET_HOLES_ATTRIBUTES, REMOVE, INVERT, UNDO, REDO, RECREATE, UNCREATE, PROJECT_RE_NAME, ROLLBACK, SET_PROJECT_PROPERTIES, SET_PROJECT_ID, OPEN_PROJECT_CONFIGURATOR, INIT_CATALOG, UPDATE_MOUSE_COORDS, UPDATE_ZOOM_SCALE, TOGGLE_SNAP, CHANGE_CATALOG_PAGE, GO_BACK_TO_CATALOG_PAGE, THROW_ERROR, THROW_WARNING, COPY_PROPERTIES, PASTE_PROPERTIES, PUSH_LAST_SELECTED_CATALOG_ELEMENT_TO_HISTORY, ALTERATE_STATE, SET_MODE, ADD_HORIZONTAL_GUIDE, ADD_VERTICAL_GUIDE, ADD_CIRCULAR_GUIDE, REMOVE_HORIZONTAL_GUIDE, REMOVE_VERTICAL_GUIDE, REMOVE_CIRCULAR_GUIDE, REMOVE_DRAWING_SUPPORT, SET_STATE_PROPERTIES, SHIFT2DON, SHIFT2DOFF, MODE_DRAWING_LINE, SET_IS_HELP, SET_IS_CABINET_DRAWING } from '../constants';
3
- import { Project } from '../class/export';
1
+ import { history } from "../utils/export";
2
+ 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, MODE_DRAWING_LINE, MODE_IDLE, 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, 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";
3
+ import { Project } from "../class/export";
4
4
  export default function (state, action) {
5
5
  switch (action.type) {
6
6
  case NEW_PROJECT:
@@ -1,6 +1,6 @@
1
- import { PROJECT_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS, GROUP_ACTIONS, ITEMS_ACTIONS, HOLE_ACTIONS, LINE_ACTIONS, AREA_ACTIONS, SCENE_ACTIONS, VERTEX_ACTIONS, USER_ACTIONS } from '../constants';
2
- import { KitchenConfiguratorAreasReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer, KitchenConfiguratorUserReducer } from './export';
3
- import { State } from '../models';
1
+ import { AREA_ACTIONS, GROUP_ACTIONS, HOLE_ACTIONS, ITEMS_ACTIONS, LINE_ACTIONS, PROJECT_ACTIONS, SCENE_ACTIONS, USER_ACTIONS, VERTEX_ACTIONS, VIEWER2D_ACTIONS, VIEWER3D_ACTIONS } from "../constants";
2
+ import { KitchenConfiguratorAreasReducer, KitchenConfiguratorGroupsReducer, KitchenConfiguratorHolesReducer, KitchenConfiguratorItemsReducer, KitchenConfiguratorLinesReducer, KitchenConfiguratorProjectReducer, KitchenConfiguratorSceneReducer, KitchenConfiguratorUserReducer, KitchenConfiguratorVerticesReducer, KitchenConfiguratorViewer2dReducer, KitchenConfiguratorViewer3dReducer } from "./export";
3
+ import { State } from "../models";
4
4
  export var initialState = new State();
5
5
  export default function appReducer(state, action) {
6
6
  // /////////
@@ -1,6 +1,6 @@
1
- import { Layer } from '../class/export';
2
- import { history } from '../utils/export';
3
- import { ADD_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, REMOVE_LAYER, UPDATE_MOVING_STATE } from '../constants';
1
+ import { Layer } from "../class/export";
2
+ import { history } from "../utils/export";
3
+ import { ADD_LAYER, REMOVE_LAYER, SELECT_LAYER, SET_LAYER_PROPERTIES, UPDATE_MOVING_STATE } from "../constants";
4
4
  export default function (state, action) {
5
5
  var saveHistory = function saveHistory() {
6
6
  return state = state.merge({
@@ -1,5 +1,4 @@
1
- import { object } from 'prop-types';
2
- import { LOGIN_SUCCESS, LOGIN_ERROR, LOGOUT } from '../constants';
1
+ import { LOGIN_ERROR, LOGIN_SUCCESS, LOGOUT } from "../constants";
3
2
  var initialState = {
4
3
  success: false,
5
4
  error: {
@@ -1,6 +1,6 @@
1
- import { BEGIN_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX, END_DRAGGING_VERTEX } from '../constants';
2
- import { history } from '../utils/export';
3
- import { Vertex } from '../class/export';
1
+ import { BEGIN_DRAGGING_VERTEX, END_DRAGGING_VERTEX, UPDATE_DRAGGING_VERTEX } from "../constants";
2
+ import { history } from "../utils/export";
3
+ import { Vertex } from "../class/export";
4
4
  export default function (state, action) {
5
5
  switch (action.type) {
6
6
  case BEGIN_DRAGGING_VERTEX:
@@ -1,4 +1,4 @@
1
- import { UPDATE_2D_CAMERA, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, MODE_2D_PAN, MODE_2D_ZOOM_IN, MODE_2D_ZOOM_OUT, CHANGE_WALL_LENGTH_MEASURE, CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from '../constants';
1
+ import { CHANGE_BASE_CABINET_MEASURE, CHANGE_WALL_CABINET_MEASURE, CHANGE_WALL_LENGTH_MEASURE, CHANGE_WINDOW_DOOR_MEASURE, MODE_2D_PAN, MODE_2D_ZOOM_IN, MODE_2D_ZOOM_OUT, SELECT_TOOL_PAN, SELECT_TOOL_ZOOM_IN, SELECT_TOOL_ZOOM_OUT, UPDATE_2D_CAMERA, UPDATE_CEIL_HEIGHT, UPDATE_CEIL_HEIGHT_UNIT } from "../constants";
2
2
  import convert from 'convert-units';
3
3
  export default function (state, action) {
4
4
  var _state = state,
@@ -1,6 +1,6 @@
1
- import { MODE_3D_VIEW, MODE_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, SELECT_TOOL_3D_FIRST_PERSON, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from '../constants';
2
- import { Project } from '../class/export';
3
- import { history } from '../utils/export';
1
+ import { MODE_3D_FIRST_PERSON, MODE_3D_VIEW, SELECT_TOOL_3D_FIRST_PERSON, SELECT_TOOL_3D_VIEW, UPDATE_3D_CEIL_HEIGHT, UPDATE_3D_CEIL_HEIGHT_UNIT } from "../constants";
2
+ import { Project } from "../class/export";
3
+ import { history } from "../utils/export";
4
4
  import convert from 'convert-units';
5
5
  export default function (state, action) {
6
6
  state = state.merge({
@@ -1,4 +1,4 @@
1
- import * as TabsStyle from './tabs.css';
1
+ import * as TabsStyle from "./tabs.css";
2
2
  export { TabsStyle };
3
3
  export default {
4
4
  TabsStyle: TabsStyle
@@ -4,9 +4,9 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
4
4
  function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
- import EN from './en';
8
- import IT from './it';
9
- import RU from './ru';
7
+ import EN from "./en";
8
+ import IT from "./it";
9
+ import RU from "./ru";
10
10
  var DEFAULT_LOCALE = 'en';
11
11
  var Translator = /*#__PURE__*/function () {
12
12
  function Translator() {
@@ -1,14 +1,14 @@
1
- import * as GeometryUtils from './geometry';
2
- import * as GraphInnerCycles from './graph-inner-cycles';
3
- import * as MathUtils from './math';
4
- import * as SnapUtils from './snap';
5
- import * as SnapSceneUtils from './snap-scene';
6
- import * as history from './history';
7
- import * as ObjectUtils from './objects-utils';
8
- import * as MoldingUtils from './molding';
9
- import IDBroker from './id-broker';
10
- import NameGenerator from './name-generator';
11
- import * as Logger from './logger';
1
+ import * as GeometryUtils from "./geometry";
2
+ import * as GraphInnerCycles from "./graph-inner-cycles";
3
+ import * as MathUtils from "./math";
4
+ import * as SnapUtils from "./snap";
5
+ import * as SnapSceneUtils from "./snap-scene";
6
+ import * as history from "./history";
7
+ import * as ObjectUtils from "./objects-utils";
8
+ import * as MoldingUtils from "./molding";
9
+ import IDBroker from "./id-broker";
10
+ import NameGenerator from "./name-generator";
11
+ import * as Logger from "./logger";
12
12
  export { GeometryUtils, GraphInnerCycles, MathUtils, SnapUtils, SnapSceneUtils, history, IDBroker, NameGenerator, ObjectUtils, Logger, MoldingUtils };
13
13
  export default {
14
14
  GeometryUtils: GeometryUtils,
@@ -22,13 +22,13 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
22
22
  * @param {number} y1 Vertex 1 y
23
23
  * @return {number}
24
24
  */
25
- import { toFixedFloat, fAbs } from './math.js';
26
- import { BASE_CABINET_LAYOUTPOS, EPSILON, LINE_THICKNESS, MEPSILON, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_NONE, OVERLAP_SAME, OVERLAP_SOME, WALL_CABINET_LAYOUTPOS, UNIT_ANGLE, MIN_ANGLE_DISALLOW_DRAW_WALL } from '../constants';
25
+ import { toFixedFloat, fAbs } from "./math.js";
26
+ import { BASE_CABINET_LAYOUTPOS, EPSILON, LINE_THICKNESS, MEPSILON, OVERLAP_INCLUDED, OVERLAP_LINK, OVERLAP_NONE, OVERLAP_SAME, OVERLAP_SOME, WALL_CABINET_LAYOUTPOS, UNIT_ANGLE, MIN_ANGLE_DISALLOW_DRAW_WALL } from "../constants";
27
27
  import convert from 'convert-units';
28
28
  import * as Three from 'three';
29
- import { returnReplaceableDeepSearchType } from '../components/viewer2d/utils.js';
30
- import { isEmpty } from './helper.js';
31
- import { MathUtils } from './export.js';
29
+ import { returnReplaceableDeepSearchType } from "../components/viewer2d/utils.js";
30
+ import { isEmpty } from "./helper.js";
31
+ import { MathUtils } from "./export.js";
32
32
  export function compareVertices(v0, v1) {
33
33
  return v0.x === v1.x ? v0.y - v1.y : v0.x - v1.x;
34
34
  }
@@ -23,4 +23,5 @@ function getVerticesFromBiconnectedComponent(component) {
23
23
  });
24
24
  return vertices;
25
25
  }
26
- module.exports = getEdgesOfSubgraphs;
26
+ export default getEdgesOfSubgraphs;
27
+ export { getEdgesOfSubgraphs, getVerticesFromBiconnectedComponent };
@@ -200,9 +200,8 @@ function find_inner_cycles(V, EV) {
200
200
  ev_mapping: cycles.ev_mapping
201
201
  };
202
202
  }
203
-
204
- // export default find_inner_cycles;
205
- module.exports = find_inner_cycles;
203
+ export default find_inner_cycles;
204
+ export { find_inner_cycles, find_cycles, compute_ev_mapping, compute_incidences };
206
205
 
207
206
  /**
208
207
  * DATA
@@ -1,6 +1,6 @@
1
- import Graph from './graph';
2
- import getEdgesOfSubgraphs from './get-edges-of-subgraphs';
3
- import graphCycles from './graph-cycles';
1
+ import Graph from "./graph";
2
+ import getEdgesOfSubgraphs from "./get-edges-of-subgraphs";
3
+ import graphCycles from "./graph-cycles";
4
4
  import { List } from 'immutable';
5
5
  export function calculateInnerCycles(verticesArray, edgesArray) {
6
6
  var innerCycles = new List();
package/es/utils/graph.js CHANGED
@@ -146,4 +146,5 @@ var Graph = /*#__PURE__*/function () {
146
146
  }
147
147
  }]);
148
148
  }();
149
- module.exports = Graph;
149
+ export default Graph;
150
+ export { Graph, Edge, create_array };
@@ -5,83 +5,15 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
5
5
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
6
6
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
7
  import { HDRCubeTextureLoader } from 'three/examples/jsm/loaders/HDRCubeTextureLoader.js';
8
- import { ANIMATE_OBJECT_OPEN_DOOR_ROTATION_UNIT, ANIMATE_STEP_MAX, DECIMAL_PLACES_2, HDR_URLS, MODE_ELEVATION_VIEW } from 'src/constants';
8
+ import { ANIMATE_OBJECT_OPEN_DOOR_ROTATION_UNIT, ANIMATE_STEP_MAX, DECIMAL_PLACES_2, HDR_URLS, MODE_ELEVATION_VIEW } from "../constants";
9
9
  import * as Three from 'three';
10
- import { returnReplaceableDeepSearchType } from './../components/viewer2d/utils';
10
+ import { returnReplaceableDeepSearchType } from "./../components/viewer2d/utils";
11
11
  import convert from 'convert-units';
12
- import { formatNumber } from './math';
13
- var AWS = require('aws-sdk');
14
- var s3 = new AWS.S3({
15
- accessKeyId: process.env.REACT_APP_AWS_ID,
16
- secretAccessKey: process.env.REACT_APP_AWS_SECRET
17
- });
18
- var s3ParseUrl = function s3ParseUrl(url) {
19
- var _decodedUrl = decodeURIComponent(url);
20
- var _result = null;
21
-
22
- // http://s3.amazonaws.com/bucket/key1/key2
23
- var match = decodedUrl.match(/^https?:\/\/s3.amazonaws.com\/([^\/]+)\/?(.*?)$/);
24
- if (_match) {
25
- _result = {
26
- bucket: _match[1],
27
- key: _match[2],
28
- region: ''
29
- };
30
- }
31
-
32
- // http://s3-aws-region.amazonaws.com/bucket/key1/key2
33
- match = decodedUrl.match(/^https?:\/\/s3-([^.]+).amazonaws.com\/([^\/]+)\/?(.*?)$/);
34
- if (_match) {
35
- _result = {
36
- bucket: _match[2],
37
- key: _match[3],
38
- region: _match[1]
39
- };
40
- }
41
-
42
- // http://bucket.s3.amazonaws.com/key1/key2
43
- match = decodedUrl.match(/^https?:\/\/([^.]+).s3.amazonaws.com\/?(.*?)$/);
44
- if (_match) {
45
- _result = {
46
- bucket: _match[1],
47
- key: _match[2],
48
- region: ''
49
- };
50
- }
51
-
52
- // http://bucket.s3-aws-region.amazonaws.com/key1/key2 or,
53
- // http://bucket.s3.aws-region.amazonaws.com/key1/key2
54
- match = decodedUrl.match(/^https?:\/\/([^.]+).(?:s3-|s3\.)([^.]+).amazonaws.com\/?(.*?)$/);
55
- if (_match) {
56
- _result = {
57
- bucket: _match[1],
58
- key: _match[3],
59
- region: _match[2]
60
- };
61
- }
62
- return _result;
63
- };
12
+ import { formatNumber } from "./math";
64
13
  export var textureCube = new HDRCubeTextureLoader().setPath('/catalog/envMap/').load(HDR_URLS, function () {
65
14
  textureCube.magFilter = Three.LinearFilter;
66
15
  textureCube.needsUpdate = true;
67
16
  });
68
- export var getSignedUrl = function getSignedUrl(url) {
69
- if (!url) return url;
70
- var signedUrl = url;
71
- try {
72
- var _s3ParseUrl = s3ParseUrl(url),
73
- bucket = _s3ParseUrl.bucket,
74
- key = _s3ParseUrl.key;
75
- signedUrl = s3.getSignedUrl('getObject', {
76
- Bucket: bucket,
77
- Key: key,
78
- ResponseCacheControl: 'no-cache'
79
- });
80
- } catch (e) {
81
- signedUrl = url;
82
- }
83
- return signedUrl;
84
- };
85
17
  export var base64Decode = function base64Decode(targetStr) {
86
18
  if (!targetStr) return null;
87
19
  try {