kitchen-simulator 1.1.1-test.3 → 1.1.1-test.31
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 +10 -10
- package/es/KitchenConfiguratorApp.js +14 -14
- package/es/actions/area-actions.js +1 -1
- package/es/actions/export.js +10 -10
- package/es/actions/groups-actions.js +1 -1
- 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 +6 -6
- package/es/catalog/catalog.js +3 -3
- package/es/catalog/factories/area-factory-3d.js +1 -1
- package/es/catalog/factories/area-factory.js +3 -3
- package/es/catalog/factories/export.js +2 -2
- package/es/catalog/factories/wall-factory-3d.js +5 -5
- package/es/catalog/factories/wall-factory.js +7 -6
- package/es/catalog/holes/door-closet/planner-element.js +2 -2
- package/es/catalog/holes/door-exterior/planner-element.js +2 -2
- package/es/catalog/holes/door-interior/planner-element.js +2 -2
- package/es/catalog/holes/door-sliding/planner-element.js +2 -2
- package/es/catalog/holes/doorway-framed/planner-element.js +2 -2
- package/es/catalog/holes/export.js +13 -13
- package/es/catalog/holes/window-clear/planner-element.js +2 -2
- package/es/catalog/holes/window-cross/planner-element.js +2 -2
- package/es/catalog/holes/window-double-hung/planner-element.js +2 -2
- package/es/catalog/holes/window-vertical/planner-element.js +2 -2
- package/es/catalog/lines/wall/planner-element.js +10 -10
- package/es/catalog/molding/molding-dcm/planner-element.js +1 -1
- package/es/catalog/molding/molding-fbm/planner-element.js +1 -1
- package/es/catalog/molding/molding-lrm/planner-element.js +1 -1
- package/es/catalog/properties/export.js +9 -9
- package/es/catalog/properties/property-checkbox.js +64 -19
- package/es/catalog/properties/property-color.js +2 -2
- package/es/catalog/properties/property-enum.js +51 -9
- package/es/catalog/properties/property-lenght-measure.js +4 -4
- package/es/catalog/properties/property-length-measure.js +58 -9
- package/es/catalog/properties/property-length-measure_hole.js +4 -4
- package/es/catalog/properties/property-number.js +2 -2
- package/es/catalog/properties/property-read-only.js +2 -2
- package/es/catalog/properties/property-string.js +2 -2
- package/es/catalog/properties/property-toggle.js +2 -2
- package/es/catalog/utils/geom-utils.js +1 -1
- package/es/catalog/utils/item-loader.js +6 -6
- package/es/catalog/utils/load-obj.js +1 -1
- package/es/catalog/utils/mtl-loader.js +2 -1
- package/es/catalog/utils/obj-loader.js +2 -1
- package/es/class/area.js +2 -2
- package/es/class/export.js +10 -10
- package/es/class/group.js +4 -4
- package/es/class/guide.js +1 -1
- package/es/class/hole.js +5 -6
- package/es/class/item.js +10 -12
- package/es/class/layer.js +4 -4
- package/es/class/line.js +4 -4
- package/es/class/project.js +8 -8
- package/es/class/vertex.js +5 -5
- package/es/components/content.js +6 -5
- package/es/components/export.js +3 -3
- package/es/components/style/button.js +1 -1
- package/es/components/style/cancel-button.js +1 -1
- package/es/components/style/content-title.js +1 -1
- package/es/components/style/delete-button.js +2 -2
- package/es/components/style/export.js +14 -14
- package/es/components/style/form-color-input.js +1 -1
- package/es/components/style/form-number-input.js +32 -8
- package/es/components/style/form-number-input_2.js +2 -2
- package/es/components/style/form-select.js +56 -8
- package/es/components/style/form-slider.js +1 -1
- package/es/components/style/form-submit-button.js +2 -2
- package/es/components/style/form-text-input.js +31 -12
- package/es/components/viewer2d/area.js +2 -2
- package/es/components/viewer2d/export.js +14 -14
- package/es/components/viewer2d/grids/grids.js +1 -1
- package/es/components/viewer2d/group.js +2 -2
- package/es/components/viewer2d/item.js +5 -5
- package/es/components/viewer2d/layer.js +4 -4
- package/es/components/viewer2d/line.js +6 -9
- package/es/components/viewer2d/ruler.js +3 -3
- package/es/components/viewer2d/rulerX.js +1 -1
- package/es/components/viewer2d/rulerY.js +1 -1
- package/es/components/viewer2d/scene.js +2 -2
- package/es/components/viewer2d/snap.js +1 -1
- package/es/components/viewer2d/state.js +3 -3
- package/es/components/viewer2d/utils.js +2 -2
- package/es/components/viewer2d/vertex.js +1 -1
- package/es/components/viewer2d/viewer2d.js +9 -9
- package/es/components/viewer3d/front3D.js +2 -2
- package/es/components/viewer3d/grid-creator.js +2 -2
- package/es/components/viewer3d/grids/grid-horizontal-streak.js +1 -1
- package/es/components/viewer3d/grids/grid-streak.js +1 -1
- package/es/components/viewer3d/grids/grid-vertical-streak.js +1 -1
- package/es/components/viewer3d/libs/mtl-loader.js +1 -1
- package/es/components/viewer3d/libs/obj-loader.js +1 -1
- package/es/components/viewer3d/libs/orbit-controls.js +5 -4
- package/es/components/viewer3d/libs/pointer-lock-controls.js +4 -3
- package/es/components/viewer3d/pointer-lock-navigation.js +1 -1
- package/es/components/viewer3d/ruler-utils/itemRect.js +1 -1
- package/es/components/viewer3d/ruler-utils/layer3D.js +5 -5
- package/es/components/viewer3d/ruler-utils/ruler3D.js +1 -1
- package/es/components/viewer3d/ruler-utils/scene3D.js +3 -4
- package/es/components/viewer3d/ruler-utils/state3D.js +1 -1
- package/es/components/viewer3d/scene-creator.js +10 -10
- package/es/components/viewer3d/viewer3d-first-person.js +5 -5
- package/es/components/viewer3d/viewer3d.js +14 -16
- package/es/index.js +14 -14
- package/es/models.js +4 -4
- package/es/plugins/autosave.js +1 -1
- package/es/plugins/console-debugger.js +1 -1
- package/es/plugins/export.js +3 -3
- package/es/plugins/keyboard.js +2 -2
- package/es/reducers/areas-reducer.js +2 -2
- package/es/reducers/export.js +11 -11
- package/es/reducers/groups-reducer.js +3 -3
- package/es/reducers/holes-reducer.js +3 -3
- package/es/reducers/items-reducer.js +3 -6
- package/es/reducers/lines-reducer.js +3 -3
- package/es/reducers/project-reducer.js +3 -3
- package/es/reducers/reducer.js +3 -3
- package/es/reducers/scene-reducer.js +3 -3
- package/es/reducers/user-reducer.js +1 -2
- package/es/reducers/vertices-reducer.js +3 -3
- package/es/reducers/viewer2d-reducer.js +1 -1
- package/es/reducers/viewer3d-reducer.js +3 -3
- package/es/styles/export.js +1 -1
- package/es/translator/translator.js +3 -3
- package/es/utils/export.js +11 -11
- package/es/utils/geometry.js +5 -5
- package/es/utils/get-edges-of-subgraphs.js +2 -1
- package/es/utils/graph-cycles.js +2 -3
- package/es/utils/graph-inner-cycles.js +3 -3
- package/es/utils/graph.js +2 -1
- package/es/utils/helper.js +3 -71
- package/es/utils/molding.js +5 -5
- package/es/utils/snap-scene.js +2 -2
- package/es/utils/snap.js +1 -1
- package/lib/KitchenConfigurator.js +20 -20
- package/lib/KitchenConfiguratorApp.js +34 -34
- package/lib/catalog/areas/area/planner-element.js +7 -7
- package/lib/catalog/factories/wall-factory-3d.js +1 -1
- package/lib/catalog/factories/wall-factory.js +1 -1
- package/lib/catalog/holes/door-closet/planner-element.js +1 -1
- package/lib/catalog/holes/door-exterior/planner-element.js +1 -1
- package/lib/catalog/holes/door-interior/planner-element.js +1 -1
- package/lib/catalog/holes/door-sliding/planner-element.js +1 -1
- package/lib/catalog/holes/doorway-framed/planner-element.js +1 -1
- package/lib/catalog/holes/export.js +13 -13
- package/lib/catalog/holes/window-clear/planner-element.js +1 -1
- package/lib/catalog/holes/window-cross/planner-element.js +1 -1
- package/lib/catalog/holes/window-double-hung/planner-element.js +1 -1
- package/lib/catalog/holes/window-vertical/planner-element.js +1 -1
- package/lib/catalog/lines/wall/planner-element.js +11 -11
- package/lib/catalog/properties/property-checkbox.js +64 -19
- package/lib/catalog/properties/property-enum.js +49 -7
- package/lib/catalog/properties/property-length-measure.js +55 -6
- package/lib/catalog/utils/geom-utils.js +1 -1
- package/lib/catalog/utils/item-loader.js +4 -6
- package/lib/catalog/utils/load-obj.js +1 -1
- package/lib/catalog/utils/mtl-loader.js +6 -2
- package/lib/catalog/utils/obj-loader.js +6 -2
- package/lib/class/item.js +3 -5
- package/lib/class/line.js +1 -1
- package/lib/class/vertex.js +1 -1
- package/lib/components/content.js +1 -0
- package/lib/components/style/form-number-input.js +30 -6
- package/lib/components/style/form-select.js +54 -8
- package/lib/components/style/form-text-input.js +30 -12
- package/lib/components/viewer2d/line.js +3 -6
- package/lib/components/viewer2d/scene.js +1 -1
- package/lib/components/viewer2d/viewer2d.js +1 -3
- package/lib/components/viewer3d/libs/mtl-loader.js +5 -1
- package/lib/components/viewer3d/libs/obj-loader.js +5 -1
- package/lib/components/viewer3d/libs/orbit-controls.js +9 -4
- package/lib/components/viewer3d/libs/pointer-lock-controls.js +8 -3
- package/lib/components/viewer3d/ruler-utils/scene3D.js +1 -2
- package/lib/components/viewer3d/scene-creator.js +1 -1
- package/lib/components/viewer3d/viewer3d.js +5 -6
- package/lib/reducers/user-reducer.js +0 -1
- package/lib/utils/get-edges-of-subgraphs.js +7 -1
- package/lib/utils/graph-cycles.js +9 -9
- package/lib/utils/graph.js +9 -3
- package/lib/utils/helper.js +2 -70
- package/package.json +15 -50
package/es/class/project.js
CHANGED
|
@@ -7,14 +7,14 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
7
7
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
8
8
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
9
9
|
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); }
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
import { GeometryUtils, history } from
|
|
15
|
-
import {
|
|
16
|
-
import * as viewer2DActions from
|
|
17
|
-
import { isEmpty } from
|
|
10
|
+
import { List, Map } from 'immutable';
|
|
11
|
+
import * as constants from "../constants";
|
|
12
|
+
import { ARRAY_3D_MODES, END_DRAWING_LINE, MODE_CONFIGURING_PROJECT, MODE_DRAWING_HOLE, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_DRAWING_LINE, MODE_IDLE, MODE_IDLE_3D, MODE_VIEWING_CATALOG, MODE_WAITING_DRAWING_LINE } from "../constants";
|
|
13
|
+
import { Catalog, Scene, State } from "../models";
|
|
14
|
+
import { GeometryUtils, history } from "../utils/export";
|
|
15
|
+
import { Area, Group, Hole, HorizontalGuide, Item, Layer, Line, VerticalGuide } from "../class/export";
|
|
16
|
+
import * as viewer2DActions from "../actions/viewer2d-actions";
|
|
17
|
+
import { isEmpty } from "../utils/helper";
|
|
18
18
|
var Project = /*#__PURE__*/function () {
|
|
19
19
|
function Project() {
|
|
20
20
|
_classCallCheck(this, Project);
|
package/es/class/vertex.js
CHANGED
|
@@ -6,11 +6,11 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
6
6
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
7
7
|
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); }
|
|
8
8
|
import { List, Map } from 'immutable';
|
|
9
|
-
import { Vertex as VertexModel } from
|
|
10
|
-
import { GeometryUtils, IDBroker, SnapSceneUtils, SnapUtils } from
|
|
11
|
-
import { END_DRAGGING_VERTEX, MODE_DRAGGING_VERTEX } from
|
|
12
|
-
import { Layer, Line } from
|
|
13
|
-
import { isEmpty } from
|
|
9
|
+
import { Vertex as VertexModel } from "../models";
|
|
10
|
+
import { GeometryUtils, IDBroker, SnapSceneUtils, SnapUtils } from "../utils/export";
|
|
11
|
+
import { END_DRAGGING_VERTEX, MODE_DRAGGING_VERTEX } from "../constants";
|
|
12
|
+
import { Layer, Line } from "../class/export";
|
|
13
|
+
import { isEmpty } from "../utils/helper";
|
|
14
14
|
var Vertex = /*#__PURE__*/function () {
|
|
15
15
|
function Vertex() {
|
|
16
16
|
_classCallCheck(this, Vertex);
|
package/es/components/content.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import Viewer2D from
|
|
4
|
-
import Viewer3D from
|
|
5
|
-
import Viewer3DFirstPerson from
|
|
6
|
-
import * as constants from
|
|
7
|
-
import Front3D from
|
|
3
|
+
import Viewer2D from "./viewer2d/viewer2d";
|
|
4
|
+
import Viewer3D from "./viewer3d/viewer3d";
|
|
5
|
+
import Viewer3DFirstPerson from "./viewer3d/viewer3d-first-person";
|
|
6
|
+
import * as constants from "../constants";
|
|
7
|
+
import Front3D from "./viewer3d/front3D";
|
|
8
8
|
export default function Content(_ref, _ref2) {
|
|
9
9
|
var width = _ref.width,
|
|
10
10
|
height = _ref.height,
|
|
@@ -17,6 +17,7 @@ export default function Content(_ref, _ref2) {
|
|
|
17
17
|
catalog = _ref.catalog;
|
|
18
18
|
var projectActions = _ref2.projectActions;
|
|
19
19
|
var mode = state.get('mode');
|
|
20
|
+
console.log('mode =>', mode);
|
|
20
21
|
switch (mode) {
|
|
21
22
|
// this mode is when view elevation
|
|
22
23
|
case constants.MODE_ELEVATION_VIEW:
|
package/es/components/export.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import Content from
|
|
2
|
-
import Viewer2DComponents from
|
|
3
|
-
import StyleComponents from
|
|
1
|
+
import Content from "./content";
|
|
2
|
+
import Viewer2DComponents from "./viewer2d/export";
|
|
3
|
+
import StyleComponents from "./style/export";
|
|
4
4
|
export { Content, Viewer2DComponents, StyleComponents };
|
|
5
5
|
export default {
|
|
6
6
|
Content: Content,
|
|
@@ -17,7 +17,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
17
17
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
18
18
|
import React, { Component } from 'react';
|
|
19
19
|
import PropTypes from 'prop-types';
|
|
20
|
-
import * as SharedStyle from
|
|
20
|
+
import * as SharedStyle from "../../shared-style";
|
|
21
21
|
var BASE_STYLE = {
|
|
22
22
|
display: 'inline-block',
|
|
23
23
|
fontWeight: '400',
|
|
@@ -3,7 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import Button from
|
|
6
|
+
import Button from "./button";
|
|
7
7
|
var STYLE = {
|
|
8
8
|
borderColor: '#adadad',
|
|
9
9
|
backgroundColor: '#e6e6e6'
|
|
@@ -10,7 +10,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
10
10
|
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; }
|
|
11
11
|
import React from 'react';
|
|
12
12
|
import PropTypes from 'prop-types';
|
|
13
|
-
import * as SharedStyle from
|
|
13
|
+
import * as SharedStyle from "../../shared-style";
|
|
14
14
|
var STYLE = {
|
|
15
15
|
color: SharedStyle.PRIMARY_COLOR.alt,
|
|
16
16
|
fontWeight: 300
|
|
@@ -3,8 +3,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import Button from
|
|
7
|
-
import * as SharedStyle from
|
|
6
|
+
import Button from "./button";
|
|
7
|
+
import * as SharedStyle from "../../shared-style";
|
|
8
8
|
var STYLE = {
|
|
9
9
|
borderColor: '#c12e2a',
|
|
10
10
|
backgroundColor: '#c9302c',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import Button from
|
|
2
|
-
import CancelButton from
|
|
3
|
-
import ContentContainer from
|
|
4
|
-
import ContentTitle from
|
|
5
|
-
import DeleteButton from
|
|
6
|
-
import FormBlock from
|
|
7
|
-
import FormColorInput from
|
|
8
|
-
import FormLabel from
|
|
9
|
-
import FormNumberInput from
|
|
10
|
-
import FormSelect from
|
|
11
|
-
import FormSlider from
|
|
12
|
-
import FormSubmitButton from
|
|
13
|
-
import FormTextInput from
|
|
14
|
-
import FormNumberInput2 from
|
|
1
|
+
import Button from "./button";
|
|
2
|
+
import CancelButton from "./cancel-button";
|
|
3
|
+
import ContentContainer from "./content-container";
|
|
4
|
+
import ContentTitle from "./content-title";
|
|
5
|
+
import DeleteButton from "./delete-button";
|
|
6
|
+
import FormBlock from "./form-block";
|
|
7
|
+
import FormColorInput from "./form-color-input";
|
|
8
|
+
import FormLabel from "./form-label";
|
|
9
|
+
import FormNumberInput from "./form-number-input";
|
|
10
|
+
import FormSelect from "./form-select";
|
|
11
|
+
import FormSlider from "./form-slider";
|
|
12
|
+
import FormSubmitButton from "./form-submit-button";
|
|
13
|
+
import FormTextInput from "./form-text-input";
|
|
14
|
+
import FormNumberInput2 from "./form-number-input_2";
|
|
15
15
|
export { Button, CancelButton, ContentContainer, ContentTitle, DeleteButton, FormBlock, FormColorInput, FormLabel, FormNumberInput, FormSelect, FormSlider, FormSubmitButton, FormTextInput, FormNumberInput2 };
|
|
16
16
|
export default {
|
|
17
17
|
Button: Button,
|
|
@@ -3,7 +3,7 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import FormTextInput from
|
|
6
|
+
import FormTextInput from "./form-text-input";
|
|
7
7
|
var STYLE = {
|
|
8
8
|
padding: 0,
|
|
9
9
|
border: 0
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
|
-
var
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
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; }
|
|
3
5
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
4
6
|
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); } }
|
|
5
7
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
@@ -12,13 +14,32 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
12
14
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
13
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); }
|
|
14
16
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
17
|
import React, { Component } from 'react';
|
|
17
18
|
import PropTypes from 'prop-types';
|
|
18
|
-
import {
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
import { DEFAULT_FONT_FAMILY, KEYBOARD_BUTTON_CODE, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
20
|
+
import { isValidNumber } from "../../utils/helper";
|
|
21
|
+
var styles = {
|
|
22
|
+
input: {
|
|
23
|
+
display: 'block',
|
|
24
|
+
padding: '15px 25px 12px 0px',
|
|
25
|
+
width: 120,
|
|
26
|
+
color: TEXT_COLOR_NEUTRAL_0,
|
|
27
|
+
backgroundColor: 'rgb(255, 255, 255)',
|
|
28
|
+
border: '2px solid',
|
|
29
|
+
textAlign: 'right',
|
|
30
|
+
"float": 'right',
|
|
31
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
32
|
+
fontSize: 16,
|
|
33
|
+
fontWeight: 600,
|
|
34
|
+
lineHeight: '17px',
|
|
35
|
+
borderRadius: 5,
|
|
36
|
+
outline: 0,
|
|
37
|
+
transition: 'border-color 0.2s'
|
|
38
|
+
},
|
|
39
|
+
inputFocus: {
|
|
40
|
+
borderColor: SECONDARY_PURPLE_COLOR
|
|
41
|
+
}
|
|
42
|
+
};
|
|
22
43
|
var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
23
44
|
function FormNumberInput(props, context) {
|
|
24
45
|
var _this;
|
|
@@ -110,13 +131,16 @@ var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
|
110
131
|
});
|
|
111
132
|
}
|
|
112
133
|
};
|
|
113
|
-
|
|
134
|
+
|
|
135
|
+
// Merge base style, focus style, and custom style
|
|
136
|
+
var inputStyle = _objectSpread(_objectSpread(_objectSpread({}, styles.input), this.state.focusOn ? styles.inputFocus : {}), style);
|
|
137
|
+
return /*#__PURE__*/React.createElement("input", {
|
|
114
138
|
id: "form_number_input",
|
|
115
139
|
autoFocus: this.state.focusOn,
|
|
116
140
|
readOnly: !!this.props.disabled,
|
|
117
141
|
type: "text",
|
|
118
142
|
value: currValue,
|
|
119
|
-
style:
|
|
143
|
+
style: inputStyle,
|
|
120
144
|
onChange: function onChange(evt) {
|
|
121
145
|
_this2.context.projectActions.copyProperties('ddddd');
|
|
122
146
|
var valid = regexp.test(evt.nativeEvent.target.value);
|
|
@@ -16,9 +16,9 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
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
17
|
import React, { Component } from 'react';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
|
-
import * as SharedStyle from
|
|
19
|
+
import * as SharedStyle from "../../shared-style";
|
|
20
20
|
import { MdUpdate } from 'react-icons/md';
|
|
21
|
-
import { KEYBOARD_BUTTON_CODE } from
|
|
21
|
+
import { KEYBOARD_BUTTON_CODE } from "../../constants";
|
|
22
22
|
var STYLE_INPUT = {
|
|
23
23
|
display: 'block',
|
|
24
24
|
width: '100%',
|
|
@@ -1,20 +1,68 @@
|
|
|
1
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1
2
|
var _excluded = ["children", "style"];
|
|
2
|
-
var _templateObject;
|
|
3
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 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
|
+
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
|
+
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; }
|
|
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 _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
10
|
+
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."); }
|
|
11
|
+
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; } }
|
|
12
|
+
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; }
|
|
13
|
+
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; } }
|
|
14
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
4
15
|
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
16
|
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 _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
7
17
|
import React from 'react';
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
18
|
+
import { DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_3 } from "../../constants";
|
|
19
|
+
var styles = {
|
|
20
|
+
select: {
|
|
21
|
+
display: 'block',
|
|
22
|
+
width: 120,
|
|
23
|
+
"float": 'right',
|
|
24
|
+
padding: '15px 10px 12px 0px',
|
|
25
|
+
color: TEXT_COLOR_NEUTRAL_3,
|
|
26
|
+
border: '2px solid',
|
|
27
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
28
|
+
fontSize: 12,
|
|
29
|
+
fontWeight: 600,
|
|
30
|
+
lineHeight: '17px',
|
|
31
|
+
textAlign: 'right',
|
|
32
|
+
outline: 'none',
|
|
33
|
+
borderRadius: 5,
|
|
34
|
+
transition: 'border-color 0.2s'
|
|
35
|
+
}
|
|
36
|
+
};
|
|
12
37
|
export default function FormSelect(_ref) {
|
|
13
38
|
var children = _ref.children,
|
|
14
39
|
style = _ref.style,
|
|
15
40
|
rest = _objectWithoutProperties(_ref, _excluded);
|
|
16
|
-
|
|
41
|
+
var _React$useState = React.useState(false),
|
|
42
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
43
|
+
focus = _React$useState2[0],
|
|
44
|
+
setFocus = _React$useState2[1];
|
|
45
|
+
var _React$useState3 = React.useState(false),
|
|
46
|
+
_React$useState4 = _slicedToArray(_React$useState3, 2),
|
|
47
|
+
hover = _React$useState4[0],
|
|
48
|
+
setHover = _React$useState4[1];
|
|
49
|
+
var borderColor = focus || hover ? SECONDARY_PURPLE_COLOR : undefined;
|
|
50
|
+
return /*#__PURE__*/React.createElement("select", _extends({
|
|
17
51
|
type: "text",
|
|
18
|
-
style:
|
|
52
|
+
style: _objectSpread(_objectSpread({}, styles.select), {}, {
|
|
53
|
+
borderColor: borderColor
|
|
54
|
+
}, style),
|
|
55
|
+
onFocus: function onFocus() {
|
|
56
|
+
return setFocus(true);
|
|
57
|
+
},
|
|
58
|
+
onBlur: function onBlur() {
|
|
59
|
+
return setFocus(false);
|
|
60
|
+
},
|
|
61
|
+
onMouseEnter: function onMouseEnter() {
|
|
62
|
+
return setHover(true);
|
|
63
|
+
},
|
|
64
|
+
onMouseLeave: function onMouseLeave() {
|
|
65
|
+
return setHover(false);
|
|
66
|
+
}
|
|
19
67
|
}, rest), children);
|
|
20
68
|
}
|
|
@@ -4,7 +4,7 @@ function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i
|
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import ReactRange from '@mapbox/react-range';
|
|
7
|
-
import FormTextInput from
|
|
7
|
+
import FormTextInput from "./form-text-input";
|
|
8
8
|
var sliderContainerStyle = {
|
|
9
9
|
display: 'inline-block',
|
|
10
10
|
width: '80%',
|
|
@@ -3,8 +3,8 @@ function _extends() { return _extends = Object.assign ? Object.assign.bind() : f
|
|
|
3
3
|
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; }
|
|
4
4
|
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; }
|
|
5
5
|
import React from 'react';
|
|
6
|
-
import Button from
|
|
7
|
-
import * as SharedStyle from
|
|
6
|
+
import Button from "./button";
|
|
7
|
+
import * as SharedStyle from "../../shared-style";
|
|
8
8
|
var STYLE = {
|
|
9
9
|
borderColor: '#415375',
|
|
10
10
|
backgroundColor: '#415375',
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
2
2
|
var _excluded = ["style"];
|
|
3
|
-
var _templateObject;
|
|
4
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 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
|
+
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
|
+
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
7
|
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; }
|
|
6
8
|
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; }
|
|
7
9
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -16,12 +18,27 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
16
18
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
17
19
|
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); }
|
|
18
20
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
19
|
-
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
20
21
|
import React, { Component } from 'react';
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
import { BG_COLOR_0, DEFAULT_FONT_FAMILY, PROJECT_NAME_LENGTH_LIMIT, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_3 } from "../../constants";
|
|
23
|
+
var styles = {
|
|
24
|
+
input: {
|
|
25
|
+
display: 'block',
|
|
26
|
+
padding: '15px 10px 12px 0px',
|
|
27
|
+
width: 120,
|
|
28
|
+
fontFamily: DEFAULT_FONT_FAMILY,
|
|
29
|
+
fontSize: 12,
|
|
30
|
+
fontWeight: 600,
|
|
31
|
+
lineHeight: '17px',
|
|
32
|
+
color: TEXT_COLOR_NEUTRAL_3,
|
|
33
|
+
backgroundColor: BG_COLOR_0,
|
|
34
|
+
border: '2px solid',
|
|
35
|
+
textAlign: 'right',
|
|
36
|
+
"float": 'right',
|
|
37
|
+
borderRadius: 5,
|
|
38
|
+
outline: 0,
|
|
39
|
+
transition: 'border-color 0.2s'
|
|
40
|
+
}
|
|
41
|
+
};
|
|
25
42
|
var FormTextInput = /*#__PURE__*/function (_Component) {
|
|
26
43
|
function FormTextInput(props) {
|
|
27
44
|
var _this;
|
|
@@ -48,21 +65,23 @@ var FormTextInput = /*#__PURE__*/function (_Component) {
|
|
|
48
65
|
var _this$props = this.props,
|
|
49
66
|
style = _this$props.style,
|
|
50
67
|
rest = _objectWithoutProperties(_this$props, _excluded);
|
|
51
|
-
|
|
68
|
+
var focus = this.state.focus;
|
|
69
|
+
var inputStyle = _objectSpread(_objectSpread({}, styles.input), {}, {
|
|
70
|
+
borderColor: focus ? SECONDARY_PURPLE_COLOR : undefined
|
|
71
|
+
}, style);
|
|
72
|
+
return /*#__PURE__*/React.createElement("input", _extends({
|
|
52
73
|
ref: this.input,
|
|
53
|
-
onFocus: function onFocus(
|
|
74
|
+
onFocus: function onFocus() {
|
|
54
75
|
return _this2.setState({
|
|
55
76
|
focus: true
|
|
56
77
|
});
|
|
57
78
|
},
|
|
58
|
-
onBlur: function onBlur(
|
|
79
|
+
onBlur: function onBlur() {
|
|
59
80
|
return _this2.setState({
|
|
60
81
|
focus: false
|
|
61
82
|
});
|
|
62
83
|
},
|
|
63
|
-
style:
|
|
64
|
-
// autoFocus
|
|
65
|
-
,
|
|
84
|
+
style: inputStyle,
|
|
66
85
|
type: "text"
|
|
67
86
|
}, rest, {
|
|
68
87
|
maxLength: PROJECT_NAME_LENGTH_LIMIT
|
|
@@ -3,8 +3,8 @@ import PropTypes from 'prop-types';
|
|
|
3
3
|
import polylabel from 'polylabel';
|
|
4
4
|
import areapolygon from 'area-polygon';
|
|
5
5
|
import convert from 'convert-units';
|
|
6
|
-
import { formatNumber } from
|
|
7
|
-
import { DECIMAL_PLACES_2 } from
|
|
6
|
+
import { formatNumber } from "../../utils/math";
|
|
7
|
+
import { DECIMAL_PLACES_2 } from "../../constants";
|
|
8
8
|
var STYLE_TEXT = {
|
|
9
9
|
textAnchor: 'middle',
|
|
10
10
|
fontSize: '12px',
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import Viewer2D from
|
|
2
|
-
import Vertex from
|
|
3
|
-
import State from
|
|
4
|
-
import Snap from
|
|
5
|
-
import Scene from
|
|
6
|
-
import Ruler from
|
|
7
|
-
import Line from
|
|
8
|
-
import Layer from
|
|
9
|
-
import Item from
|
|
10
|
-
import Area from
|
|
11
|
-
import Grids from
|
|
12
|
-
import Group from
|
|
13
|
-
import RulerX from
|
|
14
|
-
import RulerY from
|
|
1
|
+
import Viewer2D from "./viewer2d";
|
|
2
|
+
import Vertex from "./vertex";
|
|
3
|
+
import State from "./state";
|
|
4
|
+
import Snap from "./snap";
|
|
5
|
+
import Scene from "./scene";
|
|
6
|
+
import Ruler from "./ruler";
|
|
7
|
+
import Line from "./line";
|
|
8
|
+
import Layer from "./layer";
|
|
9
|
+
import Item from "./item";
|
|
10
|
+
import Area from "./area";
|
|
11
|
+
import Grids from "./grids/grids";
|
|
12
|
+
import Group from "./group";
|
|
13
|
+
import RulerX from "./rulerX";
|
|
14
|
+
import RulerY from "./rulerY";
|
|
15
15
|
export { Viewer2D, Vertex, State, Snap, Scene, Ruler, Line, Layer, Item, Area, Grids, Group, RulerX, RulerY };
|
|
16
16
|
export default {
|
|
17
17
|
Viewer2D: Viewer2D,
|
|
@@ -6,7 +6,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
7
7
|
import React, { memo } from 'react';
|
|
8
8
|
import PropTypes from 'prop-types';
|
|
9
|
-
import GridStreak from
|
|
9
|
+
import GridStreak from "./grid-streak";
|
|
10
10
|
var propsAreEqual = function propsAreEqual(oldScene, newScene) {
|
|
11
11
|
return oldScene.scene.width === newScene.scene.width && oldScene.scene.height === newScene.scene.height && oldScene.scene.grids === newScene.scene.grids;
|
|
12
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import If from
|
|
4
|
-
import * as sharedStyles from
|
|
3
|
+
import If from "../../utils/react-if";
|
|
4
|
+
import * as sharedStyles from "../../shared-style";
|
|
5
5
|
var cx = 0;
|
|
6
6
|
var cy = 0;
|
|
7
7
|
var radius = 5;
|
|
@@ -7,12 +7,12 @@ function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
|
7
7
|
import React from 'react';
|
|
8
8
|
import { useState } from 'react';
|
|
9
9
|
import PropTypes from 'prop-types';
|
|
10
|
-
import If from
|
|
11
|
-
import RulerDist from
|
|
10
|
+
import If from "../../utils/react-if";
|
|
11
|
+
import RulerDist from "./rulerDist";
|
|
12
12
|
import convert from 'convert-units';
|
|
13
|
-
import { GeometryUtils } from
|
|
14
|
-
import { MODE_ROTATING_ITEM, SECONDARY_PURPLE_COLOR, STATUS_NEGATIVE_COLOR, BG_COLOR_1, STATUS_WARNING_COLOR, WALL_CABINET_LAYOUTPOS } from
|
|
15
|
-
import { returnReplaceableDeepSearchType } from
|
|
13
|
+
import { GeometryUtils } from "../../utils/export";
|
|
14
|
+
import { MODE_ROTATING_ITEM, SECONDARY_PURPLE_COLOR, STATUS_NEGATIVE_COLOR, BG_COLOR_1, STATUS_WARNING_COLOR, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
15
|
+
import { returnReplaceableDeepSearchType } from "./utils";
|
|
16
16
|
var STYLE_LINE = {
|
|
17
17
|
fill: '#0096fd',
|
|
18
18
|
stroke: '#0096fd'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Line, Area, Vertex, Item, Group } from
|
|
4
|
-
import { GeometryUtils } from
|
|
5
|
-
import { MODE_DRAWING_LINE, WALL_CABINET_LAYOUTPOS } from
|
|
6
|
-
import { returnReplaceableDeepSearchType } from
|
|
3
|
+
import { Line, Area, Vertex, Item, Group } from "./export";
|
|
4
|
+
import { GeometryUtils } from "../../utils/export";
|
|
5
|
+
import { MODE_DRAWING_LINE, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
6
|
+
import { returnReplaceableDeepSearchType } from "./utils";
|
|
7
7
|
var STYLE = {
|
|
8
8
|
stroke: '#494949',
|
|
9
9
|
strokeWidth: 1,
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { GeometryUtils } from
|
|
4
|
-
import Ruler from
|
|
5
|
-
import { BASE_CABINET_LAYOUTPOS, LINE_THICKNESS, WALL_CABINET_LAYOUTPOS } from
|
|
3
|
+
import { GeometryUtils } from "../../utils/export";
|
|
4
|
+
import Ruler from "./ruler";
|
|
5
|
+
import { BASE_CABINET_LAYOUTPOS, LINE_THICKNESS, WALL_CABINET_LAYOUTPOS } from "../../constants";
|
|
6
6
|
import * as Three from 'three';
|
|
7
|
-
import { isEmpty } from
|
|
8
|
-
import Tooltip from '@material-ui/core/Tooltip';
|
|
7
|
+
import { isEmpty } from "./utils";
|
|
9
8
|
var STYLE = {
|
|
10
9
|
stroke: 'rgb(77, 77, 77)',
|
|
11
10
|
strokeWidth: '1px'
|
|
@@ -795,9 +794,7 @@ export default function Line(_ref) {
|
|
|
795
794
|
} : {}
|
|
796
795
|
}, renderedLine, /*#__PURE__*/React.createElement("g", {
|
|
797
796
|
transform: "translate(".concat(x1, ", ").concat(y1, ") rotate(").concat(angle, ", 0, 0)")
|
|
798
|
-
}, renderedHoles)), line.selected && /*#__PURE__*/React.createElement(
|
|
799
|
-
title: "Elevation View"
|
|
800
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
797
|
+
}, renderedHoles)), line.selected && /*#__PURE__*/React.createElement("g", {
|
|
801
798
|
id: 'elevation-button',
|
|
802
799
|
key: 1,
|
|
803
800
|
transform: "translate(".concat(x1 + 35, ", ").concat(y1 - 15, ")"),
|
|
@@ -827,7 +824,7 @@ export default function Line(_ref) {
|
|
|
827
824
|
style: {
|
|
828
825
|
transform: 'rotateX(180deg)'
|
|
829
826
|
}
|
|
830
|
-
}))
|
|
827
|
+
})), line.selected && /*#__PURE__*/React.createElement("g", {
|
|
831
828
|
id: 'remove-button',
|
|
832
829
|
key: 2,
|
|
833
830
|
transform: "translate(".concat(x1 + 10, ", ").concat(y1, ")"),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
3
|
import convert from 'convert-units';
|
|
4
|
-
import IDBroker from
|
|
5
|
-
import { FormNumberInput2 } from
|
|
6
|
-
import { LINE_THICKNESS, SHADE_LIGHT_BLUE_COLOR, TEXT_COLOR_NEUTRAL_7 } from
|
|
4
|
+
import IDBroker from "../../utils/id-broker";
|
|
5
|
+
import { FormNumberInput2 } from "../style/export";
|
|
6
|
+
import { LINE_THICKNESS, SHADE_LIGHT_BLUE_COLOR, TEXT_COLOR_NEUTRAL_7 } from "../../constants";
|
|
7
7
|
var STYLE = {
|
|
8
8
|
stroke: TEXT_COLOR_NEUTRAL_7,
|
|
9
9
|
strokeWidth: '1px'
|
|
@@ -16,7 +16,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
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
17
|
import React, { Component } from 'react';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
|
-
import * as SharedStyle from
|
|
19
|
+
import * as SharedStyle from "../../shared-style";
|
|
20
20
|
var RulerX = /*#__PURE__*/function (_Component) {
|
|
21
21
|
function RulerX(props, context) {
|
|
22
22
|
_classCallCheck(this, RulerX);
|
|
@@ -16,7 +16,7 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
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
17
|
import React, { Component } from 'react';
|
|
18
18
|
import PropTypes from 'prop-types';
|
|
19
|
-
import * as SharedStyle from
|
|
19
|
+
import * as SharedStyle from "../../shared-style";
|
|
20
20
|
var RulerY = /*#__PURE__*/function (_Component) {
|
|
21
21
|
function RulerY(props, context) {
|
|
22
22
|
_classCallCheck(this, RulerY);
|