kitchen-simulator 1.1.1-test.3 → 1.1.1-test.30
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 +36 -37
- package/es/KitchenConfiguratorApp.js +47 -45
- 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 -3
- package/es/catalog/molding/molding-fbm/planner-element.js +1 -3
- package/es/catalog/molding/molding-lrm/planner-element.js +1 -3
- package/es/catalog/properties/export.js +9 -9
- package/es/catalog/properties/property-checkbox.js +11 -12
- package/es/catalog/properties/property-color.js +13 -11
- package/es/catalog/properties/property-enum.js +12 -12
- package/es/catalog/properties/property-hidden.js +11 -10
- package/es/catalog/properties/property-lenght-measure.js +19 -18
- package/es/catalog/properties/property-length-measure.js +18 -17
- package/es/catalog/properties/property-length-measure_hole.js +19 -18
- package/es/catalog/properties/property-number.js +13 -12
- package/es/catalog/properties/property-read-only.js +12 -11
- package/es/catalog/properties/property-string.js +12 -11
- package/es/catalog/properties/property-toggle.js +12 -11
- 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 +16 -15
- package/es/components/disclaimer/disclaimer.js +66 -86
- package/es/components/export.js +3 -3
- package/es/components/style/button.js +9 -8
- package/es/components/style/cancel-button.js +1 -1
- package/es/components/style/content-container.js +2 -1
- package/es/components/style/content-title.js +2 -2
- 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 +21 -22
- package/es/components/style/form-number-input_2.js +18 -19
- package/es/components/style/form-select.js +1 -2
- 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 +1 -2
- package/es/components/viewer2d/area.js +9 -8
- package/es/components/viewer2d/export.js +14 -14
- package/es/components/viewer2d/grids/grid-horizontal-streak.js +7 -7
- package/es/components/viewer2d/grids/grid-streak.js +7 -7
- package/es/components/viewer2d/grids/grid-vertical-streak.js +7 -7
- package/es/components/viewer2d/grids/grids.js +7 -5
- package/es/components/viewer2d/group.js +14 -12
- package/es/components/viewer2d/item.js +17 -17
- package/es/components/viewer2d/layer.js +11 -10
- package/es/components/viewer2d/line.js +14 -16
- package/es/components/viewer2d/ruler.js +9 -9
- package/es/components/viewer2d/rulerDist.js +7 -6
- package/es/components/viewer2d/rulerX.js +18 -18
- package/es/components/viewer2d/rulerY.js +16 -16
- package/es/components/viewer2d/scene.js +11 -13
- package/es/components/viewer2d/snap.js +8 -7
- package/es/components/viewer2d/state.js +10 -9
- package/es/components/viewer2d/utils.js +2 -2
- package/es/components/viewer2d/vertex.js +7 -6
- package/es/components/viewer2d/viewer2d.js +27 -25
- package/es/components/viewer3d/front3D.js +3 -3
- 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 +0 -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 +2 -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 +20 -21
- package/es/components/viewer3d/viewer3d.js +31 -34
- 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 +6 -6
- 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/react-if.js +6 -5
- package/es/utils/snap-scene.js +3 -3
- package/es/utils/snap.js +2 -2
- package/lib/KitchenConfigurator.js +27 -29
- package/lib/KitchenConfiguratorApp.js +42 -41
- 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/molding/molding-dcm/planner-element.js +0 -5
- package/lib/catalog/molding/molding-fbm/planner-element.js +0 -5
- package/lib/catalog/molding/molding-lrm/planner-element.js +0 -5
- package/lib/catalog/properties/property-checkbox.js +10 -12
- package/lib/catalog/properties/property-color.js +11 -9
- package/lib/catalog/properties/property-enum.js +10 -11
- package/lib/catalog/properties/property-hidden.js +11 -11
- package/lib/catalog/properties/property-lenght-measure.js +15 -15
- package/lib/catalog/properties/property-length-measure.js +15 -15
- package/lib/catalog/properties/property-length-measure_hole.js +15 -15
- package/lib/catalog/properties/property-number.js +12 -10
- package/lib/catalog/properties/property-read-only.js +11 -9
- package/lib/catalog/properties/property-string.js +11 -9
- package/lib/catalog/properties/property-toggle.js +11 -9
- 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 +12 -10
- package/lib/components/disclaimer/disclaimer.js +66 -86
- package/lib/components/style/button.js +8 -9
- package/lib/components/style/content-container.js +5 -4
- package/lib/components/style/content-title.js +2 -3
- package/lib/components/style/form-number-input.js +19 -21
- package/lib/components/style/form-number-input_2.js +16 -19
- package/lib/components/style/form-select.js +0 -3
- package/lib/components/style/form-text-input.js +0 -1
- package/lib/components/viewer2d/area.js +8 -6
- package/lib/components/viewer2d/grids/grid-horizontal-streak.js +8 -7
- package/lib/components/viewer2d/grids/grid-streak.js +8 -7
- package/lib/components/viewer2d/grids/grid-vertical-streak.js +8 -7
- package/lib/components/viewer2d/grids/grids.js +5 -5
- package/lib/components/viewer2d/group.js +13 -10
- package/lib/components/viewer2d/item.js +12 -12
- package/lib/components/viewer2d/layer.js +8 -6
- package/lib/components/viewer2d/line.js +12 -13
- package/lib/components/viewer2d/ruler.js +8 -7
- package/lib/components/viewer2d/rulerDist.js +8 -6
- package/lib/components/viewer2d/rulerX.js +17 -19
- package/lib/components/viewer2d/rulerY.js +15 -17
- package/lib/components/viewer2d/scene.js +9 -13
- package/lib/components/viewer2d/snap.js +8 -6
- package/lib/components/viewer2d/state.js +7 -7
- package/lib/components/viewer2d/vertex.js +7 -5
- package/lib/components/viewer2d/viewer2d.js +19 -20
- package/lib/components/viewer3d/grids/grid-streak.js +0 -1
- 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 +0 -2
- package/lib/components/viewer3d/scene-creator.js +1 -1
- package/lib/components/viewer3d/viewer3d-first-person.js +14 -16
- package/lib/components/viewer3d/viewer3d.js +21 -24
- package/lib/reducers/user-reducer.js +0 -1
- package/lib/utils/geometry.js +1 -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/lib/utils/react-if.js +7 -5
- package/package.json +12 -28
package/es/class/export.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import Project from
|
|
2
|
-
import Group from
|
|
3
|
-
import Layer from
|
|
4
|
-
import Line from
|
|
5
|
-
import Hole from
|
|
6
|
-
import Vertex from
|
|
7
|
-
import Area from
|
|
8
|
-
import Item from
|
|
9
|
-
import FuseUtils from
|
|
10
|
-
import { HorizontalGuide, VerticalGuide } from
|
|
1
|
+
import Project from "./project";
|
|
2
|
+
import Group from "./group";
|
|
3
|
+
import Layer from "./layer";
|
|
4
|
+
import Line from "./line";
|
|
5
|
+
import Hole from "./hole";
|
|
6
|
+
import Vertex from "./vertex";
|
|
7
|
+
import Area from "./area";
|
|
8
|
+
import Item from "./item";
|
|
9
|
+
import FuseUtils from "./FuseUtils";
|
|
10
|
+
import { HorizontalGuide, VerticalGuide } from "./guide";
|
|
11
11
|
export { Project, Group, FuseUtils, Layer, Line, Hole, Vertex, Area, Item, HorizontalGuide, VerticalGuide };
|
|
12
12
|
export default {
|
|
13
13
|
Project: Project,
|
package/es/class/group.js
CHANGED
|
@@ -10,10 +10,10 @@ function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o =
|
|
|
10
10
|
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
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); }
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import { Group as GroupModel } from
|
|
16
|
-
import {
|
|
13
|
+
import { Area, Hole, Item, Layer, Line, Project, Vertex } from "./export";
|
|
14
|
+
import { List, Map } from 'immutable';
|
|
15
|
+
import { Group as GroupModel } from "../models";
|
|
16
|
+
import { GeometryUtils, IDBroker } from "../utils/export";
|
|
17
17
|
var Group = /*#__PURE__*/function () {
|
|
18
18
|
function Group() {
|
|
19
19
|
_classCallCheck(this, Group);
|
package/es/class/guide.js
CHANGED
|
@@ -4,7 +4,7 @@ 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 { IDBroker } from
|
|
7
|
+
import { IDBroker } from "../utils/export";
|
|
8
8
|
var HorizontalGuide = /*#__PURE__*/function () {
|
|
9
9
|
function HorizontalGuide() {
|
|
10
10
|
_classCallCheck(this, HorizontalGuide);
|
package/es/class/hole.js
CHANGED
|
@@ -4,12 +4,11 @@ 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 {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { GeometryUtils } from '../utils/export';
|
|
7
|
+
import { fromJS, List, Map } from 'immutable';
|
|
8
|
+
import { Group, Layer } from "./export";
|
|
9
|
+
import { GeometryUtils, IDBroker } from "../utils/export";
|
|
10
|
+
import { addLineSegmentSnap, nearestSnap } from "../utils/snap";
|
|
11
|
+
import { MODE_DRAGGING_HOLE, MODE_DRAGGING_HOLE_3D, MODE_DRAWING_HOLE, MODE_DRAWING_HOLE_3D, MODE_IDLE, MODE_IDLE_3D } from "../constants";
|
|
13
12
|
var Hole = /*#__PURE__*/function () {
|
|
14
13
|
function Hole() {
|
|
15
14
|
_classCallCheck(this, Hole);
|
package/es/class/item.js
CHANGED
|
@@ -14,15 +14,13 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
14
14
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
15
|
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); }
|
|
16
16
|
import convert from 'convert-units';
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import { hasMoldingLayout } from '../utils/molding';
|
|
25
|
-
import { getInstallationSuffix } from '../components/viewer2d/utils';
|
|
17
|
+
import { Group, Hole, Layer } from "./export";
|
|
18
|
+
import { GeometryUtils, IDBroker, MoldingUtils, NameGenerator } from "../utils/export";
|
|
19
|
+
import { fromJS, Map } from 'immutable';
|
|
20
|
+
import { INSTALLATION_SUFFIX_TYPE, MODE_DRAGGING_ITEM, MODE_DRAGGING_ITEM_3D, MODE_DRAWING_ITEM, MODE_DRAWING_ITEM_3D, MODE_IDLE, MODE_IDLE_3D, MODE_ROTATING_ITEM, MODE_ROTATING_ITEM_3D, MOLDING_LOCATIONS } from "../constants";
|
|
21
|
+
import { debugUtil } from "../utils/helper";
|
|
22
|
+
import { hasMoldingLayout } from "../utils/molding";
|
|
23
|
+
import { getInstallationSuffix } from "../components/viewer2d/utils";
|
|
26
24
|
var allItemRect;
|
|
27
25
|
var allItemSnap;
|
|
28
26
|
var allLines;
|
|
@@ -726,7 +724,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
726
724
|
value: function beginDraggingItem(state, layerID, itemID, x, y) {
|
|
727
725
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
728
726
|
time1 = debugUtil();
|
|
729
|
-
if (
|
|
727
|
+
if (!item) return;
|
|
730
728
|
state = state.merge({
|
|
731
729
|
mode: MODE_DRAGGING_ITEM,
|
|
732
730
|
draggingSupport: Map({
|
|
@@ -747,7 +745,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
747
745
|
value: function beginDraggingItem3D(state, layerID, itemID, x, y) {
|
|
748
746
|
var item = state.getIn(['scene', 'layers', layerID, 'items', itemID]);
|
|
749
747
|
state = state.setIn(['scene', 'isEndDragging'], false);
|
|
750
|
-
if (
|
|
748
|
+
if (!item) return {
|
|
751
749
|
updatedState: state
|
|
752
750
|
};
|
|
753
751
|
state = state.merge({
|
|
@@ -780,7 +778,7 @@ var Item = /*#__PURE__*/function () {
|
|
|
780
778
|
var diffX = startPointX - x;
|
|
781
779
|
var diffY = startPointY - y;
|
|
782
780
|
var item = scene.getIn(['layers', layerID, 'items', itemID]);
|
|
783
|
-
if (
|
|
781
|
+
if (!item) return {
|
|
784
782
|
updatedState: state
|
|
785
783
|
};
|
|
786
784
|
var tX = originalX - diffX;
|
package/es/class/layer.js
CHANGED
|
@@ -5,10 +5,10 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
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 { List } from 'immutable';
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import { Layer as LayerModel } from
|
|
11
|
-
import { isEmpty } from
|
|
8
|
+
import { Area, Hole, Item, Line, Project, Vertex } from "./export";
|
|
9
|
+
import { GeometryUtils, GraphInnerCycles, IDBroker } from "../utils/export";
|
|
10
|
+
import { Layer as LayerModel } from "../models";
|
|
11
|
+
import { isEmpty } from "../utils/helper";
|
|
12
12
|
var sameSet = function sameSet(set1, set2) {
|
|
13
13
|
return set1.size === set2.size && set1.isSuperset(set2) && set1.isSubset(set2);
|
|
14
14
|
};
|
package/es/class/line.js
CHANGED
|
@@ -11,11 +11,11 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
|
|
|
11
11
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
12
12
|
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); }
|
|
13
13
|
import { fromJS, List, Map } from 'immutable';
|
|
14
|
-
import { Group, Hole, Layer, Vertex } from
|
|
15
|
-
import { GeometryUtils, history, IDBroker, NameGenerator, SnapSceneUtils, SnapUtils } from
|
|
14
|
+
import { Group, Hole, Layer, Vertex } from "./export";
|
|
15
|
+
import { GeometryUtils, history, IDBroker, NameGenerator, SnapSceneUtils, SnapUtils } from "../utils/export";
|
|
16
16
|
import * as Three from 'three';
|
|
17
|
-
import { END_DRAGGING_LINE, END_DRAGGING_VERTEX, END_DRAWING_LINE, EPSILON, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_DRAGGING_LINE, MODE_DRAWING_LINE, MODE_IDLE, MODE_WAITING_DRAWING_LINE, UNIT_ANGLE } from
|
|
18
|
-
import { isEmpty } from
|
|
17
|
+
import { END_DRAGGING_LINE, END_DRAGGING_VERTEX, END_DRAWING_LINE, EPSILON, MIN_ANGLE_DISALLOW_DRAW_WALL, MODE_DRAGGING_LINE, MODE_DRAWING_LINE, MODE_IDLE, MODE_WAITING_DRAWING_LINE, UNIT_ANGLE } from "../constants";
|
|
18
|
+
import { isEmpty } from "../utils/helper";
|
|
19
19
|
var timeGlobal = 0;
|
|
20
20
|
var TimeRecorder = /*#__PURE__*/function () {
|
|
21
21
|
function TimeRecorder(name) {
|
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
|
-
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
|
|
2
|
+
//import PropTypes from 'prop-types';
|
|
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,
|
|
@@ -95,12 +95,13 @@ export default function Content(_ref, _ref2) {
|
|
|
95
95
|
}
|
|
96
96
|
}
|
|
97
97
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
|
|
99
|
+
// Content.propTypes = {
|
|
100
|
+
// state: PropTypes.object.isRequired,
|
|
101
|
+
// width: PropTypes.number.isRequired,
|
|
102
|
+
// height: PropTypes.number.isRequired,
|
|
103
|
+
// replaceCabinet: PropTypes.func.isRequired
|
|
104
|
+
// };
|
|
105
|
+
// Content.contextTypes = {
|
|
106
|
+
// projectActions: PropTypes.object.isRequired
|
|
107
|
+
// };
|
|
@@ -1,80 +1,62 @@
|
|
|
1
1
|
import React, { useEffect } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
borderRadius: 100,
|
|
61
|
-
padding: '16px 72px',
|
|
62
|
-
textTransform: 'none',
|
|
63
|
-
fontWeight: 500,
|
|
64
|
-
fontSize: '1rem',
|
|
65
|
-
'&:hover': {
|
|
66
|
-
backgroundColor: '#7c3aed'
|
|
67
|
-
},
|
|
68
|
-
'&:active': {
|
|
69
|
-
backgroundColor: '#5a25c2'
|
|
70
|
-
},
|
|
71
|
-
'&:disabled': {
|
|
72
|
-
backgroundColor: '#F3E5F5',
|
|
73
|
-
color: '#1D1B20'
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
});
|
|
2
|
+
var styles = {
|
|
3
|
+
root: {
|
|
4
|
+
display: 'flex',
|
|
5
|
+
justifyContent: 'center',
|
|
6
|
+
alignItems: 'center',
|
|
7
|
+
backgroundColor: '#D1C4E9',
|
|
8
|
+
background: 'url("/assets/img/svg/disclaimer/background.svg") no-repeat center',
|
|
9
|
+
backgroundSize: 'cover',
|
|
10
|
+
padding: '16px',
|
|
11
|
+
height: '100dvh',
|
|
12
|
+
width: '100dvw'
|
|
13
|
+
},
|
|
14
|
+
card: {
|
|
15
|
+
display: 'flex',
|
|
16
|
+
flexDirection: 'column',
|
|
17
|
+
alignItems: 'center',
|
|
18
|
+
backgroundColor: '#fff',
|
|
19
|
+
borderRadius: 24,
|
|
20
|
+
width: '85vw',
|
|
21
|
+
textAlign: 'center',
|
|
22
|
+
boxShadow: '0 8px 20px rgba(0,0,0,0.08)',
|
|
23
|
+
height: 'fit-content',
|
|
24
|
+
opacity: '90%',
|
|
25
|
+
gap: '1rem',
|
|
26
|
+
padding: '1.5rem',
|
|
27
|
+
maxWidth: '364px'
|
|
28
|
+
},
|
|
29
|
+
title: {
|
|
30
|
+
fontWeight: 'bold',
|
|
31
|
+
fontSize: '1.5rem',
|
|
32
|
+
lineHeight: '133%',
|
|
33
|
+
letterSpacing: '0px',
|
|
34
|
+
textAlign: 'center',
|
|
35
|
+
verticalAlign: 'middle',
|
|
36
|
+
maxWidth: '200px'
|
|
37
|
+
},
|
|
38
|
+
body: {
|
|
39
|
+
fontWeight: 400,
|
|
40
|
+
fontStyle: 'normal',
|
|
41
|
+
fontSize: '0.875rem',
|
|
42
|
+
lineHeight: '143%',
|
|
43
|
+
letterSpacing: '0.17px',
|
|
44
|
+
color: '#49454F',
|
|
45
|
+
maxWidth: '90%'
|
|
46
|
+
},
|
|
47
|
+
button: {
|
|
48
|
+
marginTop: '0.5rem',
|
|
49
|
+
backgroundColor: '#6750A4',
|
|
50
|
+
color: '#fff',
|
|
51
|
+
borderRadius: 100,
|
|
52
|
+
padding: '16px 72px',
|
|
53
|
+
textTransform: 'none',
|
|
54
|
+
fontWeight: 500,
|
|
55
|
+
fontSize: '1rem',
|
|
56
|
+
border: 'none',
|
|
57
|
+
cursor: 'pointer'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
78
60
|
export default function DisclaimerScreen(_ref) {
|
|
79
61
|
var _ref$open = _ref.open,
|
|
80
62
|
open = _ref$open === void 0 ? true : _ref$open,
|
|
@@ -85,7 +67,6 @@ export default function DisclaimerScreen(_ref) {
|
|
|
85
67
|
message = _ref$message === void 0 ? /*#__PURE__*/React.createElement(React.Fragment, null, "We\u2019re adding the finishing touches to the mobile version.", /*#__PURE__*/React.createElement("br", null), "In the meantime, try our desktop version to start designing your dream room.") : _ref$message,
|
|
86
68
|
_ref$buttonText = _ref.buttonText,
|
|
87
69
|
buttonText = _ref$buttonText === void 0 ? 'Close' : _ref$buttonText;
|
|
88
|
-
var classes = useStyles();
|
|
89
70
|
useEffect(function () {
|
|
90
71
|
var viewportMeta = document.querySelector('meta[name="viewport"]');
|
|
91
72
|
if (!viewportMeta) {
|
|
@@ -97,21 +78,20 @@ export default function DisclaimerScreen(_ref) {
|
|
|
97
78
|
}, []);
|
|
98
79
|
if (!open) return null;
|
|
99
80
|
return /*#__PURE__*/React.createElement("div", {
|
|
100
|
-
|
|
81
|
+
style: styles.root
|
|
101
82
|
}, /*#__PURE__*/React.createElement("div", {
|
|
102
|
-
|
|
83
|
+
style: styles.card
|
|
103
84
|
}, /*#__PURE__*/React.createElement("img", {
|
|
104
85
|
width: 40,
|
|
105
86
|
height: 40,
|
|
106
87
|
alt: "loog",
|
|
107
88
|
src: '/assets/img/svg/disclaimer/logo-dots.svg'
|
|
108
|
-
}), /*#__PURE__*/React.createElement(
|
|
109
|
-
|
|
110
|
-
}, titleTop), /*#__PURE__*/React.createElement(
|
|
111
|
-
|
|
112
|
-
}, message), /*#__PURE__*/React.createElement(
|
|
113
|
-
|
|
114
|
-
className: classes.button,
|
|
89
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
90
|
+
style: styles.title
|
|
91
|
+
}, titleTop), /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
style: styles.body
|
|
93
|
+
}, message), /*#__PURE__*/React.createElement("button", {
|
|
94
|
+
style: styles.button,
|
|
115
95
|
onClick: onClose
|
|
116
96
|
}, buttonText)));
|
|
117
97
|
}
|
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,
|
|
@@ -16,8 +16,8 @@ function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? O
|
|
|
16
16
|
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); }
|
|
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
|
-
import PropTypes from 'prop-types';
|
|
20
|
-
import * as SharedStyle from
|
|
19
|
+
//import PropTypes from 'prop-types';
|
|
20
|
+
import * as SharedStyle from "../../shared-style";
|
|
21
21
|
var BASE_STYLE = {
|
|
22
22
|
display: 'inline-block',
|
|
23
23
|
fontWeight: '400',
|
|
@@ -105,9 +105,10 @@ Button.defaultProps = {
|
|
|
105
105
|
borderColor: '#8c8c8c'
|
|
106
106
|
}
|
|
107
107
|
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
108
|
+
|
|
109
|
+
// Button.propTypes = {
|
|
110
|
+
// type: PropTypes.string,
|
|
111
|
+
// style: PropTypes.object,
|
|
112
|
+
// styleHover: PropTypes.object,
|
|
113
|
+
// size: PropTypes.oneOf(['large', 'normal', 'small'])
|
|
114
|
+
// };
|
|
@@ -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'
|
|
@@ -5,7 +5,8 @@ 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 React from 'react';
|
|
8
|
-
import PropTypes from 'prop-types';
|
|
8
|
+
//import PropTypes from 'prop-types';
|
|
9
|
+
|
|
9
10
|
var STYLE = {
|
|
10
11
|
padding: '0 20px',
|
|
11
12
|
overflowY: 'auto'
|
|
@@ -9,8 +9,8 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
9
9
|
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; }
|
|
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
|
-
import PropTypes from 'prop-types';
|
|
13
|
-
import * as SharedStyle from
|
|
12
|
+
//import PropTypes from 'prop-types';
|
|
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
|
|
@@ -14,10 +14,10 @@ function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new T
|
|
|
14
14
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
15
15
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
16
16
|
import React, { Component } from 'react';
|
|
17
|
-
import PropTypes from 'prop-types';
|
|
18
|
-
import {
|
|
17
|
+
//import PropTypes from 'prop-types';
|
|
18
|
+
import { DEFAULT_FONT_FAMILY, KEYBOARD_BUTTON_CODE, SECONDARY_PURPLE_COLOR, TEXT_COLOR_NEUTRAL_0 } from "../../constants";
|
|
19
19
|
import styled from 'styled-components';
|
|
20
|
-
import { isValidNumber } from
|
|
20
|
+
import { isValidNumber } from "../../utils/helper";
|
|
21
21
|
var StyledInput = styled.input(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: block;\n padding: 15px 25px 12px 0px;\n width: 120px;\n color: ", ";\n background-color: rgb(255, 255, 255);\n border: 2px solid;\n text-align: right;\n float: right;\n font-family: ", ";\n font-size: 16px;\n font-weight: 600;\n line-height: 17px;\n border-radius: 5px;\n outline: 0;\n :focus {\n border-color: ", ";\n }\n"])), TEXT_COLOR_NEUTRAL_0, DEFAULT_FONT_FAMILY, SECONDARY_PURPLE_COLOR);
|
|
22
22
|
var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
23
23
|
function FormNumberInput(props, context) {
|
|
@@ -158,26 +158,25 @@ var FormNumberInput = /*#__PURE__*/function (_Component) {
|
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
160
|
}]);
|
|
161
|
-
}(Component);
|
|
161
|
+
}(Component); // FormNumberInput.propTypes = {
|
|
162
|
+
// value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
163
|
+
// style: PropTypes.object,
|
|
164
|
+
// onChange: PropTypes.func.isRequired,
|
|
165
|
+
// onValid: PropTypes.func,
|
|
166
|
+
// onInvalid: PropTypes.func,
|
|
167
|
+
// min: PropTypes.number,
|
|
168
|
+
// max: PropTypes.number,
|
|
169
|
+
// precision: PropTypes.number,
|
|
170
|
+
// placeholder: PropTypes.string,
|
|
171
|
+
// labelName: PropTypes.string,
|
|
172
|
+
// isCeiling: PropTypes.string
|
|
173
|
+
// };
|
|
174
|
+
// FormNumberInput.contextTypes = {
|
|
175
|
+
// translator: PropTypes.object.isRequired,
|
|
176
|
+
// projectActions: PropTypes.object.isRequired,
|
|
177
|
+
// linesActions: PropTypes.object.isRequired
|
|
178
|
+
// };
|
|
162
179
|
export { FormNumberInput as default };
|
|
163
|
-
FormNumberInput.propTypes = {
|
|
164
|
-
value: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
|
|
165
|
-
style: PropTypes.object,
|
|
166
|
-
onChange: PropTypes.func.isRequired,
|
|
167
|
-
onValid: PropTypes.func,
|
|
168
|
-
onInvalid: PropTypes.func,
|
|
169
|
-
min: PropTypes.number,
|
|
170
|
-
max: PropTypes.number,
|
|
171
|
-
precision: PropTypes.number,
|
|
172
|
-
placeholder: PropTypes.string,
|
|
173
|
-
labelName: PropTypes.string,
|
|
174
|
-
isCeiling: PropTypes.string
|
|
175
|
-
};
|
|
176
|
-
FormNumberInput.contextTypes = {
|
|
177
|
-
translator: PropTypes.object.isRequired,
|
|
178
|
-
projectActions: PropTypes.object.isRequired,
|
|
179
|
-
linesActions: PropTypes.object.isRequired
|
|
180
|
-
};
|
|
181
180
|
FormNumberInput.defaultProps = {
|
|
182
181
|
value: 0,
|
|
183
182
|
style: {},
|